!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}return e.assertZonePatched=function(){if(t.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(e,"root",{get:function(){for(var t=e.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"current",{get:function(){return P.zone},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),e.__load_patch=function(i,a){if(O.hasOwnProperty(i)){if(o)throw Error("Already loaded patch: "+i)}else if(!t["__Zone_disable_"+i]){var u="Zone:"+i;n(u),O[i]=a(t,e,F),r(u,u)}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]},e.prototype.getZoneWith=function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null},e.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},e.prototype.wrap=function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}},e.prototype.run=function(t,e,n,r){P={parent:P,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{P=P.parent}},e.prototype.runGuarded=function(t,e,n,r){void 0===e&&(e=null),P={parent:P,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{P=P.parent}},e.prototype.runTask=function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||y).name+"; Execution: "+this.name+")");if(t.state!==m||t.type!==T&&t.type!==E){var r=t.state!=k;r&&t._transitionTo(k,_),t.runCount++;var o=j;j=t,P={parent:P,zone:this};try{t.type==E&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{t.state!==m&&t.state!==w&&(t.type==T||t.data&&t.data.isPeriodic?r&&t._transitionTo(_,k):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(m,k,m))),P=P.parent,j=o}}},e.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);e=e.parent}t._transitionTo(b,m);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(r){throw t._transitionTo(w,b,m),this._zoneDelegate.handleError(this,r),r}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==b&&t._transitionTo(_,b),t},e.prototype.scheduleMicroTask=function(t,e,n,r){return this.scheduleTask(new s(x,t,e,n,r,void 0))},e.prototype.scheduleMacroTask=function(t,e,n,r,o){return this.scheduleTask(new s(E,t,e,n,r,o))},e.prototype.scheduleEventTask=function(t,e,n,r,o){return this.scheduleTask(new s(T,t,e,n,r,o))},e.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||y).name+"; Execution: "+this.name+")");t._transitionTo(S,_,k);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(w,S),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(m,S),t.runCount=0,t},e.prototype._updateTaskCount=function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t})},t}(),s=function(){function e(n,r,o,i,a,u){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=u,this.callback=o;var c=this;this.invoke=n===T&&i&&i.useG?e.invokeTask:function(){return e.invokeTask.call(t,c,this,arguments)}}return e.invokeTask=function(t,e,n){t||(t=this),M++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==M&&g(),M--}},Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.cancelScheduleRequest=function(){this._transitionTo(m,b)},e.prototype._transitionTo=function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+e+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=t,t==m&&(this._zoneDelegates=null)},e.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},e}(),f=U("setTimeout"),l=U("Promise"),h=U("then"),p=[],v=!1;function d(e){if(0===M&&0===p.length)if(i||t[l]&&(i=t[l].resolve(0)),i){var n=i[h];n||(n=i.then),n.call(i,g)}else t[f](g,0);e&&p.push(e)}function g(){if(!v){for(v=!0;p.length;){var t=p;p=[];for(var e=0;e=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};Zone.__load_patch("ZoneAwarePromise",function(e,n,r){var o=Object.getOwnPropertyDescriptor,i=Object.defineProperty,a=r.symbol,u=[],c=a("Promise"),s=a("then"),f="__creationTrace__";r.onUnhandledError=function(t){if(r.showUncaughtError()){var e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},r.microtaskDrainDone=function(){for(;u.length;)for(var t=function(){var t=u.shift();try{t.zone.runGuarded(function(){throw t})}catch(e){h(e)}};u.length;)t()};var l=a("unhandledPromiseRejectionHandler");function h(t){r.onUnhandledError(t);try{var e=n[l];e&&"function"==typeof e&&e.call(this,t)}catch(o){}}function p(t){return t&&t.then}function v(t){return t}function d(t){return D.reject(t)}var g=a("state"),y=a("value"),m=a("finally"),b=a("parentPromiseValue"),_=a("parentPromiseState"),k="Promise.then",S=null,w=!0,x=!1,E=0;function T(t,e){return function(n){try{j(t,e,n)}catch(r){j(t,!1,r)}}}var O=function(){var t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},F="Promise resolved with itself",P=a("currentTaskTrace");function j(t,e,o){var a,c=O();if(t===o)throw new TypeError(F);if(t[g]===S){var s=null;try{"object"!=typeof o&&"function"!=typeof o||(s=o&&o.then)}catch(d){return c(function(){j(t,!1,d)})(),t}if(e!==x&&o instanceof D&&o.hasOwnProperty(g)&&o.hasOwnProperty(y)&&o[g]!==S)I(o),j(t,o[g],o[y]);else if(e!==x&&"function"==typeof s)try{s.call(o,c(T(t,e)),c(T(t,!1)))}catch(d){c(function(){j(t,!1,d)})()}else{t[g]=e;var l=t[y];if(t[y]=o,t[m]===m&&e===w&&(t[g]=t[_],t[y]=t[b]),e===x&&o instanceof Error){var h=n.currentTask&&n.currentTask.data&&n.currentTask.data[f];h&&i(o,P,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p1?c[1]:null,p=h&&h.signal;return new Promise(function(h,v){var d=e.current.scheduleMacroTask("fetch",l,c,function(){var u,s=e.current;try{s[a]=!0,u=r.apply(t,c)}catch(l){return void v(l)}finally{s[a]=!1}if(!(u instanceof o)){var f=u.constructor;f[i]||n.patchThen(f)}u.then(function(t){"notScheduled"!==d.state&&d.invoke(),h(t)},function(t){"notScheduled"!==d.state&&d.invoke(),v(t)})},function(){if(s)if(p&&p.abortController&&!p.aborted&&"function"==typeof p.abortController.abort&&f)try{e.current[u]=!0,f.call(p.abortController)}finally{e.current[u]=!1}else v("cancel fetch need a AbortController.signal");else v("No AbortController supported, can not cancel fetch")});p&&p.abortController&&(p.abortController.task=d)})}}});var e=Object.getOwnPropertyDescriptor,n=Object.defineProperty,r=Object.getPrototypeOf,o=Object.create,i=Array.prototype.slice,a="addEventListener",u="removeEventListener",c=Zone.__symbol__(a),s=Zone.__symbol__(u),f="true",l="false",h="__zone_symbol__";function p(t,e){return Zone.current.wrap(t,e)}function v(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}var d=Zone.__symbol__,g="undefined"!=typeof window,y=g?window:void 0,m=g&&y||"object"==typeof self&&self||global,b="removeAttribute",_=[null];function k(t,e){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=p(t[n],e+"_"+n));return t}function S(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}var w="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,x=!("nw"in m)&&void 0!==m.process&&"[object process]"==={}.toString.call(m.process),E=!x&&!w&&!(!g||!y.HTMLElement),T=void 0!==m.process&&"[object process]"==={}.toString.call(m.process)&&!w&&!(!g||!y.HTMLElement),O={},F=function(t){if(t=t||m.event){var e=O[t.type];e||(e=O[t.type]=d("ON_PROPERTY"+t.type));var n,r=this||t.target||m,o=r[e];return E&&r===y&&"error"===t.type?!0===(n=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error))&&t.preventDefault():null==(n=o&&o.apply(this,arguments))||n||t.preventDefault(),n}};function P(t,r,o){var i=e(t,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=d("on"+r+"patched");if(!t.hasOwnProperty(a)||!t[a]){delete i.writable,delete i.value;var u=i.get,c=i.set,s=r.substr(2),f=O[s];f||(f=O[s]=d("ON_PROPERTY"+s)),i.set=function(e){var n=this;n||t!==m||(n=m),n&&(n[f]&&n.removeEventListener(s,F),c&&c.apply(n,_),"function"==typeof e?(n[f]=e,n.addEventListener(s,F,!1)):n[f]=null)},i.get=function(){var e=this;if(e||t!==m||(e=m),!e)return null;var n=e[f];if(n)return n;if(u){var o=u&&u.call(this);if(o)return i.set.call(this,o),"function"==typeof e[b]&&e.removeAttribute(r),o}return null},n(t,r,i),t[a]=!0}}}function j(t,e,n){if(e)for(var r=0;r1?new r(t,n):new r(t),l=e(f,"onmessage");return l&&!1===l.configurable?(c=o(f),s=f,[a,u,"send","close"].forEach(function(t){c[t]=function(){var e=i.call(arguments);if(t===a||t===u){var n=e.length>0?e[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);f[r]=c[r]}}return f[t].apply(f,e)}})):c=f,j(c,["close","error","message","open"],s),c};var c=n.WebSocket;for(var s in r)c[s]=r[s]}(0,c)}}var gt=d("unbound");function yt(t,n,r,o){var i=Zone.__symbol__(r);if(!t[i]){var a=t[i]=t[r];t[r]=function(i,u,c){return u&&u.prototype&&o.forEach(function(t){var o,i,a,c,s=n+"."+r+"::"+t,f=u.prototype;if(f.hasOwnProperty(t)){var l=e(f,t);l&&l.value?(l.value=p(l.value,s),c=(a=l).configurable,rt(o=u.prototype,i=t,a=nt(o,i,a),c)):f[t]=p(f[t],s)}else f[t]&&(f[t]=p(f[t],s))}),a.call(t,i,u,c)},A(t[r],a)}}Zone.__load_patch("util",function(t,e,n){n.patchOnProperties=j,n.patchMethod=D,n.bindArguments=k}),Zone.__load_patch("timers",function(t){Y(t,"set","clear","Timeout"),Y(t,"set","clear","Interval"),Y(t,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(t){Y(t,"request","cancel","AnimationFrame"),Y(t,"mozRequest","mozCancel","AnimationFrame"),Y(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(t,e){for(var n=["alert","prompt","confirm"],r=0;r=0&&"function"==typeof n[r.cbIdx]?v(r.name,n[r.cbIdx],r,i):t.apply(e,n)}})}()}),Zone.__load_patch("XHR",function(t,e){!function(f){var l=XMLHttpRequest.prototype,h=l[c],p=l[s];if(!h){var g=t.XMLHttpRequestEventTarget;if(g){var y=g.prototype;h=y[c],p=y[s]}}var m="readystatechange",b="scheduled";function _(t){var e=t.data,r=e.target;r[i]=!1,r[u]=!1;var a=r[o];h||(h=r[c],p=r[s]),a&&p.call(r,m,a);var f=r[o]=function(){if(r.readyState===r.DONE)if(!e.aborted&&r[i]&&t.state===b){var n=r.__zone_symbol__loadfalse;if(n&&n.length>0){var o=t.invoke;t.invoke=function(){for(var n=r.__zone_symbol__loadfalse,i=0;is;)c.call(t,a=u[s++])&&e.push(a);return e}},"1TsA":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},"1sa7":function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},"25dN":function(t,e,n){var r=n("XKFU");r(r.S,"Object",{is:n("g6HL")})},"2OiF":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"2Spj":function(t,e,n){var r=n("XKFU");r(r.P,"Function",{bind:n("8MEG")})},"2atp":function(t,e,n){var r=n("XKFU"),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},"3Lyj":function(t,e,n){var r=n("KroJ");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"4A4+":function(t,e,n){n("2Spj"),n("f3/d"),n("IXt9"),t.exports=n("g3g5").Function},"4LiD":function(t,e,n){"use strict";var r=n("dyZX"),o=n("XKFU"),i=n("KroJ"),a=n("3Lyj"),u=n("Z6vF"),c=n("SlkY"),s=n("9gX7"),f=n("0/R4"),l=n("eeVq"),h=n("XMVh"),p=n("fyDq"),v=n("Xbzi");t.exports=function(t,e,n,d,g,y){var m=r[t],b=m,_=g?"set":"add",k=b&&b.prototype,S={},w=function(t){var e=k[t];i(k,t,"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(y||k.forEach&&!l(function(){(new b).entries().next()}))){var x=new b,E=x[_](y?{}:-0,1)!=x,T=l(function(){x.has(1)}),O=h(function(t){new b(t)}),F=!y&&l(function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)});O||((b=e(function(e,n){s(e,b,t);var r=v(new m,e,b);return null!=n&&c(n,g,r[_],r),r})).prototype=k,k.constructor=b),(T||F)&&(w("delete"),w("has"),g&&w("get")),(F||E)&&w(_),y&&k.clear&&delete k.clear}else b=d.getConstructor(e,t,g,_),a(b.prototype,n),u.NEED=!0;return p(b,t),S[t]=b,o(o.G+o.W+o.F*(b!=m),S),y||d.setStrong(b,t,g),b}},"4R4u":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5:function(t,e,n){t.exports=n("hN/g")},"5Pf0":function(t,e,n){var r=n("S/j/"),o=n("OP3Y");n("Xtr8")("getPrototypeOf",function(){return function(t){return o(r(t))}})},"69bn":function(t,e,n){var r=n("y3w9"),o=n("2OiF"),i=n("K0xU")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},"6AQ9":function(t,e,n){"use strict";var r=n("XKFU"),o=n("8a7r");r(r.S+r.F*n("eeVq")(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},"6FMO":function(t,e,n){var r=n("0/R4"),o=n("EWmC"),i=n("K0xU")("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},"7h0T":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isNaN:function(t){return t!=t}})},"8+KV":function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(0),i=n("LyE8")([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},"84bF":function(t,e,n){"use strict";n("OGtf")("small",function(t){return function(){return t(this,"small","","")}})},"8MEG":function(t,e,n){"use strict";var r=n("2OiF"),o=n("0/R4"),i=n("MfQN"),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),c=function(){var r=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in u)){for(var r=[],o=0;o0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},"9P93":function(t,e,n){var r=n("XKFU"),o=Math.imul;r(r.S+r.F*n("eeVq")(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},"9VmF":function(t,e,n){"use strict";var r=n("XKFU"),o=n("ne8i"),i=n("0sh+"),a="".startsWith;r(r.P+r.F*n("UUeW")("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},"9gX7":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},A2zW:function(t,e,n){"use strict";var r=n("XKFU"),o=n("RYi7"),i=n("vvmO"),a=n("l0Rn"),u=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)s[n]=(r+=t*s[n])%1e7,r=c(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)s[e]=c((n+=s[e])/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==s[t]){var n=String(s[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},v=function(t,e,n){return 0===e?n:e%2==1?v(t,e-1,n*t):v(t*t,e/2,n)};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n("eeVq")(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,c=i(this,f),s=o(t),d="",g="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(d="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*v(2,69,1))-69)<0?c*v(2,-e,1):c/v(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=s;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<0?d+((u=g.length)<=s?"0."+a.call("0",s-u)+g:g.slice(0,u-s)+"."+g.slice(u-s)):d+g}})},A5AN:function(t,e,n){"use strict";var r=n("AvRE")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},Afnz:function(t,e,n){"use strict";var r=n("LQAc"),o=n("XKFU"),i=n("KroJ"),a=n("Mukb"),u=n("hPIQ"),c=n("QaDb"),s=n("fyDq"),f=n("OP3Y"),l=n("K0xU")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,v,d,g,y){c(n,e,v);var m,b,_,k=function(t){if(!h&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==d,x=!1,E=t.prototype,T=E[l]||E["@@iterator"]||d&&E[d],O=T||k(d),F=d?w?k("entries"):O:void 0,P="Array"==e&&E.entries||T;if(P&&(_=f(P.call(new t)))!==Object.prototype&&_.next&&(s(_,S,!0),r||"function"==typeof _[l]||a(_,l,p)),w&&T&&"values"!==T.name&&(x=!0,O=function(){return T.call(this)}),r&&!y||!h&&!x&&E[l]||a(E,l,O),u[e]=O,u[S]=p,d)if(m={values:w?O:k("values"),keys:g?O:k("keys"),entries:F},y)for(b in m)b in E||i(E,b,m[b]);else o(o.P+o.F*(h||x),e,m);return m}},AphP:function(t,e,n){"use strict";var r=n("XKFU"),o=n("S/j/"),i=n("apmT");r(r.P+r.F*n("eeVq")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},AvRE:function(t,e,n){var r=n("RYi7"),o=n("vhPU");t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},BC7C:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{fround:n("kcoS")})},"BJ/l":function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log1p:n("1sa7")})},BP8U:function(t,e,n){var r=n("XKFU"),o=n("PKUr");r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},Btvt:function(t,e,n){"use strict";var r=n("I8a+"),o={};o[n("K0xU")("toStringTag")]="z",o+""!="[object z]"&&n("KroJ")(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},"C/va":function(t,e,n){"use strict";var r=n("y3w9");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},CkkT:function(t,e,n){var r=n("m0Pp"),o=n("Ymqv"),i=n("S/j/"),a=n("ne8i"),u=n("zRwo");t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,p=e||u;return function(e,u,v){for(var d,g,y=i(e),m=o(y),b=r(u,v,3),_=a(m.length),k=0,S=n?p(e,_):c?p(e,0):void 0;_>k;k++)if((h||k in m)&&(g=b(d=m[k],k,y),t))if(n)S[k]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return k;case 2:S.push(d)}else if(f)return!1;return l?-1:s||f?f:S}}},CuTL:function(t,e,n){n("fyVe"),n("U2t9"),n("2atp"),n("+auO"),n("MtdB"),n("Jcmo"),n("nzyx"),n("BC7C"),n("x8ZO"),n("9P93"),n("eHKK"),n("BJ/l"),n("pp/T"),n("CyHz"),n("bBoP"),n("x8Yj"),n("hLT2"),t.exports=n("g3g5").Math},CyHz:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{sign:n("lvtm")})},DNiP:function(t,e,n){"use strict";var r=n("XKFU"),o=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},DVgA:function(t,e,n){var r=n("zhAb"),o=n("4R4u");t.exports=Object.keys||function(t){return r(t,o)}},DW2E:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},EK0E:function(t,e,n){"use strict";var r,o=n("CkkT")(0),i=n("KroJ"),a=n("Z6vF"),u=n("czNK"),c=n("ZD67"),s=n("0/R4"),f=n("eeVq"),l=n("s5qY"),h=a.getWeak,p=Object.isExtensible,v=c.ufstore,d={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(s(t)){var e=h(t);return!0===e?v(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},m=t.exports=n("4LiD")("WeakMap",g,y,c,!0,!0);f(function(){return 7!=(new m).set((Object.freeze||Object)(d),7).get(d)})&&(u((r=c.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=m.prototype,n=e[t];i(e,t,function(e,o){if(s(e)&&!p(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},EWmC:function(t,e,n){var r=n("LZWt");t.exports=Array.isArray||function(t){return"Array"==r(t)}},EemH:function(t,e,n){var r=n("UqcF"),o=n("RjD/"),i=n("aCFj"),a=n("apmT"),u=n("aagx"),c=n("xpql"),s=Object.getOwnPropertyDescriptor;e.f=n("nh4g")?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(n){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},FEjr:function(t,e,n){"use strict";n("OGtf")("strike",function(t){return function(){return t(this,"strike","","")}})},FJW5:function(t,e,n){var r=n("hswa"),o=n("y3w9"),i=n("DVgA");t.exports=n("nh4g")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},FLlr:function(t,e,n){var r=n("XKFU");r(r.P,"String",{repeat:n("l0Rn")})},FlsD:function(t,e,n){var r=n("0/R4");n("Xtr8")("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},GNAe:function(t,e,n){var r=n("XKFU"),o=n("PKUr");r(r.G+r.F*(parseInt!=o),{parseInt:o})},H6hf:function(t,e,n){var r=n("y3w9");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t.return;throw void 0!==i&&r(i.call(t)),a}}},"HAE/":function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperty:n("hswa").f})},HEwt:function(t,e,n){"use strict";var r=n("m0Pp"),o=n("XKFU"),i=n("S/j/"),a=n("H6hf"),u=n("M6Qj"),c=n("ne8i"),s=n("8a7r"),f=n("J+6e");o(o.S+o.F*!n("XMVh")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,h=i(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,m=f(h);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),null==m||p==Array&&u(m))for(n=new p(e=c(h.length));e>y;y++)s(n,y,g?d(h[y],y):h[y]);else for(l=m.call(h),n=new p;!(o=l.next()).done;y++)s(n,y,g?a(l,d,[o.value,y],!0):o.value);return n.length=y,n}})},I78e:function(t,e,n){"use strict";var r=n("XKFU"),o=n("+rLv"),i=n("LZWt"),a=n("d/Gc"),u=n("ne8i"),c=[].slice;r(r.P+r.F*n("eeVq")(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=a(t,n),s=a(e,n),f=u(s-o),l=new Array(f),h=0;h1?arguments[1]:void 0)}}),n("nGyu")(i)},"IU+Z":function(t,e,n){"use strict";n("sMXx");var r=n("KroJ"),o=n("Mukb"),i=n("eeVq"),a=n("vhPU"),u=n("K0xU"),c=n("Ugos"),s=u("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=u(t),p=!i(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),v=p?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[h](""),!e}):void 0;if(!p||!v||"replace"===t&&!f||"split"===t&&!l){var d=/./[h],g=n(a,h,""[t],function(t,e,n,r,o){return e.exec===c?p&&!o?{done:!0,value:d.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),y=g[1];r(String.prototype,t,g[0]),o(RegExp.prototype,h,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},IXt9:function(t,e,n){"use strict";var r=n("0/R4"),o=n("OP3Y"),i=n("K0xU")("hasInstance"),a=Function.prototype;i in a||n("hswa").f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},Iw71:function(t,e,n){var r=n("0/R4"),o=n("dyZX").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"J+6e":function(t,e,n){var r=n("I8a+"),o=n("K0xU")("iterator"),i=n("hPIQ");t.exports=n("g3g5").getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},JCqj:function(t,e,n){"use strict";n("OGtf")("sup",function(t){return function(){return t(this,"sup","","")}})},Jcmo:function(t,e,n){var r=n("XKFU"),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},JduL:function(t,e,n){n("Xtr8")("getOwnPropertyNames",function(){return n("e7yV").f})},JiEa:function(t,e){e.f=Object.getOwnPropertySymbols},K0xU:function(t,e,n){var r=n("VTer")("wks"),o=n("ylqs"),i=n("dyZX").Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},KKXr:function(t,e,n){"use strict";var r=n("quPj"),o=n("y3w9"),i=n("69bn"),a=n("A5AN"),u=n("ne8i"),c=n("Xxuz"),s=n("Ugos"),f=Math.min,l=[].push,h=!!function(){try{return new RegExp("x","y")}catch(t){}}();n("IU+Z")("split",2,function(t,e,n,p){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,a,u,c=[],f=0,h=void 0===e?4294967295:e>>>0,p=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(i=s.call(p,o))&&!((a=p.lastIndex)>f&&(c.push(o.slice(f,i.index)),i.length>1&&i.index=h));)p.lastIndex===i.index&&p.lastIndex++;return f===o.length?!u&&p.test("")||c.push(""):c.push(o.slice(f)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):v.call(String(o),n,r)},function(t,e){var r=p(v,t,this,e,v!==n);if(r.done)return r.value;var s=o(t),l=String(this),d=i(s,RegExp),g=s.unicode,y=new d(h?s:"^(?:"+s.source+")",(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(h?"y":"g")),m=void 0===e?4294967295:e>>>0;if(0===m)return[];if(0===l.length)return null===c(y,l)?[l]:[];for(var b=0,_=0,k=[];_document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},L9s1:function(t,e,n){"use strict";var r=n("XKFU"),o=n("0sh+");r(r.P+r.F*n("UUeW")("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},LK8F:function(t,e,n){var r=n("XKFU");r(r.S,"Array",{isArray:n("EWmC")})},LQAc:function(t,e){t.exports=!1},LVwc:function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},LZWt:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},Ljet:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},Lmuc:function(t,e,n){n("xfY5"),n("A2zW"),n("VKir"),n("Ljet"),n("/KAi"),n("fN96"),n("7h0T"),n("sbF8"),n("h/M4"),n("knhD"),n("XfKG"),n("BP8U"),t.exports=n("g3g5").Number},LyE8:function(t,e,n){"use strict";var r=n("eeVq");t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},M6Qj:function(t,e,n){var r=n("hPIQ"),o=n("K0xU")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},MfQN:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},MtdB:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},Mukb:function(t,e,n){var r=n("hswa"),o=n("RjD/");t.exports=n("nh4g")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},N8g3:function(t,e,n){e.f=n("K0xU")},Nr18:function(t,e,n){"use strict";var r=n("S/j/"),o=n("d/Gc"),i=n("ne8i");t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},Nz9U:function(t,e,n){"use strict";var r=n("XKFU"),o=n("aCFj"),i=[].join;r(r.P+r.F*(n("Ymqv")!=Object||!n("LyE8")(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},OEbY:function(t,e,n){n("nh4g")&&"g"!=/./g.flags&&n("hswa").f(RegExp.prototype,"flags",{configurable:!0,get:n("C/va")})},OG14:function(t,e,n){"use strict";var r=n("y3w9"),o=n("g6HL"),i=n("Xxuz");n("IU+Z")("search",1,function(t,e,n,a){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),c=String(this),s=u.lastIndex;o(s,0)||(u.lastIndex=0);var f=i(u,c);return o(u.lastIndex,s)||(u.lastIndex=s),null===f?-1:f.index}]})},OGtf:function(t,e,n){var r=n("XKFU"),o=n("eeVq"),i=n("vhPU"),a=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+""};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},OP3Y:function(t,e,n){var r=n("aagx"),o=n("S/j/"),i=n("YTvA")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},OnI7:function(t,e,n){var r=n("dyZX"),o=n("g3g5"),i=n("LQAc"),a=n("N8g3"),u=n("hswa").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},Oyvg:function(t,e,n){var r=n("dyZX"),o=n("Xbzi"),i=n("hswa").f,a=n("kJMx").f,u=n("quPj"),c=n("C/va"),s=r.RegExp,f=s,l=s.prototype,h=/a/g,p=/a/g,v=new s(h)!==h;if(n("nh4g")&&(!v||n("eeVq")(function(){return p[n("K0xU")("match")]=!1,s(h)!=h||s(p)==p||"/a/i"!=s(h,"i")}))){s=function(t,e){var n=this instanceof s,r=u(t),i=void 0===e;return!n&&r&&t.constructor===s&&i?t:o(v?new f(r&&!i?t.source:t,e):f((r=t instanceof s)?t.source:t,r&&i?c.call(t):e),n?this:l,s)};for(var d=function(t){t in s||i(s,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},g=a(f),y=0;g.length>y;)d(g[y++]);l.constructor=s,s.prototype=l,n("KroJ")(r,"RegExp",s)}n("elZq")("RegExp")},PKUr:function(t,e,n){var r=n("dyZX").parseInt,o=n("qncB").trim,i=n("/e88"),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},QaDb:function(t,e,n){"use strict";var r=n("Kuth"),o=n("RjD/"),i=n("fyDq"),a={};n("Mukb")(a,n("K0xU")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},RW0V:function(t,e,n){var r=n("S/j/"),o=n("DVgA");n("Xtr8")("keys",function(){return function(t){return o(r(t))}})},RYi7:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"RjD/":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"S/j/":function(t,e,n){var r=n("vhPU");t.exports=function(t){return Object(r(t))}},SMB2:function(t,e,n){"use strict";n("OGtf")("bold",function(t){return function(){return t(this,"b","","")}})},SPin:function(t,e,n){"use strict";var r=n("XKFU"),o=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},SRfc:function(t,e,n){"use strict";var r=n("y3w9"),o=n("ne8i"),i=n("A5AN"),a=n("Xxuz");n("IU+Z")("match",1,function(t,e,n,u){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=u(n,t,this);if(e.done)return e.value;var c=r(t),s=String(this);if(!c.global)return a(c,s);var f=c.unicode;c.lastIndex=0;for(var l,h=[],p=0;null!==(l=a(c,s));){var v=String(l[0]);h[p]=v,""===v&&(c.lastIndex=i(s,o(c.lastIndex),f)),p++}return 0===p?null:h}]})},SlkY:function(t,e,n){var r=n("m0Pp"),o=n("H6hf"),i=n("M6Qj"),a=n("y3w9"),u=n("ne8i"),c=n("J+6e"),s={},f={};(e=t.exports=function(t,e,n,l,h){var p,v,d,g,y=h?function(){return t}:c(t),m=r(n,l,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(p=u(t.length);p>b;b++)if((g=e?m(a(v=t[b])[0],v[1]):m(t[b]))===s||g===f)return g}else for(d=y.call(t);!(v=d.next()).done;)if((g=o(d,m,v.value,e))===s||g===f)return g}).BREAK=s,e.RETURN=f},T1qB:function(t,e){!function(t){var e=function(){try{return!!Symbol.iterator}catch(t){return!1}}(),n=function(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e&&(n[Symbol.iterator]=function(){return n}),n},r=function(t){return encodeURIComponent(t).replace(/%20/g,"+")},o=function(t){return decodeURIComponent(t).replace(/\+/g," ")};"URLSearchParams"in t&&"a=1"===new URLSearchParams("?a=1").toString()||function(){var o=function(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var e=typeof t;if("undefined"===e);else if("string"===e)""!==t&&this._fromString(t);else if(t instanceof o){var n=this;t.forEach(function(t,e){n.append(e,t)})}else{if(null===t||"object"!==e)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var r=0;re[0]?1:0}),t._entries&&(t._entries={});for(var n=0;n1?o(r[1]):"")}})}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){if(function(){try{var t=new URL("b","http://a");return t.pathname="c%20d","http://a/c%20d"===t.href&&t.searchParams}catch(e){return!1}}()||function(){var e=t.URL,n=function(e,n){"string"!=typeof e&&(e=String(e));var r,o=document;if(n&&(void 0===t.location||n!==t.location.href)){(r=(o=document.implementation.createHTMLDocument("")).createElement("base")).href=n,o.head.appendChild(r);try{if(0!==r.href.indexOf(n))throw new Error(r.href)}catch(l){throw new Error("URL unable to set base "+n+" due to "+l)}}var i=o.createElement("a");if(i.href=e,r&&(o.body.appendChild(i),i.href=i.href),":"===i.protocol||!/:/.test(i.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:i});var a=new URLSearchParams(this.search),u=!0,c=!0,s=this;["append","delete","set"].forEach(function(t){var e=a[t];a[t]=function(){e.apply(a,arguments),u&&(c=!1,s.search=a.toString(),c=!0)}}),Object.defineProperty(this,"searchParams",{value:a,enumerable:!0});var f=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==f&&(f=this.search,c&&(u=!1,this.searchParams._fromString(this.search),u=!0))}})},r=n.prototype;["hash","host","hostname","port","protocol"].forEach(function(t){!function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}(t)}),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(t){this._anchorElement.search=t,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(this._anchorElement.port!={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol]&&""!==this._anchorElement.port?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0}}),n.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},n.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=n}(),void 0!==t.location&&!("origin"in t.location)){var e=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:e,enumerable:!0})}catch(n){setInterval(function(){t.location.origin=e()},100)}}}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},T39b:function(t,e,n){"use strict";var r=n("wmvG"),o=n("s5qY");t.exports=n("4LiD")("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},Tze0:function(t,e,n){"use strict";n("qncB")("trim",function(t){return function(){return t(this,3)}})},U2t9:function(t,e,n){var r=n("XKFU"),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},UUeW:function(t,e,n){var r=n("K0xU")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},Ugos:function(t,e,n){"use strict";var r,o,i=n("C/va"),a=RegExp.prototype.exec,u=String.prototype.replace,c=a,s=(o=/b*/g,a.call(r=/a/,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=void 0!==/()??/.exec("")[1];(s||f)&&(c=function(t){var e,n,r,o,c=this;return f&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),s&&(e=c.lastIndex),r=a.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),f&&r&&r.length>1&&u.call(r[0],n,function(){for(o=1;oa;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},WLL4:function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperties:n("FJW5")})},XKFU:function(t,e,n){var r=n("dyZX"),o=n("g3g5"),i=n("Mukb"),a=n("KroJ"),u=n("m0Pp"),c=function(t,e,n){var s,f,l,h,p=t&c.F,v=t&c.G,d=t&c.P,g=t&c.B,y=v?r:t&c.S?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),b=m.prototype||(m.prototype={});for(s in v&&(n=e),n)l=((f=!p&&y&&void 0!==y[s])?y:n)[s],h=g&&f?u(l,r):d&&"function"==typeof l?u(Function.call,l):l,y&&a(y,s,l,t&c.U),m[s]!=l&&i(m,s,h),d&&b[s]!=l&&(b[s]=l)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},XMVh:function(t,e,n){var r=n("K0xU")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:n=!0}},i[r]=function(){return u},t(i)}catch(a){}return n}},Xbzi:function(t,e,n){var r=n("0/R4"),o=n("i5dc").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},XfKG:function(t,e,n){var r=n("XKFU"),o=n("11IZ");r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},XfO3:function(t,e,n){"use strict";var r=n("AvRE")(!0);n("Afnz")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},Xtr8:function(t,e,n){var r=n("XKFU"),o=n("g3g5"),i=n("eeVq");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},Xxuz:function(t,e,n){"use strict";var r=n("I8a+"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},YJVH:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(4);r(r.P+r.F*!n("LyE8")([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},YTvA:function(t,e,n){var r=n("VTer")("keys"),o=n("ylqs");t.exports=function(t){return r[t]||(r[t]=o(t))}},Ymqv:function(t,e,n){var r=n("LZWt");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Z6vF:function(t,e,n){var r=n("ylqs")("meta"),o=n("0/R4"),i=n("aagx"),a=n("hswa").f,u=0,c=Object.isExtensible||function(){return!0},s=!n("eeVq")(function(){return c(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},ZD67:function(t,e,n){"use strict";var r=n("3Lyj"),o=n("Z6vF").getWeak,i=n("y3w9"),a=n("0/R4"),u=n("9gX7"),c=n("SlkY"),s=n("CkkT"),f=n("aagx"),l=n("s5qY"),h=s(5),p=s(6),v=0,d=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=v++,t._l=void 0,null!=r&&c(r,n,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).has(t):n&&f(n,this._i)}}),s},def:function(t,e,n){var r=o(i(e),!0);return!0===r?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},Zshi:function(t,e,n){var r=n("0/R4");n("Xtr8")("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},Zz4T:function(t,e,n){"use strict";n("OGtf")("sub",function(t){return function(){return t(this,"sub","","")}})},a1Th:function(t,e,n){"use strict";n("OEbY");var r=n("y3w9"),o=n("C/va"),i=n("nh4g"),a=/./.toString,u=function(t){n("KroJ")(RegExp.prototype,"toString",t,!0)};n("eeVq")(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=a.name&&u(function(){return a.call(this)})},aCFj:function(t,e,n){var r=n("Ymqv"),o=n("vhPU");t.exports=function(t){return r(o(t))}},aagx:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},apmT:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},bBoP:function(t,e,n){var r=n("XKFU"),o=n("LVwc"),i=Math.exp;r(r.S+r.F*n("eeVq")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},bDcW:function(t,e,n){"use strict";n("OGtf")("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},bHtr:function(t,e,n){var r=n("XKFU");r(r.P,"Array",{fill:n("Nr18")}),n("nGyu")("fill")},bWfx:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(1);r(r.P+r.F*!n("LyE8")([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},czNK:function(t,e,n){"use strict";var r=n("DVgA"),o=n("JiEa"),i=n("UqcF"),a=n("S/j/"),u=n("Ymqv"),c=Object.assign;t.exports=!c||n("eeVq")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,s=1,f=o.f,l=i.f;c>s;)for(var h,p=u(arguments[s++]),v=f?r(p).concat(f(p)):r(p),d=v.length,g=0;d>g;)l.call(p,h=v[g++])&&(n[h]=p[h]);return n}:c},"d/Gc":function(t,e,n){var r=n("RYi7"),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},"dE+T":function(t,e,n){var r=n("XKFU");r(r.P,"Array",{copyWithin:n("upKx")}),n("nGyu")("copyWithin")},dQfE:function(t,e,n){n("XfO3"),n("LK8F"),n("HEwt"),n("6AQ9"),n("Nz9U"),n("I78e"),n("Vd3H"),n("8+KV"),n("bWfx"),n("0l/t"),n("dZ+Y"),n("YJVH"),n("DNiP"),n("SPin"),n("V+eJ"),n("mGWK"),n("dE+T"),n("bHtr"),n("dRSK"),n("INYr"),n("0E+W"),n("yt8O"),t.exports=n("g3g5").Array},dRSK:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")("find")},"dZ+Y":function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(3);r(r.P+r.F*!n("LyE8")([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},dyZX:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e7yV:function(t,e,n){var r=n("aCFj"),o=n("kJMx").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(e){return a.slice()}}(t):o(r(t))}},eHKK:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},eI33:function(t,e,n){var r=n("XKFU"),o=n("aCFj"),i=n("ne8i");r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u=0:l>h;h+=p)h in f&&(u=e(u,f[h],h,s));return u}},"f3/d":function(t,e,n){var r=n("hswa").f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n("nh4g")&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},fN96:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isInteger:n("nBIS")})},fyDq:function(t,e,n){var r=n("hswa").f,o=n("aagx"),i=n("K0xU")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},fyVe:function(t,e,n){var r=n("XKFU"),o=n("1sa7"),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},g3g5:function(t,e){var n=t.exports={version:"2.6.2"};"number"==typeof __e&&(__e=n)},g4EE:function(t,e,n){"use strict";var r=n("y3w9"),o=n("apmT");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},g6HL:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},"h/M4":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},h7Nl:function(t,e,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n("KroJ")(r,"toString",function(){var t=i.call(this);return t==t?o.call(this):"Invalid Date"})},hEkN:function(t,e,n){"use strict";n("OGtf")("anchor",function(t){return function(e){return t(this,"a","name",e)}})},hHhE:function(t,e,n){var r=n("XKFU");r(r.S,"Object",{create:n("Kuth")})},hLT2:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},"hN/g":function(t,e,n){"use strict";n.r(e),n("vqGA"),n("99sg"),n("4A4+"),n("oka+"),n("ifmr"),n("Lmuc"),n("CuTL"),n("V5/Y"),n("nx1v"),n("dQfE"),n("rfyP"),n("qKs0"),n("hYbK"),n("VXxg"),n("0TWp"),n("T1qB")},hPIQ:function(t,e){t.exports={}},hYbK:function(t,e,n){n("Btvt"),n("yt8O"),n("EK0E"),t.exports=n("g3g5").WeakMap},hswa:function(t,e,n){var r=n("y3w9"),o=n("xpql"),i=n("apmT"),a=Object.defineProperty;e.f=n("nh4g")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},i5dc:function(t,e,n){var r=n("0/R4"),o=n("y3w9"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},ifmr:function(t,e,n){n("tyy+"),t.exports=n("g3g5").parseFloat},ioFf:function(t,e,n){"use strict";var r=n("dyZX"),o=n("aagx"),i=n("nh4g"),a=n("XKFU"),u=n("KroJ"),c=n("Z6vF").KEY,s=n("eeVq"),f=n("VTer"),l=n("fyDq"),h=n("ylqs"),p=n("K0xU"),v=n("N8g3"),d=n("OnI7"),g=n("1MBn"),y=n("EWmC"),m=n("y3w9"),b=n("0/R4"),_=n("aCFj"),k=n("apmT"),S=n("RjD/"),w=n("Kuth"),x=n("e7yV"),E=n("EemH"),T=n("hswa"),O=n("DVgA"),F=E.f,P=T.f,j=x.f,M=r.Symbol,I=r.JSON,U=I&&I.stringify,D=p("_hidden"),A=p("toPrimitive"),L={}.propertyIsEnumerable,C=f("symbol-registry"),R=f("symbols"),Z=f("op-symbols"),K=Object.prototype,X="function"==typeof M,z=r.QObject,N=!z||!z.prototype||!z.prototype.findChild,q=i&&s(function(){return 7!=w(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=F(K,e);r&&delete K[e],P(t,e,n),r&&t!==K&&P(K,e,r)}:P,V=function(t){var e=R[t]=w(M.prototype);return e._k=t,e},W=X&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},G=function(t,e,n){return t===K&&G(Z,e,n),m(t),e=k(e,!0),m(n),o(R,e)?(n.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),n=w(n,{enumerable:S(0,!1)})):(o(t,D)||P(t,D,S(1,{})),t[D][e]=!0),q(t,e,n)):P(t,e,n)},H=function(t,e){m(t);for(var n,r=g(e=_(e)),o=0,i=r.length;i>o;)G(t,n=r[o++],e[n]);return t},B=function(t){var e=L.call(this,t=k(t,!0));return!(this===K&&o(R,t)&&!o(Z,t))&&(!(e||!o(this,t)||!o(R,t)||o(this,D)&&this[D][t])||e)},Y=function(t,e){if(t=_(t),e=k(e,!0),t!==K||!o(R,e)||o(Z,e)){var n=F(t,e);return!n||!o(R,e)||o(t,D)&&t[D][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=j(_(t)),r=[],i=0;n.length>i;)o(R,e=n[i++])||e==D||e==c||r.push(e);return r},Q=function(t){for(var e,n=t===K,r=j(n?Z:_(t)),i=[],a=0;r.length>a;)!o(R,e=r[a++])||n&&!o(K,e)||i.push(R[e]);return i};X||(u((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===K&&e.call(Z,n),o(this,D)&&o(this[D],t)&&(this[D][t]=!1),q(this,t,S(1,n))};return i&&N&&q(K,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function(){return this._k}),E.f=Y,T.f=G,n("kJMx").f=x.f=J,n("UqcF").f=B,n("JiEa").f=Q,i&&!n("LQAc")&&u(K,"propertyIsEnumerable",B,!0),v.f=function(t){return V(p(t))}),a(a.G+a.W+a.F*!X,{Symbol:M});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)p($[tt++]);for(var et=O(p.store),nt=0;et.length>nt;)d(et[nt++]);a(a.S+a.F*!X,"Symbol",{for:function(t){return o(C,t+="")?C[t]:C[t]=M(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){N=!0},useSimple:function(){N=!1}}),a(a.S+a.F*!X,"Object",{create:function(t,e){return void 0===e?w(t):H(w(t),e)},defineProperty:G,defineProperties:H,getOwnPropertyDescriptor:Y,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),I&&a(a.S+a.F*(!X||s(function(){var t=M();return"[null]"!=U([t])||"{}"!=U({a:t})||"{}"!=U(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,U.apply(I,r)}}),M.prototype[A]||n("Mukb")(M.prototype,A,M.prototype.valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},jqX0:function(t,e,n){var r=n("XKFU"),o=n("jtBr");r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},jtBr:function(t,e,n){"use strict";var r=n("eeVq"),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},kJMx:function(t,e,n){var r=n("zhAb"),o=n("4R4u").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},kcoS:function(t,e,n){var r=n("lvtm"),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),s=r(t);return ou||n!=n?s*(1/0):s*n}},knhD:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},l0Rn:function(t,e,n){"use strict";var r=n("RYi7"),o=n("vhPU");t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},lvtm:function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},m0Pp:function(t,e,n){var r=n("2OiF");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},mGWK:function(t,e,n){"use strict";var r=n("XKFU"),o=n("aCFj"),i=n("RYi7"),a=n("ne8i"),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n("LyE8")(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},mYba:function(t,e,n){var r=n("aCFj"),o=n("EemH").f;n("Xtr8")("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},mura:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},nBIS:function(t,e,n){var r=n("0/R4"),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},nGyu:function(t,e,n){var r=n("K0xU")("unscopables"),o=Array.prototype;null==o[r]&&n("Mukb")(o,r,{}),t.exports=function(t){o[r][t]=!0}},nIY7:function(t,e,n){"use strict";n("OGtf")("big",function(t){return function(){return t(this,"big","","")}})},ne8i:function(t,e,n){var r=n("RYi7"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},nh4g:function(t,e,n){t.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},nsiH:function(t,e,n){"use strict";n("OGtf")("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},nx1v:function(t,e,n){n("eM6i"),n("AphP"),n("jqX0"),n("h7Nl"),n("yM4b"),t.exports=Date},nzyx:function(t,e,n){var r=n("XKFU"),o=n("LVwc");r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},oDIu:function(t,e,n){"use strict";var r=n("XKFU"),o=n("AvRE")(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},"oka+":function(t,e,n){n("GNAe"),t.exports=n("g3g5").parseInt},pIFo:function(t,e,n){"use strict";var r=n("y3w9"),o=n("S/j/"),i=n("ne8i"),a=n("RYi7"),u=n("A5AN"),c=n("Xxuz"),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n("IU+Z")("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),h=String(this),p="function"==typeof e;p||(e=String(e));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=c(l,h);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=u(h,i(l.lastIndex),y))}for(var _,k="",S=0,w=0;w=S&&(k+=h.slice(S,E)+j,S=E+x.length)}return k+h.slice(S)}];function d(t,e,r,i,a,u){var c=r+t.length,s=i.length,f=p;return void 0!==a&&(a=o(a),f=h),n.call(u,f,function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":u=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>s){var h=l(f/10);return 0===h?n:h<=s?void 0===i[h-1]?o.charAt(1):i[h-1]+o.charAt(1):n}u=i[f-1]}return void 0===u?"":u})}})},"pp/T":function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},qKs0:function(t,e,n){n("Btvt"),n("XfO3"),n("rGqo"),n("9AAn"),t.exports=n("g3g5").Map},qncB:function(t,e,n){var r=n("XKFU"),o=n("vhPU"),i=n("eeVq"),a=n("/e88"),u="["+a+"]",c=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),f=function(t,e,n){var o={},u=i(function(){return!!a[t]()||"\u200b\x85"!="\u200b\x85"[t]()}),c=o[t]=u?e(l):a[t];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},l=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(s,"")),t};t.exports=f},quPj:function(t,e,n){var r=n("0/R4"),o=n("LZWt"),i=n("K0xU")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},rGqo:function(t,e,n){for(var r=n("yt8O"),o=n("DVgA"),i=n("KroJ"),a=n("dyZX"),u=n("Mukb"),c=n("hPIQ"),s=n("K0xU"),f=s("iterator"),l=s("toStringTag"),h=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(p),d=0;d1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},s5qY:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},sMXx:function(t,e,n){"use strict";var r=n("Ugos");n("XKFU")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},sbF8:function(t,e,n){var r=n("XKFU"),o=n("nBIS"),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},tUrg:function(t,e,n){"use strict";n("OGtf")("link",function(t){return function(e){return t(this,"a","href",e)}})},"tyy+":function(t,e,n){var r=n("XKFU"),o=n("11IZ");r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},upKx:function(t,e,n){"use strict";var r=n("S/j/"),o=n("d/Gc"),i=n("ne8i");t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),c=o(e,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:o(s,a))-c,a-u),l=1;for(c0;)c in n?n[u]=n[c]:delete n[u],u+=l,c+=l;return n}},vhPU:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},vqGA:function(t,e,n){n("ioFf"),n("Btvt"),t.exports=n("g3g5").Symbol},vvmO:function(t,e,n){var r=n("LZWt");t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},w2a5:function(t,e,n){var r=n("aCFj"),o=n("ne8i"),i=n("d/Gc");t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},wmvG:function(t,e,n){"use strict";var r=n("hswa").f,o=n("Kuth"),i=n("3Lyj"),a=n("m0Pp"),u=n("9gX7"),c=n("SlkY"),s=n("Afnz"),f=n("1TsA"),l=n("elZq"),h=n("nh4g"),p=n("Z6vF").fastKey,v=n("s5qY"),d=h?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,s){var f=t(function(t,r){u(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[d]=0,null!=r&&c(r,n,t[s],t)});return i(f.prototype,{clear:function(){for(var t=v(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var n=v(this,e),r=g(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[d]--}return!!r},forEach:function(t){v(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(v(this,e),t)}}),h&&r(f.prototype,"size",{get:function(){return v(this,e)[d]}}),f},def:function(t,e,n){var r,o,i=g(t,e);return i?i.v=n:(t._l=i={i:o=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[d]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,e,n){s(t,e,function(t,n){this._t=v(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},x8Yj:function(t,e,n){var r=n("XKFU"),o=n("LVwc"),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},x8ZO:function(t,e,n){var r=n("XKFU"),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,u=arguments.length,c=0;a0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(i)}})},xfY5:function(t,e,n){"use strict";var r=n("dyZX"),o=n("aagx"),i=n("LZWt"),a=n("Xbzi"),u=n("apmT"),c=n("eeVq"),s=n("kJMx").f,f=n("EemH").f,l=n("hswa").f,h=n("qncB").trim,p=r.Number,v=p,d=p.prototype,g="Number"==i(n("Kuth")(d)),y="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=y?e.trim():h(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,c=e.slice(2),s=0,f=c.length;so)return NaN;return parseInt(c,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?c(function(){d.valueOf.call(n)}):"Number"!=i(n))?a(new v(m(e)),n,p):m(e)};for(var b,_=n("nh4g")?s(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;_.length>k;k++)o(v,b=_[k])&&!o(p,b)&&l(p,b,f(v,b));p.prototype=d,d.constructor=p,n("KroJ")(r,"Number",p)}},xpql:function(t,e,n){t.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(t,e,n){var r=n("0/R4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},yM4b:function(t,e,n){var r=n("K0xU")("toPrimitive"),o=Date.prototype;r in o||n("Mukb")(o,r,n("g4EE"))},ylqs:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},yt8O:function(t,e,n){"use strict";var r=n("nGyu"),o=n("1TsA"),i=n("hPIQ"),a=n("aCFj");t.exports=n("Afnz")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},z2o2:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},zRwo:function(t,e,n){var r=n("6FMO");t.exports=function(t,e){return new(r(t))(e)}},zhAb:function(t,e,n){var r=n("aagx"),o=n("aCFj"),i=n("w2a5")(!1),a=n("YTvA")("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}}},[[5,0]]]); //# sourceMappingURL=polyfills.420b6b4c7fe4ffe78405.js.map (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},1:function(t,e){},2:function(t,e){},"2yAJ":function(t,e){function n(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,i,r,o,s){return n((a=n(n(e,t),n(r,s)))<<(l=o)|a>>>32-l,i);var a,l}function r(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function o(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}function l(t,e){var i,l,u,c,h;t[e>>5]|=128<>>9<<4)]=e;var p=1732584193,d=-271733879,f=-1732584194,g=271733878;for(i=0;i>5]>>>e%32&255);return n}function c(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(255&t.charCodeAt(e/8))<>>4&15)+"0123456789abcdef".charAt(15&e);return i}function p(t){return unescape(encodeURIComponent(t))}function d(t){return function(t){return u(l(c(t),8*t.length))}(p(t))}function f(t,e){return function(t,e){var n,i,r=c(t),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=l(r,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=l(o.concat(c(e)),512+8*e.length),u(l(s.concat(i),640))}(p(t),p(e))}t.exports=function(t,e,n){return e?n?f(e,t):h(f(e,t)):n?d(t):h(d(t))}},3:function(t,e){},4:function(t,e){},"4af/":function(t,e,n){var i=n("vYjF"),r={collectWindowErrors:!0,debug:!1},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=[].slice,a="?",l=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function u(){return"undefined"==typeof document||null==document.location?"":document.location.href}r.report=function(){var t,e,n=[],c=null,h=null,p=null;function d(t,e){var i=null;if(!e||r.collectWindowErrors){for(var o in n)if(n.hasOwnProperty(o))try{n[o].apply(null,[t].concat(s.call(arguments,2)))}catch(a){i=a}if(i)throw i}}function f(e,n,o,s,c){var h=i.isErrorEvent(c)?c.error:c,f=i.isErrorEvent(e)?e.message:e;if(p)r.computeStackTrace.augmentStackTraceWithInitialElement(p,n,o,f),g();else if(h&&i.isError(h))d(r.computeStackTrace(h),!0);else{var m,v={url:n,line:o,column:s},y=void 0;"[object String]"==={}.toString.call(f)&&(m=f.match(l))&&(y=m[1],f=m[2]),v.func=a,d({name:y,message:f,url:u(),stack:[v]},!0)}return!!t&&t.apply(this,arguments)}function g(){var t=p,e=c;c=null,p=null,h=null,d.apply(null,[t,!1].concat(e))}function m(t,e){var n=s.call(arguments,1);if(p){if(h===t)return;g()}var i=r.computeStackTrace(t);if(p=i,h=t,c=n,setTimeout(function(){h===t&&g()},i.incomplete?2e3:0),!1!==e)throw t}return m.subscribe=function(i){e||(t=o.onerror,o.onerror=f,e=!0),n.push(i)},m.unsubscribe=function(t){for(var e=n.length-1;e>=0;--e)n[e]===t&&n.splice(e,1)},m.uninstall=function(){e&&(o.onerror=t,e=!1,t=void 0),n=[]},m}(),r.computeStackTrace=function(){function t(t){if(void 0!==t.stack&&t.stack){for(var e,n,i,r=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack||[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,h=t.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(t.message),0),f=h.length;d eval")>-1&&(e=l.exec(n[3]))?(n[3]=e[1],n[4]=e[2],n[5]=null):0!==d||n[5]||void 0===t.columnNumber||(p[0].column=t.columnNumber+1),i={url:n[3],func:n[1]||a,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}if(!i.func&&i.line&&(i.func=a),i.url&&"blob:"===i.url.substr(0,5)){var m=new XMLHttpRequest;if(m.open("GET",i.url,!1),m.send(null),200===m.status){var v=m.responseText||"",y=(v=v.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(y){var b=y[1];"~"===b.charAt(0)&&(b=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+b.slice(1)),i.url=b.slice(0,-4)}}}p.push(i)}return p.length?{name:t.name,message:t.message,url:u(),stack:p}:null}}function e(t,e,n,i){var r={url:e,line:n};if(r.url&&r.line){if(t.incomplete=!1,r.func||(r.func=a),t.stack.length>0&&t.stack[0].url===r.url){if(t.stack[0].line===r.line)return!1;if(!t.stack[0].line&&t.stack[0].func===r.func)return t.stack[0].line=r.line,!1}return t.stack.unshift(r),t.partial=!0,!0}return t.incomplete=!0,!1}function n(t,o){for(var s,l,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,h=[],p={},d=!1,f=n.caller;f&&!d;f=f.caller)if(f!==i&&f!==r.report){if(l={url:null,func:a,line:null,column:null},f.name?l.func=f.name:(s=c.exec(f.toString()))&&(l.func=s[1]),void 0===l.func)try{l.func=s.input.substring(0,s.input.indexOf("{"))}catch(m){}p[""+f]?d=!0:p[""+f]=!0,h.push(l)}o&&h.splice(0,o);var g={name:t.name,message:t.message,url:u(),stack:h};return e(g,t.sourceURL||t.fileName,t.line||t.lineNumber),g}function i(e,i){var o=null;i=null==i?0:+i;try{if(o=t(e))return o}catch(s){if(r.debug)throw s}try{if(o=n(e,i+1))return o}catch(s){if(r.debug)throw s}return{name:e.name,message:e.message,url:u()}}return i.augmentStackTraceWithInitialElement=e,i.computeStackTraceFromStackProp=t,i}(),t.exports=r},AKyF:function(t,e,n){var i=n("vYjF");t.exports={wrapMethod:function(t,e,n){var r=t[e],o=t;if(e in t){var s="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),a=i.safeJoin(t," "),l={level:s,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(a="Assertion failed: "+(i.safeJoin(t.slice(1)," ")||"console.assert"),l.extra.arguments=t.slice(1),n&&n(a,l)):n&&n(a,l),r&&Function.prototype.apply.call(r,o,t)}}}}},Aqzh:function(t,e,n){t.exports=function(){"use strict";var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===e}(t)}(t)},e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?r(Array.isArray(t)?[]:{},t,e):t}function i(t,e,i){return t.concat(e).map(function(t){return n(t,i)})}function r(e,o,s){(s=s||{}).arrayMerge=s.arrayMerge||i,s.isMergeableObject=s.isMergeableObject||t;var a=Array.isArray(o);return a===Array.isArray(e)?a?s.arrayMerge(e,o,s):function(t,e,i){var o={};return i.isMergeableObject(t)&&Object.keys(t).forEach(function(e){o[e]=n(t[e],i)}),Object.keys(e).forEach(function(s){o[s]=i.isMergeableObject(e[s])&&t[s]?r(t[s],e[s],i):n(e[s],i)}),o}(e,o,s):n(o,s)}return r.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,n){return r(t,n,e)},{})},r}()},BjAV:function(t,e){function n(t,e){for(var n=0;n0){var a=n(i,this);~a?i.splice(a+1):i.push(this),~a?r.splice(a,1/0,o):r.push(o),~n(i,s)&&(s=e.call(this,o,s))}else i.push(s);return null==t?s instanceof Error?function(t){var e={stack:t.stack,message:t.message,name:t.name};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(s):s:t.call(this,o,s)}}(t.exports=function(t,e,n,r){return JSON.stringify(t,i(e,r),n)}).getSerialize=i},Iab2:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function e(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){o(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(t){var e=new XMLHttpRequest;return e.open("HEAD",t,!1),e.send(),200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,o=r.saveAs||"object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(t,o,s){var a=r.URL||r.webkitURL,l=document.createElement("a");l.download=o=o||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?i(l):n(l.href)?e(t,o,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(t),setTimeout(function(){a.revokeObjectURL(l.href)},4e4),setTimeout(function(){i(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,r,o){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Depricated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,o),r);else if(n(t))e(t,r,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout(function(){i(s)})}}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var s="application/octet-stream"===t.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var c=r.URL||r.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}};r.saveAs=o.saveAs=o,t.exports=o})?i.apply(e,[]):i)||(t.exports=r)},J9Y1:function(t,e,n){var i;!function(){function r(t,e,n){return t.call.apply(t.bind,arguments)}function o(t,e,n){if(!t)throw Error();if(2=e.f?r():t.fonts.load(function(t){return k(t)+" "+t.f+"00 300px "+C(t.c)}(e.a),e.h).then(function(t){1<=t.length?i():setTimeout(o,25)},function(){r()})}()}),r=null,o=new Promise(function(t,n){r=setTimeout(n,e.f)});Promise.race([o,i]).then(function(){r&&(clearTimeout(r),r=null),e.g(e.a)},function(){e.j(e.a)})};var F={D:"serif",C:"sans-serif"},L=null;function N(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function B(t,e,n){for(var i in F)if(F.hasOwnProperty(i)&&e===t.f[F[i]]&&n===t.f[F[i]])return!0;return!1}function V(t,e){setTimeout(s(function(){p(this.g.a),p(this.h.a),p(this.j.a),p(this.m.a),e(this.a)},t),0)}function z(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}M.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),function t(e){var n,i=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(n=i===e.f.serif&&r===e.f["sans-serif"])||(n=N()&&B(e,i,r)),n?a()-e.A>=e.w?N()&&B(e,i,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?V(e,e.v):V(e,e.B):function(e){setTimeout(s(function(){t(this)},e),50)}(e):V(e,e.v)}(this)};var H=null;function W(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),I(t,"active")):T(t.a))}function U(t){this.j=t,this.a=new A,this.h=0,this.f=this.g=!0}function X(t,e,n,i,r){var o=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=r||null,a=i||{};if(0===n.length&&o)T(e.a);else{e.f+=n.length,o&&(e.j=o);var l,u=[];for(l=0;l0,C.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,C.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","instantiated_by_use","clip-path"],C.DPI=96,C.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",C.fontPaths={},C.iMatrix=[1,0,0,1,0,0],C.canvasModule="canvas",C.perfLimitSizeTotal=2097152,C.maxCacheSideLimit=4096,C.minCacheSideLimit=256,C.charWidthsCache={},C.textureSize=2048,C.enableGLFiltering=!0,C.devicePixelRatio=C.window.devicePixelRatio||C.window.webkitDevicePixelRatio||C.window.mozDevicePixelRatio||1,C.browserShadowBlurConstant=1,C.arcToSegmentsCache={},C.boundsOfCurveCache={},C.cachesBoundsOfCurve=!0,C.initFilterBackend=function(){return C.enableGLFiltering&&C.isWebglSupported&&C.isWebglSupported(C.textureSize)?(console.log("max texture size: "+C.maxTextureSize),new C.WebglFilterBackend({tileSize:C.textureSize})):C.Canvas2dFilterBackend?new C.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=C),function(){function t(t,e){if(this.__eventListeners[t]){var n=this.__eventListeners[t];e?n[n.indexOf(e)]=!1:C.util.array.fill(n,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in t)this.on(n,t[n]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function n(e,n){if(this.__eventListeners){if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var i in e)t.call(this,i,e[i]);else t.call(this,e,n);return this}}function i(t,e){if(this.__eventListeners){var n=this.__eventListeners[t];if(n){for(var i=0,r=n.length;i-1},complexity:function(){return this._objects.reduce(function(t,e){return t+(e.complexity?e.complexity():0)},0)}},C.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof C.Gradient||this.set(e,new C.Gradient(t))},_initPattern:function(t,e,n){!t||!t.source||t instanceof C.Pattern?n&&n():this.set(e,new C.Pattern(t,n))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=C.util.getFunctionBody(t.clipTo);void 0!==e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):this._set(t,"function"==typeof e&&"clipTo"!==t?e(this.get(t)):e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},i=e,r=Math.sqrt,o=Math.atan2,s=Math.pow,a=Math.abs,l=Math.PI/180,u=Math.PI/2,C.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/u){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=1;switch(t<0&&(e=-1),t/u){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var n=t.indexOf(e);return-1!==n&&t.splice(n,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*l},radiansToDegrees:function(t){return t/l},rotatePoint:function(t,e,n){t.subtractEquals(e);var i=C.util.rotateVector(t,n);return new C.Point(i.x,i.y).addEquals(e)},rotateVector:function(t,e){var n=C.util.sin(e),i=C.util.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}},transformPoint:function(t,e,n){return n?new C.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new C.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t){var e=[t[0].x,t[1].x,t[2].x,t[3].x],n=C.util.array.min(e),i=C.util.array.max(e)-n,r=[t[0].y,t[1].y,t[2].y,t[3].y],o=C.util.array.min(r);return{left:n,top:o,width:i,height:C.util.array.max(r)-o}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),n=[e*t[3],-e*t[1],-e*t[2],e*t[0]],i=C.util.transformPoint({x:t[4],y:t[5]},n,!0);return n[4]=-i.x,n[5]=-i.y,n},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var n=/\D{0,2}$/.exec(t),i=parseFloat(t);switch(e||(e=C.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return i*C.DPI/25.4;case"cm":return i*C.DPI/2.54;case"in":return i*C.DPI;case"pt":return i*C.DPI/72;case"pc":return i*C.DPI/72*12;case"em":return i*e;default:return i}},falseFunction:function(){return!1},getKlass:function(t,e){return t=C.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),C.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"])}return e},resolveNamespace:function(t){if(!t)return C;var e,n=t.split("."),r=n.length,o=i||C.window;for(e=0;ee;)(e+=a[d++%p])>c&&(e=c),t[f?"lineTo":"moveTo"](e,0),f=!f;t.restore()},createCanvasElement:function(){return C.document.createElement("canvas")},copyCanvasElement:function(t){var e=C.util.createCanvasElement();return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},toDataURL:function(t,e,n){return t.toDataURL("image/"+e,n)},createImage:function(){return C.document.createElement("img")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,n){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],n?0:t[0]*e[4]+t[2]*e[5]+t[4],n?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var e=o(t[1],t[0]),n=s(t[0],2)+s(t[1],2),i=r(n),a=(t[0]*t[3]-t[2]*t[1])/i,u=o(t[0]*t[2]+t[1]*t[3],n);return{angle:e/l,scaleX:i,scaleY:a,skewX:u/l,skewY:0,translateX:t[4],translateY:t[5]}},customTransformMatrix:function(t,e,n){var i=[1,0,a(Math.tan(n*l)),1],r=[a(t),0,0,a(e)];return C.util.multiplyTransformMatrices(r,i,!0)},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,n,i){i>0&&(e>i?e-=i:e=0,n>i?n-=i:n=0);var r,o=!0,s=t.getImageData(e,n,2*i||1,2*i||1),a=s.data.length;for(r=3;r0?D-=2*h:1===l&&D<0&&(D+=2*h);for(var R=Math.ceil(Math.abs(D/h*2)),j=[],M=D/R,F=8/3*Math.sin(M/4)*Math.sin(M/4)/Math.sin(M/2),L=P+M,N=0;N=r?o-r:2*Math.PI-(r-o)}function r(e,n,i,r,o,s,a,l){var u;if(C.cachesBoundsOfCurve&&(u=t.call(arguments),C.boundsOfCurveCache[u]))return C.boundsOfCurveCache[u];var c,h,p,d,f,g,m,v,y=Math.sqrt,b=Math.min,_=Math.max,w=Math.abs,x=[],S=[[],[]];h=6*e-12*i+6*o,c=-3*e+9*i-9*o+3*a,p=3*i-3*e;for(var k=0;k<2;++k)if(k>0&&(h=6*n-12*r+6*s,c=-3*n+9*r-9*s+3*l,p=3*r-3*n),w(c)<1e-12){if(w(h)<1e-12)continue;0<(d=-p/h)&&d<1&&x.push(d)}else(m=h*h-4*p*c)<0||(0<(f=(-h+(v=y(m)))/(2*c))&&f<1&&x.push(f),0<(g=(-h-v)/(2*c))&&g<1&&x.push(g));for(var E,O=x.length,T=O;O--;)S[0][O]=(E=1-(d=x[O]))*E*E*e+3*E*E*d*i+3*E*d*d*o+d*d*d*a,S[1][O]=E*E*E*n+3*E*E*d*r+3*E*d*d*s+d*d*d*l;S[0][T]=e,S[1][T]=n,S[0][T+1]=a,S[1][T+1]=l;var I=[{x:b.apply(null,S[0]),y:b.apply(null,S[1])},{x:_.apply(null,S[0]),y:_.apply(null,S[1])}];return C.cachesBoundsOfCurve&&(C.boundsOfCurveCache[u]=I),I}C.util.drawArc=function(t,n,i,r){for(var o=[[],[],[],[]],s=e(r[5]-n,r[6]-i,r[0],r[1],r[3],r[4],r[2]),a=0,l=s.length;a=e})}}}(),function(){function t(e,n,i){if(i)if(!C.isLikelyNode&&n instanceof Element)e=n;else if(n instanceof Array){e=[];for(var r=0,o=n.length;r57343)return t.charAt(e);if(55296<=n&&n<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var i=t.charCodeAt(e+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var r=t.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}C.util.string={camelize:function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},capitalize:function(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())},escapeXml:function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")},graphemeSplit:function(e){var n,i=0,r=[];for(i=0;i-1?function(t){return function(){var n=this.constructor.superclass;this.constructor.superclass=i;var r=e[t].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==t)return r}}(r):e[r],n&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function r(){}function o(e){for(var n=null,i=this;i.constructor.superclass;){var r=i.constructor.superclass.prototype[e];if(i[e]!==r){n=r;break}i=i.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,t.call(arguments,1)):n.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}C.util.createClass=function(){var n=null,s=t.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"==typeof s[0]&&(n=s.shift()),a.superclass=n,a.subclasses=[],n&&(r.prototype=n.prototype,a.prototype=new r,n.subclasses.push(a));for(var l=0,u=s.length;l=.9999?"":"alpha(opacity="+100*e+")"):n.filter+=" alpha(opacity="+100*e+")",t}),C.util.setStyle=function(t,e){var n=t.style;if(!n)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?x(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var i in e)"opacity"===i?x(t,e[i]):n["float"===i||"cssFloat"===i?void 0===n.styleFloat?"cssFloat":"styleFloat":i]=e[i];return t},function(){var t,e,n,i,r=Array.prototype.slice,o=function(t){return r.call(t,0)};try{t=o(C.document.childNodes)instanceof Array}catch(l){}function s(t,e){var n=C.document.createElement(t);for(var i in e)"class"===i?n.className=e[i]:"for"===i?n.htmlFor=e[i]:n.setAttribute(i,e[i]);return n}function a(t){for(var e=0,n=0,i=C.document.documentElement,r=C.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===C.document?(e=r.scrollLeft||i.scrollLeft||0,n=r.scrollTop||i.scrollTop||0):(e+=t.scrollLeft||0,n+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:n}}t||(o=function(t){for(var e=new Array(t.length),n=t.length;n--;)e[n]=t[n];return e}),e=C.document.defaultView&&C.document.defaultView.getComputedStyle?function(t,e){var n=C.document.defaultView.getComputedStyle(t,null);return n?n[e]:void 0}:function(t,e){var n=t.style[e];return!n&&t.currentStyle&&(n=t.currentStyle[e]),n},i="userSelect"in(n=C.document.documentElement.style)?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",C.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=C.util.falseFunction),i?t.style[i]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},C.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),i?t.style[i]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},C.util.getScript=function(t,e){var n=C.document.getElementsByTagName("head")[0],i=C.document.createElement("script"),r=!0;i.onload=i.onreadystatechange=function(t){if(r){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;r=!1,e(t||C.window.event),i=i.onload=i.onreadystatechange=null}},i.src=t,n.appendChild(i)},C.util.getById=function(t){return"string"==typeof t?C.document.getElementById(t):t},C.util.toArray=o,C.util.makeElement=s,C.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},C.util.wrapElement=function(t,e,n){return"string"==typeof e&&(e=s(e,n)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e},C.util.getScrollLeftTop=a,C.util.getElementOffset=function(t){var n,i,r=t&&t.ownerDocument,o={left:0,top:0},s={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return s;for(var u in l)s[l[u]]+=parseInt(e(t,u),10)||0;return n=r.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),i=a(t),{left:o.left+i.left-(n.clientLeft||0)+s.left,top:o.top+i.top-(n.clientTop||0)+s.top}},C.util.getElementStyle=e,C.util.getNodeCanvas=function(t){var e=C.jsdomImplForWrapper(t);return e._canvas||e._image},C.util.cleanUpJsdomNode=function(t){if(C.isLikelyNode){var e=C.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}}(),function(){function t(){}C.util.request=function(e,n){n||(n={});var i=n.method?n.method.toUpperCase():"GET",r=n.onComplete||function(){},o=new C.window.XMLHttpRequest,s=n.body||n.parameters;return o.onreadystatechange=function(){4===o.readyState&&(r(o),o.onreadystatechange=t)},"GET"===i&&(s=null,"string"==typeof n.parameters&&(e=function(t,e){return t+(/\?/.test(t)?"&":"?")+e}(e,n.parameters))),o.open(i,e,!0),"POST"!==i&&"PUT"!==i||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(s),o}}(),C.log=function(){},C.warn=function(){},"undefined"!=typeof console&&["log","warn"].forEach(function(t){void 0!==console[t]&&"function"==typeof console[t].apply&&(C[t]=function(){return console[t].apply(console,arguments)})}),function(){function t(){return!1}var e=C.window.requestAnimationFrame||C.window.webkitRequestAnimationFrame||C.window.mozRequestAnimationFrame||C.window.oRequestAnimationFrame||C.window.msRequestAnimationFrame||function(t){return C.window.setTimeout(t,1e3/60)},n=C.window.cancelAnimationFrame||C.window.clearTimeout;function i(){return e.apply(C.window,arguments)}C.util.animate=function(e){i(function(n){e||(e={});var r,o=n||+new Date,s=e.duration||500,a=o+s,l=e.onChange||t,u=e.abort||t,c=e.onComplete||t,h=e.easing||function(t,e,n,i){return-n*Math.cos(t/i*(Math.PI/2))+n+e},p="startValue"in e?e.startValue:0,d="endValue"in e?e.endValue:100,f=e.byValue||d-p;e.onStart&&e.onStart(),function t(n){if(u())c(d,1,1);else{var g=(r=n||+new Date)>a?s:r-o,m=g/s,v=h(g,p,f,s),y=Math.abs((v-p)/f);l(v,y,m),r>a?e.onComplete&&e.onComplete():i(t)}}(o)})},C.util.requestAnimFrame=i,C.util.cancelAnimFrame=function(){return n.apply(C.window,arguments)}}(),C.util.animateColor=function(t,e,n,i){var r=new C.Color(t).getSource(),o=new C.Color(e).getSource();C.util.animate(C.util.object.extend(i=i||{},{duration:n||500,startValue:r,endValue:o,byValue:o,easing:function(t,e,n,r){var o,s,a,l;return o=e,s=n,a=i.colorEasing?i.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2)),l="rgba("+parseInt(o[0]+a*(s[0]-o[0]),10)+","+parseInt(o[1]+a*(s[1]-o[1]),10)+","+parseInt(o[2]+a*(s[2]-o[2]),10),(l+=","+(o&&s?parseFloat(o[3]+a*(s[3]-o[3])):1))+")"}}))},function(){function t(t,e,n,i){return t-1&&c>-1&&c-1&&(e="stroke")}else{if("href"===t||"xlink:href"===t)return e;o=l?e.map(s):s(e,r)}else e="";return!l&&isNaN(o)?e:o}function p(t){return new RegExp("^("+t.join("|")+")\\b","i")}function d(t,e){var n,i,r,o=[];for(i=0,r=e.length;i1;)l.shift(),u=n.util.multiplyTransformMatrices(u,l[0]);return u}}();var v=new RegExp("^\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*$");function y(t){var e,i,r,o,a,l,u=t.getAttribute("viewBox"),c=1,h=1,p=t.getAttribute("width"),d=t.getAttribute("height"),f=t.getAttribute("x")||0,g=t.getAttribute("y")||0,m=t.getAttribute("preserveAspectRatio")||"",y=!u||!n.svgViewBoxElementsRegEx.test(t.nodeName)||!(u=u.match(v)),b=!p||!d||"100%"===p||"100%"===d,_=y&&b,w={},x="",C=0,S=0;if(w.width=0,w.height=0,w.toBeParsed=_,_)return w;if(y)return w.width=s(p),w.height=s(d),w;if(e=-parseFloat(u[1]),i=-parseFloat(u[2]),r=parseFloat(u[3]),o=parseFloat(u[4]),b?(w.width=r,w.height=o):(w.width=s(p),w.height=s(d),c=w.width/r,h=w.height/o),"none"!==(m=n.util.parsePreserveAspectRatioAttribute(m)).alignX&&("meet"===m.meetOrSlice&&(h=c=c>h?h:c),"slice"===m.meetOrSlice&&(h=c=c>h?c:h),C=w.width-r*c,S=w.height-o*c,"Mid"===m.alignX&&(C/=2),"Mid"===m.alignY&&(S/=2),"Min"===m.alignX&&(C=0),"Min"===m.alignY&&(S=0)),1===c&&1===h&&0===e&&0===i&&0===f&&0===g)return w;if((f||g)&&(x=" translate("+s(f)+" "+s(g)+") "),w.viewboxTransform=n.parseTransformAttribute(a=x+" matrix("+c+" 0 0 "+h+" "+(e*c+C)+" "+(i*h+S)+") "),"svg"===t.nodeName){for(l=t.ownerDocument.createElement("g");t.firstChild;)l.appendChild(t.firstChild);t.appendChild(l)}else a=(l=t).getAttribute("transform")+a;return l.setAttribute("transform",a),w}function b(t,e){var n=m(t,e.getAttribute("xlink:href").substr(1));if(n&&n.getAttribute("xlink:href")&&b(t,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach(function(t){e.hasAttribute(t)||e.setAttribute(t,n.getAttribute(t))}),!e.children.length)for(var i=n.cloneNode(!0);i.firstChild;)e.appendChild(i.firstChild);e.removeAttribute("xlink:href")}n.parseSVGDocument=function(t,e,i,o){if(t){!function(t){for(var e=d(t,["use","svg:use"]),n=0;e.length&&n/i,""))),!o||!o.documentElement)return e&&e(null),!1;n.parseSVGDocument(o.documentElement,function(t,n,i,r){e&&e(t,n,i,r)},i,r)}})},loadSVGFromString:function(t,e,i,r){var o;if(t=t.trim(),"undefined"!=typeof DOMParser){var s=new DOMParser;s&&s.parseFromString&&(o=s.parseFromString(t,"text/xml"))}else n.window.ActiveXObject&&((o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(t.replace(//i,"")));n.parseSVGDocument(o.documentElement,function(t,n,i,r){e(t,n,i,r)},i,r)}})}(),C.ElementsParser=function(t,e,n,i,r){this.elements=t,this.callback=e,this.options=n,this.reviver=i,this.svgUid=n&&n.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g},(c=C.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},c.createObjects=function(){var t=this;this.elements.forEach(function(e,n){e.setAttribute("svgUid",t.svgUid),t.createObject(e,n)})},c.findTag=function(t){return C[C.util.string.capitalize(t.tagName.replace("svg:",""))]},c.createObject=function(t,e){var n=this.findTag(t);if(n&&n.fromElement)try{n.fromElement(t,this.createCallback(e,t),this.options)}catch(i){C.log(i)}else this.checkIfDone()},c.createCallback=function(t,e){var n=this;return function(i){var r;n.resolveGradient(i,"fill"),n.resolveGradient(i,"stroke"),i instanceof C.Image&&i._originalElement&&(r=i.parsePreserveAspectRatioAttribute(e)),i._removeTransformMatrix(r),n.resolveClipPath(i),n.reviver&&n.reviver(e,i),n.instances[t]=i,n.checkIfDone()}},c.extractPropertyDefinition=function(t,e,n){var i=t[e];if(/^url\(/.test(i)){var r=this.regexUrl.exec(i)[1];return this.regexUrl.lastIndex=0,C[n][this.svgUid][r]}},c.resolveGradient=function(t,e){var n=this.extractPropertyDefinition(t,e,"gradientDefs");n&&t.set(e,C.Gradient.fromElement(n,t))},c.createClipPathCallback=function(t,e){return function(t){t._removeTransformMatrix(),t.fillRule=t.clipRule,e.push(t)}},c.resolveClipPath=function(t){var e,n,i,r,o=this.extractPropertyDefinition(t,"clipPath","clipPaths");if(o){i=[],n=C.util.invertTransform(t.calcTransformMatrix());for(var s=0;st.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,e){return void 0===e&&(e=.5),e=Math.max(Math.min(1,e),0),new i(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},distanceFrom:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new i(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new i(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,n=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=n},clone:function(){return new i(this.x,this.y)}})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});function i(t){this.status=t,this.points=[]}n.Intersection?n.warn("fabric.Intersection is already defined"):(n.Intersection=i,n.Intersection.prototype={constructor:i,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},n.Intersection.intersectLineLine=function(t,e,r,o){var s,a=(o.x-r.x)*(t.y-r.y)-(o.y-r.y)*(t.x-r.x),l=(e.x-t.x)*(t.y-r.y)-(e.y-t.y)*(t.x-r.x),u=(o.y-r.y)*(e.x-t.x)-(o.x-r.x)*(e.y-t.y);if(0!==u){var c=a/u,h=l/u;0<=c&&c<=1&&0<=h&&h<=1?(s=new i("Intersection")).appendPoint(new n.Point(t.x+c*(e.x-t.x),t.y+c*(e.y-t.y))):s=new i}else s=new i(0===a||0===l?"Coincident":"Parallel");return s},n.Intersection.intersectLinePolygon=function(t,e,n){var r,o,s=new i,a=n.length;for(o=0;o0&&(s.status="Intersection"),s},n.Intersection.intersectPolygonPolygon=function(t,e){var n,r=new i,o=t.length;for(n=0;n0&&(r.status="Intersection"),r},n.Intersection.intersectPolygonRectangle=function(t,e,r){var o=e.min(r),s=e.max(r),a=new n.Point(s.x,o.y),l=new n.Point(o.x,s.y),u=i.intersectLinePolygon(o,a,t),c=i.intersectLinePolygon(a,s,t),h=i.intersectLinePolygon(s,l,t),p=i.intersectLinePolygon(l,o,t),d=new i;return d.appendPoints(u.points),d.appendPoints(c.points),d.appendPoints(h.points),d.appendPoints(p.points),d.points.length>0&&(d.status="Intersection"),d})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});function i(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function r(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}n.Color?n.warn("fabric.Color is already defined."):(n.Color=i,n.Color.prototype={_tryParsingColor:function(t){var e;t in i.colorNameMap&&(t=i.colorNameMap[t]),"transparent"===t&&(e=[255,255,255,0]),e||(e=i.sourceFromHex(t)),e||(e=i.sourceFromRgb(t)),e||(e=i.sourceFromHsl(t)),e||(e=[0,0,0,1]),e&&this.setSource(e)},_rgbToHsl:function(t,e,i){var r,o,s,a=n.util.array.max([t/=255,e/=255,i/=255]),l=n.util.array.min([t,e,i]);if(s=(a+l)/2,a===l)r=o=0;else{var u=a-l;switch(o=s>.5?u/(2-a-l):u/(a+l),a){case t:r=(e-i)/u+(e1?1:s,o){var a=o.split(/\s*;\s*/);for(""===a[a.length-1]&&a.pop(),r=a.length;r--;){var l=a[r].split(/\s*:\s*/),u=l[0].trim(),c=l[1].trim();"stop-color"===u?e=c:"stop-opacity"===u&&(i=c)}}return e||(e=t.getAttribute("stop-color")||"rgb(0,0,0)"),i||(i=t.getAttribute("stop-opacity")),n=(e=new C.Color(e)).getAlpha(),i=isNaN(parseFloat(i))?1:parseFloat(i),i*=n,{offset:s,color:e.toRgb(),opacity:i}}var e=C.util.object.clone;function n(t,e,n){var i,r=0,o=1,s="";for(var a in e)"Infinity"===e[a]?e[a]=1:"-Infinity"===e[a]&&(e[a]=0),i=parseFloat(e[a],10),o="string"==typeof e[a]&&/^(\d+\.\d+)%|(\d+)%$/.test(e[a])?.01:1,"x1"===a||"x2"===a||"r2"===a?(o*="objectBoundingBox"===n?t.width:1,r="objectBoundingBox"===n&&t.left||0):"y1"!==a&&"y2"!==a||(o*="objectBoundingBox"===n?t.height:1,r="objectBoundingBox"===n&&t.top||0),e[a]=i*o+r;if("ellipse"===t.type&&null!==e.r2&&"objectBoundingBox"===n&&t.rx!==t.ry){var l=t.ry/t.rx;s=" scale(1, "+l+")",e.y1&&(e.y1/=l),e.y2&&(e.y2/=l)}return s}C.Gradient=C.util.createClass({offsetX:0,offsetY:0,initialize:function(t){t||(t={});var e={};this.id=C.Object.__uid++,this.type=t.type||"linear",e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice(),t.gradientTransform&&(this.gradientTransform=t.gradientTransform),this.offsetX=t.offsetX||this.offsetX,this.offsetY=t.offsetY||this.offsetY},addColorStop:function(t){for(var e in t){var n=new C.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:n.toRgb(),opacity:n.getAlpha()})}return this},toObject:function(t){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return C.util.populateWithProperties(this,e,t),e},toSVG:function(t){var n,i,r,o,s=e(this.coords,!0),a=e(this.colorStops,!0),l=s.r1>s.r2,u=this.gradientTransform?this.gradientTransform.concat():C.iMatrix.concat(),c=t.width/2-this.offsetX,h=t.height/2-this.offsetY;if(a.sort(function(t,e){return t.offset-e.offset}),"path"===t.type&&(c-=t.pathOffset.x,h-=t.pathOffset.y),u[4]-=c,u[5]-=h,o='id="SVGID_'+this.id+'" gradientUnits="userSpaceOnUse"',o+=' gradientTransform="matrix('+u.join(" ")+')" ',"linear"===this.type?r=["\n']:"radial"===this.type&&(r=["\n']),"radial"===this.type){if(l)for((a=a.concat()).reverse(),n=0,i=a.length;n0){var d=p/Math.max(s.r1,s.r2);for(n=0,i=a.length;n\n')}return r.push("linear"===this.type?"\n":"\n"),r.join("")},toLive:function(t){var e,n,i,r=C.util.object.clone(this.coords);if(this.type){for("linear"===this.type?e=t.createLinearGradient(r.x1,r.y1,r.x2,r.y2):"radial"===this.type&&(e=t.createRadialGradient(r.x1,r.y1,r.r1,r.x2,r.y2,r.r2)),n=0,i=this.colorStops.length;n\n\n\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if(void 0!==e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.toFixed;n.Shadow?n.warn("fabric.Shadow is already defined."):(n.Shadow=n.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,initialize:function(t){for(var e in"string"==typeof t&&(t=this._parseShadow(t)),t)this[e]=t[e];this.id=n.Object.__uid++},_parseShadow:function(t){var e=t.trim(),i=n.Shadow.reOffsetsAndBlur.exec(e)||[];return{color:(e.replace(n.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(i[1],10)||0,offsetY:parseInt(i[2],10)||0,blur:parseInt(i[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var e=40,r=40,o=n.Object.NUM_FRACTION_DIGITS,s=n.util.rotateVector({x:this.offsetX,y:this.offsetY},n.util.degreesToRadians(-t.angle)),a=new n.Color(this.color);return t.width&&t.height&&(e=100*i((Math.abs(s.x)+this.blur)/t.width,o)+20,r=100*i((Math.abs(s.y)+this.blur)/t.height,o)+20),t.flipX&&(s.x*=-1),t.flipY&&(s.y*=-1),'\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke};var t={},e=n.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke"].forEach(function(n){this[n]!==e[n]&&(t[n]=this[n])},this),t}}),n.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}(),function(){"use strict";if(C.StaticCanvas)C.warn("fabric.StaticCanvas is already defined.");else{var t=C.util.object.extend,e=C.util.getElementOffset,n=C.util.removeFromArray,i=C.util.toFixed,r=C.util.transformPoint,o=C.util.invertTransform,s=C.util.getNodeCanvas,a=C.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");C.StaticCanvas=C.util.createClass(C.CommonMethods,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:C.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(t,e){var n=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,n),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,n),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,n),e.overlayColor&&this.setOverlayColor(e.overlayColor,n),this.calcOffset()},_isRetinaScaling:function(){return 1!==C.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?C.devicePixelRatio:1},_initRetinaScaling:function(){this._isRetinaScaling()&&(this.lowerCanvasEl.setAttribute("width",this.width*C.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*C.devicePixelRatio),this.contextContainer.scale(C.devicePixelRatio,C.devicePixelRatio))},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,n){return this.__setBgOverlayImage("overlayImage",t,e,n)},setBackgroundImage:function(t,e,n){return this.__setBgOverlayImage("backgroundImage",t,e,n)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,n,i){return"string"==typeof e?C.util.loadImage(e,function(e){if(e){var r=new C.Image(e,i);this[t]=r,r.canvas=this}n&&n(e)},this,i&&i.crossOrigin):(i&&e.setOptions(i),this[t]=e,e&&(e.canvas=this),n&&n(e)),this},__setBgOverlayColor:function(t,e,n){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,n),this},_createCanvasElement:function(){var t=a();if(!t)throw l;if(t.style||(t.style={}),void 0===t.getContext)throw l;return t},_initOptions:function(t){var e=this.lowerCanvasEl;this._setOptions(t),this.width=this.width||parseInt(e.width,10)||0,this.height=this.height||parseInt(e.height,10)||0,this.lowerCanvasEl.style&&(e.width=this.width,e.height=this.height,e.style.width=this.width+"px",e.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){this.lowerCanvasEl=t&&t.getContext?t:C.util.getById(t)||this._createCanvasElement(),C.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var n;for(var i in e=e||{},t)n=t[i],e.cssOnly||(this._setBackstoreDimension(i,t[i]),n+="px",this.hasLostContext=!0),e.backstoreOnly||this._setCssDimension(i,n);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(t){var e,n,i,r=this._activeObject;for(this.viewportTransform=t,n=0,i=this._objects.length;n\n'),this._setSVGBgOverlayColor(n,"backgroundColor"),this._setSVGBgOverlayImage(n,"backgroundImage",e),this._setSVGObjects(n,e),this.clipPath&&n.push("\n"),this._setSVGBgOverlayColor(n,"overlayColor"),this._setSVGBgOverlayImage(n,"overlayImage",e),n.push(""),n.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('\n','\n')},_setSVGHeader:function(t,e){var n,r=e.width||this.width,o=e.height||this.height,s='viewBox="0 0 '+this.width+" "+this.height+'" ',a=C.Object.NUM_FRACTION_DIGITS;e.viewBox?s='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(s='viewBox="'+i(-(n=this.viewportTransform)[4]/n[0],a)+" "+i(-n[5]/n[3],a)+" "+i(this.width/n[0],a)+" "+i(this.height/n[3],a)+'" '),t.push("\n',"Created with Fabric.js ",C.version,"\n","\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(e),"\n")},createSVGClipPathMarkup:function(t){var e=this.clipPath;return e?(e.clipPathId="CLIPPATH_"+C.Object.__uid++,'\n'+this.clipPath.toClipPathSVG(t.reviver)+"\n"):""},createSVGRefElementsMarkup:function(){var t=this;return["backgroundColor","overlayColor"].map(function(e){var n=t[e];if(n&&n.toLive)return n.toSVG(t,!1)}).join("")},createSVGFontFacesMarkup:function(){var t,e,n,i,r,o,s,a,l="",u={},c=C.fontPaths,h=this._objects;for(s=0,a=h.length;s',"\n",l,"","\n"].join("")),l},_setSVGObjects:function(t,e){var n,i,r,o=this._objects;for(i=0,r=o.length;i\n")}else t.push('\n")},sendToBack:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(e=(r=o._objects).length;e--;)n(this._objects,i=r[e]),this._objects.unshift(i);else n(this._objects,t),this._objects.unshift(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(r=o._objects,e=0;e0+u&&(s=o-1,n(this._objects,r),this._objects.splice(s,0,r)),u++;else 0!==(o=this._objects.indexOf(t))&&(s=this._findNewLowerIndex(t,o,e),n(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(t,e,n){var i,r;if(n){for(i=e,r=e-1;r>=0;--r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){i=r;break}}else i=e-1;return i},bringForward:function(t,e){if(!t)return this;var i,r,o,s,a,l=this._activeObject,u=0;if(t===l&&"activeSelection"===t.type)for(i=(a=l._objects).length;i--;)(o=this._objects.indexOf(r=a[i]))"}}),t(C.StaticCanvas.prototype,C.Observable),t(C.StaticCanvas.prototype,C.Collection),t(C.StaticCanvas.prototype,C.DataURLExporter),t(C.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=a();if(!e||!e.getContext)return null;var n=e.getContext("2d");if(!n)return null;switch(t){case"setLineDash":return void 0!==n.setLineDash;default:return null}}}),C.StaticCanvas.prototype.toJSON=C.StaticCanvas.prototype.toObject,C.isLikelyNode&&(C.StaticCanvas.prototype.createPNGStream=function(){var t=s(this.lowerCanvasEl);return t&&t.createPNGStream()},C.StaticCanvas.prototype.createJPEGStream=function(t){var e=s(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),C.BaseBrush=C.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,setShadow:function(t){return this.shadow=new C.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,C.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(t){var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},_setShadow:function(){if(this.shadow){var t=this.canvas.contextTop,e=this.canvas.getZoom();t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*e,t.shadowOffsetX=this.shadow.offsetX*e,t.shadowOffsetY=this.shadow.offsetY*e}},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),C.PencilBrush=C.util.createClass(C.BaseBrush,{initialize:function(t){this.canvas=t,this._points=[]},_drawSegment:function(t,e,n){var i=e.midPointFrom(n);return t.quadraticCurveTo(e.x,e.y,i.x,i.y),i},onMouseDown:function(t){this._prepareForDrawing(t),this._captureDrawingPath(t),this._render()},onMouseMove:function(t){if(this._captureDrawingPath(t)&&this._points.length>1)if(this.needsFullRender)this.canvas.clearContext(this.canvas.contextTop),this._render();else{var e=this._points,n=e.length,i=this.canvas.contextTop;this._saveAndTransform(i),this.oldEnd&&(i.beginPath(),i.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(i,e[n-2],e[n-1],!0),i.stroke(),i.restore()}},onMouseUp:function(){this.oldEnd=void 0,this._finalizeAndAddPath()},_prepareForDrawing:function(t){var e=new C.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return!(this._points.length>1&&t.eq(this._points[this._points.length-1])||(this._points.push(t),0))},_reset:function(){this._points.length=0,this._setBrushStyles();var t=new C.Color(this.color);this.needsFullRender=t.getAlpha()<1,this._setShadow()},_captureDrawingPath:function(t){var e=new C.Point(t.x,t.y);return this._addPoint(e)},_render:function(){var t,e,n=this.canvas.contextTop,i=this._points[0],r=this._points[1];if(this._saveAndTransform(n),n.beginPath(),2===this._points.length&&i.x===r.x&&i.y===r.y){var o=this.width/1e3;i=new C.Point(i.x,i.y),r=new C.Point(r.x,r.y),i.x-=o,r.x+=o}for(n.moveTo(i.x,i.y),t=1,e=this._points.length;t2;for(u&&(a=t[2].xt[e-2].x?1:r.x===t[e-2].x?0:-1,l=r.y>t[e-2].y?1:r.y===t[e-2].y?0:-1),n.push("L ",r.x+a*i," ",r.y+l*i),n},createPath:function(t){var e=new C.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray}),n=new C.Point(e.left+e.width/2,e.top+e.height/2);return n=e.translateToGivenOrigin(n,"center","center",e.originX,e.originY),e.top=n.y,e.left=n.x,this.shadow&&(this.shadow.affectStroke=!0,e.setShadow(this.shadow)),e},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath();var t=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"!==t){var e=this.createPath(t);this.canvas.clearContext(this.canvas.contextTop),this.canvas.add(e),this.canvas.renderAll(),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}else this.canvas.requestRenderAll()}}),C.CircleBrush=C.util.createClass(C.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),n=this.canvas.contextTop;this._saveAndTransform(n),n.fillStyle=e.fill,n.beginPath(),n.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),n.closePath(),n.fill(),n.restore()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t,e,n,i=this.canvas.contextTop,r=this.points;for(this._saveAndTransform(i),t=0,e=r.length;t0&&!this.preserveObjectStacking){e=[],n=[];for(var r=0,o=this._objects.length;r1&&(this._activeObject._objects=n),e.push.apply(e,n)}else e=this._objects;return e},renderAll:function(){return!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop),this.renderCanvas(this.contextContainer,this._chooseObjectsToRender()),this},renderTopLayer:function(t){t.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(t),this.contextTopDirty=!0),t.restore()},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.renderTopLayer(t),this.fire("after:render"),this},_resetCurrentTransform:function(){var t=this._currentTransform;t.target.set({scaleX:t.original.scaleX,scaleY:t.original.scaleY,skewX:t.original.skewX,skewY:t.original.skewY,left:t.original.left,top:t.original.top}),this._shouldCenterTransform(t.target)?("center"!==t.originX&&(t.mouseXSign="right"===t.originX?-1:1),"center"!==t.originY&&(t.mouseYSign="bottom"===t.originY?-1:1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)},containsPoint:function(t,e,n){var i,r=n||this.getPointer(t,!0);return i=e.group&&e.group===this._activeObject&&"activeSelection"===e.group.type?this._normalizePointer(e.group,r):{x:r.x,y:r.y},e.containsPoint(i)||e._findTargetCorner(r)},_normalizePointer:function(t,e){var n=t.calcTransformMatrix(),i=C.util.invertTransform(n),r=this.restorePointerVpt(e);return C.util.transformPoint(r,i)},isTargetTransparent:function(t,e,n){if(t.shouldCache()&&t._cacheCanvas&&t!==this._activeObject){var i=this._normalizePointer(t,{x:e,y:n}),r=Math.max(t.cacheTranslationX+i.x*t.zoomX,0),o=Math.max(t.cacheTranslationY+i.y*t.zoomY,0);return C.util.isTransparent(t._cacheContext,Math.round(r),Math.round(o),this.targetFindTolerance)}var s=this.contextCache,a=t.selectionBackgroundColor,l=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(s),s.save(),s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),t.render(s),s.restore(),t===this._activeObject&&t._renderControls(s,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),t.selectionBackgroundColor=a,C.util.isTransparent(s,e,n,this.targetFindTolerance)},_isSelectionKeyPressed:function(t){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find(function(e){return!0===t[e]}):t[this.selectionKey]},_shouldClearSelection:function(t,e){var n=this.getActiveObjects(),i=this._activeObject;return!e||e&&i&&n.length>1&&-1===n.indexOf(e)&&i!==e&&!this._isSelectionKeyPressed(t)||e&&!e.evented||e&&!e.selectable&&i&&i!==e},_shouldCenterTransform:function(t){if(t){var e,n=this._currentTransform;return"scale"===n.action||"scaleX"===n.action||"scaleY"===n.action?e=this.centeredScaling||t.centeredScaling:"rotate"===n.action&&(e=this.centeredRotation||t.centeredRotation),e?!n.altKey:n.altKey}},_getOriginFromCorner:function(t,e){var n={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?n.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(n.x="left"),"tl"===e||"mt"===e||"tr"===e?n.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(n.y="top"),n},_getActionFromCorner:function(t,e,n){if(!e||!t)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return n[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return n[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,n,i){if(n){var r=this.getPointer(t),o=n._findTargetCorner(this.getPointer(t,!0)),s=this._getActionFromCorner(i,o,t),a=this._getOriginFromCorner(n,o);this._currentTransform={target:n,action:s,corner:o,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:r.x-n.left,offsetY:r.y-n.top,originX:a.x,originY:a.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,theta:e(n.angle),width:n.width*n.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey],original:C.util.saveObjectTransform(n)},this._currentTransform.original.originX=a.x,this._currentTransform.original.originY=a.y,this._resetCurrentTransform(),this._beforeTransform(t)}},_translateObject:function(t,e){var n=this._currentTransform,i=n.target,r=t-n.offsetX,o=e-n.offsetY,s=!i.get("lockMovementX")&&i.left!==r,a=!i.get("lockMovementY")&&i.top!==o;return s&&i.set("left",r),a&&i.set("top",o),s||a},_changeSkewTransformOrigin:function(t,e,n){var i="originX",r={0:"center"},o=e.target.skewX,s="left",a="right",l="mt"===e.corner||"ml"===e.corner?1:-1,u=1;t=t>0?1:-1,"y"===n&&(o=e.target.skewY,s="top",a="bottom",i="originY"),r[-1]=s,r[1]=a,e.target.flipX&&(u*=-1),e.target.flipY&&(u*=-1),0===o?(e.skewSign=-l*t*u,e[i]=r[-t]):(e.skewSign=o=o>0?1:-1,e[i]=r[o*l*u])},_skewObject:function(t,e,n){var i,r=this._currentTransform,o=r.target,s=o.get("lockSkewingX"),a=o.get("lockSkewingY");if(s&&"x"===n||a&&"y"===n)return!1;var l,u,c=o.getCenterPoint(),h=o.toLocalPoint(new C.Point(t,e),"center","center")[n],p=o.toLocalPoint(new C.Point(r.lastX,r.lastY),"center","center")[n],d=o._getTransformedDimensions();return this._changeSkewTransformOrigin(h-p,r,n),l=o.toLocalPoint(new C.Point(t,e),r.originX,r.originY)[n],u=o.translateToOriginPoint(c,r.originX,r.originY),i=this._setObjectSkew(l,r,n,d),r.lastX=t,r.lastY=e,o.setPositionByOrigin(u,r.originX,r.originY),i},_setObjectSkew:function(t,e,n,i){var r,o,s,a,l,u,c,h,p,d,f=e.target,g=e.skewSign;return"x"===n?(l="y",u="Y",c="X",p=0,d=f.skewY):(l="x",u="X",c="Y",p=f.skewX,d=0),a=f._getTransformedDimensions(p,d),(h=2*Math.abs(t)-a[n])<=2?r=0:(r=g*Math.atan(h/f["scale"+c]/(a[l]/f["scale"+u])),r=C.util.radiansToDegrees(r)),o=f["skew"+c]!==r,f.set("skew"+c,r),0!==f["skew"+u]&&(s=f._getTransformedDimensions(),f.set("scale"+u,r=i[l]/s[l]*f["scale"+u])),o},_scaleObject:function(t,e,n){var i=this._currentTransform,r=i.target,o=r.lockScalingX,s=r.lockScalingY,a=r.lockScalingFlip;if(o&&s)return!1;var l,u=r.translateToOriginPoint(r.getCenterPoint(),i.originX,i.originY),c=r.toLocalPoint(new C.Point(t,e),i.originX,i.originY),h=r._getTransformedDimensions();return this._setLocalMouse(c,i),l=this._setObjectScale(c,i,o,s,n,a,h),r.setPositionByOrigin(u,i.originX,i.originY),l},_setObjectScale:function(t,e,n,i,r,o,s){var a=e.target,l=!1,u=!1,c=!1,h=t.x*a.scaleX/s.x,p=t.y*a.scaleY/s.y,d=a.scaleX!==h,f=a.scaleY!==p;return o&&h<=0&&ho?t.x<0?t.x+=o:t.x-=o:t.x=0,r(t.y)>o?t.y<0?t.y+=o:t.y-=o:t.y=0},_rotateObject:function(t,e){var r=this._currentTransform,o=r.target,s=o.translateToOriginPoint(o.getCenterPoint(),r.originX,r.originY);if(o.lockRotation)return!1;var a=i(r.ey-s.y,r.ex-s.x),l=i(e-s.y,t-s.x),u=n(l-a+r.theta),c=!0;if(o.snapAngle>0){var h=o.snapAngle,p=o.snapThreshold||h,d=Math.ceil(u/h)*h,f=Math.floor(u/h)*h;Math.abs(u-f)0?0:-n),e.ey-(i>0?0:-i),s,a)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!o){var l=e.ex+.5-(n>0?0:s),u=e.ey+.5-(i>0?0:a);t.beginPath(),C.util.drawDashedLine(t,l,u,l+s,u,this.selectionDashArray),C.util.drawDashedLine(t,l,u+a-1,l+s,u+a-1,this.selectionDashArray),C.util.drawDashedLine(t,l,u,l,u+a,this.selectionDashArray),C.util.drawDashedLine(t,l+s-1,u,l+s-1,u+a,this.selectionDashArray),t.closePath(),t.stroke()}else C.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+.5-(n>0?0:s),e.ey+.5-(i>0?0:a),s,a)},findTarget:function(t,e){if(!this.skipTargetFind){var n,i,r=this.getPointer(t,!0),o=this._activeObject,s=this.getActiveObjects();if(this.targets=[],s.length>1&&!e&&o===this._searchPossibleTargets([o],r))return o;if(1===s.length&&o._findTargetCorner(r))return o;if(1===s.length&&o===this._searchPossibleTargets([o],r)){if(!this.preserveObjectStacking)return o;n=o,i=this.targets,this.targets=[]}var a=this._searchPossibleTargets(this._objects,r);return t[this.altSelectionKey]&&a&&n&&a!==n&&(a=n,this.targets=i),a}},_checkTarget:function(t,e,n){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;if(!this.isTargetTransparent(e,n.x,n.y))return!0}},_searchPossibleTargets:function(t,e){for(var n,i,r=t.length;r--;){var o=t[r],s=o.group&&"activeSelection"!==o.group.type?this._normalizePointer(o.group,e):e;if(this._checkTarget(s,o,e)){(n=t[r]).subTargetCheck&&n instanceof C.Group&&(i=this._searchPossibleTargets(n._objects,e))&&this.targets.push(i);break}}return n},restorePointerVpt:function(t){return C.util.transformPoint(t,C.util.invertTransform(this.viewportTransform))},getPointer:function(e,n){if(this._absolutePointer&&!n)return this._absolutePointer;if(this._pointer&&n)return this._pointer;var i,r=t(e),o=this.upperCanvasEl,s=o.getBoundingClientRect(),a=s.width||0,l=s.height||0;return a&&l||("top"in s&&"bottom"in s&&(l=Math.abs(s.top-s.bottom)),"right"in s&&"left"in s&&(a=Math.abs(s.right-s.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,n||(r=this.restorePointerVpt(r)),{x:r.x*(i=0===a||0===l?{width:1,height:1}:{width:o.width/a,height:o.height/l}).width,y:r.y*i.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,"");this.upperCanvasEl?this.upperCanvasEl.className="":this.upperCanvasEl=this._createCanvasElement(),C.util.addClass(this.upperCanvasEl,"upper-canvas "+t),this.wrapperEl.appendChild(this.upperCanvasEl),this._copyCanvasStyle(this.lowerCanvasEl,this.upperCanvasEl),this._applyCanvasStyle(this.upperCanvasEl),this.contextTop=this.upperCanvasEl.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=C.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),C.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),C.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,n=this.height||t.height;C.util.setStyle(t,{position:"absolute",width:e+"px",height:n+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none"}),t.width=e,t.height=n,C.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var t=this._activeObject;return t?"activeSelection"===t.type&&t._objects?t._objects.slice(0):[t]:[]},_onObjectRemoved:function(t){t===this._activeObject&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),this._hoveredTarget===t&&(this._hoveredTarget=null),this.callSuper("_onObjectRemoved",t)},_fireSelectionEvents:function(t,e){var n=!1,i=this.getActiveObjects(),r=[],o=[],s={e:e};t.forEach(function(t){-1===i.indexOf(t)&&(n=!0,t.fire("deselected",s),o.push(t))}),i.forEach(function(e){-1===t.indexOf(e)&&(n=!0,e.fire("selected",s),r.push(e))}),t.length>0&&i.length>0?(s.selected=r,s.deselected=o,s.updated=r[0]||o[0],s.target=this._activeObject,n&&this.fire("selection:updated",s)):i.length>0?(1===i.length&&(s.target=r[0],this.fire("object:selected",s)),s.selected=r,s.target=this._activeObject,this.fire("selection:created",s)):t.length>0&&(s.deselected=o,this.fire("selection:cleared",s))},setActiveObject:function(t,e){var n=this.getActiveObjects();return this._setActiveObject(t,e),this._fireSelectionEvents(n,e),this},_setActiveObject:function(t,e){return this._activeObject!==t&&!!this._discardActiveObject(e,t)&&!t.onSelect({e:e})&&(this._activeObject=t,!0)},_discardActiveObject:function(t,e){var n=this._activeObject;if(n){if(n.onDeselect({e:t,object:e}))return!1;this._activeObject=null}return!0},discardActiveObject:function(t){var e=this.getActiveObjects();return e.length&&this.fire("before:selection:cleared",{target:e[0],e:t}),this._discardActiveObject(t),this._fireSelectionEvents(e,t),this},dispose:function(){var t=this.wrapperEl;return this.removeListeners(),t.removeChild(this.upperCanvasEl),t.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach((function(t){C.util.cleanUpJsdomNode(this[t]),this[t]=void 0}).bind(this)),t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,C.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(t){var e=this._activeObject;e&&e._renderControls(t)},_toObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(t),r=this.callSuper("_toObject",t,e,n);return this._unwindGroupTransformOnObject(t,i),r},_realizeGroupTransformOnObject:function(t){if(t.group&&"activeSelection"===t.group.type&&this._activeObject===t.group){var e={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach(function(n){e[n]=t[n]}),this._activeObject.realizeTransform(t),e}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},_setSVGObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(e);this.callSuper("_setSVGObject",t,e,n),this._unwindGroupTransformOnObject(e,i)},setViewportTransform:function(t){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),C.StaticCanvas.prototype.setViewportTransform.call(this,t)}}),C.StaticCanvas)"prototype"!==s&&(C.Canvas[s]=C.StaticCanvas[s]);C.isTouchSupported&&(C.Canvas.prototype._setCursorFromEvent=function(){})}(),function(){var t={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},e=C.util.addListener,n=C.util.removeListener,i={passive:!1};function r(t,e){return"which"in t?t.which===e:t.button===e-1}C.util.object.extend(C.Canvas.prototype,{cursorMap:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},addOrRemove:function(t,e){t(C.window,"resize",this._onResize),t(this.upperCanvasEl,"mousedown",this._onMouseDown),t(this.upperCanvasEl,"mousemove",this._onMouseMove,i),t(this.upperCanvasEl,"mouseout",this._onMouseOut),t(this.upperCanvasEl,"mouseenter",this._onMouseEnter),t(this.upperCanvasEl,"wheel",this._onMouseWheel),t(this.upperCanvasEl,"contextmenu",this._onContextMenu),t(this.upperCanvasEl,"dblclick",this._onDoubleClick),t(this.upperCanvasEl,"touchstart",this._onMouseDown,i),t(this.upperCanvasEl,"touchmove",this._onMouseMove,i),t(this.upperCanvasEl,"dragover",this._onDragOver),t(this.upperCanvasEl,"dragenter",this._onDragEnter),t(this.upperCanvasEl,"dragleave",this._onDragLeave),t(this.upperCanvasEl,"drop",this._onDrop),"undefined"!=typeof eventjs&&e in eventjs&&(eventjs[e](this.upperCanvasEl,"gesture",this._onGesture),eventjs[e](this.upperCanvasEl,"drag",this._onDrag),eventjs[e](this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs[e](this.upperCanvasEl,"shake",this._onShake),eventjs[e](this.upperCanvasEl,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(n,"remove"),n(C.document,"mouseup",this._onMouseUp),n(C.document,"touchend",this._onMouseUp,i),n(C.document,"mousemove",this._onMouseMove,i),n(C.document,"touchmove",this._onMouseMove,i)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(t,e){this.__onTransformGesture&&this.__onTransformGesture(t,e)},_onDrag:function(t,e){this.__onDrag&&this.__onDrag(t,e)},_onMouseWheel:function(t){this.__onMouseWheel(t)},_onMouseOut:function(t){var e=this._hoveredTarget;this.fire("mouse:out",{target:e,e:t}),this._hoveredTarget=null,e&&e.fire("mouseout",{e:t}),this._iTextInstances&&this._iTextInstances.forEach(function(t){t.isEditing&&t.hiddenTextarea.focus()})},_onMouseEnter:function(t){this.findTarget(t)||(this.fire("mouse:over",{target:null,e:t}),this._hoveredTarget=null)},_onOrientationChange:function(t,e){this.__onOrientationChange&&this.__onOrientationChange(t,e)},_onShake:function(t,e){this.__onShake&&this.__onShake(t,e)},_onLongPress:function(t,e){this.__onLongPress&&this.__onLongPress(t,e)},_onDragOver:function(t){t.preventDefault();var e=this._simpleEventHandler("dragover",t);this._fireEnterLeaveEvents(e,t)},_onContextMenu:function(t){return this.stopContextMenu&&(t.stopPropagation(),t.preventDefault()),!1},_onDoubleClick:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"dblclick"),this._resetTransformEventData(t)},_onMouseDown:function(t){this.__onMouseDown(t),this._resetTransformEventData(),e(C.document,"touchend",this._onMouseUp,i),e(C.document,"touchmove",this._onMouseMove,i),n(this.upperCanvasEl,"mousemove",this._onMouseMove,i),n(this.upperCanvasEl,"touchmove",this._onMouseMove,i),"touchstart"===t.type?n(this.upperCanvasEl,"mousedown",this._onMouseDown):(e(C.document,"mouseup",this._onMouseUp),e(C.document,"mousemove",this._onMouseMove,i))},_onMouseUp:function(t){if(this.__onMouseUp(t),this._resetTransformEventData(),n(C.document,"mouseup",this._onMouseUp),n(C.document,"touchend",this._onMouseUp,i),n(C.document,"mousemove",this._onMouseMove,i),n(C.document,"touchmove",this._onMouseMove,i),e(this.upperCanvasEl,"mousemove",this._onMouseMove,i),e(this.upperCanvasEl,"touchmove",this._onMouseMove,i),"touchend"===t.type){var r=this;setTimeout(function(){e(r.upperCanvasEl,"mousedown",r._onMouseDown)},400)}},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t){var e=this._activeObject;return!!(!!e!=!!t||e&&t&&e!==t)},__onMouseUp:function(t){var e,n=this._currentTransform,i=this._groupSelector,o=!1,s=!i||0===i.left&&0===i.top;if(this._cacheTransformEventData(t),e=this._target,this._handleEvent(t,"up:before"),!r(t,3))return r(t,2)?(this.fireMiddleClick&&this._handleEvent(t,"up",2,s),void this._resetTransformEventData()):void(this.isDrawingMode&&this._isCurrentlyDrawing?this._onMouseUpInDrawingMode(t):(n&&(this._finalizeCurrentTransform(t),o=n.actionPerformed),s||(this._maybeGroupObjects(t),o||(o=this._shouldRender(e))),e&&(e.isMoving=!1),this._setCursorFromEvent(t,e),this._handleEvent(t,"up",1,s),this._groupSelector=null,this._currentTransform=null,e&&(e.__corner=0),o?this.requestRenderAll():s||this.renderTop()));this.fireRightClick&&this._handleEvent(t,"up",3,s)},_simpleEventHandler:function(t,e){var n=this.findTarget(e),i=this.targets,r={e:e,target:n,subTargets:i};if(this.fire(t,r),n&&n.fire(t,r),!i)return n;for(var o=0;o1)){var i=this._groupSelector;i?(i.left=(n=this._pointer).x-i.ex,i.top=n.y-i.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t)||null,this._setCursorFromEvent(t,e),this._fireOverOutEvents(e,t)),this._handleEvent(t,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(t,e){this.fireSynteticInOutEvents(t,e,{targetName:"_hoveredTarget",canvasEvtOut:"mouse:out",evtOut:"mouseout",canvasEvtIn:"mouse:over",evtIn:"mouseover"})},_fireEnterLeaveEvents:function(t,e){this.fireSynteticInOutEvents(t,e,{targetName:"_draggedoverTarget",evtOut:"dragleave",evtIn:"dragenter"})},fireSynteticInOutEvents:function(t,e,n){var i,r,o,s=this[n.targetName],a=s!==t,l=n.canvasEvtIn,u=n.canvasEvtOut;a&&(i={e:e,target:t,previousTarget:s},r={e:e,target:s,nextTarget:t},this[n.targetName]=t),o=t&&a,s&&a&&(u&&this.fire(u,r),s.fire(n.evtOut,r)),o&&(l&&this.fire(l,i),t.fire(n.evtIn,i))},__onMouseWheel:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"wheel"),this._resetTransformEventData()},_transformObject:function(t){var e=this.getPointer(t),n=this._currentTransform;n.reset=!1,n.target.isMoving=!0,n.shiftKey=t.shiftKey,n.altKey=t[this.centeredKey],this._beforeScaleTransform(t,n),this._performTransformAction(t,n,e),n.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,n){var i=n.x,r=n.y,o=e.action,s=!1,a={target:e.target,e:t,transform:e,pointer:n};"rotate"===o?(s=this._rotateObject(i,r))&&this._fire("rotating",a):"scale"===o?(s=this._onScale(t,e,i,r))&&this._fire("scaling",a):"scaleX"===o?(s=this._scaleObject(i,r,"x"))&&this._fire("scaling",a):"scaleY"===o?(s=this._scaleObject(i,r,"y"))&&this._fire("scaling",a):"skewX"===o?(s=this._skewObject(i,r,"x"))&&this._fire("skewing",a):"skewY"===o?(s=this._skewObject(i,r,"y"))&&this._fire("skewing",a):(s=this._translateObject(i,r))&&(this._fire("moving",a),this.setCursor(a.target.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||s},_fire:function(t,e){this.fire("object:"+t,e),e.target.fire(t,e)},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var n=this._shouldCenterTransform(e.target);(n&&("center"!==e.originX||"center"!==e.originY)||!n&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,n,i){return this._isUniscalePossible(t,e.target)?(e.currentAction="scale",this._scaleObject(n,i)):(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(n,i,"equally"))},_isUniscalePossible:function(t,e){return(t[this.uniScaleKey]||this.uniScaleTransform)&&!e.get("lockUniScaling")},_setCursorFromEvent:function(t,e){if(!e)return this.setCursor(this.defaultCursor),!1;var n=e.hoverCursor||this.hoverCursor,i=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!i||!i.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));this.setCursor(r?this.getCornerCursor(r,e,t):n)},getCornerCursor:function(e,n,i){return this.actionIsDisabled(e,n,i)?this.notAllowedCursor:e in t?this._getRotatedCornerCursor(e,n,i):"mtr"===e&&n.hasRotatingPoint?this.rotationCursor:this.defaultCursor},actionIsDisabled:function(t,e,n){return"mt"===t||"mb"===t?n[this.altActionKey]?e.lockSkewingX:e.lockScalingY:"ml"===t||"mr"===t?n[this.altActionKey]?e.lockSkewingY:e.lockScalingX:"mtr"===t?e.lockRotation:this._isUniscalePossible(n,e)?e.lockScalingX&&e.lockScalingY:e.lockScalingX||e.lockScalingY},_getRotatedCornerCursor:function(e,n,i){var r=Math.round(n.angle%360/45);return r<0&&(r+=8),r+=t[e],i[this.altActionKey]&&t[e]%2==0&&(r+=2),this.cursorMap[r%=8]}})}(),h=Math.min,p=Math.max,C.util.object.extend(C.Canvas.prototype,{_shouldGroup:function(t,e){var n=this._activeObject;return n&&this._isSelectionKeyPressed(t)&&e&&e.selectable&&this.selection&&(n!==e||"activeSelection"===n.type)&&!e.onSelect({e:t})},_handleGrouping:function(t,e){var n=this._activeObject;n.__corner||(e!==n||(e=this.findTarget(t,!0))&&e.selectable)&&(n&&"activeSelection"===n.type?this._updateActiveSelection(e,t):this._createActiveSelection(e,t))},_updateActiveSelection:function(t,e){var n=this._activeObject,i=n._objects.slice(0);n.contains(t)?(n.removeWithUpdate(t),this._hoveredTarget=t,1===n.size()&&this._setActiveObject(n.item(0),e)):(n.addWithUpdate(t),this._hoveredTarget=n),this._fireSelectionEvents(i,e)},_createActiveSelection:function(t,e){var n=this.getActiveObjects(),i=this._createGroup(t);this._hoveredTarget=i,this._setActiveObject(i,e),this._fireSelectionEvents(n,e)},_createGroup:function(t){var e=this._objects,n=e.indexOf(this._activeObject)1&&(e=new C.ActiveSelection(n.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(t){for(var e,n=[],i=this._groupSelector.ex,r=this._groupSelector.ey,o=i+this._groupSelector.left,s=r+this._groupSelector.top,a=new C.Point(h(i,o),h(r,s)),l=new C.Point(p(i,o),p(r,s)),u=!this.selectionFullyContained,c=i===o&&r===s,d=this._objects.length;d--&&!((e=this._objects[d])&&e.selectable&&e.visible&&!e.onSelect({e:t})&&(u&&e.intersectsWithRect(a,l)||e.isContainedWithinRect(a,l)||u&&e.containsPoint(a)||u&&e.containsPoint(l))&&(n.push(e),c)););return n},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t),this.setCursor(this.defaultCursor),this._groupSelector=null}}),C.util.object.extend(C.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",n=t.quality||1,i=(t.multiplier||1)*(t.enableRetinaScaling?this.getRetinaScaling():1),r=this.toCanvasElement(i,t);return C.util.toDataURL(r,e,n)},toCanvasElement:function(t,e){var n=((e=e||{}).width||this.width)*(t=t||1),i=(e.height||this.height)*t,r=this.getZoom(),o=this.width,s=this.height,a=r*t,l=this.viewportTransform,u=this.interactive,c=this.contextContainer,h=[a,0,0,a,(l[4]-(e.left||0))*t,(l[5]-(e.top||0))*t],p=C.util.createCanvasElement();return p.width=n,p.height=i,this.interactive=!1,this.viewportTransform=h,this.width=n,this.height=i,this.calcViewportBoundaries(),this.contextContainer=p.getContext("2d"),this.renderAll(),this.viewportTransform=l,this.width=o,this.height=s,this.calcViewportBoundaries(),this.contextContainer=c,this.interactive=u,p}}),C.util.object.extend(C.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,n){return this.loadFromJSON(t,e,n)},loadFromJSON:function(t,e,n){if(t){var i="string"==typeof t?JSON.parse(t):C.util.object.clone(t),r=this,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,this._enlivenObjects(i.objects,function(t){r.clear(),r._setBgOverlay(i,function(){t.forEach(function(t,e){r.insertAt(t,e)}),r.renderOnAddRemove=o,delete i.objects,delete i.backgroundImage,delete i.overlayImage,delete i.background,delete i.overlay,r._setOptions(i),r.renderAll(),e&&e()})},n),this}},_setBgOverlay:function(t,e){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(t.backgroundImage||t.overlayImage||t.background||t.overlay){var i=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,n,i),this.__setBgOverlay("overlayImage",t.overlayImage,n,i),this.__setBgOverlay("backgroundColor",t.background,n,i),this.__setBgOverlay("overlayColor",t.overlay,n,i)}else e&&e()},__setBgOverlay:function(t,e,n,i){var r=this;if(!e)return n[t]=!0,void(i&&i());"backgroundImage"===t||"overlayImage"===t?C.util.enlivenObjects([e],function(e){r[t]=e[0],n[t]=!0,i&&i()}):this["set"+C.util.string.capitalize(t,!0)](e,function(){n[t]=!0,i&&i()})},_enlivenObjects:function(t,e,n){t&&0!==t.length?C.util.enlivenObjects(t,function(t){e&&e(t)},null,n):e&&e([])},_toDataURL:function(t,e){this.clone(function(n){e(n.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,n){this.clone(function(i){n(i.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var n=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(e){e.loadFromJSON(n,function(){t&&t(e)})})},cloneWithoutData:function(t){var e=C.util.createCanvasElement();e.width=this.width,e.height=this.height;var n=new C.Canvas(e);n.clipTo=this.clipTo,this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,function(){n.renderAll(),t&&t(n)}),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):t&&t(n)}}),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.object.clone,o=n.util.toFixed,s=n.util.string.capitalize,a=n.util.degreesToRadians,l=n.StaticCanvas.supports("setLineDash");n.Object||(n.Object=n.util.createClass(n.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:!n.isLikelyNode,statefullCache:!1,noScaleCache:!0,dirty:!0,__corner:0,paintFirst:"fill",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow clipTo visible backgroundColor skewX skewY fillRule paintFirst clipPath".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(t){t&&this.setOptions(t)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=n.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(t){var e=n.perfLimitSizeTotal,i=t.width,r=t.height,o=n.maxCacheSideLimit,s=n.minCacheSideLimit;if(i<=o&&r<=o&&i*r<=e)return iu&&(t.zoomX/=i/u,t.width=u,t.capped=!0),r>c&&(t.zoomY/=r/c,t.height=c,t.capped=!0),t},_getCacheCanvasDimensions:function(){var t=this.getTotalObjectScaling(),e=this._getNonTransformedDimensions(),n=t.scaleX,i=t.scaleY;return{width:e.x*n+2,height:e.y*i+2,zoomX:n,zoomY:i,x:e.x,y:e.y}},_updateCacheCanvas:function(){var t=this.canvas;if(this.noScaleCache&&t&&t._currentTransform){var e=t._currentTransform.action;if(this===t._currentTransform.target&&e.slice&&"scale"===e.slice(0,5))return!1}var i,r,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),a=n.minCacheSideLimit,l=s.width,u=s.height,c=s.zoomX,h=s.zoomY,p=l!==this.cacheWidth||u!==this.cacheHeight,d=0,f=0,g=!1;if(p){var m=this._cacheCanvas.width,v=this._cacheCanvas.height,y=l>m||u>v;g=y||(l<.9*m||u<.9*v)&&m>a&&v>a,y&&!s.capped&&(l>a||u>a)&&(d=.1*l,f=.1*u)}return!(!p&&this.zoomX===c&&this.zoomY===h||(g?(o.width=Math.ceil(l+d),o.height=Math.ceil(u+f)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),i=s.x*c/2,r=s.y*h/2,this.cacheTranslationX=Math.round(o.width/2-i)+i,this.cacheTranslationY=Math.round(o.height/2-r)+r,this.cacheWidth=l,this.cacheHeight=u,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(c,h),this.zoomX=c,this.zoomY=h,0))},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initClipping(t),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t){var e;e=this.group&&!this.group._transformDone?this.calcTransformMatrix():this.calcOwnMatrix(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},toObject:function(t){var e=n.Object.NUM_FRACTION_DIGITS,i={type:this.type,version:n.version,originX:this.originX,originY:this.originY,left:o(this.left,e),top:o(this.top,e),width:o(this.width,e),height:o(this.height,e),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:o(this.strokeWidth,e),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:o(this.strokeMiterLimit,e),scaleX:o(this.scaleX,e),scaleY:o(this.scaleY,e),angle:o(this.angle,e),flipX:this.flipX,flipY:this.flipY,opacity:o(this.opacity,e),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():null,skewX:o(this.skewX,e),skewY:o(this.skewY,e)};return this.clipPath&&(i.clipPath=this.clipPath.toObject(t),i.clipPath.inverted=this.clipPath.inverted,i.clipPath.absolutePositioned=this.clipPath.absolutePositioned),n.util.populateWithProperties(this,i,t),this.includeDefaultValues||(i=this._removeDefaultValues(i)),i},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var e=n.util.getKlass(t.type).prototype;return e.stateProperties.forEach(function(n){t[n]===e[n]&&delete t[n],"[object Array]"===Object.prototype.toString.call(t[n])&&"[object Array]"===Object.prototype.toString.call(e[n])&&0===t[n].length&&0===e[n].length&&delete t[n]}),t},toString:function(){return"#"},getObjectScaling:function(){var t=this.scaleX,e=this.scaleY;if(this.group){var n=this.group.getObjectScaling();t*=n.scaleX,e*=n.scaleY}return{scaleX:t,scaleY:e}},getTotalObjectScaling:function(){var t=this.getObjectScaling(),e=t.scaleX,n=t.scaleY;if(this.canvas){var i=this.canvas.getZoom(),r=this.canvas.getRetinaScaling();e*=i*r,n*=i*r}return{scaleX:e,scaleY:n}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,e){var i=this[t]!==e,r=!1;return("scaleX"===t||"scaleY"===t)&&(e=this._constrainScale(e)),"scaleX"===t&&e<0?(this.flipX=!this.flipX,e*=-1):"scaleY"===t&&e<0?(this.flipY=!this.flipY,e*=-1):"shadow"!==t||!e||e instanceof n.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",e):e=new n.Shadow(e),this[t]=e,i&&(r=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(t)>-1?(this.dirty=!0,r&&this.group.set("dirty",!0)):r&&this.stateProperties.indexOf(t)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:n.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||0===this.width&&0===this.height&&0===this.strokeWidth||!this.visible},render:function(t){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t,this),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.clipTo&&n.util.clipContext(this,t),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),this.clipTo&&t.restore(),t.restore())},renderCache:function(t){t=t||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,t.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},needsItsOwnCache:function(){return"stroke"===this.paintFirst&&"object"==typeof this.shadow||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.objectCaching&&(!this.group||this.needsItsOwnCache()||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(t){var e=this.clipPath;if(t.save(),t.globalCompositeOperation=e.inverted?"destination-out":"destination-in",e.absolutePositioned){var i=n.util.invertTransform(this.calcTransformMatrix());t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}e.transform(t),t.scale(1/e.zoomX,1/e.zoomY),t.drawImage(e._cacheCanvas,-e.cacheTranslationX,-e.cacheTranslationY),t.restore()},drawObject:function(t,e){var n=this.fill,i=this.stroke;e?(this.fill="black",this.stroke="",this._setClippingProperties(t)):(this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this)),this._render(t),this._drawClipPath(t),this.fill=n,this.stroke=i},_drawClipPath:function(t){var e=this.clipPath;e&&(e.canvas=this.canvas,e.shouldCache(),e._transformDone=!0,e.renderCache({forClipping:!0}),this.drawClipPathOnCache(t))},drawCacheOnCanvas:function(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(t){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!t){var e=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-n/2,e,n)}return!0}return!1},_renderBackground:function(t){if(this.backgroundColor){var e=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-e.x/2,-e.y/2,e.x,e.y),this._removeShadow(t)}},_setOpacity:function(t){this.group&&!this.group._transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity},_setStrokeStyles:function(t,e){e.stroke&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineDashOffset=e.strokeDashOffset,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,t.strokeStyle=e.stroke.toLive?e.stroke.toLive(t,this):e.stroke)},_setFillStyles:function(t,e){e.fill&&(t.fillStyle=e.fill.toLive?e.fill.toLive(t,this):e.fill)},_setClippingProperties:function(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"},_setLineDash:function(t,e,n){e&&(1&e.length&&e.push.apply(e,e),l?t.setLineDash(e):n&&n(t))},_renderControls:function(t,e){var i,r,o,s=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(e=e||{}).hasBorders?e.hasBorders:this.hasBorders,o=void 0!==e.hasControls?e.hasControls:this.hasControls,l=n.util.multiplyTransformMatrices(s,l),i=n.util.qrDecompose(l),t.save(),t.translate(i.translateX,i.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),e.forActiveSelection?(t.rotate(a(i.angle)),r&&this.drawBordersInGroup(t,i,e)):(t.rotate(a(this.angle)),r&&this.drawBorders(t,e)),o&&this.drawControls(t,e),t.restore()},_setShadow:function(t){if(this.shadow){var e=this.shadow,i=this.canvas,r=i&&i.viewportTransform[0]||1,o=i&&i.viewportTransform[3]||1,s=this.getObjectScaling();i&&i._isRetinaScaling()&&(r*=n.devicePixelRatio,o*=n.devicePixelRatio),t.shadowColor=e.color,t.shadowBlur=e.blur*n.browserShadowBlurConstant*(r+o)*(s.scaleX+s.scaleY)/4,t.shadowOffsetX=e.offsetX*r*s.scaleX,t.shadowOffsetY=e.offsetY*o*s.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var n=e.gradientTransform||e.patternTransform,i=-this.width/2+e.offsetX||0,r=-this.height/2+e.offsetY||0;return t.translate(i,r),n&&t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),{offsetX:i,offsetY:r}},_renderPaintInOrder:function(t){"stroke"===this.paintFirst?(this._renderStroke(t),this._renderFill(t)):(this._renderFill(t),this._renderStroke(t))},_renderFill:function(t){this.fill&&(t.save(),this._applyPatternGradientTransform(t,this.fill),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore())},_renderStroke:function(t){this.stroke&&0!==this.strokeWidth&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this._applyPatternGradientTransform(t,this.stroke),t.stroke(),t.restore())},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var t=n.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",t.scaleX),this.set("scaleY",t.scaleY),this.angle=t.angle,this.skewX=t.skewX,this.skewY=0}},_removeTransformMatrix:function(t){var e=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),e=n.util.transformPoint(e,this.transformMatrix)),this.transformMatrix=null,t&&(this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this.cropX=t.cropX,this.cropY=t.cropY,e.x+=t.offsetLeft,e.y+=t.offsetTop,this.width=t.width,this.height=t.height),this.setPositionByOrigin(e,"center","center")},clone:function(t,e){var i=this.toObject(e);this.constructor.fromObject?this.constructor.fromObject(i,t):n.Object._fromObject("Object",i,t)},cloneAsImage:function(t,e){var i=this.toCanvasElement(e);return t&&t(new n.Image(i)),this},toCanvasElement:function(t){t||(t={});var e=n.util,i=e.saveObjectTransform(this),r=this.shadow,o=Math.abs,s=(t.multiplier||1)*(t.enableRetinaScaling?n.devicePixelRatio:1);t.withoutTransform&&e.resetObjectTransform(this),t.withoutShadow&&(this.shadow=null);var a,l,u=n.util.createCanvasElement(),c=this.getBoundingRect(!0,!0),h=this.shadow,p={x:0,y:0};h&&(l=h.blur,a=this.getObjectScaling(),p.x=2*Math.round((o(h.offsetX)+l)*o(a.scaleX)),p.y=2*Math.round((o(h.offsetY)+l)*o(a.scaleY))),u.width=c.width+p.x,u.height=c.height+p.y,u.width+=u.width%2?2-u.width%2:0,u.height+=u.height%2?2-u.height%2:0;var d=new n.StaticCanvas(u,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===t.format&&(d.backgroundColor="#fff"),this.setPositionByOrigin(new n.Point(d.width/2,d.height/2),"center","center");var f=this.canvas;d.add(this);var g=d.toCanvasElement(s||1,t);return this.shadow=r,this.canvas=f,this.set(i).setCoords(),d._objects=[],d.dispose(),d=null,g},toDataURL:function(t){return t||(t={}),n.util.toDataURL(this.toCanvasElement(t),t.format||"png",t.quality||1)},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,e){e||(e={});var i={colorStops:[]};return i.type=e.type||(e.r1||e.r2?"radial":"linear"),i.coords={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},(e.r1||e.r2)&&(i.coords.r1=e.r1,i.coords.r2=e.r2),i.gradientTransform=e.gradientTransform,n.Gradient.prototype.addColorStop.call(i,e.colorStops),this.set(t,n.Gradient.forObject(this,i))},setPatternFill:function(t,e){return this.set("fill",new n.Pattern(t,e))},setShadow:function(t){return this.set("shadow",t?new n.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},rotate:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(t,e){e=e||this.canvas.getPointer(t);var i=new n.Point(e.x,e.y),r=this._getLeftTopCoords();return this.angle&&(i=n.util.rotatePoint(i,r,a(-this.angle))),{x:i.x-r.x,y:i.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),n.util.createAccessors&&n.util.createAccessors(n.Object),i(n.Object.prototype,n.Observable),n.Object.NUM_FRACTION_DIGITS=2,n.Object._fromObject=function(t,e,i,o){var s=n[t];e=r(e,!0),n.util.enlivenPatterns([e.fill,e.stroke],function(t){void 0!==t[0]&&(e.fill=t[0]),void 0!==t[1]&&(e.stroke=t[1]),n.util.enlivenObjects([e.clipPath],function(t){e.clipPath=t[0];var n=o?new s(e[o],e):new s(e);i&&i(n)})})},n.Object.__uid=0)}(),d=C.util.degreesToRadians,f={left:-.5,center:0,right:.5},g={top:-.5,center:0,bottom:.5},C.util.object.extend(C.Object.prototype,{translateToGivenOrigin:function(t,e,n,i,r){var o,s,a,l=t.x,u=t.y;return"string"==typeof e?e=f[e]:e-=.5,"string"==typeof i?i=f[i]:i-=.5,"string"==typeof n?n=g[n]:n-=.5,"string"==typeof r?r=g[r]:r-=.5,s=r-n,((o=i-e)||s)&&(a=this._getTransformedDimensions(),l=t.x+o*a.x,u=t.y+s*a.y),new C.Point(l,u)},translateToCenterPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,e,n,"center","center");return this.angle?C.util.rotatePoint(i,t,d(this.angle)):i},translateToOriginPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,"center","center",e,n);return this.angle?C.util.rotatePoint(i,t,d(this.angle)):i},getCenterPoint:function(){var t=new C.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var n=this.getCenterPoint();return this.translateToOriginPoint(n,t,e)},toLocalPoint:function(t,e,n){var i,r,o=this.getCenterPoint();return i=void 0!==e&&void 0!==n?this.translateToGivenOrigin(o,"center","center",e,n):new C.Point(this.left,this.top),r=new C.Point(t.x,t.y),this.angle&&(r=C.util.rotatePoint(r,o,-d(this.angle))),r.subtractEquals(i)},setPositionByOrigin:function(t,e,n){var i=this.translateToCenterPoint(t,e,n),r=this.translateToOriginPoint(i,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(t){var e,n,i=d(this.angle),r=this.getScaledWidth(),o=C.util.cos(i)*r,s=C.util.sin(i)*r;this.left+=o*((n="string"==typeof t?f[t]:t-.5)-(e="string"==typeof this.originX?f[this.originX]:this.originX-.5)),this.top+=s*(n-e),this.setCoords(),this.originX=t},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var t=C.util.degreesToRadians,e=C.util.multiplyTransformMatrices,n=C.util.transformPoint;C.util.object.extend(C.Object.prototype,{oCoords:null,aCoords:null,ownMatrixCache:null,matrixCache:null,getCoords:function(t,e){this.oCoords||this.setCoords();var n=t?this.aCoords:this.oCoords;return function(t){return[new C.Point(t.tl.x,t.tl.y),new C.Point(t.tr.x,t.tr.y),new C.Point(t.br.x,t.br.y),new C.Point(t.bl.x,t.bl.y)]}(e?this.calcCoords(t):n)},intersectsWithRect:function(t,e,n,i){var r=this.getCoords(n,i);return"Intersection"===C.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,n){return"Intersection"===C.Intersection.intersectPolygonPolygon(this.getCoords(e,n),t.getCoords(e,n)).status||t.isContainedWithinObject(this,e,n)||this.isContainedWithinObject(t,e,n)},isContainedWithinObject:function(t,e,n){for(var i=this.getCoords(e,n),r=0,o=t._getImageLines(n?t.calcCoords(e):e?t.aCoords:t.oCoords);r<4;r++)if(!t.containsPoint(i[r],o))return!1;return!0},isContainedWithinRect:function(t,e,n,i){var r=this.getBoundingRect(n,i);return r.left>=t.x&&r.left+r.width<=e.x&&r.top>=t.y&&r.top+r.height<=e.y},containsPoint:function(t,e,n,i){e=e||this._getImageLines(i?this.calcCoords(n):n?this.aCoords:this.oCoords);var r=this._findCrossPoints(t,e);return 0!==r&&r%2==1},isOnScreen:function(t){if(!this.canvas)return!1;for(var e,n=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br,r=this.getCoords(!0,t),o=0;o<4;o++)if((e=r[o]).x<=i.x&&e.x>=n.x&&e.y<=i.y&&e.y>=n.y)return!0;return!!this.intersectsWithRect(n,i,!0,t)||this._containsCenterOfCanvas(n,i,t)},_containsCenterOfCanvas:function(t,e,n){return!!this.containsPoint({x:(t.x+e.x)/2,y:(t.y+e.y)/2},null,!0,n)},isPartiallyOnScreen:function(t){if(!this.canvas)return!1;var e=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.intersectsWithRect(e,n,!0,t)||this._containsCenterOfCanvas(e,n,t)},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var n,i,r,o=0;for(var s in e)if(!((r=e[s]).o.y=t.y&&r.d.y>=t.y||(i=r.o.x===r.d.x&&r.o.x>=t.x?r.o.x:-(t.y-0*t.x-(r.o.y-(n=(r.d.y-r.o.y)/(r.d.x-r.o.x))*r.o.x))/(0-n),i>=t.x&&(o+=1),2!==o)))break;return o},getBoundingRect:function(t,e){var n=this.getCoords(t,e);return C.util.makeBoundingBoxFromPoints(n)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)\n')}},toSVG:function(t){return this._createBaseSVGMarkup(this._toSVG(),{reviver:t})},toClipPathSVG:function(t){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:t})},_createBaseClipPathSVGMarkup:function(t,e){var n=(e=e||{}).reviver,i=[this.getSvgTransform(!0,e.additionalTransform||""),this.getSvgCommons()].join(""),r=t.indexOf("COMMON_PARTS");return t[r]=i,n?n(t.join("")):t.join("")},_createBaseSVGMarkup:function(t,e){var n,i,r=(e=e||{}).noStyle,o=e.withShadow,s=e.reviver,a=r?"":'style="'+this.getSvgStyles()+'" ',l=o?'style="'+this.getSvgFilter()+'" ':"",u=this.clipPath,c=this.clipPath&&this.clipPath.absolutePositioned,h=[],p=t.indexOf("COMMON_PARTS"),d=e.additionalTransform;return u&&(u.clipPathId="CLIPPATH_"+C.Object.__uid++,i='\n'+this.clipPath.toClipPathSVG(s)+"\n"),c&&h.push("\n"),h.push("\n"),n=[a,r?"":this.addPaintOrder()," ",d?'transform="'+d+'" ':""].join(""),t[p]=n,this.fill&&this.fill.toLive&&h.push(this.fill.toSVG(this,!1)),this.stroke&&this.stroke.toLive&&h.push(this.stroke.toSVG(this,!1)),this.shadow&&h.push(this.shadow.toSVG(this)),u&&h.push(i),h.push(t.join("")),h.push("\n"),c&&h.push("\n"),s?s(h.join("")):h.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var t=C.util.object.extend;function e(e,n,i){var r={};i.forEach(function(t){r[t]=e[t]}),t(e[n],r,!0)}C.util.object.extend(C.Object.prototype,{hasStateChanged:function(t){var e="_"+(t=t||"stateProperties");return Object.keys(this[e]).length\n']}}),n.Line.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),n.Line.fromElement=function(t,e,r){r=r||{};var o=n.parseAttributes(t,n.Line.ATTRIBUTE_NAMES);e(new n.Line([o.x1||0,o.y1||0,o.x2||0,o.y2||0],i(o,r)))},n.Line.fromObject=function(t,e){var i=r(t,!0);i.points=[t.x1,t.y1,t.x2,t.y2],n.Object._fromObject("Line",i,function(t){delete t.points,e&&e(t)},"points")})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=Math.PI;n.Circle?n.warn("fabric.Circle is already defined."):(n.Circle=n.util.createClass(n.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*i,cacheProperties:n.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(t))},_toSVG:function(){var t,e=(this.endAngle-this.startAngle)%(2*i);if(0===e)t=["\n'];else{var r=n.util.cos(this.startAngle)*this.radius,o=n.util.sin(this.startAngle)*this.radius,s=n.util.cos(this.endAngle)*this.radius,a=n.util.sin(this.endAngle)*this.radius;t=['i?"1":"0")+" 1"," "+s+" "+a,'"',"COMMON_PARTS"," />\n"]}return t},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)}}),n.Circle.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),n.Circle.fromElement=function(t,e){var i,r=n.parseAttributes(t,n.Circle.ATTRIBUTE_NAMES);if(!("radius"in(i=r)&&i.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");r.left=(r.left||0)-r.radius,r.top=(r.top||0)-r.radius,e(new n.Circle(r))},n.Circle.fromObject=function(t,e){return n.Object._fromObject("Circle",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});n.Triangle?n.warn("fabric.Triangle is already defined"):(n.Triangle=n.util.createClass(n.Object,{type:"triangle",width:100,height:100,_render:function(t){var e=this.width/2,n=this.height/2;t.beginPath(),t.moveTo(-e,n),t.lineTo(0,-n),t.lineTo(e,n),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),n.util.drawDashedLine(t,-e,i,0,-i,this.strokeDashArray),n.util.drawDashedLine(t,0,-i,e,i,this.strokeDashArray),n.util.drawDashedLine(t,e,i,-e,i,this.strokeDashArray),t.closePath()},_toSVG:function(){var t=this.width/2,e=this.height/2;return["']}}),n.Triangle.fromObject=function(t,e){return n.Object._fromObject("Triangle",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=2*Math.PI;n.Ellipse?n.warn("fabric.Ellipse is already defined."):(n.Ellipse=n.util.createClass(n.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:n.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this.set("rx",t&&t.rx||0),this.set("ry",t&&t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["\n']},_render:function(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,i,!1),t.restore(),this._renderPaintInOrder(t)}}),n.Ellipse.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),n.Ellipse.fromElement=function(t,e){var i=n.parseAttributes(t,n.Ellipse.ATTRIBUTE_NAMES);i.left=(i.left||0)-i.rx,i.top=(i.top||0)-i.ry,e(new n.Ellipse(i))},n.Ellipse.fromObject=function(t,e){return n.Object._fromObject("Ellipse",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend;n.Rect?n.warn("fabric.Rect is already defined"):(n.Rect=n.util.createClass(n.Object,{stateProperties:n.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:n.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t){var e=this.rx?Math.min(this.rx,this.width/2):0,n=this.ry?Math.min(this.ry,this.height/2):0,i=this.width,r=this.height,o=-this.width/2,s=-this.height/2,a=0!==e||0!==n,l=.4477152502;t.beginPath(),t.moveTo(o+e,s),t.lineTo(o+i-e,s),a&&t.bezierCurveTo(o+i-l*e,s,o+i,s+l*n,o+i,s+n),t.lineTo(o+i,s+r-n),a&&t.bezierCurveTo(o+i,s+r-l*n,o+i-l*e,s+r,o+i-e,s+r),t.lineTo(o+e,s+r),a&&t.bezierCurveTo(o+l*e,s+r,o,s+r-l*n,o,s+r-n),t.lineTo(o,s+n),a&&t.bezierCurveTo(o,s+l*n,o+l*e,s,o+e,s),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var e=-this.width/2,i=-this.height/2,r=this.width,o=this.height;t.beginPath(),n.util.drawDashedLine(t,e,i,e+r,i,this.strokeDashArray),n.util.drawDashedLine(t,e+r,i,e+r,i+o,this.strokeDashArray),n.util.drawDashedLine(t,e+r,i+o,e,i+o,this.strokeDashArray),n.util.drawDashedLine(t,e,i+o,e,i,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["\n']}}),n.Rect.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),n.Rect.fromElement=function(t,e,r){if(!t)return e(null);r=r||{};var o=n.parseAttributes(t,n.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0;var s=new n.Rect(i(r?n.util.object.clone(r):{},o));s.visible=s.visible&&s.width>0&&s.height>0,e(s)},n.Rect.fromObject=function(t,e){return n.Object._fromObject("Rect",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.array.min,o=n.util.array.max,s=n.util.toFixed;n.Polyline?n.warn("fabric.Polyline is already defined"):(n.Polyline=n.util.createClass(n.Object,{type:"polyline",points:null,cacheProperties:n.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e);var n=this._calcDimensions();void 0===e.left&&(this.left=n.left),void 0===e.top&&(this.top=n.top),this.width=n.width,this.height=n.height,this.pathOffset={x:n.left+this.width/2,y:n.top+this.height/2}},_calcDimensions:function(){var t=this.points,e=r(t,"x")||0,n=r(t,"y")||0;return{left:e,top:n,width:(o(t,"x")||0)-e,height:(o(t,"y")||0)-n}},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},_toSVG:function(){for(var t=[],e=this.pathOffset.x,i=this.pathOffset.y,r=n.Object.NUM_FRACTION_DIGITS,o=0,a=this.points.length;o\n']},commonRender:function(t){var e,n=this.points.length,i=this.pathOffset.x,r=this.pathOffset.y;if(!n||isNaN(this.points[n-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-i,this.points[0].y-r);for(var o=0;o"},toObject:function(t){return o(this.callSuper("toObject",t),{path:this.path.map(function(t){return t.slice()}),top:this.top,left:this.left})},toDatalessObject:function(t){var e=this.toObject(["sourcePath"].concat(t));return e.sourcePath&&delete e.path,e},_toSVG:function(){return["\n"]},_getOffsetTransform:function(){var t=n.Object.NUM_FRACTION_DIGITS;return" translate("+l(-this.pathOffset.x,t)+", "+l(-this.pathOffset.y,t)+")"},toClipPathSVG:function(t){var e=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},toSVG:function(t){var e=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},complexity:function(){return this.path.length},_parsePath:function(){for(var t,e,n,i,r,o=[],s=[],a=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,l=0,h=this.path.length;lg)for(var v=1,y=r.length;v"},addWithUpdate:function(t){return this._restoreObjectsState(),n.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},removeWithUpdate:function(t){return this._restoreObjectsState(),n.util.resetObjectTransform(this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(t){this.dirty=!0,t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){this.dirty=!0,delete t.group},_set:function(t,e){var i=this._objects.length;if(this.useSetOnGroup)for(;i--;)this._objects[i].setOnGroup(t,e);if("canvas"===t)for(;i--;)this._objects[i]._set(t,e);n.Object.prototype._set.call(this,t,e)},toObject:function(t){var e=this.includeDefaultValues,i=this._objects.map(function(n){var i=n.includeDefaultValues;n.includeDefaultValues=e;var r=n.toObject(t);return n.includeDefaultValues=i,r}),r=n.Object.prototype.toObject.call(this,t);return r.objects=i,r},toDatalessObject:function(t){var e,i=this.sourcePath;if(i)e=i;else{var r=this.includeDefaultValues;e=this._objects.map(function(e){var n=e.includeDefaultValues;e.includeDefaultValues=r;var i=e.toDatalessObject(t);return e.includeDefaultValues=n,i})}var o=n.Object.prototype.toDatalessObject.call(this,t);return o.objects=e,o},render:function(t){this._transformDone=!0,this.callSuper("render",t),this._transformDone=!1},shouldCache:function(){var t=this.objectCaching&&(!this.group||this.needsItsOwnCache()||!this.group.isOnACache());if(this.ownCaching=t,t)for(var e=0,n=this._objects.length;e"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(t,e,n){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",t,e),void 0===(n=n||{}).hasControls&&(n.hasControls=!1),void 0===n.hasRotatingPoint&&(n.hasRotatingPoint=!1),n.forActiveSelection=!0;for(var i=0,r=this._objects.length;i\n','\t\n',"\n"),o=' clip-path="url(#imageCrop_'+s+')" '}if(n.push("\t\n"),this.stroke||this.strokeDashArray){var a=this.fill;this.fill=null,t=["\t\n'],this.fill=a}return"fill"!==this.paintFirst?e.concat(t,n):e.concat(n,t)},getSrc:function(t){var e=t?this._element:this._originalElement;return e?e.toDataURL?e.toDataURL():e.src:this.src||""},setSrc:function(t,e,n){return C.util.loadImage(t,function(t){this.setElement(t,n),this._setWidthHeight(),e(this)},this,n&&n.crossOrigin),this},toString:function(){return'#'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.minimumScaleTrigger,n=this.getTotalObjectScaling(),i=n.scaleX,r=n.scaleY,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||i>e&&r>e)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=i,void(this._lastScaleY=r);C.filterBackend||(C.filterBackend=C.initFilterBackend());var s=C.util.createCanvasElement(),a=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=o.width,u=o.height;s.width=l,s.height=u,this._element=s,this._lastScaleX=t.scaleX=i,this._lastScaleY=t.scaleY=r,C.filterBackend.applyFilters([t],o,l,u,this._element,a),this._filterScalingX=s.width/this._originalElement.width,this._filterScalingY=s.height/this._originalElement.height},applyFilters:function(t){if(t=(t=t||this.filters||[]).filter(function(t){return t&&!t.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===t.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,n=e.naturalWidth||e.width,i=e.naturalHeight||e.height;if(this._element===this._originalElement){var r=C.util.createCanvasElement();r.width=n,r.height=i,this._element=r,this._filteredEl=r}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,n,i),this._lastScaleX=1,this._lastScaleY=1;return C.filterBackend||(C.filterBackend=C.initFilterBackend()),C.filterBackend.applyFilters(t,this._originalElement,n,i,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(t){!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)},shouldCache:function(){return this.ownCaching=this.objectCaching&&this.needsItsOwnCache(),this.ownCaching},_renderFill:function(t){var e=this._element,n=this.width,i=this.height,r=Math.min(e.naturalWidth||e.width,n*this._filterScalingX),o=Math.min(e.naturalHeight||e.height,i*this._filterScalingY),s=-n/2,a=-i/2,l=Math.max(0,this.cropX*this._filterScalingX),u=Math.max(0,this.cropY*this._filterScalingY);e&&t.drawImage(e,l,u,r,o,s,a,n,i)},_needsResize:function(){var t=this.getTotalObjectScaling();return t.scaleX!==this._lastScaleX||t.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(t,e){this.setElement(C.util.getById(t),e),C.util.addClass(this.getElement(),C.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?C.util.enlivenObjects(t,function(t){e&&e(t)},"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){t||(t={});var e=this.getElement();this.width=t.width||e.naturalWidth||e.width||0,this.height=t.height||e.naturalHeight||e.height||0},parsePreserveAspectRatioAttribute:function(){var t,e=C.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),n=this._element.width,i=this._element.height,r=1,o=1,s=0,a=0,l=0,u=0,c=this.width,h=this.height,p={width:c,height:h};return!e||"none"===e.alignX&&"none"===e.alignY?(r=c/n,o=h/i):("meet"===e.meetOrSlice&&(t=(c-n*(r=o=C.util.findScaleToFit(this._element,p)))/2,"Min"===e.alignX&&(s=-t),"Max"===e.alignX&&(s=t),t=(h-i*o)/2,"Min"===e.alignY&&(a=-t),"Max"===e.alignY&&(a=t)),"slice"===e.meetOrSlice&&(t=n-c/(r=o=C.util.findScaleToCover(this._element,p)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=i-h/o,"Mid"===e.alignY&&(u=t/2),"Max"===e.alignY&&(u=t),n=c/r,i=h/o)),{width:n,height:i,scaleX:r,scaleY:o,offsetLeft:s,offsetTop:a,cropX:l,cropY:u}}}),C.Image.CSS_CANVAS="canvas-img",C.Image.prototype.getSvgSrc=C.Image.prototype.getSrc,C.Image.fromObject=function(t,e){var n=C.util.object.clone(t);C.util.loadImage(n.src,function(t,i){i?e&&e(null,i):C.Image.prototype._initFilters.call(n,n.filters,function(i){n.filters=i||[],C.Image.prototype._initFilters.call(n,[n.resizeFilter],function(i){n.resizeFilter=i[0],C.util.enlivenObjects([n.clipPath],function(i){n.clipPath=i[0];var r=new C.Image(t,n);e(r)})})})},null,n.crossOrigin)},C.Image.fromURL=function(t,e,n){C.util.loadImage(t,function(t){e&&e(new C.Image(t,n))},null,n&&n.crossOrigin)},C.Image.ATTRIBUTE_NAMES=C.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),C.Image.fromElement=function(t,n,i){var r=C.parseAttributes(t,C.Image.ATTRIBUTE_NAMES);C.Image.fromURL(r["xlink:href"],n,e(i?C.util.object.clone(i):{},r))})}(e),C.util.object.extend(C.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(t){var e=function(){},n=(t=t||{}).onComplete||e,i=t.onChange||e,r=this;return C.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),i()},onComplete:function(){r.setCoords(),n()}}),this}}),C.util.object.extend(C.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function t(t,e){var n="precision "+e+" float;\nvoid main(){}",i=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(i,n),t.compileShader(i),!!t.getShaderParameter(i,t.COMPILE_STATUS)}function e(t){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}C.isWebglSupported=function(e){if(C.isLikelyNode)return!1;e=e||C.WebglFilterBackend.prototype.tileSize;var n=document.createElement("canvas"),i=n.getContext("webgl")||n.getContext("experimental-webgl"),r=!1;if(i){C.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),r=C.maxTextureSize>=e;for(var o=["highp","mediump","lowp"],s=0;s<3;s++)if(t(i,o[s])){C.webGlPrecision=o[s];break}}return this.isSupported=r,r},C.WebglFilterBackend=e,e.prototype={tileSize:2048,resources:{},setupGLContext:function(t,e){this.dispose(),this.createWebGLCanvas(t,e),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(t,e)},chooseFastestCopyGLTo2DMethod:function(t,e){var n,i=void 0!==window.performance;try{new ImageData(1,1),n=!0}catch(h){n=!1}var r="undefined"!=typeof ArrayBuffer,o="undefined"!=typeof Uint8ClampedArray;if(i&&n&&r&&o){var s,a,l=C.util.createCanvasElement(),u=new ArrayBuffer(t*e*4),c={imageBuffer:u,destinationWidth:t,destinationHeight:e,targetCanvas:l};l.width=t,l.height=e,s=window.performance.now(),S.call(c,this.gl,c),a=window.performance.now()-s,s=window.performance.now(),k.call(c,this.gl,c),a>window.performance.now()-s?(this.imageBuffer=u,this.copyGLTo2D=k):this.copyGLTo2D=S}},createWebGLCanvas:function(t,e){var n=C.util.createCanvasElement();n.width=t,n.height=e;var i={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},r=n.getContext("webgl",i);r||(r=n.getContext("experimental-webgl",i)),r&&(r.clearColor(0,0,0,0),this.canvas=n,this.gl=r)},applyFilters:function(t,e,n,i,r,o){var s,a=this.gl;o&&(s=this.getCachedTexture(o,e));var l={originalWidth:e.width||e.originalWidth,originalHeight:e.height||e.originalHeight,sourceWidth:n,sourceHeight:i,destinationWidth:n,destinationHeight:i,context:a,sourceTexture:this.createTexture(a,n,i,!s&&e),targetTexture:this.createTexture(a,n,i),originalTexture:s||this.createTexture(a,n,i,!s&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},u=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,u),t.forEach(function(t){t&&t.applyTo(l)}),function(t){var e=t.targetCanvas,n=t.destinationWidth,i=t.destinationHeight;e.width===n&&e.height===i||(e.width=n,e.height=i)}(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(u),r.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(t,e,n,i){var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,n,0,t.RGBA,t.UNSIGNED_BYTE,null),r},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var n=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=n,n},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},copyGLTo2D:S,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e={renderer:"",vendor:""};if(!t)return e;var n=t.getExtension("WEBGL_debug_renderer_info");if(n){var i=t.getParameter(n.UNMASKED_RENDERER_WEBGL),r=t.getParameter(n.UNMASKED_VENDOR_WEBGL);i&&(e.renderer=i.toLowerCase()),r&&(e.vendor=r.toLowerCase())}return this.gpuInfo=e,e}}}(),function(){"use strict";var t=function(){};function e(){}C.Canvas2dFilterBackend=e,e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(t,e,n,i,r){var o=r.getContext("2d");o.drawImage(e,0,0,n,i);var s={sourceWidth:n,sourceHeight:i,imageData:o.getImageData(0,0,n,i),originalEl:e,originalImageData:o.getImageData(0,0,n,i),canvasEl:r,ctx:o,filterBackend:this};return t.forEach(function(t){t.applyTo(s)}),s.imageData.width===n&&s.imageData.height===i||(r.width=s.imageData.width,r.height=s.imageData.height),o.putImageData(s.imageData,0,0),s}}}(),C.Image=C.Image||{},C.Image.filters=C.Image.filters||{},C.Image.filters.BaseFilter=C.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,n){e=e||this.fragmentSource,n=n||this.vertexSource,"highp"!==C.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+C.webGlPrecision+" float"));var i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(i));var r=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+t.getShaderInfoLog(r));var o=t.createProgram();if(t.attachShader(o,i),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(o));var s=this.getAttributeLocations(t,o),a=this.getUniformLocations(t,o)||{};return a.uStepW=t.getUniformLocation(o,"uStepW"),a.uStepH=t.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,uniformLocations:a}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(t,e,n){var i=e.aPosition,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e,n,i=t.context;t.passes>1?(n=t.destinationHeight,t.sourceWidth===(e=t.destinationWidth)&&t.sourceHeight===n||(i.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(i,e,n)),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t.targetTexture,0)):(i.bindFramebuffer(i.FRAMEBUFFER,null),i.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){var t=this.mainParameter,e=C.Image.filters[this.type].prototype;if(t){if(Array.isArray(e[t])){for(var n=e[t].length;n--;)if(this[t][n]!==e[t][n])return!1;return!0}return e[t]===this[t]}return!1},applyTo:function(t){t.webgl?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,n=this.retrieveShader(t);e.bindTexture(e.TEXTURE_2D,0===t.pass&&t.originalTexture?t.originalTexture:t.sourceTexture),e.useProgram(n.program),this.sendAttributeData(e,n.attributeLocations,t.aPosition),e.uniform1f(n.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(n.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,n.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,n){t.activeTexture(n),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}}),C.Image.filters.BaseFilter.fromObject=function(t,e){var n=new C.Image.filters[t.type](t);return e&&e(n),n},function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.ColorMatrix=(0,n.util.createClass)(i.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(t){this.callSuper("initialize",t),this.matrix=this.matrix.slice(0)},applyTo2d:function(t){var e,n,i,r,o,s=t.imageData.data,a=s.length,l=this.matrix,u=this.colorsOnly;for(o=0;o_||s<0||s>b||(e+=g[l=4*(a*b+s)]*(u=m[d*v+p]),n+=g[l+1]*u,i+=g[l+2]*u,C||(r+=g[l+3]*u));x[o]=e,x[o+1]=n,x[o+2]=i,x[o+3]=C?g[o+3]:r}t.imageData=w},getUniformLocations:function(t,e){return{uMatrix:t.getUniformLocation(e,"uMatrix"),uOpaque:t.getUniformLocation(e,"uOpaque"),uHalfSize:t.getUniformLocation(e,"uHalfSize"),uSize:t.getUniformLocation(e,"uSize")}},sendUniformData:function(t,e){t.uniform1fv(e.uMatrix,this.matrix)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),n.Image.filters.Convolute.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Grayscale=(0,n.util.createClass)(i.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(t){var e,n,i=t.imageData.data,r=i.length,o=this.mode;for(e=0;eu[0]&&r>u[1]&&o>u[2]&&i 0.0) {\n"+this.fragmentSource[t]+"}\n}"},retrieveShader:function(t){var e,n=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(n)||(e=this.buildSource(this.mode),t.programCache[n]=this.createProgram(t.context,e)),t.programCache[n]},applyTo2d:function(t){var e,i,r,o,s,a,l,u=t.imageData.data,c=u.length,h=1-this.alpha;e=(l=new n.Color(this.color).getSource())[0]*this.alpha,i=l[1]*this.alpha,r=l[2]*this.alpha;for(var p=0;p=t||e<=-t)return 0;if(e<1.1920929e-7&&e>-1.1920929e-7)return 1;var n=(e*=Math.PI)/t;return l(e)/e*l(n)/n}},applyTo2d:function(t){var e=t.imageData,n=this.scaleX,i=this.scaleY;this.rcpScaleX=1/n,this.rcpScaleY=1/i;var r,o=e.width,s=e.height,l=a(o*n),u=a(s*i);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,o,s,l,u):"hermite"===this.resizeType?r=this.hermiteFastResize(t,o,s,l,u):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,o,s,l,u):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,o,s,l,u)),t.imageData=r},sliceByTwo:function(t,e,i,o,s){var a,l,u=t.imageData,c=!1,h=!1,p=.5*e,d=.5*i,f=n.filterBackend.resources,g=0,m=0,v=e,y=0;for(f.sliceByTwo||(f.sliceByTwo=document.createElement("canvas")),((a=f.sliceByTwo).width<1.5*e||a.height=e)){D=r(1e3*s(S-w.x)),_[D]||(_[D]={});for(var j=x.y-b;j<=x.y+b;j++)j<0||j>=n||(R=r(1e3*s(j-w.y)),_[D][R]||(_[D][R]=d(o(i(D*m,2)+i(R*v,2))/1e3)),(k=_[D][R])>0&&(O+=k,T+=k*c[E=4*(j*e+S)],I+=k*c[E+1],A+=k*c[E+2],P+=k*c[E+3]))}p[E=4*(C*a+u)]=T/O,p[E+1]=I/O,p[E+2]=A/O,p[E+3]=P/O}return++u1&&R<-1||(b=2*R*R*R-3*R*R+1)>0&&(k+=b*d[3+(D=4*(P+O*e))],w+=b,d[D+3]<255&&(b=b*d[D+3]/250),x+=b*d[D],C+=b*d[D+1],S+=b*d[D+2],_+=b)}g[y]=x/_,g[y+1]=C/_,g[y+2]=S/_,g[y+3]=k/w}return f},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),n.Image.filters.Resize.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Contrast=(0,n.util.createClass)(i.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(t){if(0!==this.contrast){var e,n=t.imageData.data,i=n.length,r=Math.floor(255*this.contrast),o=259*(r+255)/(255*(259-r));for(e=0;e1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?n[0]=t:n[1]=t,n}}),i.Blur.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Gamma=(0,n.util.createClass)(i.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(t){this.gamma=[1,1,1],i.BaseFilter.prototype.initialize.call(this,t)},applyTo2d:function(t){var e,n=t.imageData.data,i=this.gamma,r=n.length,o=1/i[0],s=1/i[1],a=1/i[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),e=0,r=256;e'},_getCacheCanvasDimensions:function(){var t=this.callSuper("_getCacheCanvasDimensions"),e=this.fontSize;return t.width+=e*t.zoomX,t.height+=e*t.zoomY,t},_render:function(t){this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")},_renderText:function(t){"stroke"===this.paintFirst?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t))},_setTextStyles:function(t,e,n){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,n)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,n=this._textLines.length;et&&(t=i)}return t},_renderTextLine:function(t,e,n,i,r,o){this._renderChars(t,e,n,i,r,o)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,n,i,r,o,s,a=0,l=t.fillStyle,u=this._getLeftOffset(),c=this._getTopOffset(),h=0,p=0,d=0,f=this._textLines.length;d0&&!r){var p=this.__charBounds[e][n-1];h.left=p.left+p.width+l.kernedWidth-l.width}return h},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=this._textLines[t],n=this.getHeightOfChar(t,0),i=1,r=e.length;i0?(t.fillStyle=v,u&&v&&t.fillRect(y+o+h,c+this.offsets[e]*i+s,p,this.fontSize/15),h=d.left,p=d.width,u=f,v=m,i=r,s=a):p+=d.kernedWidth;t.fillStyle=m,f&&m&&t.fillRect(y+o+h,c+this.offsets[e]*i+s,p-_,this.fontSize/15),b+=n}else b+=n;this._removeShadow(t)}},_getFontDeclaration:function(t,e){var i=t||this,r=this.fontFamily,o=n.Text.genericFonts.indexOf(r.toLowerCase())>-1,s=void 0===r||r.indexOf("'")>-1||r.indexOf('"')>-1||o?i.fontFamily:'"'+i.fontFamily+'"';return[n.isLikelyNode?i.fontWeight:i.fontStyle,n.isLikelyNode?i.fontStyle:i.fontWeight,e?this.CACHE_FONT_SIZE+"px":i.fontSize+"px",s].join(" ")},render:function(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",t)))},_splitTextIntoLines:function(t){for(var e=t.split(this._reNewline),i=new Array(e.length),r=["\n"],o=[],s=0;s-1&&(t.underline=!0),t.textDecoration.indexOf("line-through")>-1&&(t.linethrough=!0),t.textDecoration.indexOf("overline")>-1&&(t.overline=!0),delete t.textDecoration)}C.IText=C.util.createClass(C.Text,C.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(t,e){this.callSuper("initialize",t,e),this.initBehavior()},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(t){this.clearContextTop(),this.callSuper("render",t),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(t){this.callSuper("_render",t)},clearContextTop:function(t){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this.canvas.contextTop,n=this.canvas.viewportTransform;e.save(),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this.transform(e),this.transformMatrix&&e.transform.apply(e,this.transformMatrix),this._clearTextArea(e),t||e.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas){var t,e=this._getCursorBoundaries();this.canvas&&this.canvas.contextTop?(t=this.canvas.contextTop,this.clearContextTop(!0)):(t=this.canvas.contextContainer).save(),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(t){var e=this.width+4,n=this.height+4;t.clearRect(-e/2,-n/2,e,n)},_getCursorBoundaries:function(t){void 0===t&&(t=this.selectionStart);var e=this._getLeftOffset(),n=this._getTopOffset(),i=this._getCursorBoundariesOffsets(t);return{left:e,top:n,leftOffset:i.left,topOffset:i.top}},_getCursorBoundariesOffsets:function(t){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var e,n,i,r=0,o=0,s=this.get2DCursorLocation(t);i=s.charIndex,n=s.lineIndex;for(var a=0;a0?o:0)},this.cursorOffsetCache},renderCursor:function(t,e){var n=this.get2DCursorLocation(),i=n.lineIndex,r=n.charIndex>0?n.charIndex-1:0,o=this.getValueOfPropertyAt(i,r,"fontSize"),s=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/s,l=t.topOffset,u=this.getValueOfPropertyAt(i,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(i)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(i,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,l+t.top+u,a,o)},renderSelection:function(t,e){for(var n=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,i=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),o=this.get2DCursorLocation(n),s=this.get2DCursorLocation(i),a=o.lineIndex,l=s.lineIndex,u=o.charIndex<0?0:o.charIndex,c=s.charIndex<0?0:s.charIndex,h=a;h<=l;h++){var p,d=this._getLineLeftOffset(h)||0,f=this.getHeightOfLine(h),g=0,m=0;if(h===a&&(g=this.__charBounds[a][u].left),h>=a&&h1)&&(f/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+d+g,t.top+t.topOffset+f,m-g,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+d+g,t.top+t.topOffset,m-g,f)),t.topOffset+=p}},getCurrentCharFontSize:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")},getCurrentCharColor:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fill")},_getCurrentCharIndex:function(){var t=this.get2DCursorLocation(this.selectionStart,!0);return{l:t.lineIndex,c:t.charIndex>0?t.charIndex-1:0}}}),C.IText.fromObject=function(e,n){if(t(e),e.styles)for(var i in e.styles)for(var r in e.styles[i])t(e.styles[i][r]);C.Object._fromObject("IText",e,n,"text")}}(),m=C.util.object.clone,C.util.object.extend(C.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var t=this;this.on("added",function(){var e=t.canvas;e&&(e._hasITextHandlers||(e._hasITextHandlers=!0,t._initCanvasHandlers(e)),e._iTextInstances=e._iTextInstances||[],e._iTextInstances.push(t))})},initRemovedHandler:function(){var t=this;this.on("removed",function(){var e=t.canvas;e&&(e._iTextInstances=e._iTextInstances||[],C.util.removeFromArray(e._iTextInstances,t),0===e._iTextInstances.length&&(e._hasITextHandlers=!1,t._removeCanvasHandlers(e)))})},_initCanvasHandlers:function(t){t._mouseUpITextHandler=function(){t._iTextInstances&&t._iTextInstances.forEach(function(t){t.__isMousedown=!1})},t.on("mouse:up",t._mouseUpITextHandler)},_removeCanvasHandlers:function(t){t.off("mouse:up",t._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,n,i){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:n,onComplete:function(){r.isAborted||t[i]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return r.isAborted}}),r},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(t){var e=this,n=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){e._tick()},n)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState,e=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&e&&e.clearContext(e.contextTop||e.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(t){var e=0,n=t-1;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n--;for(;/\S/.test(this._text[n])&&n>-1;)e++,n--;return t-e},findWordBoundaryRight:function(t){var e=0,n=t;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n++;for(;/\S/.test(this._text[n])&&n-1;)e++,n--;return t-e},findLineBoundaryRight:function(t){for(var e=0,n=t;!/\n/.test(this._text[n])&&n0&&nthis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===i||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(t,e,n){var i=n.slice(0,t),r=C.util.string.graphemeSplit(i).length;if(t===e)return{selectionStart:r,selectionEnd:r};var o=n.slice(t,e);return{selectionStart:r,selectionEnd:r+C.util.string.graphemeSplit(o).length}},fromGraphemeToStringSelection:function(t,e,n){var i=n.slice(0,t).join("").length;return t===e?{selectionStart:i,selectionEnd:i}:{selectionStart:i,selectionEnd:i+n.slice(t,e).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var t=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.inCompositionMode?this.compositionStart:this.selectionStart,e=this._getCursorBoundaries(t),n=this.get2DCursorLocation(t),i=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize")*this.lineHeight,r=e.leftOffset,o=this.calcTransformMatrix(),s={x:e.left+r,y:e.top+e.topOffset+i},a=this.canvas.upperCanvasEl,l=a.width,u=a.height,c=l-i,h=u-i,p=a.clientWidth/l,d=a.clientHeight/u;return s=C.util.transformPoint(s,o),(s=C.util.transformPoint(s,this.canvas.viewportTransform)).x*=p,s.y*=d,s.x<0&&(s.x=0),s.x>c&&(s.x=c),s.y<0&&(s.y=0),s.y>h&&(s.y=h),s.x+=this.canvas._offset.left,s.y+=this.canvas._offset.top,{left:s.x+"px",top:s.y+"px",fontSize:i+"px",charHeight:i}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text;return this.selected=!1,this.isEditing=!1,this.selectable=!0,this.selectionEnd=this.selectionStart,this.hiddenTextarea&&(this.hiddenTextarea.blur&&this.hiddenTextarea.blur(),this.canvas&&this.hiddenTextarea.parentNode.removeChild(this.hiddenTextarea),this.hiddenTextarea=null),this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},removeStyleFromTo:function(t,e){var n,i,r=this.get2DCursorLocation(t,!0),o=this.get2DCursorLocation(e,!0),s=r.lineIndex,a=r.charIndex,l=o.lineIndex,u=o.charIndex;if(s!==l){if(this.styles[s])for(n=a;n=u&&(i[c-p]=i[h],delete i[h])}},shiftLineStyles:function(t,e){var n=m(this.styles);for(var i in this.styles){var r=parseInt(i,10);r>t&&(this.styles[r+e]=n[r],n[r-e]||delete this.styles[r])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(t,e,n,i){var r,o={},s=!1;for(var a in n||(n=1),this.shiftLineStyles(t,n),this.styles[t]&&(r=this.styles[t][0===e?e:e-1]),this.styles[t]){var l=parseInt(a,10);l>=e&&(s=!0,o[l-e]=this.styles[t][a],delete this.styles[t][a])}for(s?this.styles[t+n]=o:delete this.styles[t+n];n>1;)n--,i&&i[n]?this.styles[t+n]={0:m(i[n])}:r?this.styles[t+n]={0:m(r)}:delete this.styles[t+n];this._forceClearCache=!0},insertCharStyleObject:function(t,e,n,i){this.styles||(this.styles={});var r=this.styles[t],o=r?m(r):{};for(var s in n||(n=1),o){var a=parseInt(s,10);a>=e&&(r[a+n]=o[a],o[a-n]||delete r[a])}if(this._forceClearCache=!0,i)for(;n--;)Object.keys(i[n]).length&&(this.styles[t]||(this.styles[t]={}),this.styles[t][e+n]=m(i[n]));else if(r)for(var l=r[e?e-1:1];l&&n--;)this.styles[t][e+n]=m(l)},insertNewStyleBlock:function(t,e,n){for(var i=this.get2DCursorLocation(e,!0),r=[0],o=0,s=0;s0&&(this.insertCharStyleObject(i.lineIndex,i.charIndex,r[0],n),n=n&&n.slice(r[0]+1)),o&&this.insertNewlineStyleObject(i.lineIndex,i.charIndex+r[0],o),s=1;s0?this.insertCharStyleObject(i.lineIndex+s,0,r[s],n):n&&(this.styles[i.lineIndex+s][0]=n[0]),n=n&&n.slice(r[s]+1);r[s]>0&&this.insertCharStyleObject(i.lineIndex+s,0,r[s],n)},setSelectionStartEndWithShift:function(t,e,n){n<=t?(e===t?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=t),this.selectionStart=n):n>t&&nt?this.selectionStart=t:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>t?this.selectionEnd=t:this.selectionEnd<0&&(this.selectionEnd=0)}}),C.util.object.extend(C.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=t.pointer;this.isTripleClick(e)&&(this.fire("tripleclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},initClicks:function(){this.on("mousedblclick",function(t){this.selectWord(this.getSelectionStartFromPointer(t.e))}),this.on("tripleclick",function(t){this.selectLine(this.getSelectionStartFromPointer(t.e))})},_mouseDownHandler:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||this===this.canvas._activeObject&&(this.selected=!0)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){if(this.__isMousedown=!1,!(!this.editable||this.group||t.transform&&t.transform.actionPerformed||t.e.button&&1!==t.e.button)){if(this.canvas){var e=this.canvas._activeObject;if(e&&e!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t);t.shiftKey?this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),n=0,i=0,r=0,o=0,s=0,a=0,l=this._textLines.length;a0&&(o+=this._textLines[a-1].length+1);i=this._getLineLeftOffset(s)*this.scaleX;for(var u=0,c=this._textLines[s].length;ut.x-e||o<0?0:1);return this.flipX&&(s=r-s),s>this._text.length&&(s=this._text.length),s}}),C.util.object.extend(C.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=C.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding\uff70top: "+t.fontSize+";",C.document.body.appendChild(this.hiddenTextarea),C.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),C.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),C.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),C.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(C.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing&&!this.inCompositionMode){if(t.keyCode in this.keysMap)this[this.keysMap[t.keyCode]](t);else{if(!(t.keyCode in this.ctrlKeysMapDown&&(t.ctrlKey||t.metaKey)))return;this[this.ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(t){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this.ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),this.isEditing){var n,i,r=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,o=this._text.length,s=r.length,a=s-o;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var l=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),u=this.selectionStart>l.selectionStart;this.selectionStart!==this.selectionEnd?(n=this._text.slice(this.selectionStart,this.selectionEnd),a+=this.selectionEnd-this.selectionStart):s0&&(i+=(n=this.__charBounds[t][e-1]).left+n.width),i},getDownCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(r===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-n;var o=i.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r+1,s);return this._textLines[r].slice(o).length+a+2},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(0===r||t.metaKey||33===t.keyCode)return-n;var o=i.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r-1,s),l=this._textLines[r].slice(0,o);return-this._textLines[r-1].length+a-l.length},_getIndexOnLine:function(t,e){for(var n,i,r=this._textLines[t],o=this._getLineLeftOffset(t),s=0,a=0,l=r.length;ae){i=!0;var u=o,c=Math.abs(o-n-e);s=Math.abs(u-e)=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var n=this["get"+t+"CursorOffset"](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(n):this.moveCursorWithoutShift(n),0!==n&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,"left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t),0!==t},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,n){var i;if(t.altKey)i=this["findWordBoundary"+n](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===n?-1:1,!0;i=this["findLineBoundary"+n](this[e])}if(void 0!==typeof i&&this[e]!==i)return this[e]=i,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var n="moveCursor"+t+"With";this._currentCursorOpacity=1,this[n+=e.shiftKey?"Shift":"outShift"](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t,e){void 0===e&&(e=t+1),this.removeStyleFromTo(t,e),this._text.splice(t,e-t),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(t,e,n,i){void 0===i&&(i=n),i>n&&this.removeStyleFromTo(n,i);var r=C.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,n,e),this._text=[].concat(this._text.slice(0,n),r,this._text.slice(i)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),v=C.util.toFixed,y=/ +/g,C.util.object.extend(C.Text.prototype,{toSVG:function(t){var e=this._getSVGLeftTopOffsets(),n=this._getSVGTextAndBg(e.textTop,e.textLeft),i=this._wrapSVGTextAndBg(n);return this._createBaseSVGMarkup(i,{reviver:t,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(t){var e=this.getSvgTextDecoration(this);return[t.textBgRects.join(""),'\t\t",t.textSpans.join(""),"\n"]},_getSVGTextAndBg:function(t,e){var n,i=[],r=[],o=t;this._setSVGBg(r);for(var s=0,a=this._textLines.length;s",C.util.string.escapeXml(t),""].join("")},_setSVGTextLineText:function(t,e,n,i){var r,o,s,a,l,u=this.getHeightOfLine(e),c=-1!==this.textAlign.indexOf("justify"),h="",p=0,d=this._textLines[e];i+=u*(1-this._fontSizeFraction)/this.lineHeight;for(var f=0,g=d.length-1;f<=g;f++)l=f===g||this.charSpacing,h+=d[f],s=this.__charBounds[e][f],0===p?(n+=s.kernedWidth-s.width,p+=s.width):p+=s.kernedWidth,c&&!l&&this._reSpaceAndTab.test(d[f])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,f),o=this.getCompleteStyleDeclaration(e,f+1),l=this._hasStyleChangedForSvg(r,o)),l&&(a=this._getStyleDeclaration(e,f)||{},t.push(this._createTextCharSpan(h,a,n,i)),h="",r=o,n+=p,p=0)},_pushTextBgRect:function(t,e,n,i,r,o){var s=C.Object.NUM_FRACTION_DIGITS;t.push("\t\t\n')},_setSVGTextLineBg:function(t,e,n,i){for(var r,o,s=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,l=0,u=0,c=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),h=0,p=s.length;hthis.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(t){for(var e=0,n=0,i=0,r={},o=0;o0?(n=0,i++,e++):this._reSpaceAndTab.test(t.graphemeText[i])&&o>0&&(n++,i++),r[o]={line:e,offset:n},i+=t.graphemeLines[o].length,n+=t.graphemeLines[o].length;return r},styleHas:function(t,e){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[e];i&&(e=i.line)}return n.Text.prototype.styleHas.call(this,t,e)},isEmptyStyles:function(t){var e,n,i=0,r=!1,o=this._styleMap[t],s=this._styleMap[t+1];for(var a in o&&(t=o.line,i=o.offset),s&&(r=s.line===t,e=s.offset),n=void 0===t?this.styles:{line:this.styles[t]})for(var l in n[a])if(l>=i&&(!r||l=i&&!m?(a.push(l),l=[],o=d,m=!0):o+=v,m||l.push(p),l=l.concat(c),f=this._measureWord([p],e,h),h++,m=!1,d>g&&(g=d);return y&&a.push(l),g+r>this.dynamicMinWidth&&(this.dynamicMinWidth=g-v+r),a},isEndOfWrapping:function(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line},_splitTextIntoLines:function(t){for(var e=n.Text.prototype._splitTextIntoLines.call(this,t),i=this._wrapText(e.lines,this.width),r=new Array(i.length),o=0;o=l.getMinWidth()?(a=p!==l.width,l.set("width",p),a):void 0},C.util.object.extend(C.Textbox.prototype,{_removeExtraneousStyles:function(){for(var t in this._styleMap)this._textLines[t]||delete this.styles[this._styleMap[t].line]}})},hLX6:function(t,e,n){"use strict";function i(t,e){var n,i;if("function"==typeof e)void 0!==(i=e(t))&&(t=i);else if(Array.isArray(e))for(n=0;n=0&&(t=t.replace(/\[/g,".").replace(/]/g,"")),t.split(e)}function u(t,e,n){if(!(this instanceof u))return new u(t,e,n);void 0===e&&(e=!1),void 0===n&&(n=!0),this.separator=t||".",this.override=e,this.useArray=n,this.keepArray=!1,this.cleanup=[]}var c=new u(".",!1,!0);function h(t){return function(){return c[t].apply(c,arguments)}}u.prototype._fill=function(t,e,n,r){var o=t.shift();if(t.length>0){if(e[o]=e[o]||(this.useArray&&/^\d+$/.test(t[0])?[]:{}),!s(e[o])){if(!this.override){if(!s(n)||!a(n))throw new Error("Trying to redefine `"+o+"` which is a "+typeof e[o]);return}e[o]={}}this._fill(t,e[o],n,r)}else{if(!this.override&&s(e[o])&&!a(e[o])){if(!s(n)||!a(n))throw new Error("Trying to redefine non-empty obj['"+o+"']");return}e[o]=i(n,r)}},u.prototype.object=function(t,e){var n=this;return Object.keys(t).forEach(function(r){var o=void 0===e?null:e[r],s=l(r,n.separator).join(n.separator);-1!==s.indexOf(n.separator)?(n._fill(s.split(n.separator),t,t[r],o),delete t[r]):n.override&&(t[r]=i(t[r],o))}),t},u.prototype.str=function(t,e,n,r){return-1!==t.indexOf(this.separator)?this._fill(t.split(this.separator),n,e,r):n.hasOwnProperty(t)&&!this.override||(n[t]=i(e,r)),n},u.prototype.pick=function(t,e,n){var i,o,s,a,u;for(o=l(t,this.separator),i=0;ithis._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(t){return this._globalContext.user=t,this},setExtraContext:function(t){return this._mergeContext("extra",t),this},setTagsContext:function(t){return this._mergeContext("tags",t),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(r(this._globalContext))},setEnvironment:function(t){return this._globalOptions.environment=t,this},setRelease:function(t){return this._globalOptions.release=t,this},setDataCallback:function(t){return this._globalOptions.dataCallback=U(this._globalOptions.dataCallback,t),this},setBreadcrumbCallback:function(t){return this._globalOptions.breadcrumbCallback=U(this._globalOptions.breadcrumbCallback,t),this},setShouldSendCallback:function(t){return this._globalOptions.shouldSendCallback=U(this._globalOptions.shouldSendCallback,t),this},setTransport:function(t){return this._globalOptions.transport=t,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!(!this._hasJSON||!this._globalServer&&(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),1))},afterLoad:function(){var t=z.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function(t){if(H){if(!(t=_({eventId:this.lastEventId(),dsn:this._dsn,user:this._globalContext.user||{}},t)).eventId)throw new s("Missing eventId");if(!t.dsn)throw new s("Missing DSN");var e=encodeURIComponent,n=[];for(var i in t)if("user"===i){var r=t.user;r.name&&n.push("name="+e(r.name)),r.email&&n.push("email="+e(r.email))}else n.push(e(i)+"="+e(t[i]));var o=this._getGlobalServer(this._parseDSN(t.dsn)),a=H.createElement("script");a.async=!0,a.src=o+"/api/embed/error-page/?"+n.join("&"),(H.head||H.body).appendChild(a)}},_ignoreNextOnError:function(){var t=this;this._ignoreOnError+=1,setTimeout(function(){t._ignoreOnError-=1})},_triggerEvent:function(t,e){var n,i;if(this._hasDocument){for(i in e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),H.createEvent?(n=H.createEvent("HTMLEvents")).initEvent(t,!0,!0):(n=H.createEventObject()).eventType=t,e)C(e,i)&&(n[i]=e[i]);if(H.createEvent)H.dispatchEvent(n);else try{H.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(r){}}},_breadcrumbEventHandler:function(t){var e=this;return function(n){if(e._keypressTimeout=null,e._lastCapturedEvent!==n){var i;e._lastCapturedEvent=n;try{i=O(n.target)}catch(r){i=""}e.captureBreadcrumb({category:"ui."+t,message:i})}}},_keypressEventHandler:function(){var t=this;return function(e){var n;try{n=e.target}catch(o){return}var i=n&&n.tagName;if(i&&("INPUT"===i||"TEXTAREA"===i||n.isContentEditable)){var r=t._keypressTimeout;r||t._breadcrumbEventHandler("input")(e),clearTimeout(r),t._keypressTimeout=setTimeout(function(){t._keypressTimeout=null},1e3)}}},_captureUrlChange:function(t,e){var n=A(this._location.href),i=A(e),r=A(t);this._lastHref=e,n.protocol===i.protocol&&n.host===i.host&&(e=i.relative),n.protocol===r.protocol&&n.host===r.host&&(t=r.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return t._originalFunctionToString.apply("function"==typeof this&&this.__raven__?this.__orig__:this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){var t=this,e=t._wrappedBuiltIns;function n(e){return function(n,i){for(var r=new Array(arguments.length),o=0;o"}}},s)),e.apply?e.apply(this,r):e(r[0],r[1])}}var i=this._globalOptions.autoBreadcrumbs;function r(n){var r=z[n]&&z[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(P(r,"addEventListener",function(e){return function(r,o,s,a){try{o&&o.handleEvent&&(o.handleEvent=t.wrap({mechanism:{type:"instrument",data:{target:n,function:"handleEvent",handler:o&&o.name||""}}},o.handleEvent))}catch(h){}var l,u,c;return i&&i.dom&&("EventTarget"===n||"Node"===n)&&(u=t._breadcrumbEventHandler("click"),c=t._keypressEventHandler(),l=function(t){if(t){var e;try{e=t.type}catch(n){return}return"click"===e?u(t):"keypress"===e?c(t):void 0}}),e.call(this,r,t.wrap({mechanism:{type:"instrument",data:{target:n,function:"addEventListener",handler:o&&o.name||""}}},o,l),s,a)}},e),P(r,"removeEventListener",function(t){return function(e,n,i,r){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(o){}return t.call(this,e,n,i,r)}},e))}P(z,"setTimeout",n,e),P(z,"setInterval",n,e),z.requestAnimationFrame&&P(z,"requestAnimationFrame",function(e){return function(n){return e(t.wrap({mechanism:{type:"instrument",data:{function:"requestAnimationFrame",handler:e&&e.name||""}}},n))}},e);for(var o=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],s=0;s"}}},n)})}if(e.xhr&&"XMLHttpRequest"in z){var r=z.XMLHttpRequest&&z.XMLHttpRequest.prototype;P(r,"open",function(e){return function(n,i){return m(i)&&-1===i.indexOf(t._globalKey)&&(this.__raven_xhr={method:n,url:i,status_code:null}),e.apply(this,arguments)}},n),P(r,"send",function(e){return function(){var n=this;function r(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}t.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var o=["onload","onerror","onprogress"],s=0;s"}}},e,r)}):n.onreadystatechange=r,e.apply(this,arguments)}},n)}e.xhr&&D()&&P(z,"fetch",function(e){return function(){for(var n=new Array(arguments.length),i=0;i2?arguments[2]:void 0;return n&&t._captureUrlChange(t._lastHref,n+""),e.apply(this,arguments)}};P(z.history,"pushState",a,n),P(z.history,"replaceState",a,n)}if(e.console&&"console"in z&&console.log){var l=function(e,n){t.captureBreadcrumb({message:e,level:n.level,category:"console"})};b(["debug","info","warn","error","log"],function(t,e){L(console,e,l)})}},_restoreBuiltIns:function(){for(var t;this._wrappedBuiltIns.length;)(t=this._wrappedBuiltIns.shift())[0][t[1]]=t[2]},_restoreConsole:function(){for(var t in this._originalConsoleMethods)this._originalConsole[t]=this._originalConsoleMethods[t]},_drainPlugins:function(){var t=this;b(this._plugins,function(e,n){n[0].apply(t,[t].concat(n[1]))})},_parseDSN:function(t){var e=B.exec(t),n={},i=7;try{for(;i--;)n[N[i]]=e[i]||""}catch(r){throw new s("Invalid DSN: "+t)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new s("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function(t,e){(e=e||{}).mechanism=e.mechanism||{type:"onerror",handled:!1},this._ignoreOnError||this._handleStackInfo(t,e)},_handleStackInfo:function(t,e){var n=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,n,e)},_prepareFrames:function(t,e){var n=this,i=[];if(t.stack&&t.stack.length&&(b(t.stack,function(e,r){var o=n._normalizeFrame(r,t.url);o&&i.push(o)}),e&&e.trimHeadFrames))for(var r=0;r0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),t=this._sanitizeData(t),Object.keys(t).forEach(function(e){(null==t[e]||""===t[e]||y(t[e]))&&delete t[e]}),g(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!y(t)&&(g(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"==typeof e.sampleRate?Math.random() ".length;t&&i++<5&&!("html"===(e=f(t))||i>1&&r+n.length*o+e.length>=80);)n.push(e),r+=e.length,t=t.parentNode;return n.reverse().join(" > ")},htmlElementAsString:f,isSameException:function(t,e){return!g(t,e)&&(t=t.values[0]).type===(e=e.values[0]).type&&t.value===e.value&&(n=e.stacktrace,(!o(t.stacktrace)||!o(n))&&m(t.stacktrace,e.stacktrace));var n},isSameStacktrace:m,parseUrl:function(t){if("string"!=typeof t)return{};var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+(e[6]||"")+(e[8]||"")}},fill:function(t,e,n,i){if(null!=t){var r=t[e];t[e]=n(r),t[e].__raven__=!0,t[e].__orig__=r,i&&i.push([t,e,r])}},safeJoin:function(t,e){if(!l(t))return"";for(var n=[],i=0;ir?t(e,n-1):a},serializeKeysForMessage:function(t,e){if("number"==typeof t||"string"==typeof t)return t.toString();if(!Array.isArray(t))return"";if(0===(t=t.filter(function(t){return"string"==typeof t})).length)return"[object has no keys]";if(t[0].length>=(e="number"!=typeof e?40:e))return t[0];for(var n=t.length;n>0;n--){var i=t.slice(0,n).join(", ");if(!(i.length>e))return n===t.length?i:i+"\u2026"}return""},sanitize:function(t,e){if(!l(e)||l(e)&&0===e.length)return t;var n,r=d(e);try{n=JSON.parse(i(t))}catch(o){return t}return function t(e){return l(e)?e.map(function(e){return t(e)}):s(e)?Object.keys(e).reduce(function(n,i){return n[i]=r.test(i)?"********":t(e[i]),n},{}):e}(n)}}},yLV6:function(t,e,n){var i;!function(r,o,s,a){"use strict";var l,u=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),h="function",p=Math.round,d=Math.abs,f=Date.now;function g(t,e,n){return setTimeout(x(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(v(t,n[e],n),!0)}function v(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function I(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]}):i.sort()),i}function R(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=et(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,l=s?s.center:o.center,u=e.center=nt(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=st(l,u),e.distance=ot(l,u),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==V&&o.eventType!==z||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=rt(e.deltaX,e.deltaY);var c,h,p=it(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=d(p.x)>d(p.y)?p.x:p.y,e.scale=s?(c=s.pointers,ot((h=i)[0],h[1],J)/ot(c[0],c[1],J)):1,e.rotation=s?function(t,e){return st(i[1],i[0],J)+st(t[1],t[0],J)}(s.pointers):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=H&&(l>B||s.velocity===a)){var u=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,h=it(l,u,c);i=h.x,r=h.y,n=d(h.x)>d(h.y)?h.x:h.y,o=rt(u,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var g=t.element;O(e.srcEvent.target,g)&&(g=e.srcEvent.target),e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function et(t){for(var e=[],n=0;n=d(e)?t<0?U:X:e<0?Y:G}function ot(t,e,n){n||(n=Q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function st(t,e,n){return n||(n=Q),180*Math.atan2(e[n[1]]-t[n[1]],e[n[0]]-t[n[0]])/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(M(this.element),this.evWin,this.domHandler)}};var at={mousedown:V,mousemove:2,mouseup:z},lt="mousedown",ut="mousemove mouseup";function ct(){this.evEl=lt,this.evWin=ut,this.pressed=!1,$.apply(this,arguments)}w(ct,$,{handler:function(t){var e=at[t.type];e&V&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=z),this.pressed&&(e&z&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ht={pointerdown:V,pointermove:2,pointerup:z,pointercancel:H,pointerout:H},pt={2:"touch",3:"pen",4:"mouse",5:"kinect"},dt="pointerdown",ft="pointermove pointerup pointercancel";function gt(){this.evEl=dt,this.evWin=ft,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(dt="MSPointerDown",ft="MSPointerMove MSPointerUp MSPointerCancel"),w(gt,$,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=ht[i],o=pt[t.pointerType]||t.pointerType,s="touch"==o,a=A(e,t.pointerId,"pointerId");r&V&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(z|H)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var mt={touchstart:V,touchmove:2,touchend:z,touchcancel:H},vt="touchstart",yt="touchstart touchmove touchend touchcancel";function bt(){this.evTarget=vt,this.evWin=yt,this.started=!1,$.apply(this,arguments)}w(bt,$,{handler:function(t){var e=mt[t.type];if(e===V&&(this.started=!0),this.started){var n=(function(t,e){var n=P(t.touches),i=P(t.changedTouches);return e&(z|H)&&(n=D(n.concat(i),"identifier",!0)),[n,i]}).call(this,t,e);e&(z|H)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var _t={touchstart:V,touchmove:2,touchend:z,touchcancel:H},wt="touchstart touchmove touchend touchcancel";function xt(){this.evTarget=wt,this.targetIds={},$.apply(this,arguments)}w(xt,$,{handler:function(t){var e=_t[t.type],n=(function(t,e){var n=P(t.touches),i=this.targetIds;if(e&(2|V)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=P(t.changedTouches),a=[],l=this.target;if(o=n.filter(function(t){return O(t.target,l)}),e===V)for(r=0;r-1&&i.splice(t,1)},Ct)}}w(St,$,{handler:function(t,e,n){var i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if("touch"==n.pointerType)(function(t,e){t&V?(this.primaryTouch=e.changedPointers[0].identifier,kt.call(this,e)):t&(z|H)&&kt.call(this,e)}).call(this,e,n);else if(i&&(function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n=Rt&&i(e.options.event+Lt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Vt.prototype.attrTest.call(this,t)&&(this.state&Pt||!(this.state&Pt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Nt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(Ht,Vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Pt)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),w(Wt,Ft,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(z|H)&&!r)this.reset();else if(t.eventType&V)this.reset(),this._timer=g(function(){this.state=jt,this.tryEmit()},e.time,this);else if(t.eventType&z)return jt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===jt&&(t&&t.eventType&z?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(Ut,Vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Pt)}}),w(Xt,Vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:q|K,pointers:1},getTouchAction:function(){return zt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(q|K)?e=t.overallVelocity:n&q?e=t.overallVelocityX:n&K&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&t.eventType&z},emit:function(t){var e=Nt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(Yt,Ft,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function c(){for(var t=[],e=0;e0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(Q);function st(t){return t}function at(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),it(st,t)}function lt(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof P?t[0]:at(n)(et(t,i))}function ut(){return function(t){return t.lift(new ct(t))}}var ct=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new ht(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),ht=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return r(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(O),pt=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new _).add(this.source.subscribe(new ft(this.getSubject(),this))),t.closed?(this._connection=null,t=_.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return ut()(this)},e}(P).prototype,dt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:pt._subscribe},_isComplete:{value:pt._isComplete,writable:!0},getSubject:{value:pt.getSubject},connect:{value:pt.connect},refCount:{value:pt.refCount}},ft=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return r(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(F);function gt(){return new L}function mt(){return function(t){return ut()((e=gt,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,dt);return i.source=t,i.subjectFactory=n,i})(t));var e}}function vt(t){for(var e in t)if(t[e]===vt)return e;throw Error("Could not find renamed property on target object.")}var yt=vt({ngComponentDef:vt}),bt=vt({ngInjectableDef:vt}),_t=vt({ngInjectorDef:vt}),wt=vt({ngModuleDef:vt}),xt=vt({__NG_ELEMENT_ID__:vt});function Ct(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function St(t){return t&&t.hasOwnProperty(bt)?t[bt]:null}function kt(t){return t&&t.hasOwnProperty(_t)?t[_t]:null}var Et=function(){function t(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?Ct({providedIn:e.providedIn||"root",factory:e.factory}):void 0}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),Ot="__parameters__";function Tt(t,e,n){var i=function(t){return function(){for(var e=[],n=0;n=ie?n:n[Yt]}function be(t){return null!==t.template}function _e(t){return t[le]}function we(t){var e=_e(t);return e?Array.isArray(e)?e:e.lView:null}function xe(t){return 32767&t}function Ce(t,e){for(var n=t>>16,i=e;n>0;)i=i[ne],n--;return i}var Se=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Pt);function ke(t){for(var e=t[Gt];e&&2===e.type;)e=(t=t[ne])[Gt];return t}var Ee,Oe,Te,Ie,Ae=Tt("Inject",function(t){return{token:t}}),Pe=Tt("Optional"),De=Tt("Self"),Re=Tt("SkipSelf"),je=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({}),Me=void 0;function Fe(t){var e=Me;return Me=t,e}function Le(t){var e=Ee;return Ee=t,e}function Ne(t,e){return void 0===e&&(e=je.Default),(Ee||function(t,e){if(void 0===e&&(e=je.Default),void 0===Me)throw new Error("inject() must be called from an injection context");return null===Me?Be(t,void 0,e):Me.get(t,e&je.Optional?null:void 0,e)})(t,e)}function Be(t,e,n){var i=St(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&je.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND ["+Lt(t)+"]")}function Ve(t){for(var e=[],n=0;n>16,c=r?a+u:t.directiveEnd,h=i?a:a+u;h=l&&p.type===n)return h}if(r){var d=s[l];if(d&&be(d)&&d.type===n)return l}return null}(a,e,n,null==i?function(t){return 1==(1&t.flags)}(a)&&ln:i!=s&&3===a.type,r&je.Host&&o===a);return null!==l?vn(s.data,e,l,a):gn}function vn(t,e,n,i){var r,o=e[n];if(null!=(r=o)&&"object"==typeof r&&Object.getPrototypeOf(r)==fe){var s=o;if(s.resolving)throw new Error("Circular dep for "+ge(t[n]));var a=un(s.canSeeViewProviders);s.resolving=!0;var l=void 0;s.injectImpl&&(l=Le(s.injectImpl));var u=Ge(),c=Ye();Ke(i,e);try{o=e[n]=s.factory(null,t,e,i)}finally{s.injectImpl&&Le(l),un(a),s.resolving=!1,Ke(u,c)}}return o}function yn(t,e,n){var i=64&t,r=32&t;return!!((128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e])&1<=ie&&(n=t[Gt])&&2===n.type?function(e,n){if(-1===e.index){var i=t[ee];return i>-1?t[Ut][i]:null}return t[Ut][e.parent.index]}(n):t[Ut]===e?null:t[Ut]}function Ln(t){if(t.length>=ie){var e=t;!function(t){var e,n=t[Ht];null!=n&&null!=(e=n.destroyHooks)&&Xe(t,e)}(e),(r=(i=e)[Ht]&&i[Ht].pipeDestroyHooks)&&Xe(i,r),function(t){var e=t[Ht].cleanup;if(null!=e){for(var n=t[Kt],i=0;i=0?n[s]():n[-s].unsubscribe(),i+=2}else"number"==typeof e[i]?(0,n[e[i]])():e[i].call(n[e[i+1]]);t[Kt]=null}}(e);var n=e[Gt];n&&3===n.type&&Pn(e[$t])&&e[$t].destroy()}var i,r}var Nn="@",Bn=Promise.resolve(null);function Vn(t){var e=t[Ht];if(e.firstTemplatePass=!1,on(!1),!Je(t)){var n=tn();(function(t,e,n){!n&&32&t[Wt]&&(Ue(t,e.initHooks,e.checkHooks,n),t[Wt]&=-33)})(t,e,n),function(t){for(var e=Mn(t);null!==e;e=e[Xt])if(e.length ");else if("object"==typeof e){var r=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];r.push(o+":"+("string"==typeof s?JSON.stringify(s):Lt(s)))}i="{"+r.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+i+"]: "+t.replace(bi,"\n ")}function Si(t,e){return new Error(Ci(t,e))}var ki=new Et("The presence of this token marks an injector as being the root injector."),Ei={},Oi={},Ti=[],Ii=void 0;function Ai(){return void 0===Ii&&(Ii=new ci),Ii}var Pi=function(){function t(t,e,n){var i=this;this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this.destroyed=!1;var r=[];ji([t],function(t){return i.processInjectorType(t,[],r)}),e&&ji(e,function(n){return i.processProvider(n,t,e)}),this.records.set(ui,Ri(void 0,this)),this.isRootInjector=this.records.has(ki),this.injectorDefTypes.forEach(function(t){return i.get(t)})}return t.prototype.destroy=function(){this.assertNotDestroyed(),this.destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},t.prototype.get=function(t,e,n){void 0===e&&(e=li),void 0===n&&(n=je.Default),this.assertNotDestroyed();var i,r=Fe(this);try{if(!(n&je.SkipSelf)){var o=this.records.get(t);if(void 0===o){var s=("function"==typeof(i=t)||"object"==typeof i&&i instanceof Et)&&St(t);s&&this.injectableDefInScope(s)&&(o=Ri(Di(t),Ei),this.records.set(t,o))}if(void 0!==o)return this.hydrate(t,o)}return(n&je.Self?Ai():this.parent).get(t,e)}finally{Fe(r)}},t.prototype.assertNotDestroyed=function(){if(this.destroyed)throw new Error("Injector has already been destroyed.")},t.prototype.processInjectorType=function(t,e,n){var i=this;if(t=Vt(t)){var r=kt(t),o=null==r&&t.ngModule||void 0,s=void 0===o?t:o,a=-1!==n.indexOf(s),l=void 0!==o&&t.providers||Ti;if(void 0!==o&&(r=kt(o)),null!=r){if(this.injectorDefTypes.add(s),this.records.set(s,Ri(r.factory,Ei)),null!=r.imports&&!a){n.push(s);try{ji(r.imports,function(t){return i.processInjectorType(t,e,n)})}finally{}}var u=r.providers;if(null!=u&&!a){var c=t;ji(u,function(t){return i.processProvider(t,c,u)})}var h=t.ngModule;ji(l,function(t){return i.processProvider(t,h,l)})}}},t.prototype.processProvider=function(t,e,n){var i=Fi(t=Vt(t))?t:Vt(t&&t.provide),r=function(t,e,n){var i=function(t,e,n){var i,r=void 0;if(Fi(t))return Di(Vt(t));if(Mi(t))r=function(){return Vt(t.useValue)};else if((i=t)&&i.useExisting)r=function(){return Ne(Vt(t.useExisting))};else if(t&&t.useFactory)r=function(){return t.useFactory.apply(t,c(Ve(t.deps||[])))};else{var o=Vt(t&&(t.useClass||t.provide));if(!o){var s="";throw e&&n&&(s=" - only instances of Provider and Type are allowed, got: ["+n.map(function(e){return e==t?"?"+t+"?":"..."}).join(", ")+"]"),new Error("Invalid provider for the NgModule '"+Lt(e)+"'"+s)}if(!t.deps)return Di(o);r=function(){return new(o.bind.apply(o,c([void 0],Ve(t.deps))))}}return r}(t,e,n);return Mi(t)?Ri(void 0,t.useValue):Ri(i,Ei)}(t,e,n);if(Fi(t)||!0!==t.multi){var o=this.records.get(i);if(o&&void 0!==o.multi)throw new Error("Mixed multi-provider for "+Lt(i))}else{var s=this.records.get(i);if(s){if(void 0===s.multi)throw new Error("Mixed multi-provider for "+i+".")}else(s=Ri(void 0,Ei,!0)).factory=function(){return Ve(s.multi)},this.records.set(i,s);i=t,s.multi.push(t)}this.records.set(i,r)},t.prototype.hydrate=function(t,e){if(e.value===Oi)throw new Error("Cannot instantiate cyclic dependency! "+Lt(t));var n;return e.value===Ei&&(e.value=Oi,e.value=e.factory()),"object"==typeof e.value&&e.value&&"object"==typeof(n=e.value)&&null!=n&&n.ngOnDestroy&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value},t.prototype.injectableDefInScope=function(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||"root"===t.providedIn&&this.isRootInjector:this.injectorDefTypes.has(t.providedIn))},t}();function Di(t){var e=St(t);if(null===e){var n=kt(t);if(null!==n)return n.factory;if(t instanceof Et)throw new Error("Token "+Lt(t)+" is missing an ngInjectableDef definition.");if(t instanceof Function){var i=t.length;if(i>0){var r=new Array(i).fill("?");throw new Error("Can't resolve all parameters for "+Lt(t)+": ("+r.join(", ")+").")}return function(){return new t}}throw new Error("unreachable")}return e.factory}function Ri(t,e,n){return void 0===n&&(n=!1),{factory:t,value:e,multi:n?[]:void 0}}function ji(t,e){t.forEach(function(t){return Array.isArray(t)?ji(t,e):e(t)})}function Mi(t){return t&&"object"==typeof t&&vi in t}function Fi(t){return"function"==typeof t}var Li=function(){return function(){}}(),Ni=function(){return function(){}}();function Bi(t){var e=Error("No component factory found for "+Lt(t)+". Did you add it to @NgModule.entryComponents?");return e[zi]=t,e}var Vi,zi="ngComponent",Hi=function(){function t(){}return t.prototype.resolveComponentFactory=function(t){throw Bi(t)},t}(),Wi=function(){function t(){}return t.NULL=new Hi,t}(),Ui=function(){function t(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(var i=0;i-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}var e,n;Pn(n=(e=this._lView)[$t])&&n.destroyNode&&function(t,n,i,r,o){for(var s=e[Ht].node,a=-1,l=e,u=s.child;u;){var c=null;if(3===u.type){jn(2,i,null,ve(u,l),o);var h=l[u.index];g=h,Array.isArray(g)&&g.length===ae&&jn(2,i,null,h[se],o)}else if(0===u.type){var p=l[u.index];jn(2,i,null,p[se],o),p[oe].length&&(c=(l=p[oe][0])[Ht].node,o=p[se])}else if(1===u.type){var d=ke(l),f=d[Gt].projection[u.projection];Rn[++a]=u,Rn[++a]=l,f&&(c=(l=d[Ut])[Ht].data[f.index])}else c=u.child;if(null===c)for(null===u.next&&2&u.flags&&(l=Rn[a--],u=Rn[a--]),c=u.next;!c;){if(null===(u=u.parent||l[Ht].node)||u===s)return null;0===u.type&&(o=(l=l[Ut])[u.index][se]),c=2===u.type&&l[Xt]?(l=l[Xt])[Ht].node:u.next}u=c}var g}(0,0,n),function(t){if(-1===t[Ht].childIndex)return Ln(t);for(var e=Mn(t);e;){var n=null;if(e.length>=ie?e[Ht].childIndex>-1&&(n=Mn(e)):e[oe].length&&(n=e[oe][0]),null==n){for(;e&&!e[Xt]&&e!==t;)Ln(e),e=Fn(e,t);Ln(e||t),n=e&&e[Xt]}e=n}}(e),e[Wt]|=64},t.prototype.onDestroy=function(t){var e,n;n=t,function(t){return t[Kt]||(t[Kt]=[])}(e=this._lView).push(n),e[Ht].firstTemplatePass&&function(t){return t[Ht].cleanup||(t[Ht].cleanup=[])}(e).push(e[Kt].length-1,null)},t.prototype.markForCheck=function(){!function(t){for(;t&&!(128&t[Wt]);)t[Wt]|=8,t=t[Ut];var e,n,i;t[Wt]|=8,i=0===(e=t[Zt]).flags,e.flags|=1,i&&e.clean==Bn&&(e.clean=new Promise(function(t){return n=t}),e.scheduler(function(){if(1&e.flags&&(e.flags&=-2,Zn(e)),2&e.flags){e.flags&=-3;var t=e.playerHandler;t&&t.flushPlayers()}e.clean=Bn,n(null)}))}(this._lView)},t.prototype.detach=function(){this._lView[Wt]&=-17},t.prototype.reattach=function(){this._lView[Wt]|=16},t.prototype.detectChanges=function(){Qn(this._lView,this.context)},t.prototype.checkNoChanges=function(){!function(t){en(!0);try{!function(t){Qn(function(t){var e,n=_e(t);if(Array.isArray(n)){var i=function(t,e){var n=t[Ht].components;if(n)for(var i=0;i',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t=""+t+"";try{t=encodeURI(t)}catch(i){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(void 0);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t=""+t+"";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(n){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){for(var e=t.attributes,n=e.length-1;0"),!0},t.prototype.endElement=function(t){var e=t.nodeName.toLowerCase();Er.hasOwnProperty(e)&&!xr.hasOwnProperty(e)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(Rr(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e},t}(),Pr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Dr=/([^\#-~ |!])/g;function Rr(t){return t.replace(/&/g,"&").replace(Pr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Dr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function jr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Mr={provide:Wi,useClass:or,deps:[Yi]},Fr=function(t){function e(e,n){var i=t.call(this)||this;i._parent=n,i._bootstrapComponents=[],i.injector=i,i.destroyCbs=[];var r=function(t,n){var i=e[wt]||null;return i}();return i._bootstrapComponents=r.bootstrap,i._r3Injector=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),e=e||Ai(),new Pi(t,n,e)}(e,n,[{provide:Yi,useValue:i},Mr]),i.instance=i.get(e),i}return r(e,t),e.prototype.get=function(t,e,n){return void 0===e&&(e=hi.THROW_IF_NOT_FOUND),void 0===n&&(n=je.Default),t===hi||t===Yi||t===ui?this:this._r3Injector.get(t,e,n)},Object.defineProperty(e.prototype,"componentFactoryResolver",{get:function(){return this.get(Wi)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null},e.prototype.onDestroy=function(t){this.destroyCbs.push(t)},e}(Yi);!function(t){function e(e){var n=t.call(this)||this;return n.moduleType=e,n}r(e,t),e.prototype.create=function(t){return new Fr(this.moduleType,t)}}(Gi);var Lr=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return r(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,i){var r,o=function(t){return null},s=function(){return null};e&&"object"==typeof e?(r=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(r=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),i&&(s=this.__isAsync?function(){setTimeout(function(){return i()})}:function(){i()}));var a=t.prototype.subscribe.call(this,r,o,s);return e instanceof _&&e.add(a),a},e}(L),Nr=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return Br(t,Ki)},t}(),Br=oi,Vr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),zr=/^url\(([^)]+)\)$/,Hr=Function;function Wr(t){return"function"==typeof t}var Ur=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,Xr=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Yr=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Gr=function(){function t(t){this._reflect=t||Pt.Reflect}return t.prototype.isReflectionEnabled=function(){return!0},t.prototype.factory=function(t){return function(){for(var e=[],n=0;n1?" ("+function(t){for(var e=[],n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return Lt(t.token)}).join(" -> ")+")":""}function ro(t,e,n,i){var r=[e],o=n(r),s=i?function(t,e){var n=o+" caused by: "+(e instanceof Error?e.message:e),i=Error(n);return i[Qr]=e,i}(0,i):Error(o);return s.addKey=oo,s.keys=r,s.injectors=[t],s.constructResolvingMessage=n,s[Qr]=i,s}function oo(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function so(t,e){for(var n=[],i=0,r=e.length;i=this._providers.length)throw function(t){return Error("Index "+t+" is out-of-bounds.")}(t);return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw ro(this,t.key,function(t){return"Cannot instantiate cyclic dependency!"+io(t)});return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=new Array(t.resolvedFactories.length),n=0;n0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})},t.prototype.whenStable=function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t}(),rs=function(){function t(){this._applications=new Map,os.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),os.findTestabilityInTree(this,t,e)},s([a("design:paramtypes",[])],t)}(),os=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),ss=new Et("AllowMultipleToken"),as=function(){return function(t,e){this.name=t,this.token=e}}();function ls(t,e,n){void 0===n&&(n=[]);var i="Platform: "+e,r=new Et(i);return function(e){void 0===e&&(e=[]);var o=us();if(!o||o.injector.get(ss,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var s=n.concat(e).concat({provide:r,useValue:!0});!function(t){if(es&&!es.destroyed&&!es.injector.get(ss,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");es=t.get(cs);var e=t.get(Ao,null);e&&e.forEach(function(t){return t()})}(hi.create({providers:s,name:i}))}return function(t){var e=us();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function us(){return es&&!es.destroyed?es:null}var cs=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n,i=this,r="noop"===(n=e?e.ngZone:void 0)?new ns:("zone.js"===n?void 0:n)||new Ko({enableLongStackTrace:fr()}),o=[{provide:Ko,useValue:r}];return r.run(function(){var e=hi.create({providers:o,parent:i.injector,name:t.moduleType.name}),n=t.create(e),s=n.injector.get(no,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return ds(i._modules,n)}),r.runOutsideAngular(function(){return r.onError.subscribe({next:function(t){s.handleError(t)}})}),function(t,e,r){try{var o=((s=n.injector.get(Eo)).runInitializers(),s.donePromise.then(function(){return i._moduleDoBootstrap(n),n}));return Co(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(a){throw e.runOutsideAngular(function(){return t.handleError(a)}),a}var s}(s,r)})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var i=hs({},e);return function(t,e,n){return t.get(Wo).createCompiler([e]).compileModuleAsync(n)}(this.injector,i,t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(ps);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+Lt(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function hs(t,e){return Array.isArray(e)?e.reduce(hs,t):o({},t,e)}var ps=function(){function t(t,e,n,i,r,o){var s=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=fr(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new P(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),l=new P(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){Ko.assertNotInAngularZone(),Mt(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Ko.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=lt(a,l.pipe(mt()))}var e;return e=t,t.prototype.bootstrap=function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof Ni?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n instanceof Xi?null:this._injector.get(Yi),o=n.create(hi.NULL,[],e||n.selector,r);o.onDestroy(function(){i._unloadComponent(o)});var s=o.injector.get(is,null);return s&&o.injector.get(rs).registerApplication(o.location.nativeElement,s),this._loadComponent(o),fr()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(i){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(i)})}finally{this._runningTick=!1,qo(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;ds(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Do,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),ds(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Go("ApplicationRef#tick()"),t}();function ds(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var fs,gs=function(){function t(){this.dirty=!0,this._results=[],this.changes=new Lr,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[jt()]=function(){return this._results[jt()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var i=Array.isArray(n)?t(n):n;return e.concat(i)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),ms=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return vs(t,Ki)},t}(),vs=oi,ys=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return bs()},t}(),bs=function(){for(var t=[],e=0;e-1}(i)||"root"===r.providedIn&&i._def.isRoot))){var c=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:a.factory,deps:[],index:c,token:e.token},t._providers[c]=Xa,t._providers[c]=Qa(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{Fe(o)}}function Qa(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var i=n.length;switch(i){case 0:return new e;case 1:return new e(Za(t,n[0]));case 2:return new e(Za(t,n[0]),Za(t,n[1]));case 3:return new e(Za(t,n[0]),Za(t,n[1]),Za(t,n[2]));default:for(var r=new Array(i),o=0;o=n.length)&&(e=n.length-1),e<0)return null;var i=n[e];return i.viewContainerParent=null,nl(n,e),ta.dirtyParentQueries(i),tl(i),i}function $a(t,e,n){var i=e?_a(e,e.def.lastRenderRootNode):t.renderElement,r=n.renderer.parentNode(i),o=n.renderer.nextSibling(i);Ia(n,2,r,o,void 0)}function tl(t){Ia(t,3,null,null,void 0)}function el(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function nl(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var il=new Object;function rl(t,e,n,i,r,o){return new ol(t,e,n,i,r,o)}var ol=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=r,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=i,a}return r(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,i){if(!i)throw new Error("ngModule should be provided");var r=Ta(this.viewDefFactory),o=r.nodes[0].element.componentProvider.nodeIndex,s=ta.createRootView(t,e||[],n,r,i,il),a=Qs(s,o).instance;return n&&s.renderer.setAttribute(Zs(s,0).renderElement,"ng-version",rr.full),new sl(s,new cl(s),a)},e}(Ni),sl=function(t){function e(e,n,i){var r=t.call(this)||this;return r._view=e,r._viewRef=n,r._component=i,r._elDef=r._view.def.nodes[0],r.hostView=n,r.changeDetectorRef=n,r.instance=i,r}return r(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new Ki(Zs(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new fl(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(Li);function al(t,e,n){return new ll(t,e,n)}var ll=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new Ki(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new fl(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=ba(t),t=t.parent;return t?new fl(t,e):new fl(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=Ja(this._data,t);ta.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new cl(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i},t.prototype.createComponent=function(t,e,n,i,r){var o=n||this.parentInjector;r||t instanceof Xi||(r=o.get(Yi));var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,i,r,o,s=t;return o=(n=this._data).viewContainer._embeddedViews,null==(i=e)&&(i=o.length),(r=s._view).viewContainerParent=this._view,el(o,i,r),function(t,e){var n=ya(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var i=n.template._projectedViews;i||(i=n.template._projectedViews=[]),i.push(e),function(t,n){if(!(4&n.flags)){e.parent.def.nodeFlags|=4,n.flags|=4;for(var i=n.parent;i;)i.childFlags|=4,i=i.parent}}(0,e.parentNodeDef)}}(n,r),ta.dirtyParentQueries(r),$a(n,i>0?o[i-1]:null,r),s.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,i,r,o,s,a=this._embeddedViews.indexOf(t._view);return r=e,s=(o=(n=this._data).viewContainer._embeddedViews)[i=a],nl(o,i),null==r&&(r=o.length),el(o,r,s),ta.dirtyParentQueries(s),tl(s),$a(n,r>0?o[r-1]:null,s),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Ja(this._data,t);e&&ta.destroyView(e)},t.prototype.detach=function(t){var e=Ja(this._data,t);return e?new cl(e):null},t}();function ul(t){return new cl(t)}var cl=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return Ia(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){ga(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{ta.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){ta.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),ta.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,tl(this._view),ta.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function hl(t,e){return new pl(t,e)}var pl=function(t){function e(e,n){var i=t.call(this)||this;return i._parentView=e,i._def=n,i}return r(e,t),e.prototype.createEmbeddedView=function(t){return new cl(ta.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new Ki(Zs(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(Nr);function dl(t,e){return new fl(t,e)}var fl=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=hi.THROW_IF_NOT_FOUND),ta.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:sa(t)},e)},t}();function gl(t,e){var n=t.def.nodes[e];if(1&n.flags){var i=Zs(t,n.nodeIndex);return n.element.template?i.template:i.renderElement}if(2&n.flags)return Ks(t,n.nodeIndex).renderText;if(20240&n.flags)return Qs(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function ml(t){return new vl(t.renderer)}var vl=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=u(Ma(e),2),i=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,i),i},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var i=0;i0,i=e.provider;switch(201347067&e.flags){case 512:return Ll(t,e.parent,n,i.value,i.deps);case 1024:return function(t,e,n,i,r){var o=r.length;switch(o){case 0:return i();case 1:return i(Bl(t,e,n,r[0]));case 2:return i(Bl(t,e,n,r[0]),Bl(t,e,n,r[1]));case 3:return i(Bl(t,e,n,r[0]),Bl(t,e,n,r[1]),Bl(t,e,n,r[2]));default:for(var s=Array(o),a=0;a0)u=g,ou(g)||(c=g);else for(;u&&f===u.nodeIndex+u.childCount;){var y=u.parent;y&&(y.childFlags|=u.childFlags,y.childMatchedQueries|=u.childMatchedQueries),c=(u=y)&&ou(u)?u.renderParent:u}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:l,flags:t,nodes:e,updateDirectives:n||ra,updateRenderer:i||ra,handleEvent:function(t,n,i,r){return e[n].element.handleEvent(t,i,r)},bindingCount:r,outputCount:o,lastRenderRootNode:d}}function ou(t){return 0!=(1&t.flags)&&null===t.element.name}function su(t,e,n){var i=e.element&&e.element.template;if(i){if(!i.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(i.lastRenderRootNode&&16777216&i.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var r=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=r&&e.nodeIndex+e.childCount>r)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function au(t,e,n,i){var r=cu(t.root,t.renderer,t,e,n);return hu(r,t.component,i),pu(r),r}function lu(t,e,n){var i=cu(t,t.renderer,null,null,e);return hu(i,n,n),pu(i),i}function uu(t,e,n,i){var r,o=e.element.componentRendererType;return r=o?t.root.rendererFactory.createRenderer(i,o):t.root.renderer,cu(t.root,r,t,e.element.componentProvider,n)}function cu(t,e,n,i,r){var o=new Array(r.nodes.length),s=r.outputCount?new Array(r.outputCount):null;return{def:r,parent:n,viewContainerParent:null,parentNodeDef:i,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(r.bindingCount),disposables:s,initIndex:-1}}function hu(t,e,n){t.component=e,t.context=n}function pu(t){var e;wa(t)&&(e=Zs(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,i=t.nodes,r=0;r0&&Ua(t,e,0,n)&&(d=!0),p>1&&Ua(t,e,1,i)&&(d=!0),p>2&&Ua(t,e,2,r)&&(d=!0),p>3&&Ua(t,e,3,o)&&(d=!0),p>4&&Ua(t,e,4,s)&&(d=!0),p>5&&Ua(t,e,5,a)&&(d=!0),p>6&&Ua(t,e,6,l)&&(d=!0),p>7&&Ua(t,e,7,u)&&(d=!0),p>8&&Ua(t,e,8,c)&&(d=!0),p>9&&Ua(t,e,9,h)&&(d=!0),d}(t,e,n,i,r,o,s,a,l,u,c,h);case 2:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=!1,d=e.bindings,f=d.length;if(f>0&&da(t,e,0,n)&&(p=!0),f>1&&da(t,e,1,i)&&(p=!0),f>2&&da(t,e,2,r)&&(p=!0),f>3&&da(t,e,3,o)&&(p=!0),f>4&&da(t,e,4,s)&&(p=!0),f>5&&da(t,e,5,a)&&(p=!0),f>6&&da(t,e,6,l)&&(p=!0),f>7&&da(t,e,7,u)&&(p=!0),f>8&&da(t,e,8,c)&&(p=!0),f>9&&da(t,e,9,h)&&(p=!0),p){var g=e.text.prefix;f>0&&(g+=iu(n,d[0])),f>1&&(g+=iu(i,d[1])),f>2&&(g+=iu(r,d[2])),f>3&&(g+=iu(o,d[3])),f>4&&(g+=iu(s,d[4])),f>5&&(g+=iu(a,d[5])),f>6&&(g+=iu(l,d[6])),f>7&&(g+=iu(u,d[7])),f>8&&(g+=iu(c,d[8])),f>9&&(g+=iu(h,d[9]));var m=Ks(t,e.nodeIndex).renderText;t.renderer.setValue(m,g)}return p}(t,e,n,i,r,o,s,a,l,u,c,h);case 16384:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=Qs(t,e.nodeIndex),d=p.instance,f=!1,g=void 0,m=e.bindings.length;return m>0&&pa(t,e,0,n)&&(f=!0,g=zl(t,p,e,0,n,g)),m>1&&pa(t,e,1,i)&&(f=!0,g=zl(t,p,e,1,i,g)),m>2&&pa(t,e,2,r)&&(f=!0,g=zl(t,p,e,2,r,g)),m>3&&pa(t,e,3,o)&&(f=!0,g=zl(t,p,e,3,o,g)),m>4&&pa(t,e,4,s)&&(f=!0,g=zl(t,p,e,4,s,g)),m>5&&pa(t,e,5,a)&&(f=!0,g=zl(t,p,e,5,a,g)),m>6&&pa(t,e,6,l)&&(f=!0,g=zl(t,p,e,6,l,g)),m>7&&pa(t,e,7,u)&&(f=!0,g=zl(t,p,e,7,u,g)),m>8&&pa(t,e,8,c)&&(f=!0,g=zl(t,p,e,8,c,g)),m>9&&pa(t,e,9,h)&&(f=!0,g=zl(t,p,e,9,h,g)),g&&d.ngOnChanges(g),65536&e.flags&&qs(t,256,e.nodeIndex)&&d.ngOnInit(),262144&e.flags&&d.ngDoCheck(),f}(t,e,n,i,r,o,s,a,l,u,c,h);case 32:case 64:case 128:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=e.bindings,d=!1,f=p.length;if(f>0&&da(t,e,0,n)&&(d=!0),f>1&&da(t,e,1,i)&&(d=!0),f>2&&da(t,e,2,r)&&(d=!0),f>3&&da(t,e,3,o)&&(d=!0),f>4&&da(t,e,4,s)&&(d=!0),f>5&&da(t,e,5,a)&&(d=!0),f>6&&da(t,e,6,l)&&(d=!0),f>7&&da(t,e,7,u)&&(d=!0),f>8&&da(t,e,8,c)&&(d=!0),f>9&&da(t,e,9,h)&&(d=!0),d){var g=Js(t,e.nodeIndex),m=void 0;switch(201347067&e.flags){case 32:m=new Array(p.length),f>0&&(m[0]=n),f>1&&(m[1]=i),f>2&&(m[2]=r),f>3&&(m[3]=o),f>4&&(m[4]=s),f>5&&(m[5]=a),f>6&&(m[6]=l),f>7&&(m[7]=u),f>8&&(m[8]=c),f>9&&(m[9]=h);break;case 64:m={},f>0&&(m[p[0].name]=n),f>1&&(m[p[1].name]=i),f>2&&(m[p[2].name]=r),f>3&&(m[p[3].name]=o),f>4&&(m[p[4].name]=s),f>5&&(m[p[5].name]=a),f>6&&(m[p[6].name]=l),f>7&&(m[p[7].name]=u),f>8&&(m[p[8].name]=c),f>9&&(m[p[9].name]=h);break;case 128:var v=n;switch(f){case 1:m=v.transform(n);break;case 2:m=v.transform(i);break;case 3:m=v.transform(i,r);break;case 4:m=v.transform(i,r,o);break;case 5:m=v.transform(i,r,o,s);break;case 6:m=v.transform(i,r,o,s,a);break;case 7:m=v.transform(i,r,o,s,a,l);break;case 8:m=v.transform(i,r,o,s,a,l,u);break;case 9:m=v.transform(i,r,o,s,a,l,u,c);break;case 10:m=v.transform(i,r,o,s,a,l,u,c,h)}}g.value=m}return d}(t,e,n,i,r,o,s,a,l,u,c,h);default:throw"unreachable"}}(t,e,i,r,o,s,a,l,u,h,p,d):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var i=!1,r=0;r0&&fa(t,e,0,n),p>1&&fa(t,e,1,i),p>2&&fa(t,e,2,r),p>3&&fa(t,e,3,o),p>4&&fa(t,e,4,s),p>5&&fa(t,e,5,a),p>6&&fa(t,e,6,l),p>7&&fa(t,e,7,u),p>8&&fa(t,e,8,c),p>9&&fa(t,e,9,h)}(t,e,i,r,o,s,a,l,u,c,h,p):function(t,e,n){for(var i=0;i0){var o=new Set(t.modules);ju.forEach(function(e,i){if(o.has(St(i).providedIn)){var r={token:i,flags:e.flags|(n?4096:0),deps:ka(e.deps),value:e.value,index:t.providers.length};t.providers.push(r),t.providersByKey[sa(i)]=r}})}}(t=t.factory(function(){return ra})),t):t}(i))}var Ru=new Map,ju=new Map,Mu=new Map;function Fu(t){var e;Ru.set(t.token,t),"function"==typeof t.token&&(e=St(t.token))&&"function"==typeof e.providedIn&&ju.set(t.token,t)}function Lu(t,e){var n=Ta(e.viewDefFactory),i=Ta(n.nodes[0].element.componentView);Mu.set(t,i)}function Nu(){Ru.clear(),ju.clear(),Mu.clear()}function Bu(t){if(0===Ru.size)return t;var e=function(t){for(var e=[],n=null,i=0;i=r||i.height>=o){var s=r-.1*r,a=1/Math.min((o-.1*o)/i.getScaledHeight(),s/i.getScaledWidth());i.scaleX=i.scaleX*(1/a),i.scaleY=i.scaleY*(1/a)}e.state.fabric.add(i),i.viewportCenter(),i.setCoords(),e.render(),e.zoom.fitToScreen(),n(i)}})})},t.prototype.getMainImage=function(){return this.state.fabric.getObjects().find(function(t){return t.name===Nc.mainImage.name})},t}(),Hc=function(){function t(){this.all={},this.onChange=new Lr}return t.prototype.setMultiple=function(t,e){for(var n in void 0===e&&(e=!1),t){var i=t[n];"0"!==i&&"1"!==i||(i=parseInt(i)),this.set(n,i)}e&&this.onChange.emit()},t.prototype.merge=function(t,e){void 0===e&&(e=!1),this.all=xc()(this.all,t),e&&this.onChange.emit()},t.prototype.set=function(t,e,n){void 0===n&&(n=!1),Cc.set(t,e,this.all),n&&this.onChange.emit(t)},t.prototype.get=function(t,e){void 0===e&&(e=null);var n=Cc.pick(t,this.all);return null==n?e:n},t.prototype.getAll=function(){return this.all},t.prototype.has=function(t){return!!Cc.pick(t,this.all)},t.prototype.getJson=function(t,e){void 0===e&&(e=null);var n=this.get(t,e);return"string"!=typeof n?n:JSON.parse(n)},t.prototype.getBaseUrl=function(t){return void 0===t&&(t=!1),this.has("base_url")&&("production"===this.get("vebto.environment")||t)?this.get("base_url")+"/":document.querySelector("base")?document.querySelector("base").href:window.location.href.replace(/([^\/]+\.\w+($|\/$))/,"")},t.prototype.getAssetUrl=function(t){var e=this.get("vebto.assetsUrl")||this.getBaseUrl(),n=this.get("vebto.assetsPrefix");return"production"===this.get("vebto.environment")&&n&&(e+=n+"/"),e+="assets/",t&&(e+=t),e},t.prototype.save=function(t){this.setMultiple(t.client);var e=btoa(encodeURIComponent(JSON.stringify(t)));return this.http.post("settings",{settings:e})},t.prototype.anySocialLoginEnabled=function(){var t=this;return["facebook","google","twitter"].filter(function(e){return t.get("social."+e+".enable")}).length>-1},t.prototype.setHttpClient=function(t){this.http=t},t.ngInjectableDef=Ct({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Wc=function(){function t(t,e,n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b,_){this.filterTool=t,this.resizeTool=e,this.cropTool=n,this.transformTool=i,this.drawTool=r,this.textTool=o,this.shapesTool=s,this.frameTool=a,this.cornerTool=l,this.exportTool=u,this.importTool=c,this.canvas=h,this.watermark=p,this.history=d,this.activeObject=f,this.objects=g,this.controls=m,this.cropZone=v,this.mergeTool=y,this.fillTool=b,this.fonts=_}return t.prototype.get=function(t){return"canvas"===t?this.canvas:this[t]||this[t+"Tool"]},t}(),Uc=new P(function(t){return t.complete()});function Xc(t){return t?function(t){return new P(function(e){return t.schedule(function(){return e.complete()})})}(t):Uc}function Yc(t){var e=new P(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}function Gc(){for(var t=[],e=0;e0){var i=t.slice(0,n),r=i.toLowerCase(),o=t.slice(n+1).trim();e.maybeSetNormalizedName(i,r),e.headers.has(r)?e.headers.get(r).push(o):e.headers.set(r,[o])}})}:function(){e.headers=new Map,Object.keys(t).forEach(function(n){var i=t[n],r=n.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(e.headers.set(r,i),e.maybeSetNormalizedName(n,r))})}:this.headers=new Map}return t.prototype.has=function(t){return this.init(),this.headers.has(t.toLowerCase())},t.prototype.get=function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null},t.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},t.prototype.getAll=function(t){return this.init(),this.headers.get(t.toLowerCase())||null},t.prototype.append=function(t,e){return this.clone({name:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({name:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({name:t,value:e,op:"d"})},t.prototype.maybeSetNormalizedName=function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)},t.prototype.init=function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))},t.prototype.copyFrom=function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})},t.prototype.clone=function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n},t.prototype.applyUpdate=function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,c(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var o=this.headers.get(e);if(!o)return;0===(o=o.filter(function(t){return-1===r.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}},t.prototype.forEach=function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})},t}(),Rh=function(){function t(){}return t.prototype.encodeKey=function(t){return jh(t)},t.prototype.encodeValue=function(t){return jh(t)},t.prototype.decodeKey=function(t){return decodeURIComponent(t)},t.prototype.decodeValue=function(t){return decodeURIComponent(t)},t}();function jh(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Mh=function(){function t(t){void 0===t&&(t={});var e,n,i,r=this;if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Rh,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=t.fromString,n=this.encoder,i=new Map,e.length>0&&e.split("&").forEach(function(t){var e=t.indexOf("="),r=u(-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],2),o=r[0],s=r[1],a=i.get(o)||[];a.push(s),i.set(o,a)}),i)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(function(e){var n=t.fromObject[e];r.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}return t.prototype.has=function(t){return this.init(),this.map.has(t)},t.prototype.get=function(t){this.init();var e=this.map.get(t);return e?e[0]:null},t.prototype.getAll=function(t){return this.init(),this.map.get(t)||null},t.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},t.prototype.append=function(t,e){return this.clone({param:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({param:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({param:t,value:e,op:"d"})},t.prototype.toString=function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).join("&")},t.prototype.clone=function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n},t.prototype.init=function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}}),this.cloneFrom=null)},t}();function Fh(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Lh(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Nh(t){return"undefined"!=typeof FormData&&t instanceof FormData}var Bh=function(){function t(t,e,n,i){var r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new Dh),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{var s=e.indexOf("?");this.urlWithParams=e+(-1===s?"?":s=200&&this.status<300}}(),Hh=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=Vh.ResponseHeader,n}return r(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(zh),Wh=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=Vh.Response,n.body=void 0!==e.body?e.body:null,n}return r(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(zh),Uh=function(t){function e(e){var n=t.call(this,e,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.message=n.status>=200&&n.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for "+(e.url||"(unknown url)")+": "+e.status+" "+e.statusText,n.error=e.error||null,n}return r(e,t),e}(zh);function Xh(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var Yh=function(){function t(t){this.handler=t}return t.prototype.request=function(t,e,n){var i,r=this;if(void 0===n&&(n={}),t instanceof Bh)i=t;else{var o;o=n.headers instanceof Dh?n.headers:new Dh(n.headers);var s=void 0;n.params&&(s=n.params instanceof Mh?n.params:new Mh({fromObject:n.params})),i=new Bh(t,e,void 0!==n.body?n.body:null,{headers:o,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var a=Gc(i).pipe(it(function(t){return r.handler.handle(t)},void 0,1));if(t instanceof Bh||"events"===n.observe)return a;var l=a.pipe(qc(function(t){return t instanceof Wh}));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return l.pipe(J(function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(J(function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(J(function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(J(function(t){return t.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},t.prototype.delete=function(t,e){return void 0===e&&(e={}),this.request("DELETE",t,e)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.request("GET",t,e)},t.prototype.head=function(t,e){return void 0===e&&(e={}),this.request("HEAD",t,e)},t.prototype.jsonp=function(t,e){return this.request("JSONP",t,{params:(new Mh).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},t.prototype.options=function(t,e){return void 0===e&&(e={}),this.request("OPTIONS",t,e)},t.prototype.patch=function(t,e,n){return void 0===n&&(n={}),this.request("PATCH",t,Xh(n,e))},t.prototype.post=function(t,e,n){return void 0===n&&(n={}),this.request("POST",t,Xh(n,e))},t.prototype.put=function(t,e,n){return void 0===n&&(n={}),this.request("PUT",t,Xh(n,e))},t}(),Gh=function(){function t(t,e){this.next=t,this.interceptor=e}return t.prototype.handle=function(t){return this.interceptor.intercept(t,this.next)},t}(),qh=new Et("HTTP_INTERCEPTORS"),Kh=function(){function t(){}return t.prototype.intercept=function(t,e){return e.handle(t)},t}(),Zh=/^\)\]\}',?\n/,Qh=function(){return function(){}}(),Jh=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t}(),$h=function(){function t(t){this.xhrFactory=t}return t.prototype.handle=function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new P(function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach(function(t,e){return i.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var s=t.serializeBody(),a=null,l=function(){if(null!==a)return a;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Dh(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return a=new Hh({headers:r,status:e,statusText:n,url:o})},u=function(){var e=l(),r=e.headers,o=e.status,s=e.statusText,a=e.url,u=null;204!==o&&(u=void 0===i.response?i.responseText:i.response),0===o&&(o=u?200:0);var c=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof u){var h=u;u=u.replace(Zh,"");try{u=""!==u?JSON.parse(u):null}catch(p){u=h,c&&(c=!1,u={error:p,text:u})}}c?(n.next(new Wh({body:u,headers:r,status:o,statusText:s,url:a||void 0})),n.complete()):n.error(new Uh({error:u,headers:r,status:o,statusText:s,url:a||void 0}))},c=function(t){var e=l().url,r=new Uh({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e||void 0});n.error(r)},h=!1,p=function(e){h||(n.next(l()),h=!0);var r={type:Vh.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},d=function(t){var e={type:Vh.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",c),t.reportProgress&&(i.addEventListener("progress",p),null!==s&&i.upload&&i.upload.addEventListener("progress",d)),i.send(s),n.next({type:Vh.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",u),t.reportProgress&&(i.removeEventListener("progress",p),null!==s&&i.upload&&i.upload.removeEventListener("progress",d)),i.abort()}})},t}(),tp=new Et("XSRF_COOKIE_NAME"),ep=new Et("XSRF_HEADER_NAME"),np=function(){return function(){}}(),ip=function(){function t(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return t.prototype.getToken=function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ah(t,this.cookieName),this.lastCookieString=t),this.lastToken},t}(),rp=function(){function t(t,e){this.tokenService=t,this.headerName=e}return t.prototype.intercept=function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)},t}(),op=function(){function t(t,e){this.backend=t,this.injector=e,this.chain=null}return t.prototype.handle=function(t){if(null===this.chain){var e=this.injector.get(qh,[]);this.chain=e.reduceRight(function(t,e){return new Gh(t,e)},this.backend)}return this.chain.handle(t)},t}(),sp=function(){function t(){}var e;return e=t,t.disable=function(){return{ngModule:e,providers:[{provide:rp,useClass:Kh}]}},t.withOptions=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[t.cookieName?{provide:tp,useValue:t.cookieName}:[],t.headerName?{provide:ep,useValue:t.headerName}:[]]}},t}(),ap=function(){return function(){}}();function lp(){for(var t,e=[],n=0;n0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,i=0;i0;s||(s=t[o]=[]);var l=Qp(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:l,handler:r});else{for(var u=!1,c=0;c-1},e}(Ap),od=["alt","control","meta","shift"],sd={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},ad=function(t){function e(e){return t.call(this,e)||this}var n;return r(e,t),n=e,e.prototype.supports=function(t){return null!=n.parseEventName(t)},e.prototype.addEventListener=function(t,e,i){var r=n.parseEventName(e),o=n.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return hp().onAndCancel(t,r.domEventName,o)})},e.parseEventName=function(t){var e=t.toLowerCase().split("."),i=e.shift();if(0===e.length||"keydown"!==i&&"keyup"!==i)return null;var r=n._normalizeKey(e.pop()),o="";if(od.forEach(function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),o+=t+".")}),o+=r,0!=e.length||0===r.length)return null;var s={};return s.domEventName=i,s.fullKey=o,s},e.getEventFullKey=function(t){var e="",n=hp().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),od.forEach(function(i){i!=n&&(0,sd[i])(t)&&(e+=i+".")}),e+=n},e.eventCallback=function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded(function(){return e(r)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e}(Ap),ld=function(){return function(){}}(),ud=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return r(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case nr.NONE:return e;case nr.HTML:return e instanceof hd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){var n=null;try{wr=wr||new gr(t);var i=e?String(e):"";n=wr.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=wr.getInertBodyElement(i)}while(i!==o);var s=new Ar,a=s.sanitizeChildren(jr(n)||n);return fr()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var l=jr(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}(this._doc,String(e)));case nr.STYLE:return e instanceof pd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(zr);return e&&yr(e[1])===e[1]||t.match(Vr)&&function(t){for(var e=!0,n=!0,i=0;it?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return _d(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return _d(t.value)?null:xd.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(_d(e.value))return null;var n=e.value?e.value.length:0;return nt?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(_d(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(Sd);return 0==e.length?null:function(t){return Ed(function(t,n){return e.map(function(e){return e(t)})}(t))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(Sd);return 0==e.length?null:function(t){return lp(function(t,n){return e.map(function(e){return e(t)})}(t).map(kd)).pipe(J(Ed))}},t}();function Sd(t){return null!=t}function kd(t){var e=Co(t)?nt(t):t;if(!So(e))throw new Error("Expected validator to return Promise or Observable.");return e}function Ed(t){var e=t.reduce(function(t,e){return null!=e?o({},t,e):t},{});return 0===Object.keys(e).length?null:e}var Od=new Et("NgValueAccessor"),Td=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),Id=new Et("CompositionEventMode"),Ad=function(){function t(t,e,n){var i;this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(i=hp()?hp().getUserAgent():"",!/android (\d+)/.test(i.toLowerCase())))}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._handleInput=function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this.onChange(t)},t}();function Pd(t){return t.validate?function(e){return t.validate(e)}:t}function Dd(t){return t.validate?function(e){return t.validate(e)}:t}var Rd=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}();function jd(){throw new Error("unimplemented")}var Md=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return r(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return jd()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return jd()},enumerable:!0,configurable:!0}),e}(yd),Fd=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name},t}(),Ld=function(){function t(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(Md),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')},t}(),Nd=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),Bd='\n

\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',Vd='\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',zd='\n
\n
\n \n
\n
',Hd=function(){function t(){}return t.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+Bd)},t.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+Vd+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+zd)},t.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+Bd)},t.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+Vd)},t.arrayParentException=function(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')},t.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},t.ngModelWarning=function(t){console.warn("\n It looks like you're using ngModel on the same form field as "+t+". \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/"+("formControl"===t?"FormControlDirective":"FormControlName")+"#use-with-ngmodel\n ")},t}();function Wd(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var Ud=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Ft}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=Wd(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){var e,n;try{for(var i=l(Array.from(this._optionMap.keys())),r=i.next();!r.done;r=i.next()){var o=r.value;if(this._compareWith(this._optionMap.get(o),t))return o}}catch(s){e={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t},t}(),Xd=function(){function t(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Wd(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)},t.prototype.ngOnDestroy=function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},t}();function Yd(t,e){return null==t?""+e:("string"==typeof e&&(e="'"+e+"'"),e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var Gd=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Ft}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var i=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(i.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var i=[];if(n.hasOwnProperty("selectedOptions"))for(var r=n.selectedOptions,o=0;o1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function ef(t){return null!=t?Cd.compose(t.map(Pd)):null}function nf(t){return null!=t?Cd.composeAsync(t.map(Dd)):null}function rf(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Ft(e,n.currentValue)}var of=[Td,Nd,Rd,Ud,Gd,Ld];function sf(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function af(t,e){if(!e)return null;Array.isArray(e)||tf(t,"Value accessor was not provided as an array for form control with");var n=void 0,i=void 0,r=void 0;return e.forEach(function(e){var o;e.constructor===Ad?n=e:(o=e,of.some(function(t){return o.constructor===t})?(i&&tf(t,"More than one built-in value accessor matches form control with"),i=e):(r&&tf(t,"More than one custom value accessor matches form control with"),r=e))}),r||i||n||(tf(t,"No valid value accessor for form control with"),null)}function lf(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function uf(t,e,n,i){fr()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(Hd.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}var cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return Kd(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return ef(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return nf(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){},e}(bd),hf=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),t}(),pf=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e}(hf),df=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e}(hf);function ff(t){var e=mf(t)?t.validators:t;return Array.isArray(e)?ef(e):e||null}function gf(t,e){var n=mf(e)?e.asyncValidators:t;return Array.isArray(n)?nf(n):n||null}function mf(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var vf=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return"VALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return"INVALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return"PENDING"==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return"DISABLED"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return"DISABLED"!==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),t.prototype.setValidators=function(t){this.validator=ff(t)},t.prototype.setAsyncValidators=function(t){this.asyncValidator=gf(t)},t.prototype.clearValidators=function(){this.validator=null},t.prototype.clearAsyncValidators=function(){this.asyncValidator=null},t.prototype.markAsTouched=function(t){void 0===t&&(t={}),this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)},t.prototype.markAsUntouched=function(t){void 0===t&&(t={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype.markAsDirty=function(t){void 0===t&&(t={}),this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)},t.prototype.markAsPristine=function(t){void 0===t&&(t={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype.markAsPending=function(t){void 0===t&&(t={}),this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)},t.prototype.disable=function(t){void 0===t&&(t={}),this.status="DISABLED",this.errors=null,this._forEachChild(function(e){e.disable(o({},t,{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!0)})},t.prototype.enable=function(t){void 0===t&&(t={}),this.status="VALID",this._forEachChild(function(e){e.enable(o({},t,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!1)})},t.prototype._updateAncestors=function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),this._parent._updatePristine(),this._parent._updateTouched())},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){void 0===t&&(t={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)},t.prototype._updateTreeValidity=function(t){void 0===t&&(t={emitEvent:!0}),this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})},t.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"},t.prototype._runValidator=function(){return this.validator?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var e=this;if(this.asyncValidator){this.status="PENDING";var n=kd(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return e.setErrors(n,{emitEvent:t})})}},t.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},t.prototype.setErrors=function(t,e){void 0===e&&(e={}),this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)},t.prototype.get=function(t){return function(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(".")),e instanceof Array&&0===e.length?null:e.reduce(function(t,e){return t instanceof bf?t.controls.hasOwnProperty(e)?t.controls[e]:null:t instanceof _f&&t.at(e)||null},t))}(this,t)},t.prototype.getError=function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null},t.prototype.hasError=function(t,e){return!!this.getError(t,e)},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;t._parent;)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)},t.prototype._initObservables=function(){this.valueChanges=new Lr,this.statusChanges=new Lr},t.prototype._calculateStatus=function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"},t.prototype._anyControlsHaveStatus=function(t){return this._anyControls(function(e){return e.status===t})},t.prototype._anyControlsDirty=function(){return this._anyControls(function(t){return t.dirty})},t.prototype._anyControlsTouched=function(){return this._anyControls(function(t){return t.touched})},t.prototype._updatePristine=function(t){void 0===t&&(t={}),this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype._updateTouched=function(t){void 0===t&&(t={}),this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype._isBoxedValue=function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t},t.prototype._registerOnCollectionChange=function(t){this._onCollectionChange=t},t.prototype._setUpdateStrategy=function(t){mf(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)},t}(),yf=function(t){function e(e,n,i){void 0===e&&(e=null);var r=t.call(this,ff(n),gf(i,n))||this;return r._onChange=[],r._applyFormState(e),r._setUpdateStrategy(n),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r._initObservables(),r}return r(e,t),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(function(t){return t(n.value,!1!==e.emitViewToModelChange)}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){void 0===e&&(e={}),this.setValue(t,e)},e.prototype.reset=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1},e.prototype._updateValue=function(){},e.prototype._anyControls=function(t){return!1},e.prototype._allControlsDisabled=function(){return this.disabled},e.prototype.registerOnChange=function(t){this._onChange.push(t)},e.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},e.prototype.registerOnDisabledChange=function(t){this._onDisabledChange.push(t)},e.prototype._forEachChild=function(t){},e.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))},e.prototype._applyFormState=function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t},e}(vf),bf=function(t){function e(e,n,i){var r=t.call(this,ff(n),gf(i,n))||this;return r.controls=e,r._initObservables(),r._setUpdateStrategy(n),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return r(e,t),e.prototype.registerControl=function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)},e.prototype.addControl=function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeControl=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.contains=function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled},e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),Object.keys(t).forEach(function(i){n._throwIfControlMissing(i),n.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),Object.keys(t).forEach(function(i){n.controls[i]&&n.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof yf?e.value:e.getRawValue(),t})},e.prototype._syncPendingControls=function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: "+t+".")},e.prototype._forEachChild=function(t){var e=this;Object.keys(this.controls).forEach(function(n){return t(e.controls[n],n)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})},e.prototype._updateValue=function(){this.value=this._reduceValue()},e.prototype._anyControls=function(t){var e=this,n=!1;return this._forEachChild(function(i,r){n=n||e.contains(r)&&t(i)}),n},e.prototype._reduceValue=function(){var t=this;return this._reduceChildren({},function(e,n,i){return(n.enabled||t.disabled)&&(e[i]=n.value),e})},e.prototype._reduceChildren=function(t,e){var n=t;return this._forEachChild(function(t,i){n=e(n,t,i)}),n},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=l(Object.keys(this.controls)),i=n.next();!i.done;i=n.next())if(this.controls[i.value].enabled)return!1}catch(r){t={error:r}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return Object.keys(this.controls).length>0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(vf),_f=function(t){function e(e,n,i){var r=t.call(this,ff(n),gf(i,n))||this;return r.controls=e,r._initObservables(),r._setUpdateStrategy(n),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return r(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,i){n._throwIfControlMissing(i),n.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,i){n.at(i)&&n.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof yf?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=l(this.controls),i=n.next();!i.done;i=n.next())if(i.value.enabled)return!1}catch(r){t={error:r}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(vf),wf=Promise.resolve(null),xf=function(t){function e(e,n){var i=t.call(this)||this;return i.submitted=!1,i._directives=[],i.ngSubmit=new Lr,i.form=new bf({},ef(e),nf(n)),i}return r(e,t),e.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;wf.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Zd(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;wf.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),lf(e._directives,t)})},e.prototype.addFormGroup=function(t){var e=this;wf.then(function(){var n=e._findContainer(t.path),i=new bf({});Jd(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;wf.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;wf.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this.submitted=!0,sf(this.form,this._directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},e}(bd),Cf=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+Bd+'\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n
\n \n \n
\n ')},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+Vd+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+zd)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+Vd+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+zd)},t.ngFormWarning=function(){console.warn("\n It looks like you're using 'ngForm'.\n\n Support for using the 'ngForm' element selector has been deprecated in Angular v6 and will be removed\n in Angular v9.\n\n Use 'ng-form' instead.\n\n Before:\n \n\n After:\n \n ")},t}(),Sf=new Et("NgFormSelectorWarning"),kf=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}var n;return r(e,t),n=e,e.prototype._checkParentType=function(){this._parent instanceof n||this._parent instanceof xf||Cf.modelGroupParentException()},e}(cf),Ef=Promise.resolve(null),Of=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.control=new yf,o._registered=!1,o.update=new Lr,o._parent=e,o._rawValidators=n||[],o._rawAsyncValidators=i||[],o.valueAccessor=af(o,r),o}return r(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),rf(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?Kd(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return ef(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return nf(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){Zd(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof kf)&&this._parent instanceof cf?Cf.formGroupNameException():this._parent instanceof kf||this._parent instanceof xf||Cf.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Cf.missingNameException()},e.prototype._updateValue=function(t){var e=this;Ef.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;Ef.then(function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()})},e}(Md),Tf=new Et("NgModelWithFormControlWarning"),If=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._ngModelWarningConfig=r,o.update=new Lr,o._ngModelWarningSent=!1,o._rawValidators=e||[],o._rawAsyncValidators=n||[],o.valueAccessor=af(o,i),o}var n;return r(e,t),n=e,Object.defineProperty(e.prototype,"isDisabled",{set:function(t){Hd.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._isControlChanged(t)&&(Zd(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),rf(t,this.viewModel)&&(uf("formControl",n,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return ef(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return nf(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._isControlChanged=function(t){return t.hasOwnProperty("form")},e._ngModelWarningSentOnce=!1,e}(Md),Af=function(t){function e(e,n){var i=t.call(this)||this;return i._validators=e,i._asyncValidators=n,i.submitted=!1,i.directives=[],i.form=null,i.ngSubmit=new Lr,i}return r(e,t),e.prototype.ngOnChanges=function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this.form.get(t.path);return Zd(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){lf(this.directives,t)},e.prototype.addFormGroup=function(t){var e=this.form.get(t.path);Jd(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormGroup=function(t){},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.addFormArray=function(t){var e=this.form.get(t.path);Jd(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormArray=function(t){},e.prototype.getFormArray=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){this.form.get(t.path).setValue(e)},e.prototype.onSubmit=function(t){return this.submitted=!0,sf(this.form,this.directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){e.valueAccessor.registerOnChange(function(){return $d(e)}),e.valueAccessor.registerOnTouched(function(){return $d(e)}),e._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(e.control,e),n&&Zd(n,e),e.control=n)}),this.form._updateTreeValidity({emitEvent:!1})},e.prototype._updateRegistrations=function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},e.prototype._updateValidators=function(){var t=ef(this._validators);this.form.validator=Cd.compose([this.form.validator,t]);var e=nf(this._asyncValidators);this.form.asyncValidator=Cd.composeAsync([this.form.asyncValidator,e])},e.prototype._checkFormPresent=function(){this.form||Hd.missingFormException()},e}(bd),Pf=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}return r(e,t),e.prototype._checkParentType=function(){Rf(this._parent)&&Hd.groupParentException()},e}(cf),Df=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}return r(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return Kd(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return ef(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return nf(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){Rf(this._parent)&&Hd.arrayParentException()},e}(bd);function Rf(t){return!(t instanceof Pf||t instanceof Af||t instanceof Df)}var jf=function(t){function e(e,n,i,r,o){var s=t.call(this)||this;return s._ngModelWarningConfig=o,s._added=!1,s.update=new Lr,s._ngModelWarningSent=!1,s._parent=e,s._rawValidators=n||[],s._rawAsyncValidators=i||[],s.valueAccessor=af(s,r),s}var n;return r(e,t),n=e,Object.defineProperty(e.prototype,"isDisabled",{set:function(t){Hd.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._added||this._setUpControl(),rf(t,this.viewModel)&&(uf("formControlName",n,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(e.prototype,"path",{get:function(){return Kd(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return ef(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return nf(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){!(this._parent instanceof Pf)&&this._parent instanceof cf?Hd.ngModelGroupException():this._parent instanceof Pf||this._parent instanceof Af||this._parent instanceof Df||Hd.controlParentException()},e.prototype._setUpControl=function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},e._ngModelWarningSentOnce=!1,e}(Md),Mf=function(){function t(){}return Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this.required?Cd.required(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t}(),Ff=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t),i=null,r=null,o=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(i=null!=e.validators?e.validators:null,r=null!=e.asyncValidators?e.asyncValidators:null,o=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,r=null!=e.asyncValidator?e.asyncValidator:null)),new bf(n,{asyncValidators:r,updateOn:o,validators:i})},t.prototype.control=function(t,e,n){return new yf(t,e,n)},t.prototype.array=function(t,e,n){var i=this,r=t.map(function(t){return i._createControl(t)});return new _f(r,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(i){n[i]=e._createControl(t[i])}),n},t.prototype._createControl=function(t){return t instanceof yf||t instanceof bf||t instanceof _f?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)},t}(),Lf=function(){return function(){}}(),Nf=function(){return function(){}}(),Bf=function(){function t(){}var e;return e=t,t.withConfig=function(t){return{ngModule:e,providers:[{provide:Sf,useValue:t.warnOnDeprecatedNgFormSelector}]}},t}(),Vf=function(){function t(){}var e;return e=t,t.withConfig=function(t){return{ngModule:e,providers:[{provide:Tf,useValue:t.warnOnNgModelWithFormControl}]}},t}(),zf=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new j;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(L),Hf=function(){function t(t,e,n,i){this.importTool=t,this.config=e,this.panelRef=n,this.canvas=i,this.newCanvasForm=new bf({width:new yf(800),height:new yf(600)}),this.newCanvasFormVisible$=new zf(!1),this.sampleImages=this.config.get("pixie.ui.openImageDialog.sampleImages")}return t.prototype.openUploadDialog=function(){var t=this;this.importTool.openUploadDialog({backgroundImage:!0}).then(function(){return t.close()})},t.prototype.openSampleImage=function(t){var e=this;this.importTool.openBackgroundImage(this.getImageUrl(t)).then(function(){return e.close()})},t.prototype.createNewCanvas=function(){var t=this,e=this.newCanvasForm.get("width").value,n=this.newCanvasForm.get("height").value;this.config.set("pixie.blankCanvasSize",{width:e,height:n}),this.canvas.openNew(e,n).then(function(){return t.close()})},t.prototype.close=function(){this.panelRef.close()},t.prototype.getImageUrl=function(t,e){void 0===e&&(e=!1);var n=t.thumbnail&&e?t.thumbnail:t.url;return-1===n.indexOf("//")?this.config.getAssetUrl(n):n},t}(),Wf=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return r(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(_)),Uf=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return r(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(Wf),Xf=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),Yf=function(t){function e(n,i){void 0===i&&(i=Xf.now);var r=t.call(this,n,function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()})||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return r(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Xf),Gf=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(Yf))(Uf);function qf(t,e){return new P(e?function(n){return e.schedule(Kf,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function Kf(t){t.subscriber.error(t.error)}var Zf=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Gc(this.value);case"E":return qf(this.error);case"C":return Xc()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),Qf=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return r(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new Jf(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Zf.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Zf.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Zf.createComplete()),this.unsubscribe()},e}(O),Jf=function(){return function(t,e){this.notification=t,this.destination=e}}(),$f=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return r(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new tg(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new j;if(this.isStopped||this.hasError?e=_.EMPTY:(this.observers.push(t),e=new M(this,t)),r&&t.add(t=new Qf(t,r)),n)for(var s=0;se&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(L),tg=function(){return function(t,e){this.time=t,this.value=e}}();function eg(t,e,n){return void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===e&&(e=Number.POSITIVE_INFINITY),function(i){return i.lift(function(t,e,n){var i,r,o=0,s=!1,a=!1;return function(l){o++,i&&!s||(s=!1,i=new $f(t,e,n),r=l.subscribe({next:function(t){i.next(t)},error:function(t){s=!0,i.error(t)},complete:function(){a=!0,i.complete()}}));var u=i.subscribe(this);return function(){o--,u.unsubscribe(),r&&0===o&&a&&r.unsubscribe()}}}(t,e,n))}}function ng(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}ng.prototype=Object.create(Error.prototype);var ig=ng;function rg(t){return function(e){return 0===t?Xc():e.lift(new og(t))}}var og=function(){function t(t){if(this.total=t,this.total<0)throw new ig}return t.prototype.call=function(t,e){return e.subscribe(new sg(t,this.total))},t}(),sg=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return r(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(O),ag=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new lg(t,this.project))},t}(),lg=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return r(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new V(this,void 0,void 0);this.destination.add(i),Z(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(Q),ug=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new cg(t,this.defaultValue))},t}(),cg=function(t){function e(e,n){var i=t.call(this,e)||this;return i.defaultValue=n,i.isEmpty=!0,i}return r(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(O);function hg(t){return function(e){var n=new pg(t),i=e.lift(n);return n.caught=i}}var pg=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new dg(t,this.selector,this.caught))},t}(),dg=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return r(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(r){return void t.prototype.error.call(this,r)}this._unsubscribeAndRecycle();var i=new V(this,void 0,void 0);this.add(i),Z(this,n,void 0,void 0,i)}},e}(Q);function fg(t){return function(e){return e.lift(new gg(t))}}var gg=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new mg(t),i=Z(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),mg=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(Q);function vg(t,e){return function(n){return n.lift(new yg(t,e))}}var yg=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new bg(t,this.compare,this.keySelector))},t}(),bg=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return r(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=v(this.keySelector)(t))===g)return this.destination.error(g.e);var n=!1;if(this.hasKey){if((n=v(this.compare)(this.key,e))===g)return this.destination.error(g.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(O),_g=new Et("ROOT_STATE_TOKEN"),wg=(new Et("FEATURE_STATE_TOKEN"),"NGXS_META"),xg="NGXS_SELECTOR_META",Cg=new Et("NGXS_PLUGINS"),Sg=function(){return function(){this.compatibility={strictContentSecurityPolicy:!1}}}();function kg(t){return t.hasOwnProperty(wg)||Object.defineProperty(t,wg,{value:{name:null,actions:{},defaults:{},path:null,selectFromAppState:null,children:[],instance:null}}),Eg(t)}function Eg(t){return t[wg]}function Og(t){return t[xg]}function Tg(t,e){return e&&e.compatibility&&e.compatibility.strictContentSecurityPolicy?function(t){var e=c(t);return function(t){return e.reduce(function(t,e){return t&&t[e]},t)}}(t):function(t){for(var e=t,n="store."+e[0],i=0,r=e.length,o=n;++i0;){var n=this._itemQueue.pop();t.prototype.next.call(this,n)}this._busyPushingNext=!1}},e}(L)),Lg=function(t){function e(e,n){return t.call(this,function(t){e.pipe(Mg(n)).subscribe(function(e){return t.next(e)},function(e){return t.error(e)},function(){return t.complete()})})||this}return r(e,t),e}(P),Ng=function(t){return function(){for(var e=[],n=0;n=0)throw new Error("Circular dependency '"+n+"' is required by '"+t+"': "+e.join(" -> "));u[n]||h(n,e.slice(0))}),a.indexOf(t)<0&&a.push(t)},Object.keys(s).forEach(function(t){return h(t)}),a.reverse()),f=function(t,e){void 0===e&&(e={});var n=function(t,e){for(var i in t)if(t.hasOwnProperty(i)&&t[i].indexOf(e)>=0){var r=n(t,i);return null!==r?r+"."+i:i}return null};for(var i in t)if(t.hasOwnProperty(i)){var r=n(t,i);e[i]=r?r+"."+i:i}return e}(p),g=r.reduce(function(t,e){if(!e[wg])throw new Error("States must be decorated with @State() decorator");return t[e[wg].name]=e,t},{}),m=[],v=function(t){var e=g[t];if(!e[wg])throw new Error("States must be decorated with @State() decorator");var n,i=f[t],r=e[wg].actions,s=e[wg].defaults;if(e[wg].path=i,e[wg].selectFromAppState=Tg(i.split("."),y._config),!y.states.find(function(e){return e.name===t})){Array.isArray(s)?s=c(s):"object"==typeof(n=s)&&null!==n||"function"==typeof n?s=o({},s):void 0===s&&(s={});var a=y._injector.get(e);m.push({actions:r,instance:a,defaults:s,name:t,depth:i})}},y=this;try{for(var b=l(d),_=b.next();!_.done;_=b.next())v(_.value)}catch(w){e={error:w}}finally{try{_&&!_.done&&(n=b.return)&&n.call(b)}finally{if(e)throw e.error}}return(i=this.states).push.apply(i,c(m)),m},t.prototype.addAndReturnDefaults=function(t){if(t){var e=this.add(t);return{defaults:e.reduce(function(t,e){return Ag(t,e.depth,e.defaults)},{}),states:e}}},t.prototype.connectActionHandlers=function(){var t=this;this._connected||(this._actions.pipe(qc(function(t){return"DISPATCHED"===t.status}),it(function(e){var n,i=e.action;return t.invokeActions(t._actions,i).pipe(J(function(){return{action:i,status:"SUCCESSFUL"}}),(void 0===(n={action:i,status:"CANCELED"})&&(n=null),function(t){return t.lift(new ug(n))}),hg(function(t){return Gc({action:i,status:"ERRORED",error:t})}))})).subscribe(function(e){return t._actionResults.next(e)}),this._connected=!0)},t.prototype.invokeInit=function(t){var e,n;try{for(var i=l(t),r=i.next();!r.done;r=i.next()){var o=r.value,s=o.instance;if(s.ngxsOnInit){var a=this.createStateContext(o);s.ngxsOnInit(a)}}}catch(u){e={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.invokeActions=function(t,e){var n,i,r,o,s=[];try{for(var a=l(this.states),u=a.next();!u.done;u=a.next()){var c=u.value,h=Ig(e),p=c.actions[h];if(p)try{for(var d=l(p),f=d.next();!f.done;f=d.next()){var g=f.value,m=this.createStateContext(c);try{var v=c.instance[g.fn](m,e);v instanceof Promise&&(v=nt(v)),v=v instanceof P?v.pipe(g.options.cancelUncompleted?fg(t.pipe(Dg(e))):J(function(t){return t})):Gc({}).pipe(eg()),s.push(v)}catch(y){s.push(qf(y))}}}catch(b){r={error:b}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}catch(_){n={error:_}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s.length||s.push(Gc({})),lp(s)},t.prototype.createStateContext=function(t){return this._stateContextFactory.createStateContext(t)},t}();function Zg(t,e,n){var i,r=Xg(function(){for(var t=[],n=0;n-1||t.name.indexOf("round.")>-1?null:t:null},t.prototype.set=function(t,e){var n=this.get();n&&(n.set(t,e),this.canvasState.fabric.requestRenderAll())},t.prototype.move=function(t,e){var n=this.get();n&&(n.set(t,n[t]+e),this.canvasState.fabric.requestRenderAll())},t.prototype.bringToFront=function(){var t=this.get();t&&(t.bringToFront(),this.canvasState.fabric.requestRenderAll())},t.prototype.sendToBack=function(){var t=this.get();t&&(t.sendToBack(),this.canvasState.fabric.requestRenderAll())},t.prototype.flipHorizontal=function(){var t=this.get();t&&(t.flipX=!t.flipX,this.canvasState.fabric.requestRenderAll())},t.prototype.duplicate=function(){var t=this,e=this.get();e&&(this.deselect(),e.clone(function(n){n.set({left:e.left+10,top:e.top+10,data:fm({},e.data,{id:Ec(10)}),name:e.name}),t.canvasState.fabric.add(n),t.select(n),t.canvasState.fabric.requestRenderAll()}))},t.prototype.getId=function(){var t=this.get();return t&&t.data?t.data.id:null},t.prototype.delete=function(){var t=this.get();t&&(this.canvasState.fabric.remove(t),this.canvasState.fabric.requestRenderAll())},t.prototype.deselect=function(){this.canvasState.fabric.discardActiveObject(),this.canvasState.fabric.requestRenderAll()},t.prototype.select=function(t){this.canvasState.fabric.setActiveObject(t)},t.prototype.syncForm=function(){this.get()?this.form.patchValue(function(t){if(!t)return{};var e=t.shadow,n={fill:t.fill,opacity:t.opacity,backgroundColor:t.backgroundColor,stroke:t.stroke,strokeWidth:t.strokeWidth};if(e&&(n.shadow={color:e.color||mc.shadow.color,blur:e.blur||mc.shadow.blur,offsetX:e.offsetX||mc.shadow.offsetX,offsetY:e.offsetY||mc.shadow.offsetY}),"i-text"===t.type){var i=t;n.textAlign=i.textAlign,n.underline=i.underline,n.linethrough=i.linethrough,n.fontStyle=i.fontStyle,n.fontFamily=i.fontFamily,n.fontWeight=i.fontWeight}return n}(this.get()),{emitEvent:!1}):this.form.patchValue(this.config.get("pixie.objectDefaults"))},t}(),mm=function(){function t(){}return t.type="[History] Changed",t}(),vm=function(){function t(t){this.id=t}return t.type="[History] Update Pointer By History Item ID",t}(),ym=function(){function t(t){this.item=t}return t.type="[History] Add Item",t}(),bm=function(){function t(t){this.item=t}return t.type="[History] Replace Current Item",t}(),_m=function(){function t(){}return t.type="[History] Reset",t}(),wm=function(){function t(){}var e;return e=t,t.canUndo=function(t){return t.pointer-1>-1},t.canRedo=function(t){return t.items.length>t.pointer+1},t.items=function(t){return t.items},t.activeItemId=function(t){return t.items[t.pointer].id},t.item=function(t){return Zg([e],function(e){var n=e.pointer;switch(t){case"previous":n=e.pointer-1;break;case"next":n=e.pointer+1;break;default:n=e.pointer}return e.items[n]})},t.prototype.addItem=function(t,e){var n=e.item,i=t.getState().items.concat([n]);t.patchState({items:i,pointer:i.length-1})},t.prototype.replaceCurrentItem=function(t,e){var n=t.getState().items.slice();n[t.getState().pointer]=e.item,t.patchState({items:n})},t.prototype.updatePointerById=function(t,e){var n=e.id,i=t.getState().items.findIndex(function(t){return t.id===n});t.patchState({pointer:i})},t.prototype.resetHistory=function(t){t.patchState({items:[],pointer:0})},s([om(ym),a("design:type",Function),a("design:paramtypes",[Object,ym]),a("design:returntype",void 0)],t.prototype,"addItem",null),s([om(bm),a("design:type",Function),a("design:paramtypes",[Object,bm]),a("design:returntype",void 0)],t.prototype,"replaceCurrentItem",null),s([om(vm),a("design:type",Function),a("design:paramtypes",[Object,vm]),a("design:returntype",void 0)],t.prototype,"updatePointerById",null),s([om(_m),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"resetHistory",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"canUndo",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"canRedo",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"items",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"activeItemId",null),e=s([lm({name:"history",defaults:{items:[],pointer:0}})],t)}(),xm=function(){function t(){}return t.FILTER={name:"Applied: filter",icon:"filter-custom"},t.RESIZE={name:"Applied: resize",icon:"resize-custom"},t.CROP={name:"Applied: crop",icon:"crop-custom"},t.TRANSFORM={name:"Applied: transform",icon:"transform-custom"},t.DRAW={name:"Added: drawing",icon:"draw-custom"},t.TEXT={name:"Added: text",icon:"text-box-custom"},t.SHAPES={name:"Added: shape",icon:"polygon-custom"},t.STICKERS={name:"Added: sticker",icon:"sticker-custom"},t.FRAME={name:"Added: frame",icon:"frame-custom"},t.MERGE={name:"Objects: merged",icon:"merge-custom"},t.CORNERS={name:"Applied: rounded corners",icon:"rounder-corners-custom"},t.BACKGROUND={name:"Changed: background",icon:"background-custom"},t.BG_IMAGE={name:"Changed: background Image",icon:"photo-library"},t.OVERLAY_IMAGE={name:"Added: overlay Image",icon:"photo-library"},t.INITIAL={name:"Initial",icon:"home"},t.LOADED_STATE={name:"Loaded: state",icon:"history"},t.OBJECT_STYLE={name:"Changed: style",icon:"color-custom"},t}(),Cm=function(){function t(t,e,n,i,r,o,s,a){var l=this;this.canvas=t,this.activeObject=e,this.objects=n,this.frameTool=i,this.googleFonts=r,this.textTool=o,this.store=s,this.actions$=a,this.actions$.pipe(Rg(Mc),rg(1)).subscribe(function(){l.addInitial()})}return t.prototype.undo=function(){if(this.store.selectSnapshot(wm.canUndo))return this.load(this.store.selectSnapshot(wm.item("previous")))},t.prototype.redo=function(){if(this.store.selectSnapshot(wm.canRedo))return this.load(this.store.selectSnapshot(wm.item("next")))},t.prototype.reload=function(){return this.load(this.store.selectSnapshot(wm.item("current")))},t.prototype.replaceCurrent=function(){var t=this.store.selectSnapshot(wm.item("current"));this.store.dispatch(new bm(this.createHistoryItem(t.name,t.icon)))},t.prototype.add=function(t,e){this.store.dispatch(new ym(this.createHistoryItem(t.name,t.icon,e)))},t.prototype.addFromJson=function(t){var e=!this.store.selectSnapshot(wm.items).length;return this.add(e?xm.INITIAL:xm.LOADED_STATE,"string"==typeof t?JSON.parse(t):t),this.reload()},t.prototype.getCurrentCanvasState=function(){return{canvas:this.canvas.fabric().toJSON(Object.keys(kc).concat(["crossOrigin","name","data"])),editor:{frame:this.frameTool.getActive(),fonts:this.textTool.getUsedFonts()},canvasWidth:this.canvas.state.original.width,canvasHeight:this.canvas.state.original.height}},t.prototype.clear=function(){this.store.dispatch(new _m)},t.prototype.addInitial=function(){!this.store.selectSnapshot(wm.items).length&&this.add(xm.INITIAL)},t.prototype.load=function(t){var e=this;return new Promise(function(n){e.store.dispatch(new vm(t.id)),e.googleFonts.loadIntoDom(t.editor.fonts).then(function(){e.canvas.fabric().loadFromJSON(t.canvas,function(){e.canvas.zoom.set(1),t.canvasWidth&&t.canvasHeight&&e.canvas.resize(t.canvasWidth,t.canvasHeight),t.editor.frame?e.frameTool.add(t.editor.frame.name):e.frameTool.remove(),e.canvas.render(),e.canvas.fabric().calcOffset(),e.canvas.state.loading=!1,e.canvas.zoom.fitToScreen(),e.objects.syncObjects(),e.store.dispatch(new mm),n()},function(t){t.hasOwnProperty("applyFilters")&&t.applyFilters()})})})},t.prototype.createHistoryItem=function(t,e,n){return void 0===e&&(e=null),n||(n=this.getCurrentCanvasState()),Object.assign(n,{name:t,id:Ec(15),icon:e,zoom:this.canvas.zoom.get(),activeObjectId:this.activeObject.getId()})},t}(),Sm=function(){function t(){}return t.prototype.ngxsOnInit=function(t){var e=this;this.actions$.pipe(Rg(Pc),qc(function(t){return t.panel===e.toolName})).subscribe(function(n){e.applyChanges(t,n)}),this.actions$.pipe(Rg(Dc),qc(function(t){return t.panel===e.toolName})).subscribe(function(n){e.cancelChanges(t,n)})},t}(),km=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.store=e,o.history=n,o.activeObject=i,o.actions$=r,o.toolName=dc.OBJECT_SETTINGS,o}return r(e,t),e.dirty=function(t){return t.dirty},e.activePanel=function(t){return t.activePanel},e.prototype.openObjectSettingsPanel=function(t,e){t.patchState({activePanel:e.panel})},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.cancelChanges=function(t){t.getState().activePanel?t.patchState({activePanel:null}):(this.store.dispatch(new Ac),this.activeObject.deselect()),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.OBJECT_STYLE),t.patchState({dirty:!1,activePanel:null}),this.activeObject.deselect()},s([om(hm),a("design:type",Function),a("design:paramtypes",[Object,hm]),a("design:returntype",void 0)],e.prototype,"openObjectSettingsPanel",null),s([om(pm),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"activePanel",null),s([lm({name:dc.OBJECT_SETTINGS,defaults:{dirty:!1,activePanel:null}})],e)}(Sm),Em=function(){function t(t){this.filter=t}return t.type="[Editor.Filter] Toggle Filter",t}(),Om=function(){function t(t){this.filter=t}return t.type="[Editor.Filter] Remove Filter",t}(),Tm=function(){function t(t){this.filter=t}return t.type="[Editor.Filter] Open Filter Controls",t}(),Im=function(){function t(t){this.filters=t}return t.type="[Editor.Filter] Set Applied Filters",t}(),Am=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.history=n,r.actions$=i,r.toolName=dc.FILTER,r}return r(e,t),e.activeFilters=function(t){return t.activeFilters},e.selectedFilter=function(t){return t.selectedFilter},e.dirty=function(t){return t.dirty},e.prototype.toggleFilter=function(t,e){t.patchState({dirty:!0,activeFilters:t.getState().activeFilters.concat([e.filter])})},e.prototype.removeFilter=function(t,e){var n=t.getState().activeFilters.filter(function(t){return t!==e.filter});t.patchState({dirty:!0,activeFilters:n})},e.prototype.openFilterControls=function(t,e){t.patchState({selectedFilter:e.filter})},e.prototype.setAppliedFilters=function(t,e){t.patchState({activeFilters:e.filters})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.FILTER),t.patchState({dirty:!1,selectedFilter:null})},e.prototype.cancelChanges=function(t){t.getState().selectedFilter||this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1,selectedFilter:null})},s([om(Em),a("design:type",Function),a("design:paramtypes",[Object,Em]),a("design:returntype",void 0)],e.prototype,"toggleFilter",null),s([om(Om),a("design:type",Function),a("design:paramtypes",[Object,Om]),a("design:returntype",void 0)],e.prototype,"removeFilter",null),s([om(Tm),a("design:type",Function),a("design:paramtypes",[Object,Tm]),a("design:returntype",void 0)],e.prototype,"openFilterControls",null),s([om(Im),a("design:type",Function),a("design:paramtypes",[Object,Im]),a("design:returntype",void 0)],e.prototype,"setAppliedFilters",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"activeFilters",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"selectedFilter",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"filter",defaults:{dirty:!1,activeFilters:[],selectedFilter:null}})],e)}(Sm),Pm="undefined"!=typeof Intl&&Intl.v8BreakIterator,Dm=function(){function t(t){this._platformId=t,this.isBrowser=this._platformId?this._platformId===Th:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Pm)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Po,8))},token:t,providedIn:"root"}),t}(),Rm=function(){return function(){}}();function jm(t){return function(){if(null==cm&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return cm=!0}}))}finally{cm=cm||!1}return cm}()?t:!!t.capture}var Mm={},Fm=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Lm(t,this.resultSelector))},t}(),Lm=function(t){function e(e,n){var i=t.call(this,e)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return r(e,t),e.prototype._next=function(t){this.values.push(Mm),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=(r=e.flush.bind(e,null),o=Nm++,Bm[o]=r,Promise.resolve().then(function(){return function(t){var e=Bm[t];e&&e()}(o)}),o)));var r,o},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(delete Bm[n],e.scheduled=void 0)},e}(Wf),zm=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i0?et(t,n):Xc(n):Yc(t[0]),e)}}function qm(t){return null!=t&&""+t!="false"}function Km(t,e){return void 0===e&&(e=0),function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function Zm(t){return Array.isArray(t)?t:[t]}function Qm(t){return null==t?"":"string"==typeof t?t:t+"px"}function Jm(t){return t instanceof Ki?t.nativeElement:t}var $m,tv=new Set,ev=function(){function t(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):nv}return t.prototype.matchMedia=function(t){return this.platform.WEBKIT&&function(t){if(!tv.has(t))try{$m||(($m=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild($m)),$m.sheet&&($m.sheet.insertRule("@media "+t+" {.fx-query-test{ }}",0),tv.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Dm))},token:t,providedIn:"root"}),t}();function nv(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var iv=function(){function t(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new L}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return rv(Zm(t)).some(function(t){return e._registerQuery(t).mql.matches})},t.prototype.observe=function(t){var e=this;return function(){for(var t=[],e=0;e1?Array.prototype.slice.call(arguments):t)},i,n)})}Object;var Iv=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Av(t,this.durationSelector))},t}(),Av=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return r(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=v(this.durationSelector)(t);if(e===g)this.destination.error(g.e);else{var n=Z(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(Q);function Pv(t){return!h(t)&&t-parseFloat(t)+1>=0}function Dv(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function Rv(t,e){return void 0===e&&(e=Hm),n=function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return Pv(e)?i=Number(e)<1?1:Number(e):B(e)&&(n=e),B(n)||(n=Hm),new P(function(e){var r=Pv(t)?t:+t-n.now();return n.schedule(Dv,r,{index:0,period:i,subscriber:e})})}(t,e)},function(t){return t.lift(new Iv(n))};var n}function jv(t,e){return"function"==typeof e?function(n){return n.pipe(jv(function(n,i){return nt(t(n,i)).pipe(J(function(t,r){return e(n,t,i,r)}))}))}:function(e){return e.lift(new Mv(t))}}var Mv=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Fv(t,this.project))},t}(),Fv=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return r(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new V(this,void 0,void 0);this.destination.add(r),this.innerSubscription=Z(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(Q),Lv=function(){function t(t,e,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var i=this;this._multiple=t,this._emitChanges=n,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new L,this.onChange=this.changed,e&&e.length&&(t?e.forEach(function(t){return i._markSelected(t)}):this._markSelected(e[0]),this._selectedToEmit.length=0)}return Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(){for(var t=this,e=[],n=0;n1&&!this._multiple)throw Error("Cannot pass multiple values into SelectionModel with single-value mode.")},t}(),Nv=function(){function t(){this._listeners=[]}return t.prototype.notify=function(t,e){for(var n=0,i=this._listeners;n0?e._scrolled.pipe(Rv(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){i.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):Gc()},t.prototype.ngOnDestroy=function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()},t.prototype.ancestorScrolled=function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(qc(function(t){return!t||n.indexOf(t)>-1}))},t.prototype.getAncestorScrollContainers=function(t){var e=this,n=[];return this.scrollContainers.forEach(function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)}),n},t.prototype._scrollableContainsElement=function(t,e){var n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1},t.prototype._addGlobalListener=function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return Tv(window.document,"scroll").subscribe(function(){return t._scrolled.next()})})},t.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Ko),Ne(Dm))},token:t,providedIn:"root"}),t}(),Vv=function(){return function(){}}(),zv=function(){function t(t,e){var n=this;this._platform=t,e.runOutsideAngular(function(){n._change=t.isBrowser?lt(Tv(window,"resize"),Tv(window,"orientationchange")):Gc(),n._invalidateCache=n.change().subscribe(function(){return n._updateViewportSize()})})}return t.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},t.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t},t.prototype.getViewportRect=function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}},t.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=document.documentElement,e=t.getBoundingClientRect();return{top:-e.top||document.body.scrollTop||window.scrollY||t.scrollTop||0,left:-e.left||document.body.scrollLeft||window.scrollX||t.scrollLeft||0}},t.prototype.change=function(t){return void 0===t&&(t=20),t>0?this._change.pipe(Rv(t)):this._change},t.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Dm),Ne(Ko))},token:t,providedIn:"root"}),t}(),Hv=27;function Wv(t){for(var e=[],n=1;ne.height||t.scrollWidth>e.width},t}();function Xv(){return Error("Scroll strategy has already been attached.")}var Yv=function(){function t(t,e,n,i){var r=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=function(){r.disable(),r._overlayRef.hasAttached()&&r._ngZone.run(function(){return r._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw Xv();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),Gv=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}();function qv(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function Kv(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var Zv=function(){function t(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=i,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw Xv();this._overlayRef=t},t.prototype.enable=function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;qv(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),Qv=function(){function t(t,e,n,i){var r=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=function(){return new Gv},this.close=function(t){return new Yv(r._scrollDispatcher,r._ngZone,r._viewportRuler,t)},this.block=function(){return new Uv(r._viewportRuler,r._document)},this.reposition=function(t){return new Zv(r._scrollDispatcher,r._viewportRuler,r._ngZone,t)},this._document=i}return t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Bv),Ne(zv),Ne(Ko),Ne(Oh))},token:t,providedIn:"root"}),t}(),Jv=function(){return function(t){var e=this;this.scrollStrategy=new Gv,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t&&Object.keys(t).forEach(function(n){void 0!==t[n]&&(e[n]=t[n])})}}(),$v=function(){return function(t,e,n,i,r){this.offsetX=n,this.offsetY=i,this.panelClass=r,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}(),ty=function(){return function(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}();function ey(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "top", "bottom" or "center".')}function ny(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "start", "end" or "center".')}var iy=function(){function t(t){var e=this;this._attachedOverlays=[],this._keydownListener=function(t){for(var n=e._attachedOverlays,i=n.length-1;i>-1;i--)if(n[i]._keydownEventSubscriptions>0){n[i]._keydownEvents.next(t);break}},this._document=t}return t.prototype.ngOnDestroy=function(){this._detach()},t.prototype.add=function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()},t.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Oh))},token:t,providedIn:"root"}),t}(),ry=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Oh))},token:t,providedIn:"root"}),t}(),oy=function(){function t(t,e,n,i,r,o,s,a){var l=this;this._portalOutlet=t,this._host=e,this._pane=n,this._config=i,this._ngZone=r,this._keyboardDispatcher=o,this._document=s,this._location=a,this._backdropElement=null,this._backdropClick=new L,this._attachments=new L,this._detachments=new L,this._locationChanges=_.EMPTY,this._keydownEventsObservable=P.create(function(t){var e=l._keydownEvents.subscribe(t);return l._keydownEventSubscriptions++,function(){e.unsubscribe(),l._keydownEventSubscriptions--}}),this._keydownEvents=new L,this._keydownEventSubscriptions=0,i.scrollStrategy&&i.scrollStrategy.attach(this),this._positionStrategy=i.positionStrategy}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,n=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(rg(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(function(){return e.dispose()})),n},t.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),t}},t.prototype.dispose=function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEventsObservable},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._positionStrategy&&this._positionStrategy.apply()},t.prototype.updatePositionStrategy=function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))},t.prototype.updateSize=function(t){this._config=o({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=o({},this._config,{direction:t}),this._updateElementDirection()},t.prototype.getDirection=function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"},t.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},t.prototype._updateElementSize=function(){var t=this._pane.style;t.width=Qm(this._config.width),t.height=Qm(this._config.height),t.minWidth=Qm(this._config.minWidth),t.minHeight=Qm(this._config.minHeight),t.maxWidth=Qm(this._config.maxWidth),t.maxHeight=Qm(this._config.maxHeight)},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",function(e){return t._backdropClick.next(e)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},t.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var n,i=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null),t._config.backdropClass&&t._toggleClasses(e,t._config.backdropClass,!1),clearTimeout(n)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",n=this._ngZone.runOutsideAngular(function(){return setTimeout(i,500)})}},t.prototype._toggleClasses=function(t,e,n){var i=t.classList;Zm(e).forEach(function(t){n?i.add(t):i.remove(t)})},t.prototype._detachContentWhenStable=function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._ngZone.onStable.asObservable().pipe(fg(lt(t._attachments,t._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())})})},t}(),sy=function(){function t(t,e,n,i,r){var o=this;this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new L,this._resizeSubscription=_.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this._appliedPanelClasses=[],this.positionChanges=P.create(function(t){var e=o._positionChanges.subscribe(t);return o._positionChangeSubscriptions++,function(){e.unsubscribe(),o._positionChangeSubscriptions--}}),this.setOrigin(t)}return Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){e._isInitialRender=!0,e.apply()})},t.prototype.apply=function(){if(!(this._isDisposed||this._platform&&!this._platform.isBrowser))if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var t,e=this._originRect,n=this._overlayRect,i=this._viewportRect,r=[],o=0,s=this._preferredPositions;op&&(p=m,h=g)}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}},t.prototype.detach=function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()},t.prototype.dispose=function(){this._isDisposed||(this._boundingBox&&ay(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)},t.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withPositions=function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},t.prototype.withViewportMargin=function(t){return this._viewportMargin=t,this},t.prototype.withFlexibleDimensions=function(t){return void 0===t&&(t=!0),this._hasFlexibleDimensions=t,this},t.prototype.withGrowAfterOpen=function(t){return void 0===t&&(t=!0),this._growAfterOpen=t,this},t.prototype.withPush=function(t){return void 0===t&&(t=!0),this._canPush=t,this},t.prototype.withLockedPosition=function(t){return void 0===t&&(t=!0),this._positionLocked=t,this},t.prototype.setOrigin=function(t){return this._origin=Jm(t),this},t.prototype.withDefaultOffsetX=function(t){return this._offsetX=t,this},t.prototype.withDefaultOffsetY=function(t){return this._offsetY=t,this},t.prototype.withTransformOriginOn=function(t){return this._transformOriginSelector=t,this},t.prototype._getOriginPoint=function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}},t.prototype._getOverlayPoint=function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}},t.prototype._getOverlayFit=function(t,e,n,i){var r=t.x,o=t.y,s=this._getOffset(i,"x"),a=this._getOffset(i,"y");s&&(r+=s),a&&(o+=a);var l=0-o,u=o+e.height-n.height,c=this._subtractOverflows(e.width,0-r,r+e.width-n.width),h=this._subtractOverflows(e.height,l,u),p=c*h;return{visibleArea:p,isCompletelyWithinViewport:e.width*e.height===p,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}},t.prototype._canFitWithFlexibleDimensions=function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=s&&s<=r)}},t.prototype._pushOverlayOnScreen=function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,o=this._viewportRect,s=Math.max(t.x+e.width-o.right,0),a=Math.max(t.y+e.height-o.bottom,0),l=Math.max(o.top-n.top-t.y,0),u=Math.max(o.left-n.left-t.x,0);return this._previousPushAmount={x:i=e.width0){var n=this._getScrollVisibility(),i=new ty(t,n);this._positionChanges.next(i)}this._isInitialRender=!1},t.prototype._setTransformOrigin=function(t){if(this._transformOriginSelector){var e,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),i=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var r=0;rh&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)a=l.right-t.x+this._viewportMargin,o=t.x-l.left;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)s=t.x,o=l.right-t.x;else{c=Math.min(l.right-t.x+l.left,t.x);var p=this._lastBoundingBoxSize.width;s=t.x-c,(o=2*c)>p&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.x-p/2)}return{top:i,left:s,bottom:r,right:a,width:o,height:n}},t.prototype._setBoundingBoxStyles=function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;i.height=Qm(n.height),i.top=Qm(n.top),i.bottom=Qm(n.bottom),i.width=Qm(n.width),i.left=Qm(n.left),i.right=Qm(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=Qm(r)),o&&(i.maxWidth=Qm(o))}this._lastBoundingBoxSize=n,ay(this._boundingBox.style,i)},t.prototype._resetBoundingBoxStyles=function(){ay(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},t.prototype._resetOverlayElementStyles=function(){ay(this._pane.style,{top:"",left:"",bottom:"",right:"",position:""})},t.prototype._setOverlayElementStyles=function(t,e){var n={};if(this._hasExactPosition()){var i=this._viewportRuler.getViewportScrollPosition();ay(n,this._getExactOverlayY(e,t,i)),ay(n,this._getExactOverlayX(e,t,i))}else n.position="static";var r="",o=this._getOffset(e,"x"),s=this._getOffset(e,"y");o&&(r+="translateX("+o+"px) "),s&&(r+="translateY("+s+"px)"),n.transform=r.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),ay(this._pane.style,n)},t.prototype._getExactOverlayY=function(t,e,n){var i={top:null,bottom:null},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var o=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return r.y-=o,"bottom"===t.overlayY?i.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":i.top=Qm(r.y),i},t.prototype._getExactOverlayX=function(t,e,n){var i={left:null,right:null},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right=this._document.documentElement.clientWidth-(r.x+this._overlayRect.width)+"px":i.left=Qm(r.x),i},t.prototype._getScrollVisibility=function(){var t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:Kv(t,n),isOriginOutsideView:qv(t,n),isOverlayClipped:Kv(e,n),isOverlayOutsideView:qv(e,n)}},t.prototype._subtractOverflows=function(t){for(var e=[],n=1;n-1&&n!==e._activeItemIndex&&(e._activeItemIndex=n)}})}return t.prototype.skipPredicate=function(t){return this._skipPredicateFn=t,this},t.prototype.withWrap=function(t){return void 0===t&&(t=!0),this._wrap=t,this},t.prototype.withVerticalOrientation=function(t){return void 0===t&&(t=!0),this._vertical=t,this},t.prototype.withHorizontalOrientation=function(t){return this._horizontal=t,this},t.prototype.withAllowedModifierKeys=function(t){return this._allowedModifierKeys=t,this},t.prototype.withTypeAhead=function(t){var e=this;if(void 0===t&&(t=200),this._items.length&&this._items.some(function(t){return"function"!=typeof t.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(by(function(t){return e._pressedLetters.push(t)}),Wm(t),qc(function(){return e._pressedLetters.length>0}),J(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._getItemsArray(),i=1;i-1});switch(n){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;default:return void((i||Wv(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()},Object.defineProperty(t.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!0,configurable:!0}),t.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},t.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},t.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},t.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},t.prototype.updateActiveItem=function(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n},t.prototype.updateActiveItemIndex=function(t){this.updateActiveItem(t)},t.prototype._setActiveItemByDelta=function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)},t.prototype._setActiveInWrapMode=function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}},t.prototype._setActiveInDefaultMode=function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)},t.prototype._setActiveItemByIndex=function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}},t.prototype._getItemsArray=function(){return this._items instanceof gs?this._items.toArray():this._items},t}(),Ty=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setActiveItem=function(e){this.activeItem&&this.activeItem.setInactiveStyles(),t.prototype.setActiveItem.call(this,e),this.activeItem&&this.activeItem.setActiveStyles()},e}(Oy),Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._origin="program",e}return r(e,t),e.prototype.setFocusOrigin=function(t){return this._origin=t,this},e.prototype.setActiveItem=function(e){t.prototype.setActiveItem.call(this,e),this.activeItem&&this.activeItem.focus(this._origin)},e}(Oy),Ay=function(){function t(t){this._platform=t}return t.prototype.isDisabled=function(t){return t.hasAttribute("disabled")},t.prototype.isVisible=function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility},t.prototype.isTabbable=function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(e){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){var i=n&&n.nodeName.toLowerCase();if(-1===Dy(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===i)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var r=t.nodeName.toLowerCase(),o=Dy(t);if(t.hasAttribute("contenteditable"))return-1!==o;if("iframe"===r)return!1;if("audio"===r){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===r){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==r||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&t.tabIndex>=0},t.prototype.isFocusable=function(t){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Py(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Dm))},token:t,providedIn:"root"}),t}();function Py(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Dy(t){if(!Py(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Ry=function(){function t(t,e,n,i,r){void 0===r&&(r=!1);var o=this;this._element=t,this._checker=e,this._ngZone=n,this._document=i,this._hasAttached=!1,this._startAnchorListener=function(){return o.focusLastTabbableElement()},this._endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,r||this.attachAnchors()}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this._startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this._endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null},t.prototype.attachAnchors=function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t._startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t._endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},t.prototype.focusInitialElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})},t.prototype.focusFirstTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})},t.prototype.focusLastTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})},t.prototype._getRegionBoundary=function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-"+t+"], [cdkFocusRegion"+t+"], [cdk-focus-"+t+"]"),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null},t.prototype._createAnchor=function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t},t.prototype._toggleAnchorTabIndex=function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")},t.prototype._executeOnStable=function(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(rg(1)).subscribe(t)},t}(),jy=function(){function t(t,e,n){this._checker=t,this._ngZone=e,this._document=n}return t.prototype.create=function(t,e){return void 0===e&&(e=!1),new Ry(t,this._checker,this._ngZone,this._document,e)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Ay),Ne(Ko),Ne(Oh))},token:t,providedIn:"root"}),t}(),My=new Et("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Fy=function(){function t(t,e,n){this._ngZone=e,this._document=n,this._liveElement=t||this._createLiveElement()}return t.prototype.announce=function(t){for(var e,n,i=this,r=[],o=1;o0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)}),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)},t.prototype._createOverlay=function(t){var e=new Jv;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)},t.prototype._createInjector=function(t,e){return new Ov(t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,new WeakMap([[Hy,e],[Wy,t.data]]))},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(py),Ne(Fy),Ne(ui),Ne(iv),Ne(t,12),Ne(qy))},token:t,providedIn:Gy}),t}(),Zy=function(){function t(t,e,n){this.settings=t,this.i18n=e,this.snackbar=n}return t.prototype.open=function(t,e){return void 0===e&&(e={}),e.duration||0===e.duration||(e.duration=this.settings.get("toast.default_timeout",3e3)),this.snackbar.open(this.i18n.t(t),this.i18n.t(e.action),{duration:e.duration})},t.prototype.openComponent=function(t,e){return this.snackbar.openFromComponent(t,e)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Hc),Ne(uv),Ne(Ky))},token:t,providedIn:"root"}),t}(),Qy=function(){function t(t){this.params=t}return t.type="[Editor.Resize] Set Resize Dimensions",t}(),Jy=function(){return(Jy=Object.assign||function(t){for(var e,n=1,i=arguments.length;no&&(t.left=o),n>s&&(t.top=s)},t.prototype.constrainWithinCanvasOnScaling=function(t){var e=Math.floor(t.left),n=Math.floor(t.top),i=e+t.getScaledWidth()-1,r=n+t.getScaledHeight()-1;(e<0||i>this.canvasState.original.width)&&(t.scaleX=this.lastScaleX||1),e<0&&(t.left=0),(n<0||r>this.canvasState.original.height)&&(t.scaleY=this.lastScaleY||1),n<0&&(t.top=0),this.lastScaleX=t.scaleX,this.lastScaleY=t.scaleY},t.prototype.attachEvents=function(){var t=this;this.rect.on("moving",function(){t.constrainWithinCanvas(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()}),this.rect.on("scaling",function(){t.constrainWithinCanvasOnScaling(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()})},t.prototype.gcd=function(t,e){return 0==e?t:this.gcd(e,t%e)},t.prototype.getAdjustedSize=function(t,e,n){void 0===t&&(t="16:9");var i=e,r=n,o=t.split(":"),s=parseInt(o[0])/parseInt(o[1]);return n*s>e?r=e/s:i=n*s,{width:i,height:r}},t.prototype.drawMainZone=function(t){var e=this;if(!this.initiated){var n={fill:"transparent",borderColor:this.gridColor,borderScaleFactor:2,hasRotatingPoint:!1,name:"crop.zone",lockScalingFlip:!0,minScaleLimit:0,hasControls:!this.config.get("pixie.tools.crop.hideCustomControls")};this.rect=new Sc.fabric.Rect(nb({},n,this.config.get("pixie.tools.crop.cropzone",{}))),this.rect.on("deselected",function(){e.canvas.fabric().setActiveObject(e.rect)}),this.canvas.fabric().add(this.rect),this.rect.moveTo(3),this.canvas.fabric().setActiveObject(this.rect)}var i=this.getAdjustedSize(t,this.canvasState.original.width,this.canvasState.original.height);this.rect.set({width:i.width,height:i.height,lockUniScaling:!!t}),this.rect.viewportCenter(),this.rect.setCoords()},t.prototype.drawGrid=function(){if(!this.initiated){var t={stroke:this.gridColor,strokeWidth:4,selectable:!1,evented:!1},e=[new Sc.fabric.Line([],t),new Sc.fabric.Line([],t),new Sc.fabric.Line([],t),new Sc.fabric.Line([],t)];this.grid=new Sc.fabric.Group(e,{name:"crop.grid",selectable:!1,evented:!1}),this.canvas.fabric().add(this.grid),this.grid.moveTo(10)}this.grid.width=this.rect.getScaledWidth(),this.grid.height=this.rect.getScaledHeight(),this.grid.left=this.rect.left,this.grid.top=this.rect.top;var n=this.grid.width/2,i=this.grid.width/3,r=this.grid.height/2,o=this.grid.height/3,s=this.grid.getObjects();s[0].set({x1:-(n-i),y1:-r,x2:-(n-i),y2:r}),s[1].set({x1:n-i,y1:-r,x2:n-i,y2:r}),s[2].set({x1:-n,y1:-(r-o),x2:n,y2:-(r-o)}),s[3].set({x1:-n,y1:r-o,x2:n,y2:r-o})},t.prototype.drawOverlay=function(){if(!this.initiated){var t=new Sc.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),e=new Sc.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),n=new Sc.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),i=new Sc.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1});this.overlay=new Sc.fabric.Group([t,e,n,i],{width:this.canvasState.original.width,height:this.canvasState.original.height,selectable:!1,evented:!1,name:"crop.overlay"}),this.canvas.fabric().add(this.overlay),this.overlay.moveTo(1)}var r=-this.overlay.width/2,o=-this.overlay.height/2,s=this.overlay.getObjects();s[0].set({left:r,top:o,width:this.overlay.width,height:this.rect.getScaledHeight()<0?this.rect.top-Math.abs(this.rect.getScaledHeight()):this.rect.top}),s[1].set({left:(this.rect.getScaledWidth()<0?this.rect.left:this.rect.left+this.rect.getScaledWidth())+r,top:this.rect.top+o,width:this.rect.getScaledWidth()<0?this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth())-Math.abs(this.rect.getScaledWidth()):this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth()),height:this.rect.getScaledHeight()}),s[2].set({left:r,top:(this.rect.getScaledHeight()<0?this.rect.top:this.rect.top+this.rect.getScaledHeight())+o,width:this.canvasState.original.width,height:this.rect.getScaledHeight()<0?this.canvasState.original.height-this.rect.top:this.canvasState.original.height-(this.rect.top+this.rect.getScaledHeight())}),s[3].set({left:r,top:this.rect.top+o,width:this.rect.getScaledWidth()>0?this.rect.left:this.rect.left-Math.abs(this.rect.getScaledWidth()),height:this.rect.getScaledHeight()})},t.prototype.changeAspectRatio=function(t){this.aspectRatio=t,this.drawMainZone(t),this.drawOverlay(),this.drawGrid(),this.canvas.render()},t.prototype.getSize=function(){return{width:this.rect.getScaledWidth(),height:this.rect.getScaledHeight(),left:this.rect.left,top:this.rect.top}},t.prototype.resize=function(t,e){this.aspectRatio=null,this.rect.width=t,this.rect.height=e,this.rect.lockUniScaling=!1,this.rect.setCoords(),this.drawOverlay(),this.drawGrid(),this.canvas.render()},t}(),rb={dirty:!0},ob=function(t){function e(e,n,i,r,o){var s=t.call(this)||this;return s.store=e,s.history=n,s.actions$=i,s.cropTool=r,s.cropZone=o,s.toolName=dc.CROP,s}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.applyChanges=function(t){var e=this;this.store.dispatch(new Ac),this.cropTool.apply(this.cropZone.getSize()).then(function(){e.history.add(xm.CROP),t.patchState(rb)})},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.patchState(rb)},s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"crop",defaults:rb})],e)}(Sm),sb=function(){function t(t,e){this.canvas=t,this.config=e}return t.prototype.getShapeByName=function(t){return this.config.get("pixie.tools.shapes.items").find(function(e){return e.name===t})},t.prototype.addBasicShape=function(t){"string"==typeof t&&(t=this.getShapeByName(t));var e,n=t,i=this.canvas.fabric().getWidth(),r=n.options||{},o=i/2;"circle"===n.name?r.radius=o:"ellipse"===n.name?(r.rx=o,r.ry=o/2):(r.width=o,r.height=o),e="Path"===n.type?new Sc.fabric[n.type](r.path,r):new Sc.fabric[n.type](r),this.addAndPositionSticker(e)},t.prototype.addSticker=function(t,e){var n=this;return new Promise(function(i){n.addStickerResolve=i,"svg"===t.type?n.addSvgSticker(t,e):n.addRegularSticker(t,e)})},t.prototype.addRegularSticker=function(t,e){var n=this;Sc.fabric.util.loadImage(this.getStickerUrl(t,e),function(t){var e=new Sc.fabric.Image(t);n.addAndPositionSticker(e,Nc.sticker)})},t.prototype.addAndPositionSticker=function(t,e){void 0===e&&(e=Nc.shape),t.name=e.name,this.canvas.fabric().add(t),this.canvas.fabric().setActiveObject(t),t.scaleToWidth(this.canvas.fabric().getWidth()/4),t.viewportCenter(),t.setCoords(),this.canvas.render(),this.addStickerResolve&&this.addStickerResolve()},t.prototype.getStickerUrl=function(t,e){return this.config.getAssetUrl("images/stickers/"+t.name+"/"+e+"."+t.type)},t.prototype.getStickerCategoryUrl=function(t){return t.thumbnailUrl?this.config.getAssetUrl(t.thumbnailUrl):this.getStickerUrl(t,1)},t.prototype.addSvgSticker=function(t,e){var n=this;Sc.fabric.loadSVGFromURL(this.getStickerUrl(t,e),function(t,e){var i=Sc.fabric.util.groupSVGElements(t,e);n.addAndPositionSticker(i,Nc.sticker)})},t}(),ab=function(){function t(t){this.shape=t}return t.type="[Editor.Shapes] Add Shape",t}(),lb=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.store=e,o.shapesTool=n,o.history=i,o.actions$=r,o.toolName=dc.SHAPES,o}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.applyChanges=function(t){this.store.dispatch(new Ic(dc.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(xm.SHAPES),t.patchState({dirty:!1})},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1})},e.prototype.addShape=function(t,e){t.patchState({dirty:!0}),this.shapesTool.addBasicShape(e.shape)},s([om(ab),a("design:type",Function),a("design:paramtypes",[Object,ab]),a("design:returntype",void 0)],e.prototype,"addShape",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"shapes",defaults:{dirty:!1}})],e)}(Sm),ub=function(){function t(){}return t.type="[Editor.Transform] Mark as Dirty",t}(),cb={dirty:!1},hb=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.history=n,r.actions$=i,r.toolName=dc.TRANSFORM,r}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.TRANSFORM),t.patchState(cb)},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.patchState(cb)},s([om(ub),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"transform",defaults:cb})],e)}(Sm),pb=function(){function t(){}return t.type="[Editor.Frame] Mark as Dirty",t}(),db=function(){function t(){}return t.type="[Editor.Frame] Open Frame Controls",t}(),fb={dirty:!1,controlsOpen:!1},gb=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.history=n,r.actions$=i,r.toolName=dc.FRAME,r}return r(e,t),e.dirty=function(t){return t.dirty},e.controlsOpen=function(t){return t.controlsOpen},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.openFrameControls=function(t){t.patchState({controlsOpen:!0})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.FRAME),t.patchState(fb)},e.prototype.cancelChanges=function(t){t.getState().dirty&&this.history.reload(),t.getState().controlsOpen?t.patchState({controlsOpen:!1}):(this.store.dispatch(new Ac),t.patchState(fb))},s([om(pb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([om(db),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"openFrameControls",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"controlsOpen",null),s([lm({name:"frame",defaults:fb})],e)}(Sm),mb=function(){function t(){}return t.type="[Editor.Draw] Mark as Dirty",t}(),vb=function(){function t(){}return t.type="[Editor.Draw] Open Brush Controls",t}(),yb=function(){function t(){}return t.type="[Editor.Draw] Close Brush Controls",t}(),bb={dirty:!1,brushControlsOpen:!1},_b=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.history=n,r.actions$=i,r.toolName=dc.DRAW,r}return r(e,t),e.dirty=function(t){return t.dirty},e.brushControlsOpen=function(t){return t.brushControlsOpen},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.openBrushControls=function(t){t.patchState({brushControlsOpen:!0})},e.prototype.closeBrushControls=function(t){t.patchState({brushControlsOpen:!1})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.DRAW),t.patchState(bb)},e.prototype.cancelChanges=function(t){t.getState().brushControlsOpen||this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState(bb)},s([om(mb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([om(vb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"openBrushControls",null),s([om(yb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"closeBrushControls",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"brushControlsOpen",null),s([lm({name:"draw",defaults:bb})],e)}(Sm),wb=function(){function t(t){this.category=t}return t.type="[Editor.Stickers] Open Sticker Category",t}(),xb=function(){function t(){}return t.type="[Editor.Stickers] Mark as Dirty",t}(),Cb={dirty:!1,activeCategory:null},Sb=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.history=n,r.actions$=i,r.toolName=dc.STICKERS,r}return r(e,t),e.dirty=function(t){return t.dirty},e.activeCategory=function(t){return t.activeCategory},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.openStickerCategory=function(t,e){t.patchState({activeCategory:e.category})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ic(dc.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(xm.STICKERS),t.patchState(Cb)},e.prototype.cancelChanges=function(t){t.getState().activeCategory||this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState(Cb)},s([om(xb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([om(wb),a("design:type",Function),a("design:paramtypes",[Object,wb]),a("design:returntype",void 0)],e.prototype,"openStickerCategory",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"activeCategory",null),s([lm({name:"stickers",defaults:Cb})],e)}(Sm),kb=function(){function t(t,e,n,i){this.activeObject=t,this.canvas=e,this.state=n,this.saveTool=i}return t.prototype.apply=function(t){var e=this;this.updatePreview(t),this.state.fabric.remove(this.previewRect),this.state.fabric.clipTo=function(t){e.state.fabric.getRetinaScaling(),e.previewRect.set({width:e.previewRect.width,height:e.previewRect.height,rx:e.previewRect.rx,ry:e.previewRect.ry,stroke:null}),e.previewRect.render(t),e.state.fabric.clipTo=null};var n=this.saveTool.getDataUrl();return this.state.fabric.clear(),this.hidePreview(),this.canvas.loadMainImage(n)},t.prototype.getPreviewRadius=function(){return this.previewRect.rx},t.prototype.updatePreview=function(t){this.previewRect.set({rx:t,ry:t}),this.canvas.render()},t.prototype.showPreview=function(){this.previewRect=new Sc.fabric.Rect({width:this.state.original.width,height:this.state.original.height,rx:50,ry:50,objectCaching:!1,fill:"transparent",name:"round.rect",stroke:"rgba(255,255,255,0.8)",strokeWidth:3,strokeDashArray:[4,4],selectable:!1,evented:!1}),this.state.fabric.add(this.previewRect),this.previewRect.moveTo(99),this.previewRect.viewportCenter(),this.canvas.render()},t.prototype.hidePreview=function(){this.previewRect&&(this.state.fabric.remove(this.previewRect),this.canvas.render(),this.previewRect=null)},t}(),Eb={dirty:!0},Ob=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.store=e,o.actions$=n,o.history=i,o.roundTool=r,o.toolName=dc.CORNERS,o}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.applyChanges=function(t){var e=this;this.store.dispatch(new Ac),this.roundTool.apply(this.roundTool.getPreviewRadius()).then(function(){e.history.add(xm.CORNERS)}),t.patchState(Eb)},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.patchState(Eb)},s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"corners",defaults:Eb})],e)}(Sm),Tb=function(){function t(){}return t.type="[Editor.Background] Mark as Dirty",t}(),Ib={dirty:!0},Ab=function(t){function e(e,n,i){var r=t.call(this)||this;return r.store=e,r.actions$=n,r.history=i,r.toolName=dc.BACKGROUND,r}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.markAsDirty=function(t){t.patchState({dirty:!0})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.add(xm.BACKGROUND),t.patchState(Ib)},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState(Ib)},s([om(Tb),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e.prototype,"markAsDirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"background",defaults:Ib})],e)}(Sm),Pb=function(){function t(t){this.text=t}return t.type="[Text] Add",t}(),Db=function(){return(Db=Object.assign||function(t){for(var e,n=1,i=arguments.length;ni&&t.scaleToHeight(i-t.getScaledHeight()-20),t.viewportCenter(),this.canvas.fabric().getObjects("i-text").forEach(function(n){if(n!==t&&n.intersectsWithObject(t)){var i=n.top-t.top+n.getScaledHeight(),r=t.top+i;r>e.canvas.state.original.height-n.getScaledHeight()&&(r=0),t.set("top",r),t.setCoords()}})},t.prototype.getUsedFonts=function(){var t=this;return this.objects.getAll().filter(function(t){return"i-text"===t.type}).map(function(e){var n=e.fontFamily;return t.fontsPaginator.original.find(function(t){return t.family===n})}).filter(function(t){return t&&"basic"!==t.type})},t}(),jb={dirty:!1},Mb=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.textTool=e,o.store=n,o.history=i,o.actions$=r,o.toolName=dc.TEXT,o}return r(e,t),e.dirty=function(t){return t.dirty},e.prototype.add=function(t,e){this.textTool.add(e.text),t.setState({dirty:!0})},e.prototype.applyChanges=function(t){this.store.dispatch(new Ic(dc.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(xm.TEXT),t.patchState(jb)},e.prototype.cancelChanges=function(t){this.store.dispatch(new Ac),t.getState().dirty&&this.history.reload(),t.patchState(jb)},s([om(Pb),a("design:type",Function),a("design:paramtypes",[Object,Pb]),a("design:returntype",void 0)],e.prototype,"add",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],e,"dirty",null),s([lm({name:"text",defaults:jb})],e)}(Sm),Fb=function(){function t(t,e,n){this.config=t,this.breakpoints=e,this.activeObject=n}return t.visible=function(t){return t.visible},t.mode=function(t){return t.mode},t.theme=function(t){return t.theme},t.controlsPosition=function(t){return t.controlsPosition},t.toolbarHidden=function(t){return t.hideToolbar},t.activePanel=function(t){return t.activePanel},t.contentLoaded=function(t){return t.contentLoaded},t.dirty=function(t){return t[t.activePanel].dirty},t.zoom=function(t){return t.zoom},t.activeObjIsText=function(t){return t.activeObjIsText},t.activeObjIsShape=function(t){return t.activeObjIsShape},t.activeObjId=function(t){return t.activeObjId},t.prototype.ngxsOnInit=function(t){this.listenToConfigChange(t),this.listenToBreakpointChange(t)},t.prototype.openEditor=function(t){t.patchState({visible:!0}),this.executeCallback("onOpen")},t.prototype.closeEditor=function(t,e){var n=e.executeCallback,i=this.config.get("pixie.ui.allowEditorClose");n&&(i=!1!==this.executeCallback("onClose")),i&&t.patchState({visible:!1})},t.prototype.openPanel=function(t,e){t.patchState({activePanel:e.panel})},t.prototype.closeForePanel=function(t){t.patchState({activePanel:dc.NAVIGATION})},t.prototype.objectSelected=function(t,e){var n=this.getActiveObjState();e.fromUserAction&&t.getState().activePanel===dc.NAVIGATION&&(n.activePanel=dc.OBJECT_SETTINGS),t.patchState(n),this.activeObject.syncForm()},t.prototype.objectDeselected=function(t){var e=this.getActiveObjState();t.getState().activePanel!==dc.OBJECT_SETTINGS||t.getState().objectSettings.dirty||(e.activePanel=dc.NAVIGATION),t.patchState(e),this.activeObject.syncForm()},t.prototype.contentLoaded=function(t){t.patchState({contentLoaded:!0})},t.prototype.setZoom=function(t,e){t.patchState({zoom:e.zoom})},t.prototype.executeCallback=function(t){var e=this.config.get("pixie."+t);return e&&e()},t.prototype.listenToBreakpointChange=function(t){var e=this;this.breakpoints.isMobile$.subscribe(function(n){var i=e.config.get("pixie.ui.nav.position",pc.TOP);t.patchState({controlsPosition:n?pc.BOTTOM:i})})},t.prototype.listenToConfigChange=function(t){var e=this;this.config.onChange.subscribe(function(){var n=e.config.get("pixie");t.patchState({mode:n.ui.mode,theme:n.ui.theme,hideToolbar:n.ui.toolbar.hide,visible:n.ui.visible})})},t.prototype.getActiveObjState=function(){var t=this.activeObject.get(),e={activeObjId:null,activeObjIsText:!1,activeObjIsShape:!1};return t&&(e.activeObjId=t.data.id,e.activeObjIsText="i-text"===t.type,e.activeObjIsShape=t.name===Nc.shape.name),e},s([om(Oc),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"openEditor",null),s([om(Tc),a("design:type",Function),a("design:paramtypes",[Object,Tc]),a("design:returntype",void 0)],t.prototype,"closeEditor",null),s([om(Ic),a("design:type",Function),a("design:paramtypes",[Object,Ic]),a("design:returntype",void 0)],t.prototype,"openPanel",null),s([om(Ac),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"closeForePanel",null),s([om(Rc),a("design:type",Function),a("design:paramtypes",[Object,Rc]),a("design:returntype",void 0)],t.prototype,"objectSelected",null),s([om(jc),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"objectDeselected",null),s([om(Mc),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"contentLoaded",null),s([om(Lc),a("design:type",Function),a("design:paramtypes",[Object,Lc]),a("design:returntype",void 0)],t.prototype,"setZoom",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"visible",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"mode",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"theme",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"controlsPosition",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"toolbarHidden",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"activePanel",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"contentLoaded",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"dirty",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"zoom",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"activeObjIsText",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"activeObjIsShape",null),s([um(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t,"activeObjId",null),s([lm({name:"imageEditor",defaults:{visible:!0,mode:cc.INLINE,theme:hc.LIGHT,hideToolbar:!1,activePanel:dc.NAVIGATION,controlsPosition:pc.TOP,contentLoaded:!1,activeObjIsText:!1,activeObjIsShape:!1,activeObjId:null,zoom:100},children:[Am,tb,ob,hb,_b,Mb,lb,Sb,gb,Ob,Ab,km]})],t)}(),Lb=function(){function t(t){this.config=t,this.original={width:0,height:0},this.loading=!1,this.loaded=new $f(1)}return t.prototype.isEmpty=function(){return!(this.config.get("pixie.image")||this.config.get("pixie.blankCanvasSize")||this.fabric&&0!==this.fabric.getObjects().length)},t.prototype.calcWrapperSize=function(){var t=this.wrapperEl.getBoundingClientRect();return{width:t.width,height:t.height}},t}(),Nb=function(){function t(t){this.overlayRef=t,this.value=new L}return t.prototype.isOpen=function(){return this.overlayRef&&this.overlayRef.hasAttached()},t.prototype.close=function(){this.overlayRef&&this.overlayRef.dispose()},t.prototype.emitValue=function(t){this.value.next(t)},t.prototype.valueChanged=function(){return this.value.asObservable()},t.prototype.getPanelEl=function(){return this.overlayRef.overlayElement},t.prototype.updatePosition=function(){return this.overlayRef.updatePosition()},t.prototype.afterClosed=function(){return this.overlayRef.detachments().pipe(rg(1))},t}(),Bb=new Et("OVERLAY_PANEL_DATA"),Vb=function(){function t(){}return t.prototype.attach=function(){},t.prototype.enable=function(){document.documentElement.classList.add("be-fullscreen-overlay-scrollblock")},t.prototype.disable=function(){document.documentElement.classList.remove("be-fullscreen-overlay-scrollblock")},t}(),zb={hasBackdrop:!0,closeOnBackdropClick:!0,panelClass:"overlay-panel"},Hb=function(){function t(t,e,n){this.overlay=t,this.breakpoints=e,this.injector=n}return t.prototype.open=function(t,e){var n=Object.assign({},zb,e),i=this.overlay.create({positionStrategy:this.getPositionStrategy(n),hasBackdrop:n.hasBackdrop,panelClass:n.panelClass,backdropClass:n.backdropClass,scrollStrategy:n.fullScreen?new Vb:null}),r=new Nb(i),o=new wv(t,null,this.createInjector(n,r));return i.attach(o),n.closeOnBackdropClick&&(i.backdropClick().subscribe(function(){return r.close()}),i.keydownEvents().pipe(qc(function(t){return t.keyCode===Hv})).subscribe(function(){return r.close()})),r},t.prototype.createInjector=function(t,e){var n=new WeakMap;return n.set(Nb,e),n.set(Bb,t.data||null),new Ov(this.injector,n)},t.prototype.getPositionStrategy=function(t){return t.positionStrategy?t.positionStrategy:"global"===t.origin?this.getGlobalPositionStrategy(t):this.getConnectedPositionStrategy(t)},t.prototype.getGlobalPositionStrategy=function(t){var e=this.getPositionOption(t);if("center"===e)return this.overlay.position().global().centerHorizontally().centerVertically();var n=this.overlay.position().global();return Object.keys(e).forEach(function(t){n[t](e[t])}),n},t.prototype.getConnectedPositionStrategy=function(t){return this.overlay.position().flexibleConnectedTo(t.origin).withPositions(this.getPositionOption(t))},t.prototype.getPositionOption=function(t){return t.mobilePosition&&this.breakpoints.isMobile$.value?t.mobilePosition:t.position},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(py),Ne(sv),Ne(ui))},token:t,providedIn:"root"}),t}(),Wb=function(){function t(t,e,n,i){this.canvasState=t,this.config=e,this.overlayPanel=n,this.store=i}return t.prototype.open=function(){if(this.shouldShowOpenImageDialog()){var t=this.overlayPanel.overlay.position().flexibleConnectedTo(new Ki(this.canvasState.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]);this.sampleImagePanelRef=this.overlayPanel.open(Hf,{hasBackdrop:!0,closeOnBackdropClick:!1,positionStrategy:t,panelClass:["floating-panel","sample-image-panel"]})}},t.prototype.reposition=function(){this.sampleImagePanelRef&&this.sampleImagePanelRef.updatePosition()},t.prototype.shouldShowOpenImageDialog=function(){return this.store.selectSnapshot(Fb.visible)&&this.canvasState.isEmpty()&&this.config.get("pixie.ui.openImageDialog.show")&&!this.sampleImagePanelRef},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Lb),Ne(Hc),Ne(Hb),Ne(Jg))},token:t,providedIn:"root"}),t}(),Ub=function(){function t(t){this.store=t}return t.prototype.openPanel=function(t){this.store.dispatch(new Ic(t))},t.prototype.closeCurrentPanel=function(){this.store.dispatch(new Ac)},t}();function Xb(t){return/(?:\.([^.]+))?$/.exec(t)[1]}var Yb,Gb=function(){function t(t,e){this.url=null,this.name=t.name,this.size=t.size,this.mime=function(t){var e={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",yaml:"text/yaml",yml:"text/yaml"},n=t.name?Xb(t.name):null;return t.type?t.type:n&&e[n]?e[n]:null}(t),this.extension=Xb(t.name),this.native=t,this.path=e||t.webkitRelativePath||null}return t.prototype.getData=function(){var t=this;return new Promise(function(e){var n=new FileReader;n.addEventListener("load",function(){e(n.result)}),"json"===t.extension?n.readAsText(t.native):n.readAsDataURL(t.native)})},t}();function qb(t){return void 0===t&&(t={}),new Promise(function(e){var n=function(t){void 0===t&&(t={});var e=document.querySelector("#hidden-file-upload-input");e&&e.remove();var n=document.createElement("input");n.type="file",n.multiple=t.multiple,n.classList.add("hidden"),n.style.display="none",n.style.visibility="hidden",n.id="hidden-file-upload-input";var i=[];return t.extensions&&i.push(t.extensions.join(",")),t.types&&i.push(t.types.join("|")),i.length&&(n.accept=i.join("|")),t.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}(t);n.onchange=function(t){var i=Array.from(t.target.files).map(function(t){return new Gb(t)});e(i),n.remove()},document.body.appendChild(n),n.click()})}!function(t){t.image="image/*",t.audio="audio/*",t.video="video/*"}(Yb||(Yb={}));var Kb=function(){function t(t,e,n,i,r,o,s){this.history=t,this.canvas=e,this.toast=n,this.config=i,this.frame=r,this.cropzone=o,this.validator=s}return t.prototype.openUploadDialog=function(t){var e=this;void 0===t&&(t={type:"image"});var n=this.getUploadAcceptString(t.type);return new Promise(function(i){qb({extensions:n}).then(function(n){e.validateAndGetData(n[0]).then(function(r){e.executeOnFileOpenCallback(n[0]),t.backgroundImage&&"json"!==r.extension?e.openBackgroundImage(r.data).then(function(t){return i(t)}):e.openFile(r.data,r.extension).then(function(t){return i(t)})},function(){})})})},t.prototype.importAndGetData=function(){var t=this;return new Promise(function(e){qb({types:[Yb.image]}).then(function(n){t.validateAndGetData(n[0]).then(function(t){return e(t.data)})})})},t.prototype.validateAndGetData=function(t){var e=this,n=this.validator.validate(t),i=t.extension;return new Promise(function(r,o){if(n.failed)return o();e.readFile(t,i).then(function(t){return r({data:t,extension:i})})})},t.prototype.openStateFile=function(t){var e=this;return this.resetEditor().then(function(){return e.history.addFromJson(t)})},t.prototype.resetEditor=function(t){return void 0===t&&(t={}),this.canvas.fabric().clear(),this.frame.remove(),this.cropzone.remove(),t.preserveHistory||this.history.clear(),this.config.merge({pixie:{image:null,blankCanvasSize:null}}),new Promise(function(t){return setTimeout(function(){return t()})})},t.prototype.openFile=function(t,e){return void 0===e&&(e="png"),t instanceof HTMLImageElement&&(t=t.src),"json"===e?this.openStateFile(t):this.canvas.openImage(t)},t.prototype.openBackgroundImage=function(t){var e=this;return this.resetEditor({preserveHistory:!0}).then(function(){return t instanceof HTMLImageElement&&(t=t.src),e.canvas.loadMainImage(t)})},t.prototype.readFile=function(t,e){var n=new FileReader;return new Promise(function(i){n.addEventListener("load",function(){i(n.result)}),"json"===e?n.readAsText(t.native):n.readAsDataURL(t.native)})},t.prototype.getUploadAcceptString=function(t){switch(void 0===t&&(t="all"),t){case"image":return["image/*"];case"state":return[".json","application/json"];case"all":default:return["image/*",".json","application/json"]}},t.prototype.executeOnFileOpenCallback=function(t){var e=this.config.get("pixie.onFileOpen");e&&e(t)},t}();function Zb(t,e){void 0===e&&(e=Hm);var n,i=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return function(t){return t.lift(new Qb(i,e))}}var Qb=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Jb(t,this.delay,this.scheduler))},t}(),Jb=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return r(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new $b(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Zf.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(Zf.createComplete()),this.unsubscribe()},e}(O),$b=function(){return function(t,e){this.time=t,this.notification=e}}(),t_=function(){function t(t,e,n){this.el=t,this.store=e,this.config=n}return Object.defineProperty(t.prototype,"animate",{get:function(){return this.store.selectSnapshot(Fb.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"darkTheme",{get:function(){return this.store.selectSnapshot(Fb.theme)===hc.DARK},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightTheme",{get:function(){return this.store.selectSnapshot(Fb.theme)===hc.LIGHT},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlayMode",{get:function(){return this.store.selectSnapshot(Fb.mode)===cc.OVERLAY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inlineMode",{get:function(){return this.store.selectSnapshot(Fb.mode)===cc.INLINE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.config.get("pixie.ui.width")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.config.get("pixie.ui.height")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"compact",{get:function(){return this.config.get("pixie.ui.compact")},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.bindToOverlayClick(this.overlay)},t.prototype.bindToOverlayClick=function(t){var e=this;t.nativeElement.addEventListener("click",function(){e.store.dispatch(new Tc)})},t}(),e_=n("NlKi"),n_=["Uncaught (in promise): [object Object]","Uncaught (in promise): [object Undefined]","[object Object]",'{"isTrusted"\n true}','The animation trigger "transform" has failed to build due to the following errors',"Cannot call method 'split' of undefined","Cannot call method 'trim' of undefined","undefined is not a function","has no method 'closest'","Object doesn't support property or method 'closest'","Object doesn't support property or method 'setPrototypeOf'","requestAnimationFrame is not defined","Object [object DOMWindow] has no method 'cancelAnimationFrame'","'block' member of ScrollIntoViewOptions 'center' is not a valid value for enumeration ScrollLogicalPosition."],i_=function(t){function e(e){var n=t.call(this)||this;return n.settings=e,n.installed=!1,n}return r(e,t),e.prototype.handleError=function(e,n){e&&(t.prototype.handleError.call(this,e),this.installSentry()&&e_.captureException(e.originalError||e,n))},e.prototype.installSentry=function(){return!!this.installed||!!this.settings.has("logging.sentry_public")&&(e_.config(this.settings.get("logging.sentry_public"),{release:this.settings.get("version"),ignoreErrors:n_}).install(),this.installed=!0)},e}(no),r_=function(t){return new i_(t)},o_=function(){function t(t){this.injector=t}return t.prototype.ngDoBootstrap=function(t){var e=this.injector.get(yc).selector;t.bootstrap(t_,e)},t}(),s_=function(){var t={HEX:0,RGBA:1,HSLA:2};return t[t.HEX]="HEX",t[t.RGBA]="RGBA",t[t.HSLA]="HSLA",t}(),a_=function(){return function(t,e,n,i){this.c=t,this.m=e,this.y=n,this.k=i}}(),l_=function(){return function(t,e,n,i){this.h=t,this.s=e,this.l=n,this.a=i}}(),u_=function(){return function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i}}(),c_=function(){return function(t,e,n,i){this.r=t,this.g=e,this.b=n,this.a=i}}(),h_=function(){function t(){this.newValue=new Lr}return t.prototype.inputChange=function(t){var e=t.target.value;if(void 0===this.rg)this.newValue.emit(e);else{var n=parseFloat(e);!isNaN(n)&&n>=0&&n<=this.rg&&this.newValue.emit({v:n,rg:this.rg})}},t}(),p_=function(){function t(t){var e=this;this.elRef=t,this.dragEnd=new Lr,this.dragStart=new Lr,this.newValue=new Lr,this.listenerMove=function(t){return e.move(t)},this.listenerStop=function(){return e.stop()}}return t.prototype.mouseDown=function(t){this.start(t)},t.prototype.touchStart=function(t){this.start(t)},t.prototype.move=function(t){t.preventDefault(),this.setCursor(t)},t.prototype.start=function(t){this.setCursor(t),t.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()},t.prototype.stop=function(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()},t.prototype.getX=function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageX?t.pageX:t.touches[0].pageX)-e.left-window.pageXOffset},t.prototype.getY=function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageY?t.pageY:t.touches[0].pageY)-e.top-window.pageYOffset},t.prototype.setCursor=function(t){var e=this.elRef.nativeElement.offsetWidth,n=this.elRef.nativeElement.offsetHeight,i=Math.max(0,Math.min(this.getX(t),e)),r=Math.max(0,Math.min(this.getY(t),n));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:i/e,v:1-r/n,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:r/n,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:i/e,rgX:this.rgX})},t}(),d_=function(){return function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i}}(),f_=function(){return function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i}}(),g_=function(){function t(){this.active=null}return t.prototype.setActive=function(t){this.active&&this.active!==t&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=t},t.prototype.hsva2hsla=function(t){var e=t.h,n=t.s,i=t.v,r=t.a;if(0===i)return new l_(e,0,0,r);if(0===n&&1===i)return new l_(e,1,1,r);var o=i*(2-n)/2;return new l_(e,i*n/(1-Math.abs(2*o-1)),o,r)},t.prototype.hsla2hsva=function(t){var e=Math.min(t.h,1),n=Math.min(t.s,1),i=Math.min(t.l,1),r=Math.min(t.a,1);if(0===i)return new u_(e,0,0,r);var o=i+n*(1-Math.abs(2*i-1))/2;return new u_(e,2*(o-i)/o,o,r)},t.prototype.hsvaToRgba=function(t){var e,n,i,r=t.h,o=t.s,s=t.v,a=t.a,l=Math.floor(6*r),u=6*r-l,c=s*(1-o),h=s*(1-u*o),p=s*(1-(1-u)*o);switch(l%6){case 0:e=s,n=p,i=c;break;case 1:e=h,n=s,i=c;break;case 2:e=c,n=s,i=p;break;case 3:e=c,n=h,i=s;break;case 4:e=p,n=c,i=s;break;case 5:e=s,n=c,i=h;break;default:e=0,n=0,i=0}return new c_(e,n,i,a)},t.prototype.rgbaToCmyk=function(t){var e=1-Math.max(t.r,t.g,t.b);return 1===e?new a_(0,0,0,1):new a_((1-t.r-e)/(1-e),(1-t.g-e)/(1-e),(1-t.b-e)/(1-e),e)},t.prototype.rgbaToHsva=function(t){var e,n,i=Math.min(t.r,1),r=Math.min(t.g,1),o=Math.min(t.b,1),s=Math.min(t.a,1),a=Math.max(i,r,o),l=Math.min(i,r,o),u=a,c=a-l;if(n=0===a?0:c/a,a===l)e=0;else{switch(a){case i:e=(r-o)/c+(r0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}(),this.directiveInstance=t,this.directiveElementRef=e,this.cpDisableInput=c,this.cpAlphaChannel=l,this.cpOutputFormat=u,this.cpDialogDisplay=o,this.cpIgnoredElements=h,this.cpSaveClickOutside=p,this.useRootViewContainer=d,this.width=this.cpWidth=parseInt(i,10),this.height=this.cpHeight=parseInt(r,10),this.cpPosition=f,this.cpPositionOffset=parseInt(g,10),this.cpOKButton=x,this.cpOKButtonText=S,this.cpOKButtonClass=C,this.cpCancelButton=k,this.cpCancelButtonText=O,this.cpCancelButtonClass=E,this.fallbackColor=s||"#fff",this.setPresetConfig(v,y),this.cpMaxPresetColorsLength=b,this.cpPresetEmptyMessage=_,this.cpPresetEmptyMessageClass=w,this.cpAddColorButton=T,this.cpAddColorButtonText=A,this.cpAddColorButtonClass=I,this.cpRemoveColorButtonClass=P,m||(this.dialogArrowOffset=0),"inline"===o&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===u&&"always"!==l&&"forced"!==l&&(this.cpAlphaChannel="disabled")},t.prototype.setColorMode=function(t){switch(t.toString().toUpperCase()){case"1":case"C":case"COLOR":this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3;break;default:this.cpColorMode=1}},t.prototype.setInitialColor=function(t){this.initialColor=t},t.prototype.setPresetConfig=function(t,e){this.cpPresetLabel=t,this.cpPresetColors=e},t.prototype.setColorFromString=function(t,e,n){var i;void 0===e&&(e=!0),void 0===n&&(n=!0),("always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel)&&((i=this.service.stringToHsva(t,!0))||this.hsva)||(i=this.service.stringToHsva(t,!1)),i||this.hsva||(i=this.service.stringToHsva(this.fallbackColor,!1)),i&&(this.hsva=i,this.sliderH=this.hsva.h,this.updateColorPicker(e,n))},t.prototype.onResize=function(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()},t.prototype.onDragEnd=function(t){this.directiveInstance.sliderDragEnd({slider:t,color:this.outputColor})},t.prototype.onDragStart=function(t){this.directiveInstance.sliderDragStart({slider:t,color:this.outputColor})},t.prototype.onMouseDown=function(t){this.isIE10||"popup"!==this.cpDialogDisplay||t.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,t.target)||this.isDescendant(this.directiveElementRef.nativeElement,t.target)||0!==this.cpIgnoredElements.filter(function(e){return e===t.target}).length||(this.cpSaveClickOutside||(this.setColorFromString(this.initialColor,!1),this.directiveInstance.colorChanged(this.initialColor)),this.closeColorPicker())},t.prototype.onAcceptColor=function(t){t.stopPropagation(),"popup"===this.cpDialogDisplay&&this.closeColorPicker(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor)},t.prototype.onCancelColor=function(t){t.stopPropagation(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker()),this.directiveInstance.colorCanceled()},t.prototype.onFormatToggle=function(t){var e=this.dialogInputFields.length,n=((this.dialogInputFields.indexOf(this.format)+t)%e+e)%e;this.format=this.dialogInputFields[n]},t.prototype.onColorChange=function(t){this.hsva.s=t.s/t.rgX,this.hsva.v=t.v/t.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})},t.prototype.onHueChange=function(t){this.hsva.h=t.v/t.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})},t.prototype.onValueChange=function(t){this.hsva.v=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})},t.prototype.onAlphaChange=function(t){this.hsva.a=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})},t.prototype.onHexInput=function(t){if(null===t)this.updateColorPicker();else{t&&"#"!==t[0]&&(t="#"+t);var e=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(e=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);var n=e.test(t);n&&(t.length<5&&(t="#"+t.substring(1).split("").map(function(t){return t+t}).join("")),"forced"===this.cpAlphaChannel&&(t+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(t,!0,!1)),this.directiveInstance.inputChanged({input:"hex",value:t,valid:n,color:this.outputColor})}},t.prototype.onRedInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.r=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"red",value:e.r,color:this.outputColor})},t.prototype.onBlueInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.b=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"blue",value:e.b,color:this.outputColor})},t.prototype.onGreenInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.g=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"green",value:e.g,color:this.outputColor})},t.prototype.onHueInput=function(t){this.hsva.h=t.v/t.rg,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"hue",value:this.hsva.h,color:this.outputColor})},t.prototype.onValueInput=function(t){this.hsva.v=t.v/t.rg,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"value",value:this.hsva.v,color:this.outputColor})},t.prototype.onAlphaInput=function(t){this.hsva.a=t.v/t.rg,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"alpha",value:this.hsva.a,color:this.outputColor})},t.prototype.onLightnessInput=function(t){var e=this.service.hsva2hsla(this.hsva);e.l=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"lightness",value:e.l,color:this.outputColor})},t.prototype.onSaturationInput=function(t){var e=this.service.hsva2hsla(this.hsva);e.s=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"saturation",value:e.s,color:this.outputColor})},t.prototype.onAddPresetColor=function(t,e){t.stopPropagation(),this.cpPresetColors.filter(function(t){return t===e}).length||(this.cpPresetColors=this.cpPresetColors.concat(e),this.directiveInstance.presetColorsChanged(this.cpPresetColors))},t.prototype.onRemovePresetColor=function(t,e){t.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(function(t){return t!==e}),this.directiveInstance.presetColorsChanged(this.cpPresetColors)},t.prototype.openColorPicker=function(){var t=this;this.show||(this.show=!0,this.hidden=!0,setTimeout(function(){t.hidden=!1,t.setDialogPosition(),t.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||document.addEventListener("mousedown",this.listenerMouseDown),window.addEventListener("resize",this.listenerResize))},t.prototype.closeColorPicker=function(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||document.removeEventListener("mousedown",this.listenerMouseDown),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())},t.prototype.updateColorPicker=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!0),this.sliderDimMax){2===this.cpColorMode&&(this.hsva.s=0);var n=this.outputColor,i=this.service.hsva2hsla(this.hsva),r=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),o=this.service.denormalizeRGBA(this.service.hsvaToRgba(new u_(this.sliderH||this.hsva.h,1,1,1)));e&&(this.hslaText=new l_(Math.round(360*i.h),Math.round(100*i.s),Math.round(100*i.l),Math.round(100*i.a)/100),this.rgbaText=new c_(r.r,r.g,r.b,Math.round(100*r.a)/100),this.hexText=this.service.rgbaToHex(r,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.hsva.a<1&&(this.format=this.hsva.a<1?s_.RGBA:s_.HEX),this.hueSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.alphaSliderColor="rgb("+r.r+","+r.g+","+r.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.slider=new d_((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),t&&n!==this.outputColor&&this.directiveInstance.colorChanged(this.outputColor)}},t.prototype.setDialogPosition=function(){if("inline"===this.cpDialogDisplay)this.position="relative";else{for(var t="static",e="",n=void 0,i=null,r=null,o=this.directiveElementRef.nativeElement.parentNode,s=this.dialogElement.nativeElement.offsetHeight;null!==o&&"HTML"!==o.tagName;){if("static"!==(t=(n=window.getComputedStyle(o)).getPropertyValue("position"))&&null===i&&(i=o),(e=n.getPropertyValue("transform"))&&"none"!==e&&null===r&&(r=o),"fixed"===t){i=r;break}o=o.parentNode}var a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==t);if(this.useRootViewContainer||"fixed"===t&&(!i||i instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===i&&(i=o);var l=this.createDialogBox(i,"fixed"!==t);this.top=a.top-l.top,this.left=a.left-l.left}"fixed"===t&&(this.position="fixed"),"left"===this.cpPosition?(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):"top"===this.cpPosition?(this.arrowTop=s-1,this.top-=s+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"bottom"===this.cpPosition?(this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2)}},t.prototype.isDescendant=function(t,e){for(var n=e.parentNode;null!==n;){if(n===t)return!0;n=n.parentNode}return!1},t.prototype.createDialogBox=function(t,e){return{top:t.getBoundingClientRect().top+(e?window.pageYOffset:0),left:t.getBoundingClientRect().left+(e?window.pageXOffset:0),width:t.offsetWidth,height:t.offsetHeight}},t}(),v_=function(){function t(t,e,n,i,r,o){this.injector=t,this.cfr=e,this.appRef=n,this.vcRef=i,this.elRef=r,this._service=o,this.dialogCreated=!1,this.ignoreChanges=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="right",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpPresetLabel="Preset colors",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new Lr(!0),this.cpToggleChange=new Lr(!0),this.cpSliderChange=new Lr(!0),this.cpSliderDragEnd=new Lr(!0),this.cpSliderDragStart=new Lr(!0),this.colorPickerOpen=new Lr(!0),this.colorPickerClose=new Lr(!0),this.colorPickerCancel=new Lr(!0),this.colorPickerSelect=new Lr(!0),this.colorPickerChange=new Lr(!1),this.cpPresetColorsChange=new Lr(!0)}return t.prototype.handleClick=function(){this.inputFocus()},t.prototype.handleFocus=function(){this.inputFocus()},t.prototype.handleInput=function(t){this.inputChange(t)},t.prototype.ngOnDestroy=function(){void 0!==this.cmpRef&&this.cmpRef.destroy()},t.prototype.ngOnChanges=function(t){t.cpToggle&&!this.cpDisabled&&(t.cpToggle.currentValue?this.openDialog():t.cpToggle.currentValue||this.closeDialog()),t.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(t.colorPicker.currentValue),this.dialog.setColorFromString(t.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(t.cpPresetLabel||t.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)},t.prototype.openDialog=function(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{var t=this.vcRef;if(this.dialogCreated=!0,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){var e=this.injector.get(this.appRef.componentTypes[0]);(t=e.vcRef||e.viewContainerRef||this.vcRef)===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")}var n=this.cfr.resolveComponentFactory(m_),i=wo.fromResolvedProviders([],t.parentInjector);this.cmpRef=t.createComponent(n,0,i,[]),this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass),this.dialog=this.cmpRef.instance,this.vcRef!==t&&this.cmpRef.changeDetectorRef.detectChanges()}},t.prototype.closeDialog=function(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()},t.prototype.stateChanged=function(t){this.cpToggleChange.emit(t),t?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)},t.prototype.colorChanged=function(t,e){void 0===e&&(e=!0),this.ignoreChanges=e,this.colorPickerChange.emit(t)},t.prototype.colorCanceled=function(){this.colorPickerCancel.emit()},t.prototype.colorSelected=function(t){this.colorPickerSelect.emit(t)},t.prototype.inputFocus=function(){var t=this.elRef.nativeElement,e=this.cpIgnoredElements.filter(function(e){return e===t});this.cpDisabled||e.length||("undefined"!=typeof document&&t===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())},t.prototype.inputChange=function(t){this.dialog?this.dialog.setColorFromString(t.target.value,!0):(this.colorPicker=t.target.value,this.colorPickerChange.emit(this.colorPicker))},t.prototype.inputChanged=function(t){this.cpInputChange.emit(t)},t.prototype.sliderChanged=function(t){this.cpSliderChange.emit(t)},t.prototype.sliderDragEnd=function(t){this.cpSliderDragEnd.emit(t)},t.prototype.sliderDragStart=function(t){this.cpSliderDragStart.emit(t)},t.prototype.presetColorsChanged=function(t){this.cpPresetColorsChange.emit(t)},t}(),y_=function(){return function(){}}(),b_=ca({encapsulation:2,styles:[".color-picker {\n position: absolute;\n z-index: 100000;\n\n width: 230px;\n height: auto;\n border: #777 solid 1px;\n\n cursor: default;\n\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n\n user-select: none;\n background-color: #fff;\n}\n\n.color-picker * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n\n box-sizing: border-box;\n margin: 0;\n\n font-size: 11px;\n}\n\n.color-picker input {\n width: 0;\n height: 26px;\n min-width: 0;\n\n font-size: 13px;\n text-align: center;\n color: #000;\n}\n\n.color-picker input:invalid,\n.color-picker input:-moz-ui-invalid,\n.color-picker input:-moz-submit-invalid {\n box-shadow: none;\n}\n\n.color-picker input::-webkit-inner-spin-button,\n.color-picker input::-webkit-outer-spin-button {\n margin: 0;\n\n -webkit-appearance: none;\n}\n\n.color-picker .arrow {\n position: absolute;\n z-index: 999999;\n\n width: 0;\n height: 0;\n border-style: solid;\n}\n\n.color-picker .arrow.arrow-top {\n left: 8px;\n\n border-width: 10px 5px;\n border-color: #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-left {\n top: 8px;\n left: 100%;\n\n border-width: 5px 10px;\n border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777;\n}\n\n.color-picker .arrow.arrow-right {\n top: 8px;\n left: -20px;\n\n border-width: 5px 10px;\n border-color: rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-bottom {\n top: -20px;\n left: 8px;\n\n border-width: 10px 5px;\n border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0);\n}\n\n.color-picker .cursor {\n position: relative;\n\n width: 16px;\n height: 16px;\n border: #222 solid 2px;\n border-radius: 50%;\n\n cursor: default;\n}\n\n.color-picker .box {\n display: flex;\n padding: 4px 8px;\n}\n\n.color-picker .left {\n position: relative;\n\n padding: 16px 8px;\n}\n\n.color-picker .right {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n\n padding: 12px 8px;\n}\n\n.color-picker .button-area {\n padding: 0 16px 16px;\n\n text-align: right;\n}\n\n.color-picker .preset-area {\n padding: 4px 15px;\n}\n\n.color-picker .preset-area .preset-label {\n overflow: hidden;\n width: 100%;\n padding: 4px;\n\n font-size: 11px;\n white-space: nowrap;\n text-align: left;\n text-overflow: ellipsis;\n color: #555;\n}\n\n.color-picker .preset-area .preset-color {\n position: relative;\n\n display: inline-block;\n width: 18px;\n height: 18px;\n margin: 4px 6px 8px;\n border: #a9a9a9 solid 1px;\n border-radius: 25%;\n\n cursor: pointer;\n}\n\n.color-picker .preset-area .preset-empty-message {\n min-height: 18px;\n margin-top: 4px;\n margin-bottom: 8px;\n\n font-style: italic;\n text-align: center;\n}\n\n.color-picker .hex-text {\n width: 100%;\n padding: 4px 8px;\n\n font-size: 11px;\n}\n\n.color-picker .hex-text .box {\n padding: 0 24px 8px 8px;\n}\n\n.color-picker .hex-text .box div {\n float: left;\n\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n\n text-align: center;\n color: #555;\n clear: left;\n}\n\n.color-picker .hex-text .box input {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n padding: 1px;\n border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hex-alpha .box div:first-child,\n.color-picker .hex-alpha .box input:first-child {\n flex-grow: 3;\n margin-right: 8px;\n}\n\n.color-picker .hsla-text,\n.color-picker .rgba-text,\n.color-picker .value-text {\n width: 100%;\n padding: 4px 8px;\n\n font-size: 11px;\n}\n\n.color-picker .hsla-text .box,\n.color-picker .rgba-text .box {\n padding: 0 24px 8px 8px;\n}\n\n.color-picker .value-text .box {\n padding: 0 8px 8px;\n}\n\n.color-picker .hsla-text .box div,\n.color-picker .rgba-text .box div,\n.color-picker .value-text .box div {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n margin-right: 8px;\n\n text-align: center;\n color: #555;\n}\n\n.color-picker .hsla-text .box div:last-child,\n.color-picker .rgba-text .box div:last-child,\n.color-picker .value-text .box div:last-child {\n margin-right: 0;\n}\n\n.color-picker .hsla-text .box input,\n.color-picker .rgba-text .box input,\n.color-picker .value-text .box input {\n float: left;\n\n -webkit-flex: 1;\n -ms-flex: 1;\n\n flex: 1;\n padding: 1px;\n margin: 0 8px 0 0;\n border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hsla-text .box input:last-child,\n.color-picker .rgba-text .box input:last-child,\n.color-picker .value-text .box input:last-child {\n margin-right: 0;\n}\n\n.color-picker .hue-alpha {\n align-items: center;\n margin-bottom: 3px;\n}\n\n.color-picker .hue {\n direction: ltr;\n\n width: 100%;\n height: 16px;\n margin-bottom: 16px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC');\n}\n\n.color-picker .value {\n direction: rtl;\n\n width: 100%;\n height: 16px;\n margin-bottom: 16px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=');\n}\n\n.color-picker .alpha {\n direction: ltr;\n\n width: 100%;\n height: 16px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==');\n}\n\n.color-picker .type-policy {\n position: absolute;\n top: 218px;\n right: 12px;\n\n width: 16px;\n height: 24px;\n\n background-size: 8px 16px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==');\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.color-picker .type-policy .type-policy-arrow {\n display: block;\n\n width: 100%;\n height: 50%;\n}\n\n.color-picker .selected-color {\n position: absolute;\n top: 16px;\n left: 8px;\n\n width: 40px;\n height: 40px;\n border: 1px solid #a9a9a9;\n border-radius: 50%;\n}\n\n.color-picker .selected-color-background {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC');\n}\n\n.color-picker .saturation-lightness {\n direction: ltr;\n\n width: 100%;\n height: 130px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od5rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuzaHsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+7669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTjxymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==');\n}\n\n.color-picker .cp-add-color-button-class {\n position: absolute;\n\n display: inline;\n padding: 0;\n margin: 3px -3px;\n border: 0;\n\n cursor: pointer;\n background: transparent;\n}\n\n.color-picker .cp-add-color-button-class:hover {\n text-decoration: underline;\n}\n\n.color-picker .cp-add-color-button-class:disabled {\n cursor: not-allowed;\n color: #999;\n}\n\n.color-picker .cp-add-color-button-class:disabled:hover {\n text-decoration: none;\n}\n\n.color-picker .cp-remove-color-button-class {\n position: absolute;\n top: -5px;\n right: -5px;\n\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n\n cursor: pointer;\n text-align: center;\n background: #fff;\n\n box-shadow: 1px 1px 5px #333;\n}\n\n.color-picker .cp-remove-color-button-class::before {\n content: 'x';\n\n position: relative;\n bottom: 3.5px;\n\n display: inline-block;\n\n font-size: 10px;\n}\n"],data:{}});function __(t){return ru(0,[(t()(),Va(0,0,null,null,0,"div",[],[[8,"className",0],[4,"top","px"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,La(1,"arrow arrow-",n.cpPosition,""),n.arrowTop)})}function w_(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[["class","saturation-lightness"]],[[4,"background-color",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==gl(t,1).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==gl(t,1).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onColorChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("saturation-lightness")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("saturation-lightness")&&i),i},null,null)),Tl(1,16384,null,0,p_,[Ki],{rgX:[0,"rgX"],rgY:[1,"rgY"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),Va(2,0,null,null,0,"div",[["class","cursor"]],[[4,"top","px"],[4,"left","px"]],null,null,null,null))],function(t,e){t(e,1,0,1,1)},function(t,e){var n=e.component;t(e,0,0,n.hueSliderColor),t(e,2,0,null==n.slider?null:n.slider.v,null==n.slider?null:n.slider.s)})}function x_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"button",[],[[8,"className",0],[8,"disabled",0]],[[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==r.onAddPresetColor(n,r.selectedColor)&&i),i},null,null)),(t()(),eu(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,La(1,"",n.cpAddColorButtonClass,""),n.cpPresetColors&&n.cpPresetColors.length>=n.cpMaxPresetColorsLength),t(e,1,0,n.cpAddColorButtonText)})}function C_(t){return ru(0,[(t()(),Va(0,0,null,null,0,"div",[["style","height: 16px;"]],null,null,null,null,null))],null,null)}function S_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Tl(1,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){var n=e.component;t(e,0,0,null==n.hslaText?null:n.hslaText.a)})}function k_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["A"]))],null,null)}function E_(t){return ru(0,[(t()(),Va(0,0,null,null,18,"div",[["class","hsla-text"]],[[4,"display",null]],null,null,null,null)),(t()(),Va(1,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,1,"input",[["max","360"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,3).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onHueInput(n)&&i),i},null,null)),Tl(3,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Va(4,0,null,null,1,"input",[["max","100"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,5).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onSaturationInput(n)&&i),i},null,null)),Tl(5,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Va(6,0,null,null,1,"input",[["max","100"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,7).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onLightnessInput(n)&&i),i},null,null)),Tl(7,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Ba(16777216,null,null,1,null,S_)),Tl(9,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(10,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(11,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["H"])),(t()(),Va(13,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["S"])),(t()(),Va(15,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["L"])),(t()(),Ba(16777216,null,null,1,null,k_)),Tl(18,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,360),t(e,5,0,100),t(e,7,0,100),t(e,9,0,"disabled"!==n.cpAlphaChannel),t(e,18,0,"disabled"!==n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,2!==n.format?"none":"block"),t(e,2,0,null==n.hslaText?null:n.hslaText.h),t(e,4,0,null==n.hslaText?null:n.hslaText.s),t(e,6,0,null==n.hslaText?null:n.hslaText.l)})}function O_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Tl(1,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){var n=e.component;t(e,0,0,null==n.rgbaText?null:n.rgbaText.a)})}function T_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["A"]))],null,null)}function I_(t){return ru(0,[(t()(),Va(0,0,null,null,18,"div",[["class","rgba-text"]],[[4,"display",null]],null,null,null,null)),(t()(),Va(1,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,3).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onRedInput(n)&&i),i},null,null)),Tl(3,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Va(4,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,5).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onGreenInput(n)&&i),i},null,null)),Tl(5,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Va(6,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,7).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onBlueInput(n)&&i),i},null,null)),Tl(7,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Ba(16777216,null,null,1,null,O_)),Tl(9,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(10,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(11,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["R"])),(t()(),Va(13,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["G"])),(t()(),Va(15,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["B"])),(t()(),Ba(16777216,null,null,1,null,T_)),Tl(18,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,255),t(e,5,0,255),t(e,7,0,255),t(e,9,0,"disabled"!==n.cpAlphaChannel),t(e,18,0,"disabled"!==n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,1!==n.format?"none":"block"),t(e,2,0,null==n.rgbaText?null:n.rgbaText.r),t(e,4,0,null==n.rgbaText?null:n.rgbaText.g),t(e,6,0,null==n.rgbaText?null:n.rgbaText.b)})}function A_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Tl(1,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){t(e,0,0,e.component.hexAlpha)})}function P_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["A"]))],null,null)}function D_(t){return ru(0,[(t()(),Va(0,0,null,null,10,"div",[["class","hex-text"]],[[2,"hex-alpha",null],[4,"display",null]],null,null,null,null)),(t()(),Va(1,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,1,"input",[],[[8,"value",0]],[[null,"blur"],[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,3).inputChange(n)&&i),"blur"===e&&(i=!1!==r.onHexInput(null)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onHexInput(n)&&i),i},null,null)),Tl(3,16384,null,0,h_,[],null,{newValue:"newValue"}),(t()(),Ba(16777216,null,null,1,null,A_)),Tl(5,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(6,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(7,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["Hex"])),(t()(),Ba(16777216,null,null,1,null,P_)),Tl(10,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,"forced"===n.cpAlphaChannel),t(e,10,0,"forced"===n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,"forced"===n.cpAlphaChannel,0!==n.format?"none":"block"),t(e,2,0,n.hexText)})}function R_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Tl(1,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){var n=e.component;t(e,0,0,null==n.hslaText?null:n.hslaText.a)})}function j_(t){return ru(0,[(t()(),Va(0,0,null,null,10,"div",[["class","value-text"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,1,"input",[["max","100"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,3).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onValueInput(n)&&i),i},null,null)),Tl(3,16384,null,0,h_,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),Ba(16777216,null,null,1,null,R_)),Tl(5,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(6,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),Va(7,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["V"])),(t()(),Va(9,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(-1,null,["A"]))],function(t,e){var n=e.component;t(e,3,0,100),t(e,5,0,"disabled"!==n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,2,0,null==n.hslaText?null:n.hslaText.l)})}function M_(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[["class","type-policy"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,0,"span",[["class","type-policy-arrow"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onFormatToggle(1)&&i),i},null,null)),(t()(),Va(2,0,null,null,0,"span",[["class","type-policy-arrow"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onFormatToggle(-1)&&i),i},null,null))],null,null)}function F_(t){return ru(0,[(t()(),Va(0,0,null,null,0,"span",[],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onRemovePresetColor(n,t.parent.context.$implicit)&&i),i},null,null))],null,function(t,e){t(e,0,0,La(1,"",e.component.cpRemoveColorButtonClass,""))})}function L_(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[["class","preset-color"]],[[4,"backgroundColor",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.setColorFromString(t.context.$implicit)&&i),i},null,null)),(t()(),Ba(16777216,null,null,1,null,F_)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,2,0,e.component.cpAddColorButton)},function(t,e){t(e,0,0,e.context.$implicit)})}function N_(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,L_)),Tl(2,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.cpPresetColors)},null)}function B_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],[[8,"className",0]],null,null,null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,La(1,"",n.cpPresetEmptyMessageClass,"")),t(e,1,0,n.cpPresetEmptyMessage)})}function V_(t){return ru(0,[(t()(),Va(0,0,null,null,7,"div",[["class","preset-area"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,0,"hr",[],null,null,null,null,null)),(t()(),Va(2,0,null,null,1,"div",[["class","preset-label"]],null,null,null,null,null)),(t()(),eu(3,null,["",""])),(t()(),Ba(16777216,null,null,1,null,N_)),Tl(5,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,B_)),Tl(7,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,null==n.cpPresetColors?null:n.cpPresetColors.length),t(e,7,0,!(null!=n.cpPresetColors&&n.cpPresetColors.length)&&n.cpAddColorButton)},function(t,e){t(e,3,0,e.component.cpPresetLabel)})}function z_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onCancelColor(n)&&i),i},null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,La(1,"",n.cpCancelButtonClass,"")),t(e,1,0,n.cpCancelButtonText)})}function H_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onAcceptColor(n)&&i),i},null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,La(1,"",n.cpOKButtonClass,"")),t(e,1,0,n.cpOKButtonText)})}function W_(t){return ru(0,[(t()(),Va(0,0,null,null,4,"div",[["class","button-area"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,z_)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,H_)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.cpCancelButton),t(e,4,0,n.cpOKButton)},null)}function U_(t){return ru(0,[Xl(402653184,1,{dialogElement:0}),Xl(402653184,2,{hueSlider:0}),Xl(402653184,3,{alphaSlider:0}),(t()(),Va(3,0,[[1,0],["dialogPopup",1]],null,36,"div",[["class","color-picker"]],[[4,"visibility",null],[4,"top","px"],[4,"left","px"],[4,"position",null],[4,"height","px"],[4,"width","px"]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==n.stopPropagation()&&i),i},null,null)),(t()(),Ba(16777216,null,null,1,null,__)),Tl(5,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,w_)),Tl(7,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(8,0,null,null,17,"div",[["class","hue-alpha box"]],null,null,null,null,null)),(t()(),Va(9,0,null,null,4,"div",[["class","left"]],null,null,null,null,null)),(t()(),Va(10,0,null,null,0,"div",[["class","selected-color-background"]],null,null,null,null,null)),(t()(),Va(11,0,null,null,0,"div",[["class","selected-color"]],[[4,"background-color",null]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,x_)),Tl(13,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(14,0,null,null,11,"div",[["class","right"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,C_)),Tl(16,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(17,0,[[2,0],["hueSlider",1]],null,2,"div",[["class","hue"]],[[4,"display",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==gl(t,18).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==gl(t,18).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onHueChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("hue")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("hue")&&i),i},null,null)),Tl(18,16384,null,0,p_,[Ki],{rgX:[0,"rgX"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),Va(19,0,null,null,0,"div",[["class","cursor"]],[[4,"left","px"]],null,null,null,null)),(t()(),Va(20,0,[["valueSlider",1]],null,2,"div",[["class","value"]],[[4,"display",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==gl(t,21).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==gl(t,21).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onValueChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("value")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("value")&&i),i},null,null)),Tl(21,16384,null,0,p_,[Ki],{rgX:[0,"rgX"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),Va(22,0,null,null,0,"div",[["class","cursor"]],[[4,"right","px"]],null,null,null,null)),(t()(),Va(23,0,[[3,0],["alphaSlider",1]],null,2,"div",[["class","alpha"]],[[4,"display",null],[4,"background-color",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==gl(t,24).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==gl(t,24).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("alpha")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("alpha")&&i),i},null,null)),Tl(24,16384,null,0,p_,[Ki],{rgX:[0,"rgX"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),Va(25,0,null,null,0,"div",[["class","cursor"]],[[4,"left","px"]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,E_)),Tl(27,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,I_)),Tl(29,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,D_)),Tl(31,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,j_)),Tl(33,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,M_)),Tl(35,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,V_)),Tl(37,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,W_)),Tl(39,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,"popup"==n.cpDialogDisplay),t(e,7,0,1===(n.cpColorMode||1)),t(e,13,0,n.cpAddColorButton),t(e,16,0,"disabled"===n.cpAlphaChannel),t(e,18,0,1),t(e,21,0,1),t(e,24,0,1),t(e,27,0,!n.cpDisableInput&&1===(n.cpColorMode||1)),t(e,29,0,!n.cpDisableInput&&1===(n.cpColorMode||1)),t(e,31,0,!n.cpDisableInput&&1===(n.cpColorMode||1)),t(e,33,0,!n.cpDisableInput&&2===(n.cpColorMode||1)),t(e,35,0,!n.cpDisableInput&&1===(n.cpColorMode||1)),t(e,37,0,(null==n.cpPresetColors?null:n.cpPresetColors.length)||n.cpAddColorButton),t(e,39,0,n.cpOKButton||n.cpCancelButton)},function(t,e){var n=e.component;t(e,3,0,n.hidden||!n.show?"hidden":"visible",n.top,n.left,n.position,n.cpHeight,n.cpWidth),t(e,11,0,n.selectedColor),t(e,17,0,1===(n.cpColorMode||1)?"block":"none"),t(e,19,0,null==n.slider?null:n.slider.h),t(e,20,0,2===(n.cpColorMode||1)?"block":"none"),t(e,22,0,null==n.slider?null:n.slider.v),t(e,23,0,"disabled"===n.cpAlphaChannel?"none":"block",n.alphaSliderColor),t(e,25,0,null==n.slider?null:n.slider.a)})}function X_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"color-picker",[],null,[["document","keyup.esc"],["document","keyup.enter"]],function(t,e,n){var i=!0;return"document:keyup.esc"===e&&(i=!1!==gl(t,1).handleEsc(n)&&i),"document:keyup.enter"===e&&(i=!1!==gl(t,1).handleEnter(n)&&i),i},U_,b_)),Tl(1,4440064,null,0,m_,[Ki,ys,g_],null,null)],function(t,e){t(e,1,0)},null)}var Y_=rl("color-picker",m_,X_,{},{},[]),G_=new RegExp("[^#a-f\\d]","gi"),q_=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i"),K_=function(){function t(t,e){this.data=t,this.overlayPanelRef=e}return t.prototype.ngOnInit=function(){var t=this;this.color=this.getInitialColor(),setTimeout(function(){t.trigger.nativeElement.click()})},t.prototype.emitSelectedEvent=function(t){this.color=t;var e="rgba("+function(t){if("string"!=typeof t||G_.test(t)||!q_.test(t))throw new TypeError("Expected a valid hex string");var e=255;8===(t=t.replace(/^#/,"")).length&&(e=parseInt(t.slice(6,8),16)/255,t=t.substring(0,6)),4===t.length&&(e=parseInt(t.slice(3,4).repeat(2),16)/255,t=t.substring(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var n=parseInt(t,16);return[n>>16,n>>8&255,255&n,e]}(t).join(",")+")";this.overlayPanelRef.emitValue(e)},t.prototype.getInitialColor=function(){var t=this.data&&this.data.color||null;return t&&"rgba(0,0,0,0)"===t.replace(/ /g,"")&&(t=void 0),t},t}(),Z_=ca({encapsulation:2,styles:[["colorpicker-panel{display:block;width:230px;height:277px}colorpicker-panel>.trigger{display:block}"]],data:{}});function Q_(t){return ru(0,[Xl(402653184,1,{trigger:0}),(t()(),Va(1,16777216,[[1,0],["trigger",1]],null,1,"div",[["class","trigger"]],null,[[null,"colorPickerChange"],[null,"click"],[null,"focus"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==gl(t,2).handleClick()&&i),"focus"===e&&(i=!1!==gl(t,2).handleFocus()&&i),"input"===e&&(i=!1!==gl(t,2).handleInput(n)&&i),"colorPickerChange"===e&&(i=!1!==r.emitSelectedEvent(n)&&i),i},null,null)),Tl(2,671744,null,0,v_,[hi,Wi,ps,ms,Ki,g_],{colorPicker:[0,"colorPicker"],cpToggle:[1,"cpToggle"],cpOutputFormat:[2,"cpOutputFormat"],cpAlphaChannel:[3,"cpAlphaChannel"],cpDialogDisplay:[4,"cpDialogDisplay"]},{colorPickerChange:"colorPickerChange"})],function(t,e){t(e,2,0,e.component.color,!1,"hex","always","inline")},null)}function J_(t){return ru(0,[(t()(),Va(0,0,null,null,1,"colorpicker-panel",[],null,null,null,Q_,Z_)),Tl(1,114688,null,0,K_,[[2,Bb],Nb],null,null)],function(t,e){t(e,1,0)},null)}var $_=rl("colorpicker-panel",K_,J_,{},{},[]),tw=20;function ew(t){return Error('Tooltip position "'+t+'" is invalid.')}var nw=new Et("mat-tooltip-scroll-strategy");function iw(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:tw})}}var rw=new Et("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),ow=function(){function t(t,e,n,i,r,o,s,a,l,u,c,h){var p=this;this._overlay=t,this._elementRef=e,this._scrollDispatcher=n,this._viewContainerRef=i,this._ngZone=r,this._ariaDescriber=s,this._focusMonitor=a,this._dir=u,this._defaultOptions=c,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new L,this._scrollStrategy=l;var d=e.nativeElement,f=d.style,g="undefined"==typeof window||window.Hammer||h;o.IOS||o.ANDROID?g||this._manualListeners.set("touchstart",function(){return p.show()}):this._manualListeners.set("mouseenter",function(){return p.show()}).set("mouseleave",function(){return p.hide()}),this._manualListeners.forEach(function(t,e){return d.addEventListener(e,t)}),"INPUT"!==d.nodeName&&"TEXTAREA"!==d.nodeName||(f.webkitUserSelect=f.userSelect=f.msUserSelect=""),d.draggable&&"none"===f.webkitUserDrag&&(f.webkitUserDrag=""),a.monitor(e).pipe(fg(this._destroyed)).subscribe(function(t){t?"keyboard"===t&&r.run(function(){return p.show()}):r.run(function(){return p.hide(0)})})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=qm(t),this._disabled&&this.hide(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipClass",{get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var t=this;this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._manualListeners.forEach(function(e,n){t._elementRef.nativeElement.removeEventListener(n,e)}),this._manualListeners.clear(),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef)},t.prototype.show=function(t){var e=this;if(void 0===t&&(t=this.showDelay),!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new wv(sw,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(fg(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}},t.prototype.hide=function(t){void 0===t&&(t=this.hideDelay),this._tooltipInstance&&this._tooltipInstance.hide(t)},t.prototype.toggle=function(){this._isTooltipVisible()?this.hide():this.show()},t.prototype._isTooltipVisible=function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()},t.prototype._handleKeydown=function(t){this._isTooltipVisible()&&t.keyCode===Hv&&(t.stopPropagation(),this.hide(0))},t.prototype._handleTouchend=function(){this.hide(this._defaultOptions.touchendHideDelay)},t.prototype._createOverlay=function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8),n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);return e.withScrollableContainers(n),e.positionChanges.pipe(fg(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(fg(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef},t.prototype._detach=function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null},t.prototype._updatePosition=function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([o({},e.main,n.main),o({},e.fallback,n.fallback)])},t.prototype._getOrigin=function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n||"below"==n)t={originX:"center",originY:"above"==n?"top":"bottom"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={originX:"start",originY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw ew(n);t={originX:"end",originY:"center"}}var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}},t.prototype._getOverlayPosition=function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n)t={overlayX:"center",overlayY:"bottom"};else if("below"==n)t={overlayX:"center",overlayY:"top"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw ew(n);t={overlayX:"start",overlayY:"center"}}var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}},t.prototype._updateTooltipMessage=function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(rg(1),fg(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))},t.prototype._setTooltipClass=function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())},t.prototype._invertPosition=function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}},t}(),sw=function(){function t(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new L,this._isHandset=this._breakpointObserver.observe(ov.Handset)}return t.prototype.show=function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()},t)},t.prototype.hide=function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()},t)},t.prototype.afterHidden=function(){return this._onHide.asObservable()},t.prototype.isVisible=function(){return"visible"===this._visibility},t.prototype._animationStart=function(){this._closeOnInteraction=!1},t.prototype._animationDone=function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)},t.prototype._handleBodyInteraction=function(){this._closeOnInteraction&&this.hide(0)},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t}(),aw=function(){return function(){}}(),lw=function(){function t(){}return t.prototype.create=function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)},t.ngInjectableDef=Ct({factory:function(){return new t},token:t,providedIn:"root"}),t}(),uw=function(){function t(t){this._mutationObserverFactory=t,this._observedElements=new Map}return t.prototype.ngOnDestroy=function(){var t=this;this._observedElements.forEach(function(e,n){return t._cleanupObserver(n)})},t.prototype.observe=function(t){var e=this,n=Jm(t);return P.create(function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}})},t.prototype._observeElement=function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new L,n=this._mutationObserverFactory.create(function(t){return e.next(t)});n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream},t.prototype._unobserveElement=function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))},t.prototype._cleanupObserver=function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(lw))},token:t,providedIn:"root"}),t}(),cw=function(){function t(t,e,n){this._contentObserver=t,this._elementRef=e,this._ngZone=n,this.event=new Lr,this._disabled=!1,this._currentSubscription=null}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=qm(t),this._disabled?this._unsubscribe():this._subscribe()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debounce",{get:function(){return this._debounce},set:function(t){this._debounce=Km(t),this._subscribe()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._currentSubscription||this.disabled||this._subscribe()},t.prototype.ngOnDestroy=function(){this._unsubscribe()},t.prototype._subscribe=function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(Wm(t.debounce)):e).subscribe(t.event)})},t.prototype._unsubscribe=function(){this._currentSubscription&&this._currentSubscription.unsubscribe()},t}(),hw=function(){return function(){}}(),pw=new Et("cdk-dir-doc",{providedIn:"root",factory:function(){return Ne(Oh)}}),dw=function(){function t(t){if(this.value="ltr",this.change=new Lr,t){var e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}return t.prototype.ngOnDestroy=function(){this.change.complete()},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(pw,8))},token:t,providedIn:"root"}),t}(),fw=function(){return function(){}}(),gw=new Et("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),mw=function(){function t(t,e){this._sanityChecksEnabled=t,this._hammerLoader=e,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}return t.prototype._areChecksEnabled=function(){return this._sanityChecksEnabled&&fr()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){var t=this._window;return t&&(t.__karma__||t.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkThemeIsPresent=function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.prototype._checkHammerIsAvailable=function(){!this._hasCheckedHammer&&this._window&&(!this._areChecksEnabled()||this._window.Hammer||this._hammerLoader||console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)},t}();function vw(t){return function(t){function e(){for(var e=[],n=0;n visible",animation:{type:4,styles:{type:5,steps:[{type:6,styles:{opacity:0,transform:"scale(0)",offset:0},offset:null},{type:6,styles:{opacity:.5,transform:"scale(0.99)",offset:.5},offset:null},{type:6,styles:{opacity:1,transform:"scale(1)",offset:1},offset:null}]},timings:"200ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms cubic-bezier(0, 0, 0.2, 1)"},options:null}],options:{}}]}});function Kw(t){return ru(2,[(t()(),Va(0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(t,e,n){var i=!0,r=t.component;return"@state.start"===e&&(i=!1!==r._animationStart()&&i),"@state.done"===e&&(i=!1!==r._animationDone(n)&&i),i},null,null)),Tl(1,278528,null,0,lh,[Fs,Ls,Ki,tr],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Il(131072,Ch,[ys]),(t()(),eu(3,null,["",""]))],function(t,e){t(e,1,0,"mat-tooltip",e.component.tooltipClass)},function(t,e){var n,i=e.component;t(e,0,0,null==(n=aa(e,0,0,gl(e,2).transform(i._isHandset)))?null:n.matches,i._visibility),t(e,3,0,i.message)})}function Zw(t){return ru(0,[(t()(),Va(0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(t,e,n){var i=!0;return"body:click"===e&&(i=!1!==gl(t,1)._handleBodyInteraction()&&i),i},Kw,qw)),Tl(1,49152,null,0,sw,[ys,iv],null,null)],null,function(t,e){t(e,0,0,"visible"===gl(e,1)._visibility?1:null)})}var Qw=rl("mat-tooltip-component",sw,Zw,{},{},[]),Jw=function(){function t(t,e,n){this.el=t,this.i18n=e,this.settings=n,this.subscriptions=[]}return t.prototype.ngAfterViewInit=function(){var t=this;if(this.settings.get("i18n.enable")){var e=this.i18n.localizationChange.subscribe(function(){return t.translate()});this.translate(),this.subscriptions.push(e)}},t.prototype.translate=function(){var t=this.el.nativeElement;if(t.getAttribute("placeholder")){var e=t.getAttribute("placeholder");t.setAttribute("placeholder",this.i18n.t(e))}else t.getAttribute("title")?(e=t.getAttribute("title"),t.setAttribute("title",this.i18n.t(e))):this.translateTextContent(t)},t.prototype.translateTextContent=function(t){var e=Array.from(t.childNodes);e.sort(function(t,e){return t.nodeType===Node.TEXT_NODE?-1:1});for(var n=0;n=0;n--){var i=e[n];if(i.svgElement){var r=this._extractSvgIconFromSet(i.svgElement,t);if(r)return r}}return null},t.prototype._loadSvgIconFromConfig=function(t){var e=this;return this._fetchUrl(t.url).pipe(J(function(t){return e._createSvgElementForSingleIcon(t)}))},t.prototype._loadSvgIconSetFromConfig=function(t){var e=this;return t.svgElement?Gc(t.svgElement):this._fetchUrl(t.url).pipe(J(function(n){return t.svgElement||(t.svgElement=e._svgElementFromString(n)),t.svgElement}))},t.prototype._createSvgElementForSingleIcon=function(t){var e=this._svgElementFromString(t);return this._setSvgAttributes(e),e},t.prototype._extractSvgIconFromSet=function(t,e){var n=t.querySelector("#"+e);if(!n)return null;var i=n.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i));var r=this._svgElementFromString("");return r.appendChild(i),this._setSvgAttributes(r)},t.prototype._svgElementFromString=function(t){var e=this._document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error(" tag not found");return n},t.prototype._toSvgElement=function(t){for(var e=this._svgElementFromString(""),n=0;n=1&&0!=this.pageSize},e.prototype.hasNextPage=function(){var t=this.getNumberOfPages()-1;return this.pageIndexe+256?Math.max(0,n-256+t):e},e.prototype.focus=function(){this._elementRef.nativeElement.focus()},e.prototype._getOptionIndex=function(t){return this.options.reduce(function(e,n,i){return void 0===e?t===n?i:void 0:e},void 0)},e.prototype._calculateOverlayPosition=function(){var t=this._getItemHeight(),e=this._getItemCount(),n=Math.min(e*t,256),i=e*t-n,r=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);r+=Xw(r,this.options,this.optionGroups);var o=n/2;this._scrollTop=this._calculateOverlayScroll(r,o,i),this._offsetY=this._calculateOverlayOffsetY(r,o,i),this._checkOverlayWithinViewport(i)},e.prototype._calculateOverlayScroll=function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)},e.prototype._getAriaLabel=function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder},e.prototype._getAriaLabelledby=function(){return this.ariaLabelledby?this.ariaLabelledby:this._parentFormField&&this._parentFormField._hasFloatingLabel()&&!this._getAriaLabel()&&this._parentFormField._labelId||null},e.prototype._getAriaActiveDescendant=function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null},e.prototype._calculateOverlayOffsetX=function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?Cx+16:32;if(this.multiple)t=Cx;else{var o=this._selectionModel.selected[0]||this.options.first;t=o&&o.group?32:16}i||(t*=-1);var s=0-(e.left+t-(i?r:0)),a=e.right+t-n.width+(i?0:r);s>0?t+=s+8:a>0&&(t-=a+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()},e.prototype._calculateOverlayOffsetY=function(t,e,n){var i,r=this._getItemHeight(),o=(r-this._triggerRect.height)/2,s=Math.floor(256/r);return this._disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-s))*r+(r-(this._getItemCount()*r-256)%r):e-r/2,Math.round(-1*i-o))},e.prototype._checkOverlayWithinViewport=function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),s=Math.min(this._getItemCount()*e,256)-o-this._triggerRect.height;s>r?this._adjustPanelUp(s,r):o>i?this._adjustPanelDown(o,i,t):this._transformOrigin=this._getOriginBasedOnOption()},e.prototype._adjustPanelUp=function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")},e.prototype._adjustPanelDown=function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")},e.prototype._getOriginBasedOnOption=function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return"50% "+(Math.abs(this._offsetY)-e+t/2)+"px 0px"},e.prototype._getItemCount=function(){return this.options.length+this.optionGroups.length},e.prototype._getItemHeight=function(){return 3*this._triggerFontSize},e.prototype.setDescribedByIds=function(t){this._ariaDescribedby=t.join(" ")},e.prototype.onContainerClick=function(){this.focus(),this.open()},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return this._panelOpen||!this.empty},enumerable:!0,configurable:!0}),e}(bw(_w(vw(ww(function(){return function(t,e,n,i,r){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}}()))))),Tx=function(){return function(){}}(),Ix="accent",Ax=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],Px=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;o._focusMonitor=i,o._animationMode=r,o.isRoundButton=o._hasHostAttributes("mat-fab","mat-mini-fab"),o.isIconButton=o._hasHostAttributes("mat-icon-button");for(var s=0,a=Ax;s0&&this._control.errorState?"error":"hint"},e.prototype._animateAndLockLabel=function(){var t=this;this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,Tv(this._label.nativeElement,"transitionend").pipe(rg(1)).subscribe(function(){t._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())},e.prototype._validatePlaceholders=function(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")},e.prototype._processHints=function(){this._validateHints(),this._syncDescribedByIds()},e.prototype._validateHints=function(){var t,e,n=this;this._hintChildren&&this._hintChildren.forEach(function(i){if("start"===i.align){if(t||n.hintLabel)throw jx("start");t=i}else if("end"===i.align){if(e)throw jx("end");e=i}})},e.prototype._syncDescribedByIds=function(){if(this._control){var t=[];if("hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find(function(t){return"start"===t.align}):null,n=this._hintChildren?this._hintChildren.find(function(t){return"end"===t.align}):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&(t=this._errorChildren.map(function(t){return t.id}));this._control.setDescribedByIds(t)}},e.prototype._validateControlChild=function(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")},e.prototype.updateOutlineGap=function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&(!this._platform||this._platform.isBrowser))if(document.documentElement.contains(this._elementRef.nativeElement)){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),o=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var s=i.getBoundingClientRect();if(0===s.width&&0===s.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var a=this._getStartEnd(s),l=this._getStartEnd(t.children[0].getBoundingClientRect()),u=0,c=0,h=t.children;c0?.75*u+10:0}for(var p=0;p *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var o=r[1],s=r[2],a=r[3];e.push(RC(o,a)),"<"!=s[0]||o==AC&&a==AC||e.push(RC(a,o))}(t,r,i)}):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:BC(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return TC(n,t,e)}),options:BC(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,i=e.currentTime,r=0,o=t.steps.map(function(t){e.currentTime=i;var o=TC(n,t,e);return r=Math.max(r,e.currentTime),o});return e.currentTime=r,{type:3,steps:o,options:BC(t.options)}},t.prototype.visitAnimate=function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return VC(pC(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var r=VC(0,0,"");return r.dynamic=!0,r.strValue=i,r}return VC((n=n||pC(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:fv({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,s=!1;if(!o){s=!0;var a={};i.easing&&(a.easing=i.easing),o=fv(a)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=s,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==pv?n.push(t):e.errors.push("The provided style string value "+t+" is not allowed."):n.push(t)}):n.push(t.styles);var i=!1,r=null;return n.forEach(function(t){if(NC(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var o in e)if(e[o].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(i){if(n._driver.validateStyleProperty(i)){var s,a,l,u=e.collectedStyles[e.currentQuerySelector],c=u[i],h=!0;c&&(o!=r&&o>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'+i+'" that exists between the times of "'+c.startTime+'ms" and "'+c.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+r+'ms"'),h=!1),o=c.startTime),h&&(u[i]={startTime:o,endTime:r}),e.options&&(s=e.errors,a=e.options.params||{},(l=wC(t[i])).length&&l.forEach(function(t){a.hasOwnProperty(t)||s.push("Unable to resolve the local animation param "+t+" in the given list of values")}))}else e.errors.push('The provided animation property "'+i+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,o=[],s=!1,a=!1,l=0,u=t.steps.map(function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(NC(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(NC(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),a=a||c<0||c>1,s=s||c0&&r0?r==p?1:h*r:o[r],a=s*g;e.currentTime=d+f.delay+a,f.duration=a,n._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i},t.prototype.visitReference=function(t,e){return{type:8,animation:TC(this,bC(t.animation),e),options:BC(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:BC(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:BC(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=u(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return":self"==t});return e&&(t=t.replace(jC,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),o=r[0],s=r[1];e.currentQuerySelector=n.length?n+" "+o:o,Yx(e.collectedStyles,e.currentQuerySelector,{});var a=TC(this,bC(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:BC(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:pC(t.timings,e.errors,!0);return{type:12,animation:TC(this,bC(t.animation),e),timings:n,options:null}},t}(),LC=function(){return function(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}();function NC(t){return!Array.isArray(t)&&"object"==typeof t}function BC(t){var e;return t?(t=dC(t)).params&&(t.params=(e=t.params)?dC(e):null):t={},t}function VC(t,e,n){return{duration:t,delay:e,easing:n}}function zC(t,e,n,i,r,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var HC=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,c(e))},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),WC=new RegExp(":enter","g"),UC=new RegExp(":leave","g");function XC(t,e,n,i,r,o,s,a,l,u){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===u&&(u=[]),(new YC).buildKeyframes(t,e,n,i,r,o,s,a,l,u)}var YC=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,i,r,o,s,a,l,u){void 0===u&&(u=[]),l=l||new HC;var c=new qC(t,e,l,i,r,u,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),TC(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(s).length){var p=h[h.length-1];p.allowOnlyTimelineStyles()||p.setStyles([s],null,c.errors,a)}return h.length?h.map(function(t){return t.buildKeyframes()}):[zC(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?cC(n.duration):null,o=null!=n.delay?cC(n.delay):null;return 0!==r&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,r,o);i=Math.max(i,n.duration+n.delay)}),i},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),TC(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&((r=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=GC);var s=cC(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(function(t){return TC(n,t,r)}),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?cC(t.options.delay):0;t.steps.forEach(function(s){var a=e.createSubContext(t.options);o&&a.delayNextStep(o),TC(n,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(r),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return pC(e.params?xC(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*r),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+r),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?cC(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=GC);var s=i,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;var l=null;a.forEach(function(i,r){e.currentQueryIndex=r;var a=e.createSubContext(t.options,i);o&&a.delayNextStep(o),i===e.element&&(l=a.currentTimeline),TC(n,t.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,o=Math.abs(r.duration),s=o*(e.currentQueryTotal-1),a=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var l=e.currentTimeline;a&&l.delayNextStep(a);var u=l.currentTime;TC(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)},t}(),GC={},qC=function(){function t(t,e,n,i,r,o,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=GC,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new KC(this._driver,e,0),s.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=cC(i.duration)),null!=i.delay&&(r.delay=cC(i.delay));var o=i.params;if(o){var s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(t){e&&s.hasOwnProperty(t)||(s[t]=xC(o[t],s,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,i){void 0===e&&(e=null);var r=n||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=GC,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new ZC(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,i,r,o){var s=[];if(i&&s.push(this.element),t.length>0){t=(t=t.replace(WC,"."+this._enterClassName)).replace(UC,"."+this._leaveClassName);var a=this._driver.query(this.element,t,1!=n);0!==n&&(a=n<0?a.slice(a.length+n,a.length):a.slice(0,n)),s.push.apply(s,c(a))}return r||0!=s.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),s},t}(),KC=function(){function t(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||pv,e._currentKeyframe[t]=pv}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},s=function(t,e){var n,i={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){i[t]=pv}):fC(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(s).forEach(function(t){var e=xC(s[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:pv),r._updateStyle(t,e)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach(function(o,s){var a=fC(o,!0);Object.keys(a).forEach(function(t){var i=a[t];i==yv?e.add(t):i==pv&&n.add(t)}),i||(a.offset=s/t.duration),r.push(a)});var o=e.size?CC(e.values()):[],s=n.size?CC(n.values()):[];if(i){var a=r[0],l=dC(a);a.offset=0,l.offset=1,r=[a,l]}return zC(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)},t}(),ZC=function(t){function e(e,n,i,r,o,s,a){void 0===a&&(a=!1);var l=t.call(this,e,n,s.delay)||this;return l.element=n,l.keyframes=i,l.preStyleProps=r,l.postStyleProps=o,l._stretchStartingKeyframe=a,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return r(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=i+n,a=n/s,l=fC(t[0],!1);l.offset=0,o.push(l);var u=fC(t[0],!1);u.offset=QC(a),o.push(u);for(var c=t.length-1,h=1;h<=c;h++){var p=fC(t[h],!1);p.offset=QC((n+p.offset*i)/s),o.push(p)}i=s,n=0,r="",t=o}return zC(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)},e}(KC);function QC(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var JC=function(){return function(){}}(),$C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.normalizePropertyName=function(t,e){return kC(t)},e.prototype.normalizeStyleValue=function(t,e,n,i){var r="",o=n.toString().trim();if(tS[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&i.push("Please provide a CSS unit value for "+t+":"+n)}return o+r},e}(JC),tS=eS("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function eS(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}function nS(t,e,n,i,r,o,s,a,l,u,c,h,p){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:p}}var iS={},rS=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e,n,i){return function(t,e,n,i,r){return t.some(function(t){return t(e,n,i,r)})}(this.ast.matchers,t,e,n,i)},t.prototype.buildStyles=function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):o},t.prototype.build=function(t,e,n,i,r,s,a,l,u,c){var h=[],p=this.ast.options&&this.ast.options.params||iS,d=this.buildStyles(n,a&&a.params||iS,h),f=l&&l.params||iS,g=this.buildStyles(i,f,h),m=new Set,v=new Map,y=new Map,b="void"===i,_={params:o({},p,f)},w=c?[]:XC(t,e,this.ast.animation,r,s,d,g,_,u,h),x=0;if(w.forEach(function(t){x=Math.max(t.duration+t.delay,x)}),h.length)return nS(e,this._triggerName,n,i,b,d,g,[],[],v,y,x,h);w.forEach(function(t){var n=t.element,i=Yx(v,n,{});t.preStyleProps.forEach(function(t){return i[t]=!0});var r=Yx(y,n,{});t.postStyleProps.forEach(function(t){return r[t]=!0}),n!==e&&m.add(n)});var C=CC(m.values());return nS(e,this._triggerName,n,i,b,d,g,w,C,v,y,x)},t}(),oS=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},i=dC(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach(function(t){var o=r[t];o.length>1&&(o=xC(o,i,e)),n[t]=o})}}),n},t}(),sS=function(){function t(t,e){var n=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){n.states[t.name]=new oS(t.style,t.options&&t.options.params||{})}),aS(this.states,"true","1"),aS(this.states,"false","0"),e.transitions.forEach(function(e){n.transitionFactories.push(new rS(t,e,n.states))}),this.fallbackTransition=new rS(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e,n,i){return this.transitionFactories.find(function(r){return r.match(t,e,n,i)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function aS(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var lS=new HC,uS=function(){function t(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],i=MC(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i},t.prototype._buildPlayer=function(t,e,n){var i=t.element,r=Hx(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)},t.prototype.create=function(t,e,n){var i=this;void 0===n&&(n={});var r,o=[],s=this._animations[t],a=new Map;if(s?(r=XC(this._driver,e,s,"ng-enter","ng-leave",{},{},n,lS,o)).forEach(function(t){var e=Yx(a,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),r=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));a.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=i._driver.computeStyle(e,n,pv)})});var l=zx(r.map(function(t){var e=a.get(t.element);return i._buildPlayer(t,{},e)}));return this._playersById[t]=l,l.onDestroy(function(){return i.destroy(t)}),this.players.push(l),l},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,i){var r=Xx(e,"","","");return Wx(this._getPlayer(t),n,r,i),function(){}},t.prototype.command=function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])},t}(),cS=[],hS={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},pS={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},dS="__ng_removed",fS=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){var i=dC(t);delete i.value,this.options=i}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),gS=new fS("void"),mS=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,SS(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,i){var r,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var s=Yx(this._elementListeners,t,[]),a={name:e,phase:n,callback:i};s.push(a);var l=Yx(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(SS(t,"ng-trigger"),SS(t,"ng-trigger-"+e),l[e]=gS),function(){o._engine.afterFlush(function(){var t=s.indexOf(a);t>=0&&s.splice(t,1),o._triggers[e]||delete l[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,i){var r=this;void 0===i&&(i=!0);var o=this._getTrigger(e),s=new yS(this.id,e,t),a=this._engine.statesByElement.get(t);a||(SS(t,"ng-trigger"),SS(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,a={}));var l=a[e],u=new fS(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),a[e]=u,l||(l=gS),"void"===u.value||l.value!==u.value){var c=Yx(this._engine.playersByElement,t,[]);c.forEach(function(t){t.namespaceId==r.id&&t.triggerName==e&&t.queued&&t.destroy()});var h=o.matchTransition(l.value,u.value,t,u.params),p=!1;if(!h){if(!i)return;h=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:l,toState:u,player:s,isFallbackTransition:p}),p||(SS(t,"ng-animate-queued"),s.onStart(function(){kS(t,"ng-animate-queued")})),s.onDone(function(){var e=r.players.indexOf(s);e>=0&&r.players.splice(e,1);var n=r._engine.playersByElement.get(t);if(n){var i=n.indexOf(s);i>=0&&n.splice(i,1)}}),this.players.push(s),c.push(s),s}if(!function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(var r=0;r=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return i.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(t){var s=this._fetchNamespace(t);s&&s.insertNode(e,n)}i&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),SS(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),kS(t,"ng-animate-disabled"))},t.prototype.removeNode=function(t,e,n){if(bS(e)){var i=t?this._fetchNamespace(t):null;i?i.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,i){this.collectedLeaveElements.push(e),e[dS]={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,i,r){return bS(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}},t.prototype._buildInstruction=function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return zx(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[dS];if(n&&n.setForRemoval){if(t[dS]=hS,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(function(t){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;E--)this._namespaceList[E].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(S.push(e),n.collectedEnterElements.length){var s=o[dS];if(s&&s.setForMove)return void e.destroy()}var c=!d||!n.driver.containsElement(d,o),p=x.get(o),f=m.get(o),g=n._buildInstruction(t,i,f,p,c);if(g.errors&&g.errors.length)k.push(g);else{if(c)return e.onStart(function(){return yC(o,g.fromStyles)}),e.onDestroy(function(){return vC(o,g.toStyles)}),void r.push(e);if(t.isFallbackTransition)return e.onStart(function(){return yC(o,g.fromStyles)}),e.onDestroy(function(){return vC(o,g.toStyles)}),void r.push(e);g.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(o,g.timelines),a.push({instruction:g,player:e,element:o}),g.queriedElements.forEach(function(t){return Yx(l,t,[]).push(e)}),g.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var i=u.get(e);i||u.set(e,i=new Set),n.forEach(function(t){return i.add(t)})}}),g.postStyleProps.forEach(function(t,e){var n=Object.keys(t),i=h.get(e);i||h.set(e,i=new Set),n.forEach(function(t){return i.add(t)})})}});if(k.length){var O=[];k.forEach(function(t){O.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return O.push("- "+t+"\n")})}),S.forEach(function(t){return t.destroy()}),this.reportError(O)}var T=new Map,I=new Map;a.forEach(function(t){var e=t.element;i.has(e)&&(I.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,T))}),r.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Yx(T,e,[]).push(t),t.destroy()})});var A=y.filter(function(t){return OS(t,u,h)}),P=new Map;wS(P,this.driver,_,h,pv).forEach(function(t){OS(t,u,h)&&A.push(t)});var D=new Map;g.forEach(function(t,e){wS(D,n.driver,new Set(t),u,yv)}),A.forEach(function(t){var e=P.get(t),n=D.get(t);P.set(t,o({},e,n))});var R=[],j=[],M={};a.forEach(function(t){var e=t.element,o=t.player,a=t.instruction;if(i.has(e)){if(p.has(e))return o.onDestroy(function(){return vC(e,a.toStyles)}),o.disabled=!0,o.overrideTotalTime(a.totalTime),void r.push(o);var l=M;if(I.size>1){for(var u=e,c=[];u=u.parentNode;){var h=I.get(u);if(h){l=h;break}c.push(u)}c.forEach(function(t){return I.set(t,l)})}var d=n._buildAnimation(o.namespaceId,a,T,s,D,P);if(o.setRealPlayer(d),l===M)R.push(o);else{var f=n.playersByElement.get(l);f&&f.length&&(o.parentPlayer=zx(f)),r.push(o)}}else yC(e,a.fromStyles),o.onDestroy(function(){return vC(e,a.toStyles)}),j.push(o),p.has(e)&&r.push(o)}),j.forEach(function(t){var e=s.get(t.element);if(e&&e.length){var n=zx(e);t.setRealPlayer(n)}}),r.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var F=0;F0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new mv(t.duration,t.delay)},t}(),yS=function(){function t(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new mv,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return Wx(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.overrideTotalTime=function(t){this.totalTime=t},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){Yx(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function bS(t){return t&&1===t.nodeType}function _S(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function wS(t,e,n,i,r){var o=[];n.forEach(function(t){return o.push(_S(t))});var s=[];i.forEach(function(n,i){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i[dS]=pS,s.push(i))}),t.set(i,o)});var a=0;return n.forEach(function(t){return _S(t,o[a++])}),s}function xS(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var i=new Set(e),r=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return 1;var o=r.get(e);if(o)return o;var s=e.parentNode;return o=n.has(s)?s:i.has(s)?1:t(s),r.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}var CS="$$classes";function SS(t,e){if(t.classList)t.classList.add(e);else{var n=t[CS];n||(n=t[CS]={}),n[e]=!0}}function kS(t,e){if(t.classList)t.classList.remove(e);else{var n=t[CS];n&&delete n[e]}}function ES(t,e,n){zx(n).onDone(function(){return t.processLeaveNode(e)})}function OS(t,e,n){var i=n.get(t);if(!i)return!1;var r=e.get(t);return r?i.forEach(function(t){return r.add(t)}):e.set(t,i),n.delete(t),!0}var TS=function(){function t(t,e,n){var i=this;this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new vS(t,e,n),this._timelineEngine=new uS(t,e,n),this._transitionEngine.onRemovalComplete=function(t,e){return i.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,i,r){var o=t+"-"+i,s=this._triggerCache[o];if(!s){var a=[],l=MC(this._driver,r,a);if(a.length)throw new Error('The animation trigger "'+i+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function(t,e){return new sS(t,e)}(i,l),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(e,i,s)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,i){if("@"==n.charAt(0)){var r=u(Gx(n),2);this._timelineEngine.command(r[0],e,r[1],i)}else this._transitionEngine.trigger(t,e,n,i)},t.prototype.listen=function(t,e,n,i,r){if("@"==n.charAt(0)){var o=u(Gx(n),2);return this._timelineEngine.listen(o[0],e,o[1],r)}return this._transitionEngine.listen(t,e,n,i,r)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}(),IS="animation",AS="animationend",PS=function(){function t(t,e,n,i,r,o,s){var a=this;this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=r,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return a._handleCallback(t)}}return t.prototype.apply=function(){var t,e,n;e=this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name,(n=LS(t=this._element,"").trim()).length&&(function(t,e){for(var n=0;n=this._delay&&n>=this._duration&&this.finish()},t.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),MS(this._element,this._eventFn,!0))},t.prototype.destroy=function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=jS(n=LS(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),FS(t,"",n.join(","))))},t}();function DS(t,e,n){FS(t,"PlayState",n,RS(t,e))}function RS(t,e){var n=LS(t,"");return n.indexOf(",")>0?jS(n.split(","),e):jS([n],e)}function jS(t,e){for(var n=0;n=0)return n;return-1}function MS(t,e,n){n?t.removeEventListener(AS,e):t.addEventListener(AS,e)}function FS(t,e,n,i){var r=IS+e;if(null!=i){var o=t.style[r];if(o.length){var s=o.split(",");s[i]=n,n=s.join(",")}}t.style[r]=n}function LS(t,e){return t.style[IS+e]}var NS="linear",BS=function(){function t(t,e,n,i,r,o,s){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||NS,this.totalTime=i+r,this._buildStyler()}return t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]},t.prototype._flushStartFns=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},t.prototype.setPosition=function(t){this._styler.setPosition(t)},t.prototype.getPosition=function(){return this._styler.getPosition()},t.prototype.hasStarted=function(){return this._state>=2},t.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},t.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2),this._styler.resume()},t.prototype.pause=function(){this.init(),this._styler.pause()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},t.prototype._buildStyler=function(){var t=this;this._styler=new PS(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t.prototype.beforeDestroy=function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:IC(t.element,i))})}this.currentSnapshot=e},t}(),VS=function(t){function e(e,n){var i=t.call(this)||this;return i.element=e,i._startingStyles={},i.__initialized=!1,i._styles=sC(n),i}return r(e,t),e.prototype.init=function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),t.prototype.init.call(this))},e.prototype.play=function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),t.prototype.play.call(this))},e.prototype.destroy=function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,t.prototype.destroy.call(this))},e}(mv),zS=function(){function t(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return t.prototype.validateStyleProperty=function(t){return nC(t)},t.prototype.matchesElement=function(t,e){return iC(t,e)},t.prototype.containsElement=function(t,e){return rC(t,e)},t.prototype.query=function(t,e,n){return oC(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.buildKeyframeElement=function(t,e,n){n=n.map(function(t){return sC(t)});var i="@keyframes "+e+" {\n",r="";n.forEach(function(t){r=" ";var e=parseFloat(t.offset);i+=""+r+100*e+"% {\n",r+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=r+"animation-timing-function: "+n+";\n"));default:return void(i+=""+r+e+": "+n+";\n")}}),i+=r+"}\n"}),i+="}\n";var o=document.createElement("style");return o.innerHTML=i,o},t.prototype.animate=function(t,e,n,i,r,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(t){return t instanceof BS}),l={};EC(n,i)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return l[t]=e[t]})});var u=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=OC(t,e,l));if(0==n)return new VS(t,u);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(h);var p=new BS(t,e,c,n,i,r,u);return p.onDestroy(function(){var t;(t=h).parentNode.removeChild(t)}),p},t.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},t}(),HS=function(){function t(t,e,n){this.element=t,this.keyframes=e,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:IC(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),WS=function(){function t(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(US().toString()),this._cssKeyframesDriver=new zS}return t.prototype.validateStyleProperty=function(t){return nC(t)},t.prototype.matchesElement=function(t,e){return iC(t,e)},t.prototype.containsElement=function(t,e){return rC(t,e)},t.prototype.query=function(t,e,n){return oC(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.overrideWebAnimationsSupport=function(t){this._isNativeImpl=t},t.prototype.animate=function(t,e,n,i,r,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,o);var a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);var l={},u=o.filter(function(t){return t instanceof HS});return EC(n,i)&&u.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return l[t]=e[t]})}),e=OC(t,e=e.map(function(t){return fC(t,!1)}),l),new HS(t,e,a)},t}();function US(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var XS=function(t){function e(e,n){var i=t.call(this)||this;return i._nextAnimationId=0,i._renderer=e.createRenderer(n.body,{id:"0",encapsulation:zt.None,styles:[],data:{animation:[]}}),i}return r(e,t),e.prototype.build=function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?dv(t):t;return qS(this._renderer,null,e,"register",[n]),new YS(e,this._renderer)},e}(cv),YS=function(t){function e(e,n){var i=t.call(this)||this;return i._id=e,i._renderer=n,i}return r(e,t),e.prototype.create=function(t,e){return new GS(this._id,t,e||{},this._renderer)},e}(hv),GS=function(){function t(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return t.prototype._listen=function(t,e){return this._renderer.listen(this.element,"@@"+this.id+":"+t,e)},t.prototype._command=function(t){for(var e=[],n=1;n=0&&t enter",animation:[{type:6,styles:{opacity:0,transform:"translateY(-100%)"},offset:null},{type:4,styles:null,timings:"300ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function ck(t){return ru(0,[(t()(),Va(0,0,null,null,8,null,null,null,null,null,null,null)),(t()(),Va(1,0,null,null,3,"div",[["class","mat-form-field-outline"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],null,null,null,null,null)),(t()(),Va(3,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],null,null,null,null,null)),(t()(),Va(4,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null)),(t()(),Va(5,0,null,null,3,"div",[["class","mat-form-field-outline mat-form-field-outline-thick"]],null,null,null,null,null)),(t()(),Va(6,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],null,null,null,null,null)),(t()(),Va(7,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],null,null,null,null,null)),(t()(),Va(8,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null))],null,null)}function hk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","mat-form-field-prefix"]],null,null,null,null,null)),Zl(null,0)],null,null)}function pk(t){return ru(0,[(t()(),Va(0,0,null,null,2,null,null,null,null,null,null,null)),Zl(null,2),(t()(),eu(2,null,["",""]))],null,function(t,e){t(e,2,0,e.component._control.placeholder)})}function dk(t){return ru(0,[Zl(null,3),(t()(),Ba(0,null,null,0))],null,null)}function fk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"span",[["aria-hidden","true"],["class","mat-placeholder-required mat-form-field-required-marker"]],null,null,null,null,null)),(t()(),eu(-1,null,["\xa0*"]))],null,null)}function gk(t){return ru(0,[(t()(),Va(0,0,[[4,0],["label",1]],null,8,"label",[["class","mat-form-field-label"]],[[8,"id",0],[1,"for",0],[1,"aria-owns",0],[2,"mat-empty",null],[2,"mat-form-field-empty",null],[2,"mat-accent",null],[2,"mat-warn",null]],[[null,"cdkObserveContent"]],function(t,e,n){var i=!0;return"cdkObserveContent"===e&&(i=!1!==t.component.updateOutlineGap()&&i),i},null,null)),Tl(1,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),Tl(2,1196032,null,0,cw,[uw,Ki,Ko],{disabled:[0,"disabled"]},{event:"cdkObserveContent"}),(t()(),Ba(16777216,null,null,1,null,pk)),Tl(4,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,dk)),Tl(6,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,fk)),Tl(8,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,n._hasLabel()),t(e,2,0,"outline"!=n.appearance),t(e,4,0,!1),t(e,6,0,!0),t(e,8,0,!n.hideRequiredMarker&&n._control.required&&!n._control.disabled)},function(t,e){var n=e.component;t(e,0,0,n._labelId,n._control.id,n._control.id,n._control.empty&&!n._shouldAlwaysFloat,n._control.empty&&!n._shouldAlwaysFloat,"accent"==n.color,"warn"==n.color)})}function mk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","mat-form-field-suffix"]],null,null,null,null,null)),Zl(null,4)],null,null)}function vk(t){return ru(0,[(t()(),Va(0,0,[[1,0],["underline",1]],null,1,"div",[["class","mat-form-field-underline"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,0,"span",[["class","mat-form-field-ripple"]],[[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,1,0,"accent"==n.color,"warn"==n.color)})}function yk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],[[24,"@transitionMessages",0]],null,null,null,null)),Zl(null,5)],null,function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function bk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","mat-hint"]],[[8,"id",0]],null,null,null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,n._hintLabelId),t(e,1,0,n.hintLabel)})}function _k(t){return ru(0,[(t()(),Va(0,0,null,null,5,"div",[["class","mat-form-field-hint-wrapper"]],[[24,"@transitionMessages",0]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,bk)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Zl(null,6),(t()(),Va(4,0,null,null,0,"div",[["class","mat-form-field-hint-spacer"]],null,null,null,null,null)),Zl(null,7)],function(t,e){t(e,2,0,e.component.hintLabel)},function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function wk(t){return ru(2,[Xl(671088640,1,{underlineRef:0}),Xl(402653184,2,{_connectionContainerRef:0}),Xl(402653184,3,{_inputContainerRef:0}),Xl(671088640,4,{_label:0}),(t()(),Va(4,0,null,null,20,"div",[["class","mat-form-field-wrapper"]],null,null,null,null,null)),(t()(),Va(5,0,[[2,0],["connectionContainer",1]],null,11,"div",[["class","mat-form-field-flex"]],null,[[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==(r._control.onContainerClick&&r._control.onContainerClick(n))&&i),i},null,null)),(t()(),Ba(16777216,null,null,1,null,ck)),Tl(7,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,hk)),Tl(9,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(10,0,[[3,0],["inputContainer",1]],null,4,"div",[["class","mat-form-field-infix"]],null,null,null,null,null)),Zl(null,1),(t()(),Va(12,0,null,null,2,"span",[["class","mat-form-field-label-wrapper"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,gk)),Tl(14,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,mk)),Tl(16,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,vk)),Tl(18,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(19,0,null,null,5,"div",[["class","mat-form-field-subscript-wrapper"]],null,null,null,null,null)),Tl(20,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ba(16777216,null,null,1,null,yk)),Tl(22,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,_k)),Tl(24,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){var n=e.component;t(e,7,0,"outline"==n.appearance),t(e,9,0,n._prefixChildren.length),t(e,14,0,n._hasFloatingLabel()),t(e,16,0,n._suffixChildren.length),t(e,18,0,"outline"!=n.appearance),t(e,20,0,n._getDisplayedMessages()),t(e,22,0,"error"),t(e,24,0,"hint")},null)}var xk=ca({encapsulation:2,styles:[".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],data:{animation:[{type:7,name:"transformPanel",definitions:[{type:0,name:"void",styles:{type:6,styles:{transform:"scaleY(0.8)",minWidth:"100%",opacity:0},offset:null},options:void 0},{type:0,name:"showing",styles:{type:6,styles:{opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"},offset:null},options:void 0},{type:0,name:"showing-multiple",styles:{type:6,styles:{opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"},offset:null},options:void 0},{type:1,expr:"void => *",animation:{type:4,styles:null,timings:"120ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}}]}});function Ck(t){return ru(0,[(t()(),Va(0,0,null,null,1,"span",[["class","mat-select-placeholder"]],null,null,null,null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.placeholder||"\xa0")})}function Sk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"span",[],null,null,null,null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.triggerValue||"\xa0")})}function kk(t){return ru(0,[Zl(null,0),(t()(),Ba(0,null,null,0))],null,null)}function Ek(t){return ru(0,[(t()(),Va(0,0,null,null,5,"span",[["class","mat-select-value-text"]],null,null,null,null,null)),Tl(1,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ba(16777216,null,null,1,null,Sk)),Tl(3,16384,null,0,yh,[ms,Nr,mh],null,null),(t()(),Ba(16777216,null,null,1,null,kk)),Tl(5,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){t(e,1,0,!!e.component.customTrigger),t(e,5,0,!0)},null)}function Ok(t){return ru(0,[(t()(),Va(0,0,[[2,0],["panel",1]],null,2,"div",[],[[24,"@transformPanel",0],[4,"transformOrigin",null],[4,"font-size","px"]],[[null,"@transformPanel.done"],[null,"keydown"]],function(t,e,n){var i=!0,r=t.component;return"@transformPanel.done"===e&&(i=!1!==r._panelDoneAnimatingStream.next(n.toState)&&i),"keydown"===e&&(i=!1!==r._handleKeydown(n)&&i),i},null,null)),Tl(1,278528,null,0,lh,[Fs,Ls,Ki,tr],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Zl(null,1)],function(t,e){var n=e.component;t(e,1,0,La(1,"mat-select-panel ",n._getPanelTheme(),""),n.panelClass)},function(t,e){var n=e.component;t(e,0,0,n.multiple?"showing-multiple":"showing",n._transformOrigin,n._triggerFontSize)})}function Tk(t){return ru(2,[Xl(402653184,1,{trigger:0}),Xl(671088640,2,{panel:0}),Xl(402653184,3,{overlayDir:0}),(t()(),Va(3,0,[[1,0],["trigger",1]],null,9,"div",[["aria-hidden","true"],["cdk-overlay-origin",""],["class","mat-select-trigger"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.toggle()&&i),i},null,null)),Tl(4,16384,[["origin",4]],0,gy,[Ki],null,null),(t()(),Va(5,0,null,null,5,"div",[["class","mat-select-value"]],null,null,null,null,null)),Tl(6,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ba(16777216,null,null,1,null,Ck)),Tl(8,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,Ek)),Tl(10,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Va(11,0,null,null,1,"div",[["class","mat-select-arrow-wrapper"]],null,null,null,null,null)),(t()(),Va(12,0,null,null,0,"div",[["class","mat-select-arrow"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,function(t,e,n){var i=!0,r=t.component;return"backdropClick"===e&&(i=!1!==r.close()&&i),"attach"===e&&(i=!1!==r._onAttached()&&i),"detach"===e&&(i=!1!==r.close()&&i),i},Ok)),Tl(14,671744,[[3,4]],0,my,[py,Nr,ms,fy,[2,dw]],{origin:[0,"origin"],positions:[1,"positions"],offsetY:[2,"offsetY"],minWidth:[3,"minWidth"],backdropClass:[4,"backdropClass"],scrollStrategy:[5,"scrollStrategy"],open:[6,"open"],hasBackdrop:[7,"hasBackdrop"],lockPosition:[8,"lockPosition"]},{backdropClick:"backdropClick",attach:"attach",detach:"detach"})],function(t,e){var n=e.component;t(e,6,0,n.empty),t(e,8,0,!0),t(e,10,0,!1),t(e,14,0,gl(e,4),n._positions,n._offsetY,null==n._triggerRect?null:n._triggerRect.width,"cdk-overlay-transparent-backdrop",n._scrollStrategy,n.panelOpen,"","")},null)}var Ik=ca({encapsulation:2,styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:.04}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-focus-overlay,.mat-stroked-button .mat-button-ripple.mat-ripple{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple.mat-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],data:{}});function Ak(t){return ru(2,[Xl(402653184,1,{ripple:0}),(t()(),Va(1,0,null,null,1,"span",[["class","mat-button-wrapper"]],null,null,null,null,null)),Zl(null,0),(t()(),Va(3,0,null,null,1,"div",[["class","mat-button-ripple mat-ripple"],["matRipple",""]],[[2,"mat-button-ripple-round",null],[2,"mat-ripple-unbounded",null]],null,null,null,null)),Tl(4,212992,[[1,4]],0,Mw,[Ki,Ko,Dm,[2,jw],[2,nk]],{centered:[0,"centered"],disabled:[1,"disabled"],trigger:[2,"trigger"]},null),(t()(),Va(5,0,null,null,0,"div",[["class","mat-button-focus-overlay"]],null,null,null,null,null))],function(t,e){var n=e.component;t(e,4,0,n.isIconButton,n._isRippleDisabled(),n._getHostElement())},function(t,e){var n=e.component;t(e,3,0,n.isRoundButton||n.isIconButton,gl(e,4).unbounded)})}var Pk,Dk=ca({encapsulation:2,styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"],data:{}});function Rk(t){return ru(0,[(t()(),Va(0,0,null,null,2,"mat-option",[["class","mat-option"],["role","option"]],[[1,"tabindex",0],[2,"mat-selected",null],[2,"mat-option-multiple",null],[2,"mat-active",null],[8,"id",0],[1,"aria-selected",0],[1,"aria-disabled",0],[2,"mat-option-disabled",null]],[[null,"click"],[null,"keydown"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==gl(t,1)._selectViaInteraction()&&i),"keydown"===e&&(i=!1!==gl(t,1)._handleKeydown(n)&&i),i},sk,rk)),Tl(1,8568832,[[8,4]],0,Uw,[Ki,ys,[2,Ww],[2,Vw]],{value:[0,"value"]},null),(t()(),eu(2,0,["",""]))],function(t,e){t(e,1,0,e.context.$implicit)},function(t,e){t(e,0,0,gl(e,1)._getTabIndex(),gl(e,1).selected,gl(e,1).multiple,gl(e,1).active,gl(e,1).id,gl(e,1).selected.toString(),gl(e,1).disabled.toString(),gl(e,1).disabled),t(e,2,0,e.context.$implicit)})}function jk(t){return ru(0,[(t()(),Va(0,0,null,null,17,"mat-form-field",[["class","mat-paginator-page-size-select mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-has-label",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,wk,uk)),Tl(1,7520256,null,7,Nx,[Ki,ys,[2,Gw],[2,dw],[2,Lx],Dm,Ko,[2,nk]],{color:[0,"color"]},null),Xl(335544320,1,{_control:0}),Xl(335544320,2,{_placeholderChild:0}),Xl(335544320,3,{_labelChild:0}),Xl(603979776,4,{_errorChildren:1}),Xl(603979776,5,{_hintChildren:1}),Xl(603979776,6,{_prefixChildren:1}),Xl(603979776,7,{_suffixChildren:1}),(t()(),Va(9,0,null,1,8,"mat-select",[["class","mat-select"],["role","listbox"]],[[1,"id",0],[1,"tabindex",0],[1,"aria-label",0],[1,"aria-labelledby",0],[1,"aria-required",0],[1,"aria-disabled",0],[1,"aria-invalid",0],[1,"aria-owns",0],[1,"aria-multiselectable",0],[1,"aria-describedby",0],[1,"aria-activedescendant",0],[2,"mat-select-disabled",null],[2,"mat-select-invalid",null],[2,"mat-select-required",null],[2,"mat-select-empty",null]],[[null,"selectionChange"],[null,"keydown"],[null,"focus"],[null,"blur"]],function(t,e,n){var i=!0,r=t.component;return"keydown"===e&&(i=!1!==gl(t,11)._handleKeydown(n)&&i),"focus"===e&&(i=!1!==gl(t,11)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,11)._onBlur()&&i),"selectionChange"===e&&(i=!1!==r._changePageSize(n.value)&&i),i},Tk,xk)),Al(6144,null,Ww,null,[Ox]),Tl(11,2080768,null,3,Ox,[zv,ys,Ko,Cw,Ki,[2,dw],[2,xf],[2,Af],[2,Nx],[8,null],[8,null],Sx,Fy],{disabled:[0,"disabled"],value:[1,"value"],ariaLabel:[2,"ariaLabel"]},{selectionChange:"selectionChange"}),Xl(603979776,8,{options:1}),Xl(603979776,9,{optionGroups:1}),Xl(335544320,10,{customTrigger:0}),Al(2048,[[1,4]],Rx,null,[Ox]),(t()(),Ba(16777216,null,1,1,null,Rk)),Tl(17,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,1,0,n.color),t(e,11,0,n.disabled,n.pageSize,n._intl.itemsPerPageLabel),t(e,17,0,n._displayedPageSizeOptions)},function(t,e){t(e,0,1,["standard"==gl(e,1).appearance,"fill"==gl(e,1).appearance,"outline"==gl(e,1).appearance,"legacy"==gl(e,1).appearance,gl(e,1)._control.errorState,gl(e,1)._canLabelFloat,gl(e,1)._shouldLabelFloat(),gl(e,1)._hasFloatingLabel(),gl(e,1)._hideControlPlaceholder(),gl(e,1)._control.disabled,gl(e,1)._control.autofilled,gl(e,1)._control.focused,"accent"==gl(e,1).color,"warn"==gl(e,1).color,gl(e,1)._shouldForward("untouched"),gl(e,1)._shouldForward("touched"),gl(e,1)._shouldForward("pristine"),gl(e,1)._shouldForward("dirty"),gl(e,1)._shouldForward("valid"),gl(e,1)._shouldForward("invalid"),gl(e,1)._shouldForward("pending"),!gl(e,1)._animationsEnabled]),t(e,9,1,[gl(e,11).id,gl(e,11).tabIndex,gl(e,11)._getAriaLabel(),gl(e,11)._getAriaLabelledby(),gl(e,11).required.toString(),gl(e,11).disabled.toString(),gl(e,11).errorState,gl(e,11).panelOpen?gl(e,11)._optionIds:null,gl(e,11).multiple,gl(e,11)._ariaDescribedby||null,gl(e,11)._getAriaActiveDescendant(),gl(e,11).disabled,gl(e,11).errorState,gl(e,11).required,gl(e,11).empty])})}function Mk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),eu(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.pageSize)})}function Fk(t){return ru(0,[(t()(),Va(0,0,null,null,6,"div",[["class","mat-paginator-page-size"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,1,"div",[["class","mat-paginator-page-size-label"]],null,null,null,null,null)),(t()(),eu(2,null,["",""])),(t()(),Ba(16777216,null,null,1,null,jk)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,Mk)),Tl(6,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,n._displayedPageSizeOptions.length>1),t(e,6,0,n._displayedPageSizeOptions.length<=1)},function(t,e){t(e,2,0,e.component._intl.itemsPerPageLabel)})}function Lk(t){return ru(0,[(t()(),Va(0,16777216,null,null,4,"button",[["class","mat-paginator-navigation-first"],["mat-icon-button",""],["type","button"]],[[1,"aria-label",0],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,2).show()&&i),"keydown"===e&&(i=!1!==gl(t,2)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,2)._handleTouchend()&&i),"click"===e&&(i=!1!==r.firstPage()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Tl(2,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{position:[0,"position"],disabled:[1,"disabled"],message:[2,"message"]},null),(t()(),Va(3,0,null,0,1,":svg:svg",[["class","mat-paginator-icon"],["focusable","false"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),Va(4,0,null,null,0,":svg:path",[["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"]],null,null,null,null,null)),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,1,0,n._previousButtonsDisabled()),t(e,2,0,"above",n._previousButtonsDisabled(),n._intl.firstPageLabel)},function(t,e){t(e,0,0,e.component._intl.firstPageLabel,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode)})}function Nk(t){return ru(0,[(t()(),Va(0,16777216,null,null,4,"button",[["class","mat-paginator-navigation-last"],["mat-icon-button",""],["type","button"]],[[1,"aria-label",0],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,2).show()&&i),"keydown"===e&&(i=!1!==gl(t,2)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,2)._handleTouchend()&&i),"click"===e&&(i=!1!==r.lastPage()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Tl(2,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{position:[0,"position"],disabled:[1,"disabled"],message:[2,"message"]},null),(t()(),Va(3,0,null,0,1,":svg:svg",[["class","mat-paginator-icon"],["focusable","false"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),Va(4,0,null,null,0,":svg:path",[["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],null,null,null,null,null)),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,1,0,n._nextButtonsDisabled()),t(e,2,0,"above",n._nextButtonsDisabled(),n._intl.lastPageLabel)},function(t,e){t(e,0,0,e.component._intl.lastPageLabel,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode)})}function Bk(t){return ru(2,[(t()(),Va(0,0,null,null,20,"div",[["class","mat-paginator-outer-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,19,"div",[["class","mat-paginator-container"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,Fk)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(4,0,null,null,16,"div",[["class","mat-paginator-range-actions"]],null,null,null,null,null)),(t()(),Va(5,0,null,null,1,"div",[["class","mat-paginator-range-label"]],null,null,null,null,null)),(t()(),eu(6,null,["",""])),(t()(),Ba(16777216,null,null,1,null,Lk)),Tl(8,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(9,16777216,null,null,4,"button",[["class","mat-paginator-navigation-previous"],["mat-icon-button",""],["type","button"]],[[1,"aria-label",0],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,11).show()&&i),"keydown"===e&&(i=!1!==gl(t,11)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,11)._handleTouchend()&&i),"click"===e&&(i=!1!==r.previousPage()&&i),i},Ak,Ik)),Tl(10,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Tl(11,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{position:[0,"position"],disabled:[1,"disabled"],message:[2,"message"]},null),(t()(),Va(12,0,null,0,1,":svg:svg",[["class","mat-paginator-icon"],["focusable","false"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),Va(13,0,null,null,0,":svg:path",[["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"]],null,null,null,null,null)),(t()(),Va(14,16777216,null,null,4,"button",[["class","mat-paginator-navigation-next"],["mat-icon-button",""],["type","button"]],[[1,"aria-label",0],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,16).show()&&i),"keydown"===e&&(i=!1!==gl(t,16)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,16)._handleTouchend()&&i),"click"===e&&(i=!1!==r.nextPage()&&i),i},Ak,Ik)),Tl(15,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Tl(16,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{position:[0,"position"],disabled:[1,"disabled"],message:[2,"message"]},null),(t()(),Va(17,0,null,0,1,":svg:svg",[["class","mat-paginator-icon"],["focusable","false"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),Va(18,0,null,null,0,":svg:path",[["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,Nk)),Tl(20,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,!n.hidePageSize),t(e,8,0,n.showFirstLastButtons),t(e,10,0,n._previousButtonsDisabled()),t(e,11,0,"above",n._previousButtonsDisabled(),n._intl.previousPageLabel),t(e,15,0,n._nextButtonsDisabled()),t(e,16,0,"above",n._nextButtonsDisabled(),n._intl.nextPageLabel),t(e,20,0,n.showFirstLastButtons)},function(t,e){var n=e.component;t(e,6,0,n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)),t(e,9,0,n._intl.previousPageLabel,gl(e,10).disabled||null,"NoopAnimations"===gl(e,10)._animationMode),t(e,14,0,n._intl.nextPageLabel,gl(e,15).disabled||null,"NoopAnimations"===gl(e,15)._animationMode)})}!function(t){t.display="Display",t.handwriting="Hand Writing",t.monospace="Mono Space",t["sans-serif"]="Sans Serif",t.serif="Serif"}(Pk||(Pk={}));var Vk=function(){function t(t,e){this.overlayPanelRef=t,this.fonts=e,this.fontCategories=Pk}return t.prototype.ngOnInit=function(){var t=this;this.fonts.init().then(function(){t.fonts.paginator.filters.valueChanges.subscribe(function(){t.paginator.firstPage()})})},t.prototype.ngOnDestroy=function(){this.fonts.paginator.reset()},t.prototype.applyFont=function(t){this.overlayPanelRef.emitValue(t.family),this.overlayPanelRef.close()},t.prototype.changePage=function(t){this.fonts.paginator.setPage(t.pageIndex)},t}(),zk=n("J9Y1"),Hk=function(){function t(t,e,n){var i=this;this.http=t,this.settings=e,this.paginator=n,this.loadedFonts=[],this.paginator.current$.subscribe(function(t){i.loadIntoDom(t)})}return t.prototype.init=function(){return t=this,void 0,n=function(){var t,e,n;return function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1] visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void, * => hidden",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"75ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function Zk(t){return ru(0,[(t()(),Ba(0,null,null,0))],null,null)}function Qk(t){return ru(2,[Xl(402653184,1,{_portalOutlet:0}),(t()(),Ba(16777216,null,null,1,null,Zk)),Tl(2,212992,[[1,4]],0,kv,[Wi,ms],{portal:[0,"portal"]},null)],function(t,e){t(e,2,0,"")},null)}function Jk(t){return ru(0,[(t()(),Va(0,0,null,null,1,"snack-bar-container",[["class","mat-snack-bar-container"]],[[1,"role",0],[40,"@state",0]],[["component","@state.done"]],function(t,e,n){var i=!0;return"component:@state.done"===e&&(i=!1!==gl(t,1).onAnimationEnd(n)&&i),i},Qk,Kk)),Tl(1,180224,null,0,Yy,[Ko,Ki,ys,Uy],null,null)],null,function(t,e){t(e,0,0,gl(e,1)._role,gl(e,1)._animationState)})}var $k=rl("snack-bar-container",Yy,Jk,{},{},[]),tE=ca({encapsulation:2,styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;height:100%;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}"],data:{}});function eE(t){return ru(0,[(t()(),Va(0,0,null,null,3,"div",[["class","mat-simple-snackbar-action"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"button",[["mat-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.action()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),eu(3,0,["",""]))],null,function(t,e){var n=e.component;t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,n.data.action)})}function nE(t){return ru(2,[(t()(),Va(0,0,null,null,1,"span",[],null,null,null,null,null)),(t()(),eu(1,null,["",""])),(t()(),Ba(16777216,null,null,1,null,eE)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,3,0,e.component.hasAction)},function(t,e){t(e,1,0,e.component.data.message)})}function iE(t){return ru(0,[(t()(),Va(0,0,null,null,1,"simple-snack-bar",[["class","mat-simple-snackbar"]],null,null,null,nE,tE)),Tl(1,49152,null,0,Xy,[Hy,Wy],null,null)],null,null)}var rE=rl("simple-snack-bar",Xy,iE,{},{},[]),oE=function(){return function(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0}}();function sE(){throw Error("Attempting to attach dialog content after content is already attached")}var aE=function(t){function e(e,n,i,r,o){var s=t.call(this)||this;return s._elementRef=e,s._focusTrapFactory=n,s._changeDetectorRef=i,s._document=r,s._config=o,s._elementFocusedBeforeDialogWasOpened=null,s._state="enter",s._animationStateChanged=new Lr,s._ariaLabelledBy=null,s}return r(e,t),e.prototype.attachComponentPortal=function(t){return this._portalOutlet.hasAttached()&&sE(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(t)},e.prototype.attachTemplatePortal=function(t){return this._portalOutlet.hasAttached()&&sE(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(t)},e.prototype._trapFocus=function(){this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)),this._config.autoFocus&&this._focusTrap.focusInitialElementWhenReady()},e.prototype._restoreFocus=function(){var t=this._elementFocusedBeforeDialogWasOpened;this._config.restoreFocus&&t&&"function"==typeof t.focus&&t.focus(),this._focusTrap&&this._focusTrap.destroy()},e.prototype._savePreviouslyFocusedElement=function(){var t=this;this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then(function(){return t._elementRef.nativeElement.focus()}))},e.prototype._onAnimationDone=function(t){"enter"===t.toState?this._trapFocus():"exit"===t.toState&&this._restoreFocus(),this._animationStateChanged.emit(t)},e.prototype._onAnimationStart=function(t){this._animationStateChanged.emit(t)},e.prototype._startExitAnimation=function(){this._state="exit",this._changeDetectorRef.markForCheck()},e}(Cv),lE=0,uE=function(){function t(t,e,n,i){void 0===i&&(i="mat-dialog-"+lE++);var r=this;this._overlayRef=t,this._containerInstance=e,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new L,this._afterClosed=new L,this._beforeClosed=new L,e._id=i,e._animationStateChanged.pipe(qc(function(t){return"done"===t.phaseName&&"enter"===t.toState}),rg(1)).subscribe(function(){r._afterOpened.next(),r._afterOpened.complete()}),e._animationStateChanged.pipe(qc(function(t){return"done"===t.phaseName&&"exit"===t.toState}),rg(1)).subscribe(function(){return r._overlayRef.dispose()}),t.detachments().subscribe(function(){r._beforeClosed.next(r._result),r._beforeClosed.complete(),r._afterClosed.next(r._result),r._afterClosed.complete(),r.componentInstance=null,r._overlayRef.dispose()}),t.keydownEvents().pipe(qc(function(t){return t.keyCode===Hv&&!r.disableClose})).subscribe(function(){return r.close()})}return t.prototype.close=function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(qc(function(t){return"start"===t.phaseName}),rg(1)).subscribe(function(){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop()}),this._containerInstance._startExitAnimation()},t.prototype.afterOpened=function(){return this._afterOpened.asObservable()},t.prototype.afterClosed=function(){return this._afterClosed.asObservable()},t.prototype.beforeClosed=function(){return this._beforeClosed.asObservable()},t.prototype.backdropClick=function(){return this._overlayRef.backdropClick()},t.prototype.keydownEvents=function(){return this._overlayRef.keydownEvents()},t.prototype.updatePosition=function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this},t.prototype.updateSize=function(t,e){return void 0===t&&(t=""),void 0===e&&(e=""),this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this},t.prototype.afterOpen=function(){return this.afterOpened()},t.prototype.beforeClose=function(){return this.beforeClosed()},t.prototype._getPositionStrategy=function(){return this._overlayRef.getConfig().positionStrategy},t}(),cE=new Et("MatDialogData"),hE=new Et("mat-dialog-default-options"),pE=new Et("mat-dialog-scroll-strategy");function dE(t){return function(){return t.scrollStrategies.block()}}var fE=function(){function t(t,e,n,i,r,o,s){var a=this;this._overlay=t,this._injector=e,this._location=n,this._defaultOptions=i,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new L,this._afterOpenedAtThisLevel=new L,this._ariaHiddenElements=new Map,this.afterAllClosed=wx(function(){return a.openDialogs.length?a._afterAllClosed:a._afterAllClosed.pipe(Gm(void 0))}),this._scrollStrategy=r}return Object.defineProperty(t.prototype,"openDialogs",{get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterOpened",{get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterOpen",{get:function(){return this.afterOpened},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_afterAllClosed",{get:function(){var t=this._parentDialog;return t?t._afterAllClosed:this._afterAllClosedAtThisLevel},enumerable:!0,configurable:!0}),t.prototype.open=function(t,e){var n=this;if((e=function(t,e){return o({},e,t)}(e,this._defaultOptions||new oE)).id&&this.getDialogById(e.id))throw Error('Dialog with id "'+e.id+'" exists already. The dialog id must be unique.');var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),s=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.afterClosed().subscribe(function(){return n._removeOpenDialog(s)}),this.afterOpened.next(s),s},t.prototype.closeAll=function(){this._closeDialogs(this.openDialogs)},t.prototype.getDialogById=function(t){return this.openDialogs.find(function(e){return e.id===t})},t.prototype.ngOnDestroy=function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()},t.prototype._createOverlay=function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)},t.prototype._getOverlayConfig=function(t){var e=new Jv({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e},t.prototype._attachDialogContainer=function(t,e){var n=new Ov(e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,new WeakMap([[oE,e]])),i=new wv(aE,e.viewContainerRef,n);return t.attach(i).instance},t.prototype._attachDialogContent=function(t,e,n,i){var r=new uE(n,e,this._location,i.id);if(i.hasBackdrop&&n.backdropClick().subscribe(function(){r.disableClose||r.close()}),t instanceof Nr)e.attachTemplatePortal(new xv(t,null,{$implicit:i.data,dialogRef:r}));else{var o=this._createInjector(i,r,e),s=e.attachComponentPortal(new wv(t,void 0,o));r.componentInstance=s.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r},t.prototype._createInjector=function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=new WeakMap([[aE,n],[cE,t.data],[uE,e]]);return!t.direction||i&&i.get(dw,null)||r.set(dw,{value:t.direction,change:Gc()}),new Ov(i||this._injector,r)},t.prototype._removeOpenDialog=function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._afterAllClosed.next()))},t.prototype._hideNonDialogContentFromAssistiveTechnology=function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}},t.prototype._closeDialogs=function(t){for(var e=t.length;e--;)t[e].close()},t}(),gE=function(){return function(){}}(),mE=ca({encapsulation:2,styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}@media (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],data:{animation:[{type:7,name:"dialogContainer",definitions:[{type:0,name:"void, exit",styles:{type:6,styles:{opacity:0,transform:"scale(0.7)"},offset:null},options:void 0},{type:0,name:"enter",styles:{type:6,styles:{transform:"none"},offset:null},options:void 0},{type:1,expr:"* => enter",animation:{type:4,styles:{type:6,styles:{transform:"none",opacity:1},offset:null},timings:"150ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void, * => exit",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"75ms cubic-bezier(0.4, 0.0, 0.2, 1)"},options:null}],options:{}}]}});function vE(t){return ru(0,[(t()(),Ba(0,null,null,0))],null,null)}function yE(t){return ru(0,[Xl(402653184,1,{_portalOutlet:0}),(t()(),Ba(16777216,null,null,1,null,vE)),Tl(2,212992,[[1,4]],0,kv,[Wi,ms],{portal:[0,"portal"]},null)],function(t,e){t(e,2,0,"")},null)}function bE(t){return ru(0,[(t()(),Va(0,0,null,null,1,"mat-dialog-container",[["aria-modal","true"],["class","mat-dialog-container"],["tabindex","-1"]],[[1,"id",0],[1,"role",0],[1,"aria-labelledby",0],[1,"aria-label",0],[1,"aria-describedby",0],[40,"@dialogContainer",0]],[["component","@dialogContainer.start"],["component","@dialogContainer.done"]],function(t,e,n){var i=!0;return"component:@dialogContainer.start"===e&&(i=!1!==gl(t,1)._onAnimationStart(n)&&i),"component:@dialogContainer.done"===e&&(i=!1!==gl(t,1)._onAnimationDone(n)&&i),i},yE,mE)),Tl(1,49152,null,0,aE,[Ki,jy,ys,[2,Oh],oE],null,null)],null,function(t,e){t(e,0,0,gl(e,1)._id,gl(e,1)._config.role,gl(e,1)._config.ariaLabel?null:gl(e,1)._ariaLabelledBy,gl(e,1)._config.ariaLabel,gl(e,1)._config.ariaDescribedBy||null,gl(e,1)._state)})}var _E=rl("mat-dialog-container",aE,bE,{},{},[]),wE=ca({encapsulation:2,styles:[["pixie-editor .sample-image-panel{max-width:318px}open-sample-image-panel{display:block;padding:15px;border-radius:3px;overflow:hidden;margin:0 auto}open-sample-image-panel h2{font-size:16px;font-weight:400;margin:10px 0;text-align:center}open-sample-image-panel .separator{position:relative;text-align:center;height:30px;display:flex;justify-content:center;align-items:center;margin-bottom:8px}open-sample-image-panel .separator>hr{position:absolute;left:0;top:13px;width:100%;height:2px;background-color:rgba(0,0,0,.07);margin:0;border:none}open-sample-image-panel .separator>.text{display:block;background-color:#fff;position:relative;z-index:1;padding:0 10px}open-sample-image-panel .buttons{display:flex;justify-content:center;margin:20px 0;text-align:center}open-sample-image-panel .buttons>button{display:block;margin:0 10px}open-sample-image-panel .samples{display:flex;justify-content:center}open-sample-image-panel .samples>img{cursor:pointer;width:80px;height:80px;-o-object-fit:cover;object-fit:cover;transition:box-shadow .3s ease;margin:0 8px}open-sample-image-panel .samples>img:hover{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}open-sample-image-panel .new-canvas-container{margin:20px 0;padding-top:20px;border-top:2px solid rgba(0,0,0,.07)}open-sample-image-panel .new-canvas-container .form-buttons{text-align:right}"]],data:{}});function xE(t){return ru(0,[(t()(),Va(0,0,null,null,8,"div",[["class","buttons"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,3,"button",[["color","primary"],["mat-flat-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openUploadDialog()&&i),i},Ak,Ik)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(3,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{color:[0,"color"]},null),(t()(),eu(-1,0,["Open Photo"])),(t()(),Va(5,0,null,null,3,"button",[["color","primary"],["mat-stroked-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.newCanvasFormVisible$.next(!0)&&i),i},Ak,Ik)),Tl(6,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(7,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{color:[0,"color"]},null),(t()(),eu(-1,0,["Create New"]))],function(t,e){t(e,3,0,"primary"),t(e,7,0,"primary")},function(t,e){t(e,1,0,gl(e,3).disabled||null,"NoopAnimations"===gl(e,3)._animationMode),t(e,5,0,gl(e,7).disabled||null,"NoopAnimations"===gl(e,7)._animationMode)})}function CE(t){return ru(0,[(t()(),Va(0,0,null,null,35,"div",[["class","new-canvas-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,34,"form",[["class","many-inputs"],["ngNativeValidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0,r=t.component;return"submit"===e&&(i=!1!==gl(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,2).onReset()&&i),"ngSubmit"===e&&(i=!1!==r.createNewCanvas()&&i),i},null,null)),Tl(2,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},{ngSubmit:"ngSubmit"}),Al(2048,null,bd,null,[Af]),Tl(4,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(5,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(6,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Tl(7,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Width"])),(t()(),Va(9,0,null,null,6,"input",[["formControlName","width"],["id","width"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==gl(t,10)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,10).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,10)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,10)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,11).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,11).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,11).onTouched()&&i),i},null,null)),Tl(10,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(11,16384,null,0,Rd,[tr,Ki],null,null),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(13,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(15,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(16,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(17,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Tl(18,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Height"])),(t()(),Va(20,0,null,null,6,"input",[["formControlName","height"],["id","height"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==gl(t,21)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,21).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,21)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,21)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,22).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,22).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,22).onTouched()&&i),i},null,null)),Tl(21,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(22,16384,null,0,Rd,[tr,Ki],null,null),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(24,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(26,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(27,0,null,null,8,"div",[["class","form-buttons"]],null,null,null,null,null)),(t()(),Va(28,0,null,null,3,"button",[["mat-button",""],["trans",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.newCanvasFormVisible$.next(!1)&&i),i},Ak,Ik)),Tl(29,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(30,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),eu(-1,0,["Cancel"])),(t()(),Va(32,0,null,null,3,"button",[["color","primary"],["mat-raised-button",""],["trans",""],["type","submit"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],null,null,Ak,Ik)),Tl(33,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(34,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{color:[0,"color"]},null),(t()(),eu(-1,0,["Create"]))],function(t,e){t(e,2,0,e.component.newCanvasForm),t(e,13,0,"width"),t(e,24,0,"height"),t(e,34,0,"primary")},function(t,e){t(e,1,0,gl(e,4).ngClassUntouched,gl(e,4).ngClassTouched,gl(e,4).ngClassPristine,gl(e,4).ngClassDirty,gl(e,4).ngClassValid,gl(e,4).ngClassInvalid,gl(e,4).ngClassPending),t(e,9,0,gl(e,15).ngClassUntouched,gl(e,15).ngClassTouched,gl(e,15).ngClassPristine,gl(e,15).ngClassDirty,gl(e,15).ngClassValid,gl(e,15).ngClassInvalid,gl(e,15).ngClassPending),t(e,20,0,gl(e,26).ngClassUntouched,gl(e,26).ngClassTouched,gl(e,26).ngClassPristine,gl(e,26).ngClassDirty,gl(e,26).ngClassValid,gl(e,26).ngClassInvalid,gl(e,26).ngClassPending),t(e,28,0,gl(e,30).disabled||null,"NoopAnimations"===gl(e,30)._animationMode),t(e,32,0,gl(e,34).disabled||null,"NoopAnimations"===gl(e,34)._animationMode)})}function SE(t){return ru(0,[(t()(),Va(0,0,null,null,0,"img",[],[[8,"src",4]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openSampleImage(t.context.$implicit)&&i),i},null,null))],null,function(t,e){t(e,0,0,e.component.getImageUrl(e.context.$implicit,!0))})}function kE(t){return ru(2,[(t()(),Va(0,0,null,null,2,"h2",[["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Open a photo or design to get started."])),(t()(),Ba(16777216,null,null,2,null,xE)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),Il(131072,Ch,[ys]),(t()(),Ba(0,[["canvasFormContainer",2]],null,0,null,CE)),(t()(),Va(7,0,null,null,4,"div",[["class","separator"]],null,null,null,null,null)),(t()(),Va(8,0,null,null,0,"hr",[],null,null,null,null,null)),(t()(),Va(9,0,null,null,2,"span",[["class","text"],["trans",""]],null,null,null,null,null)),Tl(10,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["or use a sample"])),(t()(),Va(12,0,null,null,2,"div",[["class","samples"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,SE)),Tl(14,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,4,0,!aa(e,4,0,gl(e,5).transform(n.newCanvasFormVisible$)),gl(e,6)),t(e,14,0,n.sampleImages)},null)}function EE(t){return ru(0,[(t()(),Va(0,0,null,null,1,"open-sample-image-panel",[],null,null,null,kE,wE)),Tl(1,49152,null,0,Hf,[Kb,Hc,Nb,zc],null,null)],null,null)}var OE=rl("open-sample-image-panel",Hf,EE,{},{},[]);function TE(t){return getComputedStyle(t)}function IE(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function AE(t){var e=document.createElement("div");return e.className=t,e}var PE="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function DE(t,e){if(!PE)throw new Error("No element matching method supported");return PE.call(t,e)}function RE(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function jE(t,e){return Array.prototype.filter.call(t.children,function(t){return DE(t,e)})}var ME={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},FE={x:null,y:null};function LE(t,e){var n=t.element.classList,i=ME.state.scrolling(e);n.contains(i)?clearTimeout(FE[e]):n.add(i)}function NE(t,e){FE[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(ME.state.scrolling(e))},t.settings.scrollingThreshold)}var BE=function(t){this.element=t,this.handlers={}},VE={isEmpty:{configurable:!0}};BE.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},BE.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)})},BE.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},VE.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(BE.prototype,VE);var zE=function(){this.eventElements=[]};function HE(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}zE.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new BE(t),this.eventElements.push(e)),e},zE.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},zE.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},zE.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},zE.prototype.once=function(t,e,n){var i=this.eventElement(t),r=function(t){i.unbind(e,r),n(t)};i.bind(e,r)};var WE=function(t,e,n,i,r){var o;if(void 0===i&&(i=!0),void 0===r&&(r=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,i,r){var s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],h=o[5];void 0===i&&(i=!0),void 0===r&&(r=!1);var p=t.element;t.reach[u]=null,p[l]<1&&(t.reach[u]="start"),p[l]>t[s]-t[a]-1&&(t.reach[u]="end"),e&&(p.dispatchEvent(HE("ps-scroll-"+u)),e<0?p.dispatchEvent(HE("ps-scroll-"+c)):e>0&&p.dispatchEvent(HE("ps-scroll-"+h)),i&&function(t,e){LE(t,e),NE(t,e)}(t,u)),t.reach[u]&&(e||r)&&p.dispatchEvent(HE("ps-"+u+"-reach-"+t.reach[u]))}(t,n,0,i,r)};function UE(t){return parseInt(t,10)||0}var XE={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},YE=function(t){var e=t.element,n=Math.floor(e.scrollTop);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(jE(e,ME.element.rail("x")).forEach(function(t){return RE(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(jE(e,ME.element.rail("y")).forEach(function(t){return RE(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var n={width:e.railXWidth},i=Math.floor(t.scrollTop);n.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-i:n.top=e.scrollbarXTop+i,IE(e.scrollbarXRail,n);var r={top:i,height:e.railYHeight};e.isScrollbarYUsingRight?r.right=e.isRtl?e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:e.scrollbarYRight-t.scrollLeft:r.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:e.scrollbarYLeft+t.scrollLeft,IE(e.scrollbarYRail,r),IE(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),IE(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(ME.state.active("x")):(e.classList.remove(ME.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),t.scrollbarYActive?e.classList.add(ME.state.active("y")):(e.classList.remove(ME.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)};function GE(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function qE(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[5],a=e[6],l=e[7],u=e[8],c=t.element,h=null,p=null,d=null;function f(e){c[a]=h+d*(e[r]-p),LE(t,l),YE(t),e.stopPropagation(),e.preventDefault()}function g(){NE(t,l),t[u].classList.remove(ME.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",f)}t.event.bind(t[e[4]],"mousedown",function(e){h=c[a],p=e[r],d=(t[i]-t[n])/(t[o]-t[s]),t.event.bind(t.ownerDocument,"mousemove",f),t.event.once(t.ownerDocument,"mouseup",g),t[u].classList.add(ME.state.clicking),e.stopPropagation(),e.preventDefault()})}var KE={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top;t.element.scrollTop+=(n>t.scrollbarYTop?1:-1)*t.containerHeight,YE(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left;t.element.scrollLeft+=(n>t.scrollbarXLeft?1:-1)*t.containerWidth,YE(t),e.stopPropagation()})},"drag-thumb":function(t){qE(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),qE(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(DE(e,":hover")||DE(t.scrollbarX,":focus")||DE(t.scrollbarY,":focus"))){var i,r=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(r){if("IFRAME"===r.tagName)r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(DE(i=r,"input,[contenteditable]")||DE(i,"select,[contenteditable]")||DE(i,"textarea,[contenteditable]")||DE(i,"button,[contenteditable]"))return}var o=0,s=0;switch(n.which){case 37:o=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:s=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:o=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:s=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:s=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:s=t.containerHeight;break;case 34:s=-t.containerHeight;break;case 36:s=t.contentHeight;break;case 35:s=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==s||(e.scrollTop-=s,e.scrollLeft+=o,YE(t),function(n,i){var r=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(o,s)&&n.preventDefault())}})},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return void 0!==e&&void 0!==n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),r=i[0],o=i[1];if(!function(t,n,i){if(!XE.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains(ME.element.consuming))return!0;var o=TE(r);if([o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)){var s=r.scrollHeight-r.clientHeight;if(s>0&&!(0===r.scrollTop&&i>0||r.scrollTop===s&&i<0))return!0;var a=r.scrollWidth-r.clientWidth;if(a>0&&!(0===r.scrollLeft&&n<0||r.scrollLeft===a&&n>0))return!0}r=r.parentNode}return!1}(n.target,r,o)){var s=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(o?e.scrollTop-=o*t.settings.wheelSpeed:e.scrollTop+=r*t.settings.wheelSpeed,s=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(r?e.scrollLeft+=r*t.settings.wheelSpeed:e.scrollLeft-=o*t.settings.wheelSpeed,s=!0):(e.scrollTop-=o*t.settings.wheelSpeed,e.scrollLeft+=r*t.settings.wheelSpeed),YE(t),(s=s||function(n,i){var r=Math.floor(e.scrollTop),o=0===e.scrollTop,s=r+e.offsetHeight===e.scrollHeight,a=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(i)>Math.abs(n)?o||s:a||l)||!t.settings.wheelPropagation}(r,o))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?t.event.bind(e,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(XE.supportsTouch||XE.supportsIePointer){var e=t.element,n={},i=0,r={},o=null;XE.supportsTouch?(t.event.bind(e,"touchstart",u),t.event.bind(e,"touchmove",c),t.event.bind(e,"touchend",h)):XE.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",u),t.event.bind(e,"pointermove",c),t.event.bind(e,"pointerup",h)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",u),t.event.bind(e,"MSPointerMove",c),t.event.bind(e,"MSPointerUp",h)))}function s(n,i){e.scrollTop-=i,e.scrollLeft-=n,YE(t)}function a(t){return t.targetTouches?t.targetTouches[0]:t}function l(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function u(t){if(l(t)){var e=a(t);n.pageX=e.pageX,n.pageY=e.pageY,i=(new Date).getTime(),null!==o&&clearInterval(o)}}function c(o){if(l(o)){var u=a(o),c={pageX:u.pageX,pageY:u.pageY},h=c.pageX-n.pageX,p=c.pageY-n.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains(ME.element.consuming))return!0;var o=TE(r);if([o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)){var s=r.scrollHeight-r.clientHeight;if(s>0&&!(0===r.scrollTop&&i>0||r.scrollTop===s&&i<0))return!0;var a=r.scrollLeft-r.clientWidth;if(a>0&&!(0===r.scrollLeft&&n<0||r.scrollLeft===a&&n>0))return!0}r=r.parentNode}return!1}(o.target,h,p))return;s(h,p),n=c;var d=(new Date).getTime(),f=d-i;f>0&&(r.x=h/f,r.y=p/f,i=d),function(n,i){var r=Math.floor(e.scrollTop),o=e.scrollLeft,s=Math.abs(n),a=Math.abs(i);if(a>s){if(i<0&&r===t.contentHeight-t.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&XE.isChrome}else if(s>a&&(n<0&&o===t.contentWidth-t.containerWidth||n>0&&0===o))return!0;return!0}(h,p)&&o.preventDefault()}}function h(){t.settings.swipeEasing&&(clearInterval(o),o=setInterval(function(){t.isInitialized?clearInterval(o):r.x||r.y?Math.abs(r.x)<.01&&Math.abs(r.y)<.01?clearInterval(o):(s(30*r.x,30*r.y),r.x*=.8,r.y*=.8):clearInterval(o)},10))}}},ZE=function(t,e){var n=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var i in this.element=t,t.classList.add(ME.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)n.settings[i]=e[i];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,o,s=function(){return t.classList.add(ME.state.focus)},a=function(){return t.classList.remove(ME.state.focus)};this.isRtl="rtl"===TE(t).direction,this.isNegativeScroll=(o=t.scrollLeft,t.scrollLeft=-1,r=t.scrollLeft<0,t.scrollLeft=o,r),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new zE,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=AE(ME.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=AE(ME.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",s),this.event.bind(this.scrollbarX,"blur",a),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=TE(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=UE(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=UE(l.borderLeftWidth)+UE(l.borderRightWidth),IE(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=UE(l.marginLeft)+UE(l.marginRight),IE(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=AE(ME.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=AE(ME.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",s),this.event.bind(this.scrollbarY,"blur",a),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=TE(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=UE(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=TE(t);return UE(e.width)+UE(e.paddingLeft)+UE(e.paddingRight)+UE(e.borderLeftWidth)+UE(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=UE(u.borderTopWidth)+UE(u.borderBottomWidth),IE(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=UE(u.marginTop)+UE(u.marginBottom),IE(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return KE[t](n)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),YE(this)};ZE.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,IE(this.scrollbarXRail,{display:"block"}),IE(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=UE(TE(this.scrollbarXRail).marginLeft)+UE(TE(this.scrollbarXRail).marginRight),this.railYMarginHeight=UE(TE(this.scrollbarYRail).marginTop)+UE(TE(this.scrollbarYRail).marginBottom),IE(this.scrollbarXRail,{display:"none"}),IE(this.scrollbarYRail,{display:"none"}),YE(this),WE(this,"top",0,!1,!0),WE(this,"left",0,!1,!0),IE(this.scrollbarXRail,{display:""}),IE(this.scrollbarYRail,{display:""}))},ZE.prototype.onScroll=function(t){this.isAlive&&(YE(this),WE(this,"top",this.element.scrollTop-this.lastScrollTop),WE(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},ZE.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),RE(this.scrollbarX),RE(this.scrollbarY),RE(this.scrollbarXRail),RE(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},ZE.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")};var QE=ZE,JE=function(){function t(t,e,n,i,r,o,s){this.el=t,this.renderer=e,this.breakpoints=n,this.ngZone=i,this.mutationObserverFactory=r,this.config=o,this.supportsNativeStyling=s,this.subscriptions=[],this.minLength=100,this.suppressX=!0,this.scrollTop=0,this.native=!0,this.debouncer=new L}return t.prototype.ngAfterViewInit=function(){this.renderer.addClass(this.el.nativeElement,this.suppressX?"scroll-container":"scroll-container-x"),this.shouldUseNative()||(this.scrollbar=new QE(this.el.nativeElement,{minScrollbarLength:this.minLength,suppressScrollX:this.suppressX,useBothWheelAxes:!this.suppressX,wheelSpeed:2}),this.native=!1,this.bindToContentChange())},t.prototype.update=function(){this.native||this.scrollbar.update()},t.prototype.setScrollTop=function(t){void 0===t&&(t=0),this.el.nativeElement.scrollTop=t,this.scrollTop=this.el.nativeElement.scrollTop,this.update()},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions=[],this.native||this.scrollbar.destroy(),this.debouncer.complete(),this.observer&&this.observer.disconnect()},t.prototype.shouldUseNative=function(){return!this.config.get("vebto.forceCustomScrollbar")&&!/Edge/.test(navigator.userAgent)&&(!!this.breakpoints.isMobile$.value||this.supportsNativeStyling)},t.prototype.bindToContentChange=function(){var t=this;this.observer=this.ngZone.runOutsideAngular(function(){return t.mutationObserverFactory.create(function(e){t.debouncer.next(e)})}),this.observer.observe(this.el.nativeElement,{childList:!0,subtree:!0}),this.ngZone.runOutsideAngular(function(){t.debouncer.subscribe(function(e){return t.update()})})},t}(),$E=new Et("SUPPORTS_NATIVE_SCROLLBAR_STYLING",{providedIn:"root",factory:function(){if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1)return!1;var t=document.createElement("div");t.className="__sb-test",t.style.overflow="scroll",t.style.width="40px";var e=document.createElement("style");e.innerHTML=".__sb-test::-webkit-scrollbar { width: 0px; }",t.appendChild(e),document.body.appendChild(t);var n=40==t.scrollWidth;return document.body.removeChild(t),n}}),tO=function(){function t(t,e){this.history=t,this.panelRef=e}return t.prototype.loadHistoryState=function(t){return this.history.load(t)},s([tm(wm.items),a("design:type",P)],t.prototype,"items$",void 0),s([tm(wm.activeItemId),a("design:type",P)],t.prototype,"activeItemId$",void 0),t}(),eO=ca({encapsulation:2,styles:[["history-panel{display:block;bottom:5px;right:5px}"]],data:{}});function nO(t){return ru(0,[(t()(),Va(0,0,null,null,5,"div",[["class","floating-panel-item"]],[[2,"active",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.loadHistoryState(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,1,"mat-icon",[["class","list-icon mat-icon"],["role","img"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(2,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(3,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(4,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(5,null,["",""]))],function(t,e){t(e,2,0,e.context.$implicit.icon)},function(t,e){t(e,0,0,e.context.$implicit.id===e.parent.context.ngIf),t(e,1,0,gl(e,2).inline,"primary"!==gl(e,2).color&&"accent"!==gl(e,2).color&&"warn"!==gl(e,2).color),t(e,5,0,e.context.$implicit.name)})}function iO(t){return ru(0,[(t()(),Va(0,0,null,null,4,"div",[["class","items-list"],["customScrollbar",""]],null,null,null,null,null)),Tl(1,4341760,null,0,JE,[Ki,tr,sv,Ko,lw,Hc,$E],null,null),(t()(),Ba(16777216,null,null,2,null,nO)),Tl(3,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,3,0,aa(e,3,0,gl(e,4).transform(n.items$)))},null)}function rO(t){return ru(2,[(t()(),Va(0,0,null,null,7,"div",[["class","header"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["History"])),(t()(),Va(4,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panelRef.close()&&i),i},Ak,Ik)),Tl(5,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(6,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(7,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Ba(16777216,null,null,2,null,iO)),Tl(9,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,7,0,"close"),t(e,9,0,aa(e,9,0,gl(e,10).transform(n.activeItemId$)))},function(t,e){t(e,4,0,gl(e,5).disabled||null,"NoopAnimations"===gl(e,5)._animationMode),t(e,6,0,gl(e,7).inline,"primary"!==gl(e,7).color&&"accent"!==gl(e,7).color&&"warn"!==gl(e,7).color)})}function oO(t){return ru(0,[(t()(),Va(0,0,null,null,1,"history-panel",[],null,null,null,rO,eO)),Tl(1,49152,null,0,tO,[Cm,Nb],null,null)],null,null)}var sO=rl("history-panel",tO,oO,{},{},[]),aO=new Et("CDK_DROP_LIST");function lO(t,e,n){var i=uO(e,t.length-1),r=uO(n,t.length-1);if(i!==r){for(var o=t[i],s=r-1?1:1e3;return parseFloat(t)*e}function yO(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}var bO=jm({passive:!0}),_O=jm({passive:!1}),wO=function(){function t(t,e,n,i,r,o,s,a,l){var u=this;this._document=e,this._ngZone=n,this._viewContainerRef=i,this._viewportRuler=r,this._dragDropRegistry=o,this._config=s,this.dropContainer=a,this._dir=l,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new L,this._moveEventSubscriptions=0,this._pointerMoveSubscription=_.EMPTY,this._pointerUpSubscription=_.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabled=!1,this.beforeStarted=new L,this.started=new L,this.released=new L,this.ended=new L,this.entered=new L,this.exited=new L,this.dropped=new L,this.moved=P.create(function(t){var e=u._moveEvents.subscribe(t);return u._moveEventSubscriptions++,function(){e.unsubscribe(),u._moveEventSubscriptions--}}),this._pointerDown=function(t){if(u.beforeStarted.next(),u._handles.length){var e=u._handles.find(function(e){var n=e.element.nativeElement,i=t.target;return!!i&&(i===n||n.contains(i))});!e||e.disabled||u.disabled||u._initializeDragSequence(e.element.nativeElement,t)}else u.disabled||u._initializeDragSequence(u._rootElement,t)},this._pointerMove=function(t){if(u._hasStartedDragging){u._boundaryElement&&(u._previewRect&&(u._previewRect.width||u._previewRect.height)||(u._previewRect=(u._preview||u._rootElement).getBoundingClientRect()));var e=u._getConstrainedPointerPosition(t);if(u._hasMoved=!0,t.preventDefault(),u._updatePointerDirectionDelta(e),u.dropContainer)u._updateActiveDropContainer(e);else{var n=u._activeTransform;n.x=e.x-u._pickupPositionOnPage.x+u._passiveTransform.x,n.y=e.y-u._pickupPositionOnPage.y+u._passiveTransform.y;var i=xO(n.x,n.y);u._rootElement.style.transform=u._initialTransform?u._initialTransform+" "+i:i,"undefined"!=typeof SVGElement&&u._rootElement instanceof SVGElement&&u._rootElement.setAttribute("transform","translate("+n.x+" "+n.y+")")}u._moveEventSubscriptions>0&&u._ngZone.run(function(){u._moveEvents.next({source:u,pointerPosition:e,event:t,delta:u._pointerDirectionDelta})})}else{var r=u._getPointerPositionOnPage(t);Math.abs(r.x-u._pickupPositionOnPage.x)+Math.abs(r.y-u._pickupPositionOnPage.y)>=u._config.dragStartThreshold&&(u._hasStartedDragging=!0,u._ngZone.run(function(){return u._startDragSequence(t)}))}},this._pointerUp=function(t){if(u._dragDropRegistry.isDragging(u)&&(u._removeSubscriptions(),u._dragDropRegistry.stopDragging(u),u._handles&&(u._rootElement.style.webkitTapHighlightColor=u._rootElementTapHighlight),u._hasStartedDragging)){if(u.released.next({source:u}),!u.dropContainer)return u._passiveTransform.x=u._activeTransform.x,u._passiveTransform.y=u._activeTransform.y,u._ngZone.run(function(){return u.ended.next({source:u})}),void u._dragDropRegistry.stopDragging(u);u._animatePreviewToPlaceholder().then(function(){u._cleanupDragArtifacts(t),u._dragDropRegistry.stopDragging(u)})}},this.withRootElement(t),o.registerDragItem(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)},set:function(t){var e=qm(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._placeholder},t.prototype.getRootElement=function(){return this._rootElement},t.prototype.withHandles=function(t){return this._handles=t,t.forEach(function(t){return fO(t.element.nativeElement,!1)}),this._toggleNativeDragInteractions(),this},t.prototype.withPreviewTemplate=function(t){return this._previewTemplate=t,this},t.prototype.withPlaceholderTemplate=function(t){return this._placeholderTemplate=t,this},t.prototype.withRootElement=function(t){var e=t instanceof Ki?t.nativeElement:t;return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),e.addEventListener("mousedown",this._pointerDown,_O),e.addEventListener("touchstart",this._pointerDown,bO),this._rootElement=e),this},t.prototype.withBoundaryElement=function(t){return this._boundaryElement=t instanceof Ki?t.nativeElement:t,this},t.prototype.dispose=function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&kO(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._nextSibling=null},t.prototype.isDragging=function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)},t.prototype.reset=function(){this._rootElement.style.transform="",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}},t.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},t.prototype._destroyPreview=function(){this._preview&&kO(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null},t.prototype._destroyPlaceholder=function(){this._placeholder&&kO(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null},t.prototype._startDragSequence=function(t){if(this.started.next({source:this}),EO(t)&&(this._lastTouchEventTime=Date.now()),this.dropContainer){var e=this._rootElement;this._nextSibling=e.nextSibling;var n=this._preview=this._createPreviewElement(),i=this._placeholder=this._createPlaceholderElement();e.style.display="none",this._document.body.appendChild(e.parentNode.replaceChild(i,e)),this._document.body.appendChild(n),this.dropContainer.start()}},t.prototype._initializeDragSequence=function(t,e){e.stopPropagation();var n=this.isDragging(),i=EO(e),r=!i&&0!==e.button,o=this._rootElement,s=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(n||r||s)){null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor,o.style.webkitTapHighlightColor="transparent"),this._toggleNativeDragInteractions(),this._hasStartedDragging=this._hasMoved=!1,this._initialContainer=this.dropContainer,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._boundaryElement&&(this._boundaryRect=this._boundaryElement.getBoundingClientRect()),this._pickupPositionInElement=this._previewTemplate?{x:0,y:0}:this._getPointerPositionInElement(t,e);var a=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:a.x,y:a.y},this._dragDropRegistry.startDragging(this,e)}},t.prototype._cleanupDragArtifacts=function(t){var e=this;this._rootElement.style.display="",this._nextSibling?this._nextSibling.parentNode.insertBefore(this._rootElement,this._nextSibling):this._initialContainer.element.nativeElement.appendChild(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var n=e.dropContainer,i=n.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=n._isOverContainer(r.x,r.y);e.ended.next({source:e}),e.dropped.next({item:e,currentIndex:i,previousIndex:e._initialContainer.getItemIndex(e),container:n,previousContainer:e._initialContainer,isPointerOverContainer:o}),n.drop(e,i,e._initialContainer,o),e.dropContainer=e._initialContainer})},t.prototype._updateActiveDropContainer=function(t){var e=this,n=t.x,i=t.y,r=this.dropContainer._getSiblingContainerFromPosition(this,n,i);!r&&this.dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,i)&&(r=this._initialContainer),r&&this._ngZone.run(function(){e.exited.next({item:e,container:e.dropContainer}),e.dropContainer.exit(e),e.entered.next({item:e,container:r}),e.dropContainer=r,e.dropContainer.enter(e,n,i)}),this.dropContainer._sortItem(this,n,i,this._pointerDirectionDelta),this._preview.style.transform=xO(n-this._pickupPositionInElement.x,i-this._pickupPositionInElement.y)},t.prototype._createPreviewElement=function(){var t;if(this._previewTemplate){var e=this._viewContainerRef.createEmbeddedView(this._previewTemplate.templateRef,this._previewTemplate.data);t=e.rootNodes[0],this._previewRef=e,t.style.transform=xO(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var n=this._rootElement,i=n.getBoundingClientRect();(t=CO(n)).style.width=i.width+"px",t.style.height=i.height+"px",t.style.transform=xO(i.left,i.top)}return dO(t.style,{pointerEvents:"none",position:"fixed",top:"0",left:"0",zIndex:"1000"}),fO(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._dir?this._dir.value:"ltr"),t},t.prototype._animatePreviewToPlaceholder=function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=xO(e.left,e.top);var n=function(t){var e=getComputedStyle(t),n=yO(e,"transition-property"),i=n.find(function(t){return"transform"===t||"all"===t});if(!i)return 0;var r=n.indexOf(i),o=yO(e,"transition-duration"),s=yO(e,"transition-delay");return vO(o[r])+vO(s[r])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var i=function(n){(!n||n.target===t._preview&&"transform"===n.propertyName)&&(t._preview.removeEventListener("transitionend",i),e(),clearTimeout(r))},r=setTimeout(i,1.5*n);t._preview.addEventListener("transitionend",i)})})},t.prototype._createPlaceholderElement=function(){var t;return this._placeholderTemplate?(this._placeholderRef=this._viewContainerRef.createEmbeddedView(this._placeholderTemplate.templateRef,this._placeholderTemplate.data),t=this._placeholderRef.rootNodes[0]):t=CO(this._rootElement),t.classList.add("cdk-drag-placeholder"),t},t.prototype._getPointerPositionInElement=function(t,e){var n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,r=i?i.getBoundingClientRect():n,o=EO(e)?e.targetTouches[0]:e;return{x:r.left-n.left+(o.pageX-r.left-this._scrollPosition.left),y:r.top-n.top+(o.pageY-r.top-this._scrollPosition.top)}},t.prototype._getPointerPositionOnPage=function(t){var e=EO(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.pageX-this._scrollPosition.left,y:e.pageY-this._scrollPosition.top}},t.prototype._getConstrainedPointerPosition=function(t){var e=this._getPointerPositionOnPage(t),n=this.dropContainer?this.dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===n?e.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==n||(e.x=this._pickupPositionOnPage.x),this._boundaryRect){var i=this._pickupPositionInElement,r=i.x,o=i.y,s=this._boundaryRect,a=this._previewRect,l=s.top+o,u=s.bottom-(a.height-o);e.x=SO(e.x,s.left+r,s.right-(a.width-r)),e.y=SO(e.y,l,u)}return e},t.prototype._updatePointerDirectionDelta=function(t){var e=t.x,n=t.y,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),s=Math.abs(n-r.y);return o>this._config.pointerDirectionChangeThreshold&&(i.x=e>r.x?1:-1,r.x=e),s>this._config.pointerDirectionChangeThreshold&&(i.y=n>r.y?1:-1,r.y=n),i},t.prototype._toggleNativeDragInteractions=function(){if(this._rootElement&&this._handles){var t=this.disabled||this._handles.length>0;t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,fO(this._rootElement,t))}},t.prototype._removeRootElementListeners=function(t){t.removeEventListener("mousedown",this._pointerDown,_O),t.removeEventListener("touchstart",this._pointerDown,bO)},t}();function xO(t,e){return"translate3d("+Math.round(t)+"px, "+Math.round(e)+"px, 0)"}function CO(t){var e=t.cloneNode(!0);return e.removeAttribute("id"),e}function SO(t,e,n){return Math.max(e,Math.min(n,t))}function kO(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function EO(t){return t.type.startsWith("touch")}var OO=new Et("CDK_DRAG_CONFIG",{providedIn:"root",factory:function(){return{dragStartThreshold:5,pointerDirectionChangeThreshold:5}}}),TO=function(){function t(t,e,n,i,r,o,s,a,l){var u=this;this.element=t,this.dropContainer=e,this._document=n,this._ngZone=i,this._viewContainerRef=r,this._viewportRuler=o,this._dragDropRegistry=s,this._config=a,this._dir=l,this._rootElementInitSubscription=_.EMPTY,this._disabled=!1,this.started=new Lr,this.released=new Lr,this.ended=new Lr,this.entered=new Lr,this.exited=new Lr,this.dropped=new Lr,this.moved=P.create(function(t){var e=u._dragRef.moved.pipe(J(function(t){return{source:u,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta}})).subscribe(t);return function(){e.unsubscribe()}});var c=this._dragRef=new wO(t,this._document,this._ngZone,this._viewContainerRef,this._viewportRuler,this._dragDropRegistry,this._config,this.dropContainer?this.dropContainer._dropListRef:void 0,this._dir);c.data=this,c.beforeStarted.subscribe(function(){c.isDragging()||(c.disabled=u.disabled,c.lockAxis=u.lockAxis,c.withBoundaryElement(u._getBoundaryElement()).withPlaceholderTemplate(u._placeholderTemplate).withPreviewTemplate(u._previewTemplate))}),this._proxyEvents(c)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=qm(t),this._dragRef.disabled=this._disabled},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._dragRef.getPlaceholderElement()},t.prototype.getRootElement=function(){return this._dragRef.getRootElement()},t.prototype.reset=function(){this._dragRef.reset()},t.prototype.ngAfterViewInit=function(){var t=this;this._rootElementInitSubscription=this._ngZone.onStable.asObservable().pipe(rg(1)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe(Gm(t._handles)).subscribe(function(e){t._dragRef.withHandles(e.filter(function(e){return e._parentDrag===t}))})})},t.prototype.ngOnChanges=function(t){var e=t.rootElementSelector;e&&!e.firstChange&&this._updateRootElement()},t.prototype.ngOnDestroy=function(){this._rootElementInitSubscription.unsubscribe(),this._dragRef.dispose()},t.prototype._updateRootElement=function(){var t=this.element.nativeElement,e=this.rootElementSelector?IO(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error('cdkDrag must be attached to an element node. Currently attached to "'+e.nodeName+'".');this._dragRef.withRootElement(e||t)},t.prototype._getBoundaryElement=function(){var t=this.boundaryElementSelector;return t?IO(this.element.nativeElement,t):null},t.prototype._proxyEvents=function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e})}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(){e.ended.emit({source:e})}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e})})},t}();function IO(t,e){for(var n=t.parentElement;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}var AO=function(){function t(){this._items=new Set,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=qm(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._items.clear()},t}(),PO=0,DO=function(){function t(t,e,n,i){this.element=t,this._dragDropRegistry=e,this._dir=i,this.id="cdk-drop-list-ref-"+PO++,this.disabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new L,this.entered=new L,this.exited=new L,this.dropped=new L,this.sorted=new L,this._isDragging=!1,this._positionCache={items:[],siblings:[],self:{}},this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=0,e.registerDropContainer(this),this._document=n}return t.prototype.dispose=function(){this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._dragDropRegistry.removeDropContainer(this)},t.prototype.isDragging=function(){return this._isDragging},t.prototype.start=function(){this.beforeStarted.next(),this._isDragging=!0,this._activeDraggables=this._draggables.slice(),this._cachePositions(),this._positionCache.siblings.forEach(function(t){return t.drop._toggleIsReceiving(!0)})},t.prototype.enter=function(t,e,n){this.entered.next({item:t,container:this}),this.start();var i=this._getItemIndexFromPointerPosition(t,e,n),r=this._activeDraggables.indexOf(t),o=this._activeDraggables[i],s=t.getPlaceholderElement();if(r>-1&&this._activeDraggables.splice(r,1),o&&!this._dragDropRegistry.isDragging(o)){var a=o.getRootElement();a.parentElement.insertBefore(s,a),this._activeDraggables.splice(i,0,t)}else this.element.nativeElement.appendChild(s),this._activeDraggables.push(t);s.style.transform="",this._cachePositions()},t.prototype.exit=function(t){this._reset(),this.exited.next({item:t,container:this})},t.prototype.drop=function(t,e,n,i){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n.getItemIndex(t),container:this,previousContainer:n,isPointerOverContainer:i})},t.prototype.withItems=function(t){return this._draggables=t.slice(),this},t.prototype.connectedTo=function(t){return this._siblings=t.slice(),this},t.prototype.withOrientation=function(t){return this._orientation=t,this},t.prototype.getItemIndex=function(t){return this._isDragging?jO("horizontal"===this._orientation&&this._dir&&"rtl"===this._dir.value?this._positionCache.items.slice().reverse():this._positionCache.items,function(e){return e.drag===t}):this._draggables.indexOf(t)},t.prototype.isReceiving=function(){return this._activeSiblings>0},t.prototype._sortItem=function(t,e,n,i){if(this._isPointerNearDropContainer(e,n)){var r=this._positionCache.items,o=this._getItemIndexFromPointerPosition(t,e,n,i);if(!(-1===o&&r.length>0)){var s="horizontal"===this._orientation,a=jO(r,function(e){return e.drag===t}),l=r[o],u=r[a].clientRect,c=l.clientRect,h=a>o?1:-1;this._previousSwap.drag=l.drag,this._previousSwap.delta=s?i.x:i.y;var p=this._getItemOffsetPx(u,c,h),d=this._getSiblingOffsetPx(a,r,h),f=r.slice();lO(r,a,o),this.sorted.next({previousIndex:a,currentIndex:o,container:this,item:t}),r.forEach(function(e,n){if(f[n]!==e){var i=e.drag===t,r=i?p:d,o=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,s?(o.style.transform="translate3d("+Math.round(e.offset)+"px, 0, 0)",RO(e.clientRect,0,r)):(o.style.transform="translate3d(0, "+Math.round(e.offset)+"px, 0)",RO(e.clientRect,r,0))}})}}},t.prototype._cachePositions=function(){var t=this,e="horizontal"===this._orientation;this._positionCache.self=this.element.nativeElement.getBoundingClientRect(),this._positionCache.items=this._activeDraggables.map(function(e){var n=(t._dragDropRegistry.isDragging(e)?e.getPlaceholderElement():e.getRootElement()).getBoundingClientRect();return{drag:e,offset:0,clientRect:{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height}}}).sort(function(t,n){return e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top}),this._positionCache.siblings=this._siblings.map(function(t){return{drop:t,clientRect:t.element.nativeElement.getBoundingClientRect()}})},t.prototype._toggleIsReceiving=function(t){this._activeSiblings=Math.max(0,this._activeSiblings+(t?1:-1))},t.prototype._reset=function(){this._isDragging=!1,this._activeDraggables.forEach(function(t){return t.getRootElement().style.transform=""}),this._positionCache.siblings.forEach(function(t){return t.drop._toggleIsReceiving(!1)}),this._activeDraggables=[],this._positionCache.items=[],this._positionCache.siblings=[],this._previousSwap.drag=null,this._previousSwap.delta=0},t.prototype._getSiblingOffsetPx=function(t,e,n){var i="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*n],s=r[i?"width":"height"]*n;if(o){var a=i?"left":"top",l=i?"right":"bottom";-1===n?s-=o.clientRect[a]-r[l]:s+=r[a]-o.clientRect[l]}return s},t.prototype._isPointerNearDropContainer=function(t,e){var n=this._positionCache.self,i=.05*n.width,r=.05*n.height;return e>n.top-r&&en.left-i&&t=Math.floor(c.left)&&e<=Math.floor(c.right):n>=Math.floor(c.top)&&n<=Math.floor(c.bottom))})},t.prototype._isOverContainer=function(t,e){return MO(this._positionCache.self,t,e)},t.prototype._getSiblingContainerFromPosition=function(t,e,n){var i=this._positionCache.siblings.filter(function(t){return MO(t.clientRect,e,n)});if(!i.length)return null;var r=this._document.elementFromPoint(e,n);if(!r)return null;var o=i.find(function(t){var e=t.drop.element.nativeElement;return e===r||e.contains(r)});return o&&o.drop.enterPredicate(t,o.drop)?o.drop:null},t}();function RO(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function jO(t,e){for(var n=0;n=t.top&&n<=t.bottom&&e>=t.left&&e<=t.right}var FO=0,LO=function(){function t(e,n,i,r,o,s){var a=this;this.element=e,this._changeDetectorRef=i,this._group=o,this.connectedTo=[],this.orientation="vertical",this.id="cdk-drop-list-"+FO++,this._disabled=!1,this.enterPredicate=function(){return!0},this.dropped=new Lr,this.entered=new Lr,this.exited=new Lr,this.sorted=new Lr;var l=this._dropListRef=new DO(e,n,s||document,r);l.data=this,l.enterPredicate=function(t,e){return a.enterPredicate(t.data,e.data)},this._syncInputs(l),this._proxyEvents(l),t._dropLists.push(this),o&&o._items.add(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._disabled=qm(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var e=t._dropLists.indexOf(this);this._dropListRef.dispose(),e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this)},t.prototype.start=function(){this._dropListRef.start()},t.prototype.drop=function(t,e,n,i){this._dropListRef.drop(t._dragRef,e,n._dropListRef,i)},t.prototype.enter=function(t,e,n){this._dropListRef.enter(t._dragRef,e,n)},t.prototype.exit=function(t){this._dropListRef.exit(t._dragRef)},t.prototype.getItemIndex=function(t){return this._dropListRef.getItemIndex(t._dragRef)},t.prototype._sortItem=function(t,e,n,i){return this._dropListRef._sortItem(t._dragRef,e,n,i)},t.prototype._getSiblingContainerFromPosition=function(t,e,n){var i=this._dropListRef._getSiblingContainerFromPosition(t._dragRef,e,n);return i?i.data:null},t.prototype._isOverContainer=function(t,e){return this._dropListRef._isOverContainer(t,e)},t.prototype._syncInputs=function(e){var n=this;e.beforeStarted.subscribe(function(){var i=Zm(n.connectedTo).map(function(e){return"string"==typeof e?t._dropLists.find(function(t){return t.id===e}):e});n._group&&n._group._items.forEach(function(t){-1===i.indexOf(t)&&i.push(t)}),e.lockAxis=n.lockAxis,e.connectedTo(i.filter(function(t){return t&&t!==n}).map(function(t){return t._dropListRef})).withOrientation(n.orientation).withItems(n._draggables.map(function(t){return t._dragRef}))})},t.prototype._proxyEvents=function(t){var e=this;t.beforeStarted.subscribe(function(){e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:e,item:t.item.data})}),t.exited.subscribe(function(t){e.exited.emit({container:e,item:t.item.data})}),t.sorted.subscribe(function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer})})},t._dropLists=[],t}(),NO=function(){return function(){}}(),BO=function(){function t(t,e,n,i,r){this.objects=t,this.panelRef=e,this.controls=n,this.canvasState=i,this.store=r}return t.prototype.getIcon=function(t){return Nc[t.name].icon},t.prototype.selectObject=function(t){this.objects.select(t),this.store.selectSnapshot(Fb.dirty)||this.store.dispatch(new Ic(dc.OBJECT_SETTINGS))},t.prototype.getObjectDisplayName=function(t){var e=t.name;return e?e.replace(/([A-Z])/g," $1"):""},t.prototype.reorderObjects=function(t){lO(this.objects.getAll(),t.previousIndex,t.currentIndex);var e=this.objects.getAll().slice().reverse().findIndex(function(e){return e.data.id===t.item.data});this.objects.getById(t.item.data).moveTo(e),this.canvasState.fabric.requestRenderAll()},t.prototype.shouldDisableObject=function(t){return!t.selectable&&t.name!==Nc.drawing.name},s([tm(Fb.activeObjId),a("design:type",P)],t.prototype,"activeObjId$",void 0),t}(),VO=function(){function t(t,e,n){this.canvas=t,this.activeObject=e,this.store=n,this.objects=[],this.init()}return t.prototype.getAll=function(){return this.objects},t.prototype.get=function(t){return this.objects.find(function(e){return e.name===t})},t.prototype.getById=function(t){return this.objects.find(function(e){return e.data.id===t})},t.prototype.isActive=function(t){return this.activeObject.getId()===t.data.id},t.prototype.has=function(t){return this.objects.findIndex(function(e){return e.name===t})>-1},t.prototype.select=function(t){this.canvas.state.fabric.setActiveObject(t),this.canvas.state.fabric.requestRenderAll()},t.prototype.syncObjects=function(){this.objects=this.canvas.fabric().getObjects().filter(function(t){if(t.name)return-1===t.name.indexOf("crop.")&&-1===t.name.indexOf("round.")&&-1===t.name.indexOf("frame.")}).reverse(),this.store.dispatch(new Fc)},t.prototype.init=function(){var t=this;this.canvas.state.loaded.subscribe(function(){t.canvas.state.loaded.subscribe(function(){t.syncObjects()}),t.canvas.fabric().on("object:added",function(){setTimeout(function(){return t.syncObjects()})}),t.canvas.fabric().on("object:removed",function(){t.syncObjects()})})},t}(),zO=ca({encapsulation:2,styles:[["objects-panel{display:block}objects-panel .action-button{vertical-align:middle;width:20px;height:20px;line-height:20px;margin:0 5px}objects-panel .action-button mat-icon{width:20px;height:20px}objects-panel .drag-placeholder{transition:-webkit-transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1);padding:5px 10px}objects-panel .drag-placeholder .placeholder-inner{height:48px;background:#f1f1f1;border:3px dotted #e0e0e0}objects-panel .cdk-drag-animating,objects-panel .cdk-drop-list-dragging .drag-item:not(.cdk-drag-placeholder){transition:-webkit-transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]],data:{}});function HO(t){return ru(0,[(t()(),Va(0,0,null,null,0,"div",[["class","drag-preview"]],null,null,null,null,null))],null,null)}function WO(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","drag-placeholder"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,0,"div",[["class","placeholder-inner"]],null,null,null,null,null))],null,null)}function UO(t){return ru(0,[(t()(),Va(0,16777216,null,null,16,"div",[["cdkDrag",""],["cdkDragBoundary",".items-list"],["cdkDragLockAxis","y"],["class","reorder-item-wrapper drag-item cdk-drag"]],[[2,"cdk-drag-dragging",null]],null,null,null,null)),Al(6144,null,pO,null,[TO]),Tl(2,4866048,[[1,4]],3,TO,[Ki,[3,aO],Oh,Ko,ms,zv,hO,OO,[2,dw]],{data:[0,"data"],lockAxis:[1,"lockAxis"],boundaryElementSelector:[2,"boundaryElementSelector"],disabled:[3,"disabled"]},null),Xl(603979776,2,{_handles:1}),Xl(335544320,3,{_previewTemplate:0}),Xl(335544320,4,{_placeholderTemplate:0}),(t()(),Va(6,0,null,null,10,"div",[["class","floating-panel-item"]],[[2,"disabled",null],[2,"active",null],[1,"data-id",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.selectObject(t.context.$implicit)&&i),i},null,null)),Il(131072,Ch,[ys]),(t()(),Va(8,0,null,null,1,"mat-icon",[["class","list-icon mat-icon"],["role","img"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(9,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(10,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(11,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(12,null,["",""])),(t()(),Ba(0,null,null,1,null,HO)),Tl(14,16384,[[3,4]],0,mO,[Nr],null,null),(t()(),Ba(0,null,null,1,null,WO)),Tl(16,16384,[[4,4]],0,gO,[Nr],null,null),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,2,0,e.context.$implicit.data.id,"y",".items-list",n.shouldDisableObject(e.context.$implicit)),t(e,9,0,n.getIcon(e.context.$implicit))},function(t,e){var n=e.component;t(e,0,0,gl(e,2)._dragRef.isDragging()),t(e,6,0,n.shouldDisableObject(e.context.$implicit),aa(e,6,1,gl(e,7).transform(n.activeObjId$))===e.context.$implicit.data.id,e.context.$implicit.data.id),t(e,8,0,gl(e,9).inline,"primary"!==gl(e,9).color&&"accent"!==gl(e,9).color&&"warn"!==gl(e,9).color),t(e,12,0,n.getObjectDisplayName(e.context.$implicit))})}function XO(t){return ru(2,[(t()(),Va(0,0,null,null,7,"div",[["class","header"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Objects"])),(t()(),Va(4,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panelRef.close()&&i),i},Ak,Ik)),Tl(5,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(6,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(7,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(8,0,null,null,7,"div",[["cdkDropList",""],["class","items-list cdk-drop-list"],["customScrollbar",""]],[[8,"id",0],[2,"cdk-drop-list-dragging",null],[2,"cdk-drop-list-receiving",null]],[[null,"cdkDropListDropped"]],function(t,e,n){var i=!0;return"cdkDropListDropped"===e&&(i=!1!==t.component.reorderObjects(n)&&i),i},null,null)),Al(6144,null,aO,null,[LO]),Tl(10,4341760,null,0,JE,[Ki,tr,sv,Ko,lw,Hc,$E],null,null),Tl(11,147456,null,1,LO,[Ki,hO,ys,[2,dw],[3,AO],[2,Oh]],null,{dropped:"cdkDropListDropped"}),Xl(603979776,1,{_draggables:1}),Al(256,null,AO,void 0,[]),(t()(),Ba(16777216,null,null,1,null,UO)),Tl(15,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,7,0,"close"),t(e,15,0,n.objects.getAll())},function(t,e){t(e,4,0,gl(e,5).disabled||null,"NoopAnimations"===gl(e,5)._animationMode),t(e,6,0,gl(e,7).inline,"primary"!==gl(e,7).color&&"accent"!==gl(e,7).color&&"warn"!==gl(e,7).color),t(e,8,0,gl(e,11).id,gl(e,11)._dropListRef.isDragging(),gl(e,11)._dropListRef.isReceiving())})}function YO(t){return ru(0,[(t()(),Va(0,0,null,null,1,"objects-panel",[],null,null,null,XO,zO)),Tl(1,49152,null,0,BO,[VO,Nb,Ub,Lb,Jg],null,null)],null,null)}var GO=rl("objects-panel",BO,YO,{},{},[]),qO=function(){function t(t){this.i18n=t}return t.prototype.transform=function(t){return this.i18n.t(t)},t}(),KO=0,ZO=function(){return function(t,e){this.source=t,this.value=e}}(),QO=function(){function t(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+KO++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){},this.change=new Lr}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t,this._updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())},enumerable:!0,configurable:!0}),t.prototype._checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=qm(t),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=qm(t),this._markRadiosForCheck()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._isInitialized=!0},t.prototype._touch=function(){this.onTouched&&this.onTouched()},t.prototype._updateRadioButtonNames=function(){var t=this;this._radios&&this._radios.forEach(function(e){e.name=t.name})},t.prototype._updateSelectedRadioFromValue=function(){var t=this;this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)}))},t.prototype._emitChangeEvent=function(){this._isInitialized&&this.change.emit(new ZO(this._selected,this._value))},t.prototype._markRadiosForCheck=function(){this._radios&&this._radios.forEach(function(t){return t._markForCheck()})},t.prototype.writeValue=function(t){this.value=t,this._changeDetector.markForCheck()},t.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this._changeDetector.markForCheck()},t}(),JO=function(t){function e(e,n,i,r,o,s){var a=t.call(this,n)||this;return a._changeDetector=i,a._focusMonitor=r,a._radioDispatcher=o,a._animationMode=s,a._uniqueId="mat-radio-"+ ++KO,a.id=a._uniqueId,a.change=new Lr,a._checked=!1,a._value=null,a._removeUniqueSelectionListener=function(){},a.radioGroup=e,a._removeUniqueSelectionListener=o.listen(function(t,e){t!==a.id&&e===a.name&&(a.checked=!1)}),a}return r(e,t),Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){var e=qm(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(t){this._labelPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(t){var e=qm(t);this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement,"keyboard")},e.prototype._markForCheck=function(){this._changeDetector.markForCheck()},e.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},e.prototype.ngAfterViewInit=function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){!e&&t.radioGroup&&t.radioGroup._touch()})},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()},e.prototype._emitChangeEvent=function(){this.change.emit(new ZO(this,this._value))},e.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},e.prototype._onInputClick=function(t){t.stopPropagation()},e.prototype._onInputChange=function(t){t.stopPropagation();var e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),this.radioGroup._touch(),e&&this.radioGroup._emitChangeEvent())},e}(yw(bw(_w(function(){return function(t){this._elementRef=t}}())),"accent")),$O=function(){return function(){}}(),tT=ca({encapsulation:2,styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(.5)}@media (-ms-high-contrast:active){.mat-radio-checked .mat-radio-inner-circle{border:solid 10px}}.mat-radio-label-content{display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple,.mat-radio-persistent-ripple{opacity:0}@media (hover:none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}"],data:{}});function eT(t){return ru(2,[Xl(402653184,1,{_inputElement:0}),(t()(),Va(1,0,[["label",1]],null,12,"label",[["class","mat-radio-label"]],[[1,"for",0]],null,null,null,null)),(t()(),Va(2,0,null,null,7,"div",[["class","mat-radio-container"]],null,null,null,null,null)),(t()(),Va(3,0,null,null,0,"div",[["class","mat-radio-outer-circle"]],null,null,null,null,null)),(t()(),Va(4,0,null,null,0,"div",[["class","mat-radio-inner-circle"]],null,null,null,null,null)),(t()(),Va(5,0,null,null,3,"div",[["class","mat-radio-ripple mat-ripple"],["mat-ripple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Tl(6,212992,null,0,Mw,[Ki,Ko,Dm,[2,jw],[2,nk]],{centered:[0,"centered"],radius:[1,"radius"],animation:[2,"animation"],disabled:[3,"disabled"],trigger:[4,"trigger"]},null),$l(7,{enterDuration:0}),(t()(),Va(8,0,null,null,0,"div",[["class","mat-ripple-element mat-radio-persistent-ripple"]],null,null,null,null,null)),(t()(),Va(9,0,[[1,0],["input",1]],null,0,"input",[["class","mat-radio-input cdk-visually-hidden"],["type","radio"]],[[8,"id",0],[8,"checked",0],[8,"disabled",0],[8,"tabIndex",0],[1,"name",0],[8,"required",0],[1,"aria-label",0],[1,"aria-labelledby",0],[1,"aria-describedby",0]],[[null,"change"],[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"change"===e&&(i=!1!==r._onInputChange(n)&&i),"click"===e&&(i=!1!==r._onInputClick(n)&&i),i},null,null)),(t()(),Va(10,0,null,null,3,"div",[["class","mat-radio-label-content"]],[[2,"mat-radio-label-before",null]],null,null,null,null)),(t()(),Va(11,0,null,null,1,"span",[["style","display:none"]],null,null,null,null,null)),(t()(),eu(-1,null,["\xa0"])),Zl(null,0)],function(t,e){var n=e.component,i=t(e,7,0,150);t(e,6,0,!0,20,i,n._isRippleDisabled(),gl(e,1))},function(t,e){var n=e.component;t(e,1,0,n.inputId),t(e,5,0,gl(e,6).unbounded),t(e,9,0,n.inputId,n.checked,n.disabled,n.tabIndex,n.name,n.required,n.ariaLabel,n.ariaLabelledby,n.ariaDescribedby),t(e,10,0,"before"==n.labelPosition)})}var nT=function(){return function(){}}(),iT=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e)||this;return a._focusMonitor=n,a._changeDetectorRef=i,a._dir=r,a._animationMode=s,a._invert=!1,a._max=100,a._min=0,a._step=1,a._thumbLabel=!1,a._tickInterval=0,a._value=null,a._vertical=!1,a.change=new Lr,a.input=new Lr,a.valueChange=new Lr,a.onTouched=function(){},a._percent=0,a._isSliding=!1,a._isActive=!1,a._tickIntervalPercent=0,a._sliderDimensions=null,a._controlValueAccessorChangeFn=function(){},a._dirChangeSubscription=_.EMPTY,a.tabIndex=parseInt(o)||0,a}return r(e,t),Object.defineProperty(e.prototype,"invert",{get:function(){return this._invert},set:function(t){this._invert=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max=Km(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min=Km(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step=Km(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thumbLabel",{get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tickInterval",{get:function(){return this._tickInterval},set:function(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?Km(t,this._tickInterval):0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return null===this._value&&(this.value=this._min),this._value},set:function(t){if(t!==this._value){var e=Km(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this._focusHostElement()},e.prototype.blur=function(){this._blurHostElement()},Object.defineProperty(e.prototype,"percent",{get:function(){return this._clamp(this._percent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_invertAxis",{get:function(){return this.vertical?!this.invert:this.invert},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isMinValue",{get:function(){return 0===this.percent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_thumbGap",{get:function(){return this.disabled?7:this._isMinValue&&!this.thumbLabel?this._isActive?10:7:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_trackBackgroundStyles",{get:function(){var t=this.vertical?"1, "+(1-this.percent)+", 1":1-this.percent+", 1, 1";return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this._shouldInvertMouseCoords()?"-":"")+this._thumbGap+"px) scale3d("+t+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_trackFillStyles",{get:function(){var t=this.vertical?"1, "+this.percent+", 1":this.percent+", 1, 1";return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this._shouldInvertMouseCoords()?"":"-")+this._thumbGap+"px) scale3d("+t+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ticksContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._getDirection()?"-":"")+this._tickIntervalPercent/2*100+"%)"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ticksStyles",{get:function(){var t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?"2px "+t+"%":t+"% 2px",transform:"translateZ(0) translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._getDirection()?"":"-")+t/2+"%)"+(this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)")};return this._isMinValue&&this._thumbGap&&(e["padding"+(this.vertical?this._invertAxis?"Bottom":"Top":this._invertAxis?"Right":"Left")]=this._thumbGap+"px"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_thumbContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"(-"+100*(("rtl"!=this._getDirection()||this.vertical?this._invertAxis:!this._invertAxis)?this.percent:1-this.percent)+"%)"}},enumerable:!0,configurable:!0}),e.prototype._shouldInvertMouseCoords=function(){return"rtl"!=this._getDirection()||this.vertical?this._invertAxis:!this._invertAxis},e.prototype._getDirection=function(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"},e.prototype.ngOnInit=function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){t._isActive=!!e&&"keyboard"!==e,t._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(function(){t._changeDetectorRef.markForCheck()}))},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()},e.prototype._onMouseenter=function(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())},e.prototype._onMousedown=function(t){if(!this.disabled&&0===t.button){var e=this.value;this._isSliding=!1,this._focusHostElement(),this._updateValueFromPosition({x:t.clientX,y:t.clientY}),e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent())}},e.prototype._onSlide=function(t){if(!this.disabled){this._isSliding||this._onSlideStart(null),t.preventDefault();var e=this.value;this._updateValueFromPosition({x:t.center.x,y:t.center.y}),e!=this.value&&this._emitInputEvent()}},e.prototype._onSlideStart=function(t){this.disabled||this._isSliding||(this._onMouseenter(),this._isSliding=!0,this._focusHostElement(),this._valueOnSlideStart=this.value,t&&(this._updateValueFromPosition({x:t.center.x,y:t.center.y}),t.preventDefault()))},e.prototype._onSlideEnd=function(){this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=null},e.prototype._onFocus=function(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()},e.prototype._onBlur=function(){this.onTouched()},e.prototype._onKeydown=function(t){if(!this.disabled&&!Wv(t)){var e=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}},e.prototype._onKeyup=function(){this._isSliding=!1},e.prototype._increment=function(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)},e.prototype._updateValueFromPosition=function(t){if(this._sliderDimensions){var e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{var n=this._calculateValue(e),i=Math.round((n-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}},e.prototype._emitChangeEvent=function(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())},e.prototype._emitInputEvent=function(){this.input.emit(this._createChangeEvent())},e.prototype._updateTickIntervalPercent=function(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){var t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)},e.prototype._createChangeEvent=function(t){void 0===t&&(t=this.value);var e=new nT;return e.source=this,e.value=t,e},e.prototype._calculatePercentage=function(t){return((t||0)-this.min)/(this.max-this.min)},e.prototype._calculateValue=function(t){return this.min+t*(this.max-this.min)},e.prototype._clamp=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),Math.max(e,Math.min(t,n))},e.prototype._getSliderDimensions=function(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null},e.prototype._focusHostElement=function(){this._elementRef.nativeElement.focus()},e.prototype._blurHostElement=function(){this._elementRef.nativeElement.blur()},e.prototype.writeValue=function(t){this.value=t},e.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},e.prototype.registerOnTouched=function(t){this.onTouched=t},e.prototype.setDisabledState=function(t){this.disabled=t},e}(_w(yw(vw(function(){return function(t){this._elementRef=t}}()),"accent"))),rT=function(){return function(){}}(),oT=ca({encapsulation:2,styles:[".mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:0;vertical-align:middle}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.cdk-keyboard-focused .mat-slider-focus-ring,.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label{cursor:-webkit-grab;cursor:grab}.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label:active,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb:active{cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}@media (-ms-high-contrast:active){.mat-slider-thumb-label{outline:solid 1px}}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-sliding .mat-slider-thumb-container,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-track-fill{transition-duration:0s}.mat-slider-has-ticks .mat-slider-wrapper::after{content:'';position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}@media (-ms-high-contrast:active){.mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}@media (-ms-high-contrast:active){.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}@media (-ms-high-contrast:active){.mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-track-fill{transition:none}"],data:{}});function sT(t){return ru(2,[Xl(402653184,1,{_sliderWrapper:0}),(t()(),Va(1,0,[[1,0],["sliderWrapper",1]],null,16,"div",[["class","mat-slider-wrapper"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,4,"div",[["class","mat-slider-track-wrapper"]],null,null,null,null,null)),(t()(),Va(3,0,null,null,1,"div",[["class","mat-slider-track-background"]],null,null,null,null,null)),Tl(4,278528,null,0,bh,[Ls,Ki,tr],{ngStyle:[0,"ngStyle"]},null),(t()(),Va(5,0,null,null,1,"div",[["class","mat-slider-track-fill"]],null,null,null,null,null)),Tl(6,278528,null,0,bh,[Ls,Ki,tr],{ngStyle:[0,"ngStyle"]},null),(t()(),Va(7,0,null,null,3,"div",[["class","mat-slider-ticks-container"]],null,null,null,null,null)),Tl(8,278528,null,0,bh,[Ls,Ki,tr],{ngStyle:[0,"ngStyle"]},null),(t()(),Va(9,0,null,null,1,"div",[["class","mat-slider-ticks"]],null,null,null,null,null)),Tl(10,278528,null,0,bh,[Ls,Ki,tr],{ngStyle:[0,"ngStyle"]},null),(t()(),Va(11,0,null,null,6,"div",[["class","mat-slider-thumb-container"]],null,null,null,null,null)),Tl(12,278528,null,0,bh,[Ls,Ki,tr],{ngStyle:[0,"ngStyle"]},null),(t()(),Va(13,0,null,null,0,"div",[["class","mat-slider-focus-ring"]],null,null,null,null,null)),(t()(),Va(14,0,null,null,0,"div",[["class","mat-slider-thumb"]],null,null,null,null,null)),(t()(),Va(15,0,null,null,2,"div",[["class","mat-slider-thumb-label"]],null,null,null,null,null)),(t()(),Va(16,0,null,null,1,"span",[["class","mat-slider-thumb-label-text"]],null,null,null,null,null)),(t()(),eu(17,null,["",""]))],function(t,e){var n=e.component;t(e,4,0,n._trackBackgroundStyles),t(e,6,0,n._trackFillStyles),t(e,8,0,n._ticksContainerStyles),t(e,10,0,n._ticksStyles),t(e,12,0,n._thumbContainerStyles)},function(t,e){t(e,17,0,e.component.displayValue)})}var aT=function(){function t(t,e){this.config=t,this.exportTool=e,this.quality$=new zf(10*this.config.get("pixie.tools.export.defaultQuality")),this.exportForm=new bf({name:new yf(this.config.get("pixie.tools.export.defaultName")),format:new yf(this.config.get("pixie.tools.export.defaultFormat")),quality:new yf(this.config.get("pixie.tools.export.defaultQuality"))})}return t.prototype.ngOnInit=function(){var t=this;this.exportForm.get("format").valueChanges.subscribe(function(e){"jpeg"!==e?t.exportForm.get("quality").disable():t.exportForm.get("quality").enable()}),this.exportForm.get("quality").valueChanges.subscribe(function(e){t.quality$.next(10*e)})},t.prototype.export=function(){var t=this.exportForm.value;this.exportTool.export(t.name,t.format,t.quality)},t}(),lT=n("Iab2"),uT=n("RdDz");function cT(t){return t.charAt(0).toUpperCase()+t.slice(1)}var hT=function(){function t(t,e,n,i,r,o,s){this.canvas=t,this.cropzone=e,this.history=n,this.config=i,this.http=r,this.watermark=o,this.toast=s}return t.prototype.getDefault=function(t){return this.config.get("pixie.tools.export.default"+cT(t))},t.prototype.export=function(t,e,n){t||(t=this.getDefault("name")),e||(e=this.getDefault("format")),n||(n=this.getDefault("quality"));var i,r=t+"."+e;this.applyWaterMark(),i="json"===e?this.getJsonState():this.getDataUrl(e,n),this.watermark.remove(),i&&(this.config.has("pixie.saveUrl")?this.http.post(this.config.get("pixie.saveUrl"),{data:i,filename:r,format:e}).subscribe(function(){},function(){}):this.config.has("pixie.onSave")?this.config.get("pixie.onSave")(i,r,e):this.getCanvasBlob(e,i).then(function(t){Object(lT.saveAs)(t,r)}))},t.prototype.getCanvasBlob=function(t,e){return new Promise(function(n){var i;if("json"===t)i=new Blob([e],{type:"application/json"});else{var r="image/"+t;e=e.replace(/data:image\/([a-z]*)?;base64,/,""),i=uT(e,r)}n(i)})},t.prototype.getDataUrl=function(t,e){void 0===t&&(t=this.getDefault("format")),void 0===e&&(e=this.getDefault("quality")),this.prepareCanvas();try{return this.canvas.fabric().toDataURL({format:t,quality:e,multiplier:this.canvas.state.original.width/this.canvas.fabric().getWidth()})}catch(n){if(-1===n.message.toLowerCase().indexOf("tainted"))return null;this.toast.open("Could not export canvas with external image.")}},t.prototype.getJsonState=function(){return JSON.stringify(this.history.getCurrentCanvasState())},t.prototype.prepareCanvas=function(){this.canvas.fabric().discardActiveObject(),this.canvas.pan.reset(),this.cropzone.remove()},t.prototype.applyWaterMark=function(){var t=this.config.get("pixie.watermarkText");t&&this.watermark.add(t)},t}(),pT=ca({encapsulation:2,styles:[[".export-panel-dialog-container.be-modal{width:255px}.export-panel-dialog-container.be-modal .mat-dialog-container{padding:18px}export-panel{display:block}export-panel .name-input-container{margin-bottom:18px}export-panel .mat-radio-group{display:block;width:100%;margin-bottom:5px}export-panel .mat-radio-button~.mat-radio-button{margin-left:16px}export-panel .mat-slider{display:block;width:100%;margin:0 -6px}export-panel .slider-label{position:relative;bottom:-15px;pointer-events:none}export-panel .save-button{margin-top:15px;display:block;width:100%}"]],data:{}});function dT(t){return ru(2,[Il(0,qO,[uv]),(t()(),Va(1,0,null,null,50,"form",[["ngNativeValidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0,r=t.component;return"submit"===e&&(i=!1!==gl(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,2).onReset()&&i),"ngSubmit"===e&&(i=!1!==r.export()&&i),i},null,null)),Tl(2,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},{ngSubmit:"ngSubmit"}),Al(2048,null,bd,null,[Af]),Tl(4,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(5,0,null,null,11,"div",[["class","input-container name-input-container"]],null,null,null,null,null)),(t()(),Va(6,0,null,null,2,"label",[["for","name"],["trans",""]],null,null,null,null,null)),Tl(7,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["File Name"])),(t()(),Va(9,0,null,null,7,"input",[["formControlName","name"],["id","name"],["required",""],["type","text"]],[[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==gl(t,10)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,10).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,10)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,10)._compositionEnd(n.target.value)&&i),i},null,null)),Tl(10,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(11,16384,null,0,Mf,[],{required:[0,"required"]},null),Al(1024,null,wd,function(t){return[t]},[Mf]),Al(1024,null,Od,function(t){return[t]},[Ad]),Tl(14,671744,null,0,jf,[[3,bd],[6,wd],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(16,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(17,0,null,null,17,"mat-radio-group",[["class","mat-radio-group"],["formControlName","format"],["required",""],["role","radiogroup"]],[[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,null,null)),Tl(18,16384,null,0,Mf,[],{required:[0,"required"]},null),Al(1024,null,wd,function(t){return[t]},[Mf]),Tl(20,1064960,null,1,QO,[ys],{required:[0,"required"]},null),Xl(603979776,1,{_radios:1}),Al(1024,null,Od,function(t){return[t]},[QO]),Tl(23,671744,null,0,jf,[[3,bd],[6,wd],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(25,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(26,0,null,null,2,"mat-radio-button",[["class","mat-radio-button"],["value","jpeg"]],[[2,"mat-radio-checked",null],[2,"mat-radio-disabled",null],[2,"_mat-animation-noopable",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,27)._inputElement.nativeElement.focus()&&i),i},eT,tT)),Tl(27,4440064,[[1,4]],0,JO,[[2,QO],Ki,ys,By,Nv,[2,nk]],{value:[0,"value"]},null),(t()(),eu(-1,0,["JPEG"])),(t()(),Va(29,0,null,null,2,"mat-radio-button",[["class","mat-radio-button"],["value","png"]],[[2,"mat-radio-checked",null],[2,"mat-radio-disabled",null],[2,"_mat-animation-noopable",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,30)._inputElement.nativeElement.focus()&&i),i},eT,tT)),Tl(30,4440064,[[1,4]],0,JO,[[2,QO],Ki,ys,By,Nv,[2,nk]],{value:[0,"value"]},null),(t()(),eu(-1,0,["PNG"])),(t()(),Va(32,0,null,null,2,"mat-radio-button",[["class","mat-radio-button"],["value","json"]],[[2,"mat-radio-checked",null],[2,"mat-radio-disabled",null],[2,"_mat-animation-noopable",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,33)._inputElement.nativeElement.focus()&&i),i},eT,tT)),Tl(33,4440064,[[1,4]],0,JO,[[2,QO],Ki,ys,By,Nv,[2,nk]],{value:[0,"value"]},null),(t()(),eu(-1,0,["JSON"])),(t()(),Va(35,0,null,null,12,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(36,0,null,null,3,"label",[["class","slider-label"],["for","quality"]],null,null,null,null,null)),(t()(),eu(37,null,[""," (",")"])),Jl(38,1),Il(131072,Ch,[ys]),(t()(),Va(40,0,null,null,7,"mat-slider",[["class","mat-slider"],["formControlName","quality"],["id","quality"],["max","1"],["min","0.1"],["required",""],["role","slider"],["step","0.1"]],[[1,"required",0],[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,43)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,43)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,43)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,43)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,43)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,43)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,43)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,43)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,43)._onSlideStart(n)&&i),i},sT,oT)),Tl(41,16384,null,0,Mf,[],{required:[0,"required"]},null),Al(1024,null,wd,function(t){return[t]},[Mf]),Tl(43,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"],step:[2,"step"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(45,671744,null,0,jf,[[3,bd],[6,wd],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(47,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(48,0,null,null,3,"button",[["class","save-button"],["color","accent"],["mat-raised-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],null,null,Ak,Ik)),Tl(49,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(50,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{color:[0,"color"]},null),(t()(),eu(-1,0,["Save"]))],function(t,e){t(e,2,0,e.component.exportForm),t(e,11,0,""),t(e,14,0,"name"),t(e,18,0,""),t(e,20,0,""),t(e,23,0,"format"),t(e,27,0,"jpeg"),t(e,30,0,"png"),t(e,33,0,"json"),t(e,41,0,""),t(e,43,0,"1","0.1","0.1"),t(e,45,0,"quality"),t(e,50,0,"accent")},function(t,e){var n=e.component;t(e,1,0,gl(e,4).ngClassUntouched,gl(e,4).ngClassTouched,gl(e,4).ngClassPristine,gl(e,4).ngClassDirty,gl(e,4).ngClassValid,gl(e,4).ngClassInvalid,gl(e,4).ngClassPending),t(e,9,0,gl(e,11).required?"":null,gl(e,16).ngClassUntouched,gl(e,16).ngClassTouched,gl(e,16).ngClassPristine,gl(e,16).ngClassDirty,gl(e,16).ngClassValid,gl(e,16).ngClassInvalid,gl(e,16).ngClassPending),t(e,17,0,gl(e,18).required?"":null,gl(e,25).ngClassUntouched,gl(e,25).ngClassTouched,gl(e,25).ngClassPristine,gl(e,25).ngClassDirty,gl(e,25).ngClassValid,gl(e,25).ngClassInvalid,gl(e,25).ngClassPending),t(e,26,0,gl(e,27).checked,gl(e,27).disabled,"NoopAnimations"===gl(e,27)._animationMode,-1,gl(e,27).id),t(e,29,0,gl(e,30).checked,gl(e,30).disabled,"NoopAnimations"===gl(e,30)._animationMode,-1,gl(e,30).id),t(e,32,0,gl(e,33).checked,gl(e,33).disabled,"NoopAnimations"===gl(e,33)._animationMode,-1,gl(e,33).id);var i=aa(e,37,0,t(e,38,0,gl(e,0),"Quality"));t(e,37,0,i,aa(e,37,1,gl(e,39).transform(n.quality$))),t(e,40,1,[gl(e,41).required?"":null,gl(e,43).tabIndex,gl(e,43).disabled,gl(e,43).max,gl(e,43).min,gl(e,43).value,gl(e,43).vertical?"vertical":"horizontal",gl(e,43).disabled,gl(e,43).tickInterval,!gl(e,43).vertical,gl(e,43)._invertAxis,gl(e,43)._isSliding,gl(e,43).thumbLabel,gl(e,43).vertical,gl(e,43)._isMinValue,gl(e,43).disabled||gl(e,43)._isMinValue&&gl(e,43)._thumbGap&&gl(e,43)._invertAxis,"NoopAnimations"===gl(e,43)._animationMode,gl(e,47).ngClassUntouched,gl(e,47).ngClassTouched,gl(e,47).ngClassPristine,gl(e,47).ngClassDirty,gl(e,47).ngClassValid,gl(e,47).ngClassInvalid,gl(e,47).ngClassPending]),t(e,48,0,gl(e,50).disabled||null,"NoopAnimations"===gl(e,50)._animationMode)})}function fT(t){return ru(0,[(t()(),Va(0,0,null,null,1,"export-panel",[],null,null,null,dT,pT)),Tl(1,114688,null,0,aT,[Hc,hT],null,null)],function(t,e){t(e,1,0)},null)}var gT=rl("export-panel",aT,fT,{},{},[]),mT=new Et("MAT_MENU_PANEL"),vT=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._elementRef=e,o._focusMonitor=i,o._parentMenu=r,o.role="menuitem",o._hovered=new L,o._highlighted=!1,o._triggersSubmenu=!1,i&&i.monitor(o._elementRef,!1),r&&r.addItem&&r.addItem(o),o._document=n,o}return r(e,t),e.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()},e.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()},e.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e.prototype._checkDisabled=function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())},e.prototype._handleMouseEnter=function(){this._hovered.next(this)},e.prototype.getLabel=function(){var t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var i=t.childNodes.length,r=0;r')}(),this._xPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: ')}(),this._yPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelClass",{set:function(t){t&&t.length&&(this._classList=t.split(" ").reduce(function(t,e){return t[e]=!0,t},{}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return this.panelClass},set:function(t){this.panelClass=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.setPositionClasses()},t.prototype.ngAfterContentInit=function(){var t=this;this._keyManager=new Iy(this._items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return t.closed.emit("tab")})},t.prototype.ngOnDestroy=function(){this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){return this._itemChanges.pipe(Gm(this._items),jv(function(t){return lt.apply(void 0,t.map(function(t){return t._hovered}))}))},t.prototype._handleKeydown=function(t){var e=t.keyCode;switch(e){case Hv:this.closed.emit("keydown");break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:38!==e&&40!==e||this._keyManager.setFocusOrigin("keyboard"),this._keyManager.onKeydown(t)}},t.prototype.focusFirstItem=function(t){var e=this;void 0===t&&(t="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(rg(1)).subscribe(function(){return e._keyManager.setFocusOrigin(t).setFirstItemActive()}):this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype.setElevation=function(t){var e="mat-elevation-z"+(4+t),n=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)},t.prototype.addItem=function(t){-1===this._items.indexOf(t)&&(this._items.push(t),this._itemChanges.next(this._items))},t.prototype.removeItem=function(t){var e=this._items.indexOf(t);this._items.indexOf(t)>-1&&(this._items.splice(e,1),this._itemChanges.next(this._items))},t.prototype.setPositionClasses=function(t,e){void 0===t&&(t=this.xPosition),void 0===e&&(e=this.yPosition);var n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)},t}(),_T=new Et("mat-menu-scroll-strategy");function wT(t){return function(){return t.scrollStrategies.reposition()}}var xT=jm({passive:!0}),CT=function(){function t(t,e,n,i,r,o,s,a){var l=this;this._overlay=t,this._element=e,this._viewContainerRef=n,this._parentMenu=r,this._menuItemInstance=o,this._dir=s,this._focusMonitor=a,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=_.EMPTY,this._hoverSubscription=_.EMPTY,this._menuCloseSubscription=_.EMPTY,this._handleTouchStart=function(){return l._openedBy="touch"},this._openedBy=null,this.menuOpened=new Lr,this.onMenuOpen=this.menuOpened,this.menuClosed=new Lr,this.onMenuClose=this.menuClosed,e.nativeElement.addEventListener("touchstart",this._handleTouchStart,xT),o&&(o._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=i}return Object.defineProperty(t.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(t){this.menu=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menu",{get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.asObservable().subscribe(function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e._parentMenu||e._parentMenu.closed.emit(t)})))},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,xT),this._cleanUpSubscriptions()},Object.defineProperty(t.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},t.prototype.openMenu=function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof bT&&this.menu._startAnimation()}},t.prototype.closeMenu=function(){this.menu.close.emit()},t.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,t):this._element.nativeElement.focus()},t.prototype._destroyMenu=function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closeSubscription.unsubscribe(),this._overlayRef.detach(),e instanceof bT?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(qc(function(t){return"void"===t.toState}),rg(1),fg(e.lazyContent._attached)).subscribe(function(){return e.lazyContent.detach()},void 0,function(){t._resetMenu()}):this._resetMenu()):(this._resetMenu(),e.lazyContent&&e.lazyContent.detach())}},t.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")},t.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}},t.prototype._resetMenu=function(){this._setIsMenuOpen(!1),this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus(),this._openedBy=null},t.prototype._setIsMenuOpen=function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)},t.prototype._checkMenu=function(){this.menu||function(){throw Error('matMenuTriggerFor: must pass in an mat-menu instance.\n\n Example:\n \n ')}()},t.prototype._createOverlay=function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef},t.prototype._getOverlayConfig=function(){return new Jv({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},t.prototype._subscribeToPositions=function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})},t.prototype._setPosition=function(t){var e="before"===this.menu.xPosition?["end","start"]:["start","end"],n=e[0],i=e[1],r="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],o=r[0],s=r[1],a=[o,s],l=a[0],u=a[1],c=[n,i],h=c[0],p=c[1],d=0;this.triggersSubmenu()?(p=n="before"===this.menu.xPosition?"start":"end",i=h="end"===n?"start":"end",d="bottom"===o?8:-8):this.menu.overlapTrigger||(l="top"===o?"bottom":"top",u="top"===s?"bottom":"top"),t.withPositions([{originX:n,originY:l,overlayX:h,overlayY:o,offsetY:d},{originX:i,originY:l,overlayX:p,overlayY:o,offsetY:d},{originX:n,originY:u,overlayX:h,overlayY:s,offsetY:-d},{originX:i,originY:u,overlayX:p,overlayY:s,offsetY:-d}])},t.prototype._cleanUpSubscriptions=function(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},t.prototype._menuClosingActions=function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return lt(e,this._parentMenu?this._parentMenu.closed:Gc(),this._parentMenu?this._parentMenu._hovered().pipe(qc(function(e){return e!==t._menuItemInstance}),qc(function(){return t._menuOpen})):Gc(),n)},t.prototype._handleMousedown=function(t){Vy(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.keyCode;this.triggersSubmenu()&&(39===e&&"ltr"===this.dir||37===e&&"rtl"===this.dir)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(qc(function(e){return e===t._menuItemInstance&&!e.disabled}),Zb(0,zm)).subscribe(function(){t._openedBy="mouse",t.menu instanceof bT&&t.menu._isAnimating?t.menu._animationDone.pipe(rg(1),Zb(0,zm),fg(t._parentMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))},t.prototype._getPortal=function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new xv(this.menu.templateRef,this._viewContainerRef)),this._portal},t}(),ST=function(){return function(){}}(),kT=ca({encapsulation:2,styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0}.mat-menu-panel.ng-animating{pointer-events:none}@media (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],data:{animation:[{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.8)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:{type:3,steps:[{type:11,selector:".mat-menu-content",animation:{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"100ms linear"},options:null},{type:4,styles:{type:6,styles:{transform:"scale(1)"},offset:null},timings:"120ms cubic-bezier(0, 0, 0.2, 1)"}],options:null},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}},{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null},options:void 0},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function ET(t){return ru(0,[(t()(),Va(0,0,null,null,3,"div",[["class","mat-menu-panel"],["role","menu"],["tabindex","-1"]],[[24,"@transformMenu",0]],[[null,"keydown"],[null,"click"],[null,"@transformMenu.start"],[null,"@transformMenu.done"]],function(t,e,n){var i=!0,r=t.component;return"keydown"===e&&(i=!1!==r._handleKeydown(n)&&i),"click"===e&&(i=!1!==r.closed.emit("click")&&i),"@transformMenu.start"===e&&(i=!1!==r._onAnimationStart(n)&&i),"@transformMenu.done"===e&&(i=!1!==r._onAnimationDone(n)&&i),i},null,null)),Tl(1,278528,null,0,lh,[Fs,Ls,Ki,tr],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),Va(2,0,null,null,1,"div",[["class","mat-menu-content"]],null,null,null,null,null)),Zl(null,0)],function(t,e){t(e,1,0,"mat-menu-panel",e.component._classList)},function(t,e){t(e,0,0,e.component._panelAnimationState)})}function OT(t){return ru(2,[Xl(402653184,1,{templateRef:0}),(t()(),Ba(0,[[1,2]],null,0,null,ET))],null,null)}var TT=ca({encapsulation:2,styles:[],data:{}});function IT(t){return ru(2,[Zl(null,0),(t()(),Va(1,0,null,null,1,"div",[["class","mat-menu-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Tl(2,212992,null,0,Mw,[Ki,Ko,Dm,[2,jw],[2,nk]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,2,0,n.disableRipple||n.disabled,n._getHostElement())},function(t,e){t(e,1,0,gl(e,2).unbounded)})}function AT(t){return t.replace(/([A-Z])/g," $1")}var PT=function(){function t(t,e,n,i,r,o,s,a,l,u){this.history=t,this.config=e,this.zoom=n,this.panels=i,this.breakpoints=r,this.importTool=o,this.exportTool=s,this.canvas=a,this.floatingPanels=l,this.store=u,this.compactMode=new zf(!1)}return t.prototype.ngAfterViewInit=function(){var t=this;this.canvas.state.loaded.pipe(Zb(0)).subscribe(function(){t.floatingPanels.openSampleImagePanel()}),this.breakpoints.observe("(max-width: 768px)").subscribe(function(e){return t.compactMode.next(e.matches)})},t.prototype.zoomIn=function(){this.zoom.set(this.zoom.get()+.05)},t.prototype.zoomOut=function(){this.zoom.set(this.zoom.get()-.05)},t.prototype.exportImage=function(){this.config.get("pixie.ui.showExportPanel")?this.panels.openExportPanel():this.exportTool.export()},t.prototype.openBackgroundImage=function(){var t=this;this.importTool.openUploadDialog({type:"image",backgroundImage:!0}).then(function(){t.history.add(xm.BG_IMAGE)})},t.prototype.openOverlayImage=function(){var t=this;this.importTool.openUploadDialog().then(function(e){e&&(t.canvas.fabric().setActiveObject(e),t.history.add(xm.OVERLAY_IMAGE))})},t.prototype.openStateFile=function(){return this.importTool.openUploadDialog({type:"state"})},t.prototype.executeOpenButtonAction=function(){var t=this.config.get("pixie.ui.toolbar.openButtonAction");t?t():this.matMenuTrigger.toggleMenu()},t.prototype.applyChanges=function(){var t=this.store.selectSnapshot(Fb.activePanel);this.store.dispatch(new Pc(t))},t.prototype.cancelChanges=function(){var t=this.store.selectSnapshot(Fb.activePanel);this.store.dispatch(new Dc(t))},t.prototype.closeEditor=function(){this.store.dispatch(new Tc)},t.prototype.getToolDisplayName=function(t){return AT(t)},s([tm(Fb.mode),a("design:type",P)],t.prototype,"mode$",void 0),s([tm(Fb.zoom),a("design:type",P)],t.prototype,"zoom$",void 0),s([tm(Fb.activePanel),a("design:type",P)],t.prototype,"activePanel$",void 0),s([tm(wm.canUndo),a("design:type",P)],t.prototype,"canUndo$",void 0),s([tm(wm.canRedo),a("design:type",P)],t.prototype,"canRedo$",void 0),t}(),DT=function(){function t(t,e,n,i){this.state=t,this.pan=e,this.config=n,this.store=i,this.maxScale=2,this.minScale=.1,this.currentZoom=1}return t.prototype.get=function(){return this.currentZoom},t.prototype.getPercent=function(){return Math.floor(100*this.currentZoom)},t.prototype.set=function(t,e){if(void 0===e&&(e=!0),!(tthis.maxScale)){var n=this.state.original.width*t,i=this.state.original.height*t;this.state.fabric.setZoom(t),e&&(this.state.fabric.setHeight(i),this.state.fabric.setWidth(n)),this.currentZoom=t,this.store.dispatch(new Lc(this.getPercent()))}},t.prototype.fitToScreen=function(){var t=this.state.calcWrapperSize(),e=t.width-40,n=t.height-40;if(this.state.original.height>n||this.state.original.width>e){var i=Math.min(n/this.state.original.height,e/this.state.original.width);this.set(i)}},t.prototype.init=function(){this.config.get("pixie.ui.allowZoom")&&(this.bindMouseWheel(),this.bindToPinchZoom())},t.prototype.bindMouseWheel=function(){var t=this;this.state.fabric.on("mouse:wheel",function(e){e.e.preventDefault(),e.e.stopPropagation(),t.set(e.e.deltaY<0?t.currentZoom+.05:t.currentZoom-.05),t.pan.set(),t.state.fabric.requestRenderAll()})},t.prototype.bindToPinchZoom=function(){var t=this,e=new Hammer.Manager(this.state.maskWrapperEl),n=new Hammer.Pinch;e.add([n]),e.on("pinch",function(e){var n=Math.abs(e.overallVelocity);t.set("pinchout"===e.additionalEvent?t.get()+n:t.get()-n),t.pan.set(),t.state.fabric.requestRenderAll()})},t}(),RT=function(){function t(t,e,n,i,r){this.overlayPanel=t,this.state=e,this.openSampleImageDialog=n,this.breakpoints=i,this.dialog=r}return t.prototype.openSampleImagePanel=function(){this.openSampleImageDialog.open()},t.prototype.openExportPanel=function(){this.dialog.open(aT,null,{panelClass:"export-panel-dialog-container"})},t.prototype.toggleHistory=function(){this.closePanel("objects"),this.panelIsOpen("history")?this.historyPanelRef.close():this.openHistoryPanel()},t.prototype.toggleObjects=function(){this.closePanel("history"),this.panelIsOpen("objects")?this.objectsPanelRef.close():this.openObjectsPanel()},t.prototype.openHistoryPanel=function(){this.historyPanelRef=this.overlayPanel.open(tO,this.getPanelConfig())},t.prototype.openObjectsPanel=function(){this.objectsPanelRef=this.overlayPanel.open(BO,this.getPanelConfig())},t.prototype.closePanel=function(t){switch(t){case"history":this.historyPanelRef&&this.historyPanelRef.close();break;case"objects":this.objectsPanelRef&&this.objectsPanelRef.close()}},t.prototype.panelIsOpen=function(t){var e="history"===t?this.historyPanelRef:this.objectsPanelRef;return e&&e.isOpen()},t.prototype.getPanelConfig=function(){return{hasBackdrop:!1,positionStrategy:this.getPositionStrategy(),panelClass:"floating-panel"}},t.prototype.getPositionStrategy=function(){return this.breakpoints.isMobile$.value?this.overlayPanel.overlay.position().flexibleConnectedTo(new Ki(this.state.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]):this.overlayPanel.overlay.position().flexibleConnectedTo(new Ki(this.state.wrapperEl)).withPositions([{overlayX:"end",overlayY:"bottom",originX:"end",originY:"bottom",offsetY:-10,offsetX:-10}])},t}(),jT=ca({encapsulation:2,styles:[["toolbar{display:flex;align-items:center;height:50px;padding:0 20px;color:#fff;background-color:#1976d2;position:relative;z-index:3;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}toolbar .mobile-open-button,toolbar .open-button{position:relative}toolbar .mat-menu-trigger{display:block;position:absolute;left:-1px;bottom:-1px}toolbar>.center{display:flex;align-items:center;justify-content:center;width:140px;text-transform:capitalize}toolbar>.center .current{margin:0 8px}toolbar>.center .value{text-align:center}toolbar>.left{margin-right:auto}toolbar>.right{margin-left:auto}toolbar>.right .toggle-history-button{margin-left:40px}toolbar .drawer-name{font-size:15px}toolbar .status-bar{height:30px;background-color:#1565c0;text-align:center;line-height:30px}toolbar .close-button{margin-left:25px}toolbar .open-button mat-icon{margin-right:5px}toolbar .export-button mat-icon{margin-right:2px}toolbar .invisible{visibility:hidden;pointer-events:none}"]],data:{}});function MT(t){return ru(0,[(t()(),Va(0,0,null,null,5,"button",[["class","mobile-open-button"],["mat-icon-button",""]],[[2,"invisible",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeOpenButtonAction()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,16777216,null,0,1,"span",[["aria-haspopup","true"],["class","mat-menu-trigger"]],[[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==gl(t,3)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,3)._handleKeydown(n)&&i),"click"===e&&(i=!1!==gl(t,3)._handleClick(n)&&i),i},null,null)),Tl(3,1196032,[[1,4]],0,CT,[py,Ki,ms,_T,[2,bT],[8,null],[2,dw],By],{menu:[0,"menu"]},null),(t()(),Va(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","photo-library"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(5,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,gl(e.parent.parent.parent,6)),t(e,5,0,"photo-library")},function(t,e){t(e,0,0,e.component.config.get("pixie.ui.toolbar.hideOpenButton"),gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).menuOpen||null),t(e,4,0,gl(e,5).inline,"primary"!==gl(e,5).color&&"accent"!==gl(e,5).color&&"warn"!==gl(e,5).color)})}function FT(t){return ru(0,[(t()(),Va(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.cancelChanges()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(3,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"close")},function(t,e){t(e,0,0,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).inline,"primary"!==gl(e,3).color&&"accent"!==gl(e,3).color&&"warn"!==gl(e,3).color)})}function LT(t){return ru(0,[(t()(),Va(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(2,null,["",""]))],null,function(t,e){t(e,2,0,e.component.getToolDisplayName(e.parent.context.ngIf))})}function NT(t){return ru(0,[(t()(),Va(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Editor"]))],null,null)}function BT(t){return ru(0,[(t()(),Va(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyChanges()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","check"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(3,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"check")},function(t,e){t(e,0,0,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).inline,"primary"!==gl(e,3).color&&"accent"!==gl(e,3).color&&"warn"!==gl(e,3).color)})}function VT(t){return ru(0,[(t()(),Va(0,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"invisible",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.exportImage()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","file-download"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(3,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"file-download")},function(t,e){t(e,0,0,e.component.config.get("pixie.ui.toolbar.hideSaveButton"),gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).inline,"primary"!==gl(e,3).color&&"accent"!==gl(e,3).color&&"warn"!==gl(e,3).color)})}function zT(t){return ru(0,[(t()(),Va(0,0,null,null,15,null,null,null,null,null,null,null)),(t()(),Va(1,0,null,null,4,"div",[["class","left"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,MT)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,FT)),Tl(5,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(6,0,null,null,4,"div",[["class","center drawer-name"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,LT)),Tl(8,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,NT)),Tl(10,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(11,0,null,null,4,"div",[["class","right"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,BT)),Tl(13,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,VT)),Tl(15,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,3,0,"navigation"===e.context.ngIf),t(e,5,0,"navigation"!==e.context.ngIf),t(e,8,0,"navigation"!==e.context.ngIf),t(e,10,0,"navigation"===e.context.ngIf),t(e,13,0,"navigation"!==e.context.ngIf),t(e,15,0,"navigation"===e.context.ngIf)},null)}function HT(t){return ru(0,[(t()(),Va(0,0,null,null,3,null,null,null,null,null,null,null)),(t()(),Ba(16777216,null,null,2,null,zT)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,2,0,aa(e,2,0,gl(e,3).transform(n.activePanel$)))},null)}function WT(t){return ru(0,[(t()(),Va(0,0,null,null,15,"div",[["class","center"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.zoomOut()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","remove"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(4,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(5,0,null,null,6,"div",[["class","current"]],null,null,null,null,null)),(t()(),Va(6,0,null,null,2,"div",[["trans",""]],null,null,null,null,null)),Tl(7,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Zoom"])),(t()(),Va(9,0,null,null,2,"div",[["class","value"]],null,null,null,null,null)),(t()(),eu(10,null,["","%"])),Il(131072,Ch,[ys]),(t()(),Va(12,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.zoomIn()&&i),i},Ak,Ik)),Tl(13,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(14,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(15,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,4,0,"remove"),t(e,15,0,"add")},function(t,e){var n=e.component;t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,gl(e,4).inline,"primary"!==gl(e,4).color&&"accent"!==gl(e,4).color&&"warn"!==gl(e,4).color),t(e,10,0,aa(e,10,0,gl(e,11).transform(n.zoom$))),t(e,12,0,gl(e,13).disabled||null,"NoopAnimations"===gl(e,13)._animationMode),t(e,14,0,gl(e,15).inline,"primary"!==gl(e,15).color&&"accent"!==gl(e,15).color&&"warn"!==gl(e,15).color)})}function UT(t){return ru(0,[(t()(),Va(0,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.closeEditor()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(3,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"close")},function(t,e){t(e,0,0,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).inline,"primary"!==gl(e,3).color&&"accent"!==gl(e,3).color&&"warn"!==gl(e,3).color)})}function XT(t){return ru(0,[(t()(),Va(0,0,null,null,16,"div",[["class","left"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,8,"button",[["class","open-button"],["mat-button",""]],[[2,"invisible",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeOpenButtonAction()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(3,16777216,null,0,1,"span",[["aria-haspopup","true"],["class","mat-menu-trigger"]],[[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==gl(t,4)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,4)._handleKeydown(n)&&i),"click"===e&&(i=!1!==gl(t,4)._handleClick(n)&&i),i},null,null)),Tl(4,1196032,[[1,4]],0,CT,[py,Ki,ms,_T,[2,bT],[8,null],[2,dw],By],{menu:[0,"menu"]},null),(t()(),Va(5,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","photo-library"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(6,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(7,0,null,0,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(8,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Open"])),(t()(),Va(10,0,null,null,6,"button",[["class","export-button"],["mat-button",""]],[[2,"invisible",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.exportImage()&&i),i},Ak,Ik)),Tl(11,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(12,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","file-download"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(13,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(14,0,null,0,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(15,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Save"])),(t()(),Ba(16777216,null,null,1,null,WT)),Tl(18,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(19,0,null,null,21,"div",[["class","right"]],null,null,null,null,null)),(t()(),Va(20,0,null,null,4,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.undo()&&i),i},Ak,Ik)),Tl(21,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Il(131072,Ch,[ys]),(t()(),Va(23,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","undo"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(24,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(25,0,null,null,4,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.redo()&&i),i},Ak,Ik)),Tl(26,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Il(131072,Ch,[ys]),(t()(),Va(28,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","redo"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(29,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(30,0,null,null,3,"button",[["class","toggle-history-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panels.toggleHistory()&&i),i},Ak,Ik)),Tl(31,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(32,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","history"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(33,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(34,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panels.toggleObjects()&&i),i},Ak,Ik)),Tl(35,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(36,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","layers"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(37,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Ba(16777216,null,null,2,null,UT)),Tl(39,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,4,0,gl(e.parent,6)),t(e,6,0,"photo-library"),t(e,13,0,"file-download"),t(e,18,0,n.config.get("pixie.ui.allowZoom")),t(e,21,0,!aa(e,21,0,gl(e,22).transform(n.canUndo$))),t(e,24,0,"undo"),t(e,26,0,!aa(e,26,0,gl(e,27).transform(n.canRedo$))),t(e,29,0,"redo"),t(e,33,0,"history"),t(e,37,0,"layers"),t(e,39,0,"overlay"===aa(e,39,0,gl(e,40).transform(n.mode$))&&!n.config.get("pixie.ui.toolbar.hideCloseButton"))},function(t,e){var n=e.component;t(e,1,0,n.config.get("pixie.ui.toolbar.hideOpenButton"),gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,gl(e,4).menuOpen||null),t(e,5,0,gl(e,6).inline,"primary"!==gl(e,6).color&&"accent"!==gl(e,6).color&&"warn"!==gl(e,6).color),t(e,10,0,n.config.get("pixie.ui.toolbar.hideSaveButton"),gl(e,11).disabled||null,"NoopAnimations"===gl(e,11)._animationMode),t(e,12,0,gl(e,13).inline,"primary"!==gl(e,13).color&&"accent"!==gl(e,13).color&&"warn"!==gl(e,13).color),t(e,20,0,gl(e,21).disabled||null,"NoopAnimations"===gl(e,21)._animationMode),t(e,23,0,gl(e,24).inline,"primary"!==gl(e,24).color&&"accent"!==gl(e,24).color&&"warn"!==gl(e,24).color),t(e,25,0,gl(e,26).disabled||null,"NoopAnimations"===gl(e,26)._animationMode),t(e,28,0,gl(e,29).inline,"primary"!==gl(e,29).color&&"accent"!==gl(e,29).color&&"warn"!==gl(e,29).color),t(e,30,0,gl(e,31).disabled||null,"NoopAnimations"===gl(e,31)._animationMode),t(e,32,0,gl(e,33).inline,"primary"!==gl(e,33).color&&"accent"!==gl(e,33).color&&"warn"!==gl(e,33).color),t(e,34,0,gl(e,35).disabled||null,"NoopAnimations"===gl(e,35)._animationMode),t(e,36,0,gl(e,37).inline,"primary"!==gl(e,37).color&&"accent"!==gl(e,37).color&&"warn"!==gl(e,37).color)})}function YT(t){return ru(2,[Xl(671088640,1,{matMenuTrigger:0}),(t()(),Ba(16777216,null,null,2,null,HT)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),Il(131072,Ch,[ys]),(t()(),Ba(0,[["desktopToolbar",2]],null,0,null,XT)),(t()(),Va(5,0,null,null,16,"mat-menu",[],null,null,null,OT,kT)),Tl(6,1294336,[["openMenu",4]],2,bT,[Ki,Ko,yT],{overlapTrigger:[0,"overlapTrigger"]},null),Xl(603979776,2,{items:1}),Xl(335544320,3,{lazyContent:0}),Al(2048,null,mT,null,[bT]),(t()(),Va(10,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["trans",""]],[[1,"role",0],[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==gl(t,12)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==gl(t,12)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openBackgroundImage()&&i),i},IT,TT)),Tl(11,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(12,180224,[[2,4]],0,vT,[Ki,Oh,By,[2,mT]],null,null),(t()(),eu(-1,0,["Background Image"])),(t()(),Va(14,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["trans",""]],[[1,"role",0],[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==gl(t,16)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==gl(t,16)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openOverlayImage()&&i),i},IT,TT)),Tl(15,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(16,180224,[[2,4]],0,vT,[Ki,Oh,By,[2,mT]],null,null),(t()(),eu(-1,0,["Overlay Image"])),(t()(),Va(18,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["trans",""]],[[1,"role",0],[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==gl(t,20)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==gl(t,20)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openStateFile()&&i),i},IT,TT)),Tl(19,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(20,180224,[[2,4]],0,vT,[Ki,Oh,By,[2,mT]],null,null),(t()(),eu(-1,0,["Editor Project File"]))],function(t,e){var n=e.component;t(e,2,0,aa(e,2,0,gl(e,3).transform(n.compactMode)),gl(e,4)),t(e,6,0,!1)},function(t,e){t(e,10,0,gl(e,12).role,gl(e,12)._highlighted,gl(e,12)._triggersSubmenu,gl(e,12)._getTabIndex(),gl(e,12).disabled.toString(),gl(e,12).disabled||null),t(e,14,0,gl(e,16).role,gl(e,16)._highlighted,gl(e,16)._triggersSubmenu,gl(e,16)._getTabIndex(),gl(e,16).disabled.toString(),gl(e,16).disabled||null),t(e,18,0,gl(e,20).role,gl(e,20)._highlighted,gl(e,20)._triggersSubmenu,gl(e,20)._getTabIndex(),gl(e,20).disabled.toString(),gl(e,20).disabled||null)})}var GT=function(){function t(t,e,n,i,r,o,s,a,l,u){this.controls=t,this.canvas=e,this.saveTool=n,this.config=i,this.mergeTool=r,this.history=o,this.toast=s,this.store=a,this.actions$=l,this.changeDetector=u}return t.prototype.ngOnInit=function(){var t=this;this.actions$.pipe(Rg(Fc)).subscribe(function(){t.changeDetector.markForCheck()})},t.prototype.executeNavItemAction=function(t){return"merge"===t.action?this.merge():"string"==typeof t.action?this.store.dispatch(new Ic(t.action)):void("function"==typeof t.action&&t.action())},t.prototype.navItemIsDisabled=function(t){var e=!!this.canvas.getMainImage();return t.name===dc.MERGE?!this.mergeTool.canMerge():t.name===dc.TRANSFORM&&!e},t.prototype.getNavItems=function(){return this.config.get("pixie.ui.nav.items")},t.prototype.merge=function(){var t=this;this.mergeTool.apply().then(function(){t.history.add(xm.MERGE),t.toast.open("Objects merged.")})},t}(),qT=function(){function t(t,e,n,i,r){this.activeObject=t,this.canvas=e,this.saveTool=n,this.objects=i,this.activeFrame=r}return t.prototype.canMerge=function(){return this.objects.getAll().filter(function(t){return t.name!==Nc.mainImage.name}).length>0},t.prototype.apply=function(){var t=this.saveTool.getDataUrl();return this.clearCanvas(),this.canvas.loadMainImage(t)},t.prototype.clearCanvas=function(){this.activeFrame.remove(),this.canvas.fabric().clear()},t}(),KT=ca({encapsulation:2,styles:[["navigation-bar{display:block;width:100%;height:100%;padding:0 12px}navigation-bar .scroll-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%;position:relative;overflow-x:auto;overflow-y:hidden;white-space:nowrap}@media only screen and (max-width:1065px){navigation-bar .scroll-container{justify-content:flex-start}navigation-bar .scroll-container .separator{display:none}}navigation-bar button.control-button{text-align:center;margin:0 12px;flex:0 0 auto}navigation-bar button.control-button[disabled]{opacity:.4;cursor:default}navigation-bar button.control-button .mat-icon{width:38px;height:38px;margin:0 auto;color:rgba(0,0,0,.75)}navigation-bar button.control-button .name{display:block;margin-top:2px;text-transform:uppercase;font-size:13px}navigation-bar .separator{height:75px;width:1px;flex:0 0 1px;background-color:rgba(0,0,0,.07);margin:0 20px}"]],data:{}});function ZT(t){return ru(0,[(t()(),Va(0,0,null,null,0,"div",[["class","separator"]],null,null,null,null,null))],null,null)}function QT(t){return ru(0,[(t()(),Va(0,0,null,null,5,"button",[["class","no-style control-button"]],[[8,"disabled",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeNavItemAction(t.parent.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(2,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(3,0,null,null,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(4,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(5,null,["",""]))],function(t,e){t(e,2,0,e.parent.context.$implicit.icon)},function(t,e){t(e,0,0,e.component.navItemIsDisabled(e.parent.context.$implicit)),t(e,1,0,gl(e,2).inline,"primary"!==gl(e,2).color&&"accent"!==gl(e,2).color&&"warn"!==gl(e,2).color),t(e,5,0,e.parent.context.$implicit.display_name||e.parent.context.$implicit.name)})}function JT(t){return ru(0,[(t()(),Va(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,ZT)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,QT)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(0,null,null,0))],function(t,e){t(e,2,0,"separator"===e.context.$implicit.type),t(e,4,0,"separator"!==e.context.$implicit.type)},null)}function $T(t){return ru(2,[(t()(),Va(0,0,null,null,3,"div",[["class","scroll-container"],["customScrollbar",""]],null,null,null,null,null)),Tl(1,4341760,null,0,JE,[Ki,tr,sv,Ko,lw,Hc,$E],{suppressX:[0,"suppressX"]},null),(t()(),Ba(16777216,null,null,1,null,JT)),Tl(3,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,1,0,!1),t(e,3,0,n.getNavItems())},null)}var tI=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:5},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"}],eI=function(){function t(t,e){this.overlayPanel=t,this.config=e,this.compact=!1,this.selectedColor$=new zf("#000"),this.colors=this.config.get("pixie.ui.colorPresets.items")}return t.prototype.changeColor=function(t){this.selectedColor$.next(t),this.propagateChange(t)},t.prototype.openColorPicker=function(){var t=this;this.overlayPanel.open(K_,{position:tI,hasBackdrop:!0,origin:this.colorPickerButton}).valueChanged().subscribe(function(e){return t.changeColor(e)})},t.prototype.writeValue=function(t){this.selectedColor$.next(t)},t.prototype.registerOnChange=function(t){this.propagateChange=t},t.prototype.registerOnTouched=function(){},t}(),nI=ca({encapsulation:2,styles:[["color-widget{display:block;margin:0 25px}color-widget .color-picker-button{margin-right:5px;width:50px;height:50px}color-widget .color-picker-button svg{-webkit-filter:drop-shadow(3px 3px 2px rgba(0, 0, 0, .1));filter:drop-shadow(3px 3px 2px rgba(0, 0, 0, .1))}color-widget .color-picker-button .mat-icon{width:40px;height:40px}@media only screen and (max-width:599.99px){color-widget .color-picker-button{width:45px;height:45px;line-height:45px;margin-right:10px}color-widget .color-picker-button .mat-icon{width:35px;height:35px}}color-widget .colors{display:flex;align-items:center;justify-content:center;width:358px;overflow:hidden;margin:auto}color-widget button.color{width:25px;height:25px;flex-shrink:0;border:1px solid #e0e0e0;border-radius:50%;margin:0 5px;transition:box-shadow 225ms ease;position:relative;z-index:2}color-widget button.color.selected{border-color:transparent;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}"]],data:{}});function iI(t){return ru(0,[(t()(),Va(0,0,null,null,1,"button",[["class","no-style color control"]],[[4,"background",null],[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.changeColor(t.context.$implicit)&&i),i},null,null)),Il(131072,Ch,[ys])],null,function(t,e){var n=e.component;t(e,0,0,e.context.$implicit,aa(e,0,1,gl(e,1).transform(n.selectedColor$))===e.context.$implicit)})}function rI(t){return ru(2,[Xl(402653184,1,{colorPickerButton:0}),(t()(),Va(1,0,null,null,6,"div",[["class","colors"]],null,null,null,null,null)),(t()(),Va(2,0,[[1,0]],null,3,"button",[["class","color-picker-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openColorPicker()&&i),i},Ak,Ik)),Tl(3,180224,[["colorPickerButton",4]],0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-wheel-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(5,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Ba(16777216,null,null,1,null,iI)),Tl(7,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null),(t()(),Va(8,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(9,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Zl(null,0)],function(t,e){var n=e.component;t(e,5,0,"color-wheel-custom"),t(e,7,0,n.colors)},function(t,e){t(e,2,0,gl(e,3).disabled||null,"NoopAnimations"===gl(e,3)._animationMode),t(e,4,0,gl(e,5).inline,"primary"!==gl(e,5).color&&"accent"!==gl(e,5).color&&"warn"!==gl(e,5).color)})}var oI=function(){function t(t,e){this.filterTool=t,this.store=e,this.colorFormControl=new yf}return t.prototype.applyFilterValue=function(t,e){var n=this.store.selectSnapshot(Am.selectedFilter),i=this.filterTool.getByName(n);this.filterTool.applyValue(i,t,e)},t.prototype.getFilterOptions=function(t){return this.filterTool.getByName(t).options},s([tm(Am.selectedFilter),a("design:type",P)],t.prototype,"selectedFilter$",void 0),t}(),sI=[{name:"grayscale"},{name:"blackWhite"},{name:"sharpen",uses:"Convolute",matrix:[0,-1,0,-1,5,-1,0,-1,0]},{name:"invert"},{name:"vintage"},{name:"polaroid"},{name:"kodachrome"},{name:"technicolor"},{name:"brownie"},{name:"sepia"},{name:"removeColor",options:{distance:{type:"slider",current:.1,min:0,max:1,step:.01},color:{current:"#fff",type:"colorPicker"}}},{name:"brightness",options:{brightness:{type:"slider",current:.1,min:-1,max:1,step:.1}}},{name:"gamma",options:{red:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},green:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},blue:{type:"slider",current:.1,min:.2,max:2.2,step:.003921}},apply:function(t,e,n){t.gamma=[t.red,t.green,t.blue]}},{name:"noise",options:{noise:{type:"slider",current:40,max:600}}},{name:"pixelate",options:{blocksize:{type:"slider",min:1,max:40,current:6}}},{name:"blur",uses:"Convolute",matrix:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]},{name:"emboss",uses:"Convolute",matrix:[1,1,1,1,.7,-1,-1,-1,-1]},{name:"blendColor",options:{mode:{current:"add",type:"select",available:["add","multiply","subtract","diff","screen","lighten","darken"]},alpha:{type:"slider",current:.5,min:.1,max:1,step:.1},color:{type:"colorPicker",current:"#FF4081"}}}],aI=function(){function t(t,e,n){this.canvas=t,this.store=e,this.actions$=n,this.filtersList=sI,this.syncWithHistory()}return t.prototype.apply=function(t){var e=this.getByName(t);if(this.applied(e.name))return this.remove(e.name);this.store.dispatch(new Em(e.name));var n=this.create(e);this.getImages().forEach(function(t){t.filters.push(n),t.applyFilters()}),this.canvas.render()},t.prototype.remove=function(t){var e=this;this.canvas.state.loading=!0;var n=this.getByName(t);this.store.dispatch(new Om(n.name)),this.getImages().forEach(function(t){var i=e.findFilterIndex(n.name,t.filters);t.filters.splice(i,1),t.applyFilters()}),this.canvas.render(),this.canvas.state.loading=!1},t.prototype.getAll=function(){return this.filtersList},t.prototype.getByName=function(t){return this.filtersList.find(function(e){return e.name===t})},t.prototype.applied=function(t){var e=this.canvas.getMainImage();if(e)return this.findFilterIndex(t,e.filters)>-1},t.prototype.hasOptions=function(t){return!!this.getByName(t).options},t.prototype.findFilterIndex=function(t,e){var n=this;if(e.length){var i=this.getByName(t);return e.findIndex(function(e){var r=e.type.toLowerCase();return r===t.toLowerCase()||"convolute"===r&&n.matrixAreEqual(i.matrix,e.matrix)})}},t.prototype.matrixAreEqual=function(t,e){if(!t||!e||t.length!==e.length)return!1;for(var n=t.length;n--;)if(t[n]!==e[n])return!1;return!0},t.prototype.applyValue=function(t,e,n){this.canvas.state.loading=!0,this.getImages().forEach(function(i){var r=i.filters.find(function(e){return e.type.toLowerCase()===t.name.toLowerCase()});r[e]=n,t.apply&&t.apply(r,e,n),i.applyFilters()}),this.canvas.render()},t.prototype.create=function(t){var e;if(t.uses)e=new(Sc.fabric.Image.filters[cT(t.uses)])({matrix:t.matrix});else{var n={};for(var i in t.options)n[i]=t.options[i].current;e=new(Sc.fabric.Image.filters[cT(t.name)])(n)}return e},t.prototype.addCustom=function(t,e,n){Sc.fabric.Image.filters[t]=Sc.fabric.util.createClass(Sc.fabric.Image.filters.BaseFilter,e),Sc.fabric.Image.filters[t].fromObject=Sc.fabric.Image.filters.BaseFilter.fromObject,sI.push({name:t,options:n})},t.prototype.getImages=function(){return this.canvas.fabric().getObjects(Nc.image.name)},t.prototype.syncWithHistory=function(){var t=this;this.actions$.pipe(Rg(mm)).subscribe(function(){var e=t.getAll().filter(function(e){return t.applied(e.name)}).map(function(t){return t.name});t.store.dispatch(new Im(e))})},t}(),lI=ca({encapsulation:2,styles:[["filter-controls .input-container{max-width:120px}filter-controls .input-container label{display:none}"]],data:{}});function uI(t){return ru(0,[(t()(),Va(0,0,null,null,6,null,null,null,null,null,null,null)),(t()(),Va(1,0,null,null,5,"color-widget",[["class","color-widget"]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0;return"ngModelChange"===e&&(i=!1!==t.component.applyFilterValue("color",n)&&i),i},rI,nI)),Tl(2,49152,null,0,eI,[Hb,Hc],null,null),Al(1024,null,Od,function(t){return[t]},[eI]),Tl(4,540672,null,0,If,[[8,null],[8,null],[6,Od],[2,Tf]],{form:[0,"form"]},{update:"ngModelChange"}),Al(2048,null,Md,null,[If]),Tl(6,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){t(e,4,0,e.component.colorFormControl)},function(t,e){t(e,1,0,gl(e,2).compact,gl(e,6).ngClassUntouched,gl(e,6).ngClassTouched,gl(e,6).ngClassPristine,gl(e,6).ngClassDirty,gl(e,6).ngClassValid,gl(e,6).ngClassInvalid,gl(e,6).ngClassPending)})}function cI(t){return ru(0,[(t()(),Va(0,0,null,null,4,"option",[["trans",""]],null,null,null,null,null)),Tl(1,147456,null,0,Xd,[Ki,tr,[8,null]],{value:[0,"value"]},null),Tl(2,147456,null,0,qd,[Ki,tr,[8,null]],{value:[0,"value"]},null),Tl(3,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(4,null,["",""]))],function(t,e){t(e,1,0,e.context.$implicit),t(e,2,0,e.context.$implicit)},function(t,e){t(e,4,0,e.context.$implicit)})}function hI(t){return ru(0,[(t()(),Va(0,0,null,null,6,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"label",[["trans",""]],[[8,"htmlFor",0]],null,null,null,null)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(3,null,["",""])),(t()(),Va(4,0,null,null,2,"select",[],[[8,"id",0]],[[null,"change"]],function(t,e,n){var i=!0;return"change"===e&&(i=!1!==t.component.applyFilterValue(t.parent.context.$implicit.key,n.target.value)&&i),i},null,null)),(t()(),Ba(16777216,null,null,1,null,cI)),Tl(6,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,6,0,e.parent.context.$implicit.value.available)},function(t,e){t(e,1,0,e.parent.context.$implicit.key),t(e,3,0,e.parent.context.$implicit.key),t(e,4,0,e.parent.context.$implicit.key)})}function pI(t){return ru(0,[(t()(),Va(0,0,null,null,6,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(3,null,["",""])),(t()(),Va(4,0,null,null,2,"mat-slider",[["class","mat-slider"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==gl(t,6)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,6)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,6)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,6)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,6)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,6)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,6)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,6)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,6)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.applyFilterValue(t.parent.context.$implicit.key,n.value)&&i),i},sT,oT)),Al(5120,null,Od,function(t){return[t]},[iT]),Tl(6,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"],step:[2,"step"],value:[3,"value"]},{input:"input"})],function(t,e){t(e,6,0,e.parent.context.$implicit.value.max||100,e.parent.context.$implicit.value.min||0,e.parent.context.$implicit.value.step||1,e.parent.context.$implicit.value.current)},function(t,e){t(e,3,0,e.parent.context.$implicit.key),t(e,4,1,[gl(e,6).tabIndex,gl(e,6).disabled,gl(e,6).max,gl(e,6).min,gl(e,6).value,gl(e,6).vertical?"vertical":"horizontal",gl(e,6).disabled,gl(e,6).tickInterval,!gl(e,6).vertical,gl(e,6)._invertAxis,gl(e,6)._isSliding,gl(e,6).thumbLabel,gl(e,6).vertical,gl(e,6)._isMinValue,gl(e,6).disabled||gl(e,6)._isMinValue&&gl(e,6)._thumbGap&&gl(e,6)._invertAxis,"NoopAnimations"===gl(e,6)._animationMode])})}function dI(t){return ru(0,[(t()(),Va(0,0,null,null,6,null,null,null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,uI)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,hI)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,pI)),Tl(6,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(0,null,null,0))],function(t,e){t(e,2,0,"colorPicker"===e.context.$implicit.value.type),t(e,4,0,"select"===e.context.$implicit.value.type),t(e,6,0,"slider"===e.context.$implicit.value.type)},null)}function fI(t){return ru(0,[(t()(),Va(0,0,null,null,3,null,null,null,null,null,null,null)),(t()(),Ba(16777216,null,null,2,null,dI)),Tl(2,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null),Il(0,Sh,[Ls]),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,2,0,aa(e,2,0,gl(e,3).transform(n.getFilterOptions(e.context.ngIf))))},null)}function gI(t){return ru(2,[(t()(),Ba(16777216,null,null,2,null,fI)),Tl(1,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,1,0,aa(e,1,0,gl(e,2).transform(n.selectedFilter$)))},null)}var mI=function(){function t(t,e,n,i){this.settings=t,this.filterTool=e,this.store=n,this.config=i,this.filterList=[],this.filterList=this.config.get("pixie.tools.filter.items")}return t.prototype.applyFilter=function(t){this.filterTool.apply(t)},t.prototype.removeFilter=function(t){this.filterTool.remove(t)},t.prototype.getFilterImage=function(t){return this.settings.getAssetUrl("images/filters/square/"+t.replace(" ","-")+".jpg")},t.prototype.showFilterControls=function(t){this.store.dispatch(new Tm(t))},t.prototype.getFilterDisplayName=function(t){return"blackWhite"===t?"Black & White":AT(t)},s([tm(Fb.activePanel),a("design:type",P)],t.prototype,"forePanel$",void 0),s([tm(Am.activeFilters),a("design:type",P)],t.prototype,"activeFilters$",void 0),s([tm(Am.selectedFilter),a("design:type",P)],t.prototype,"selectedFilter$",void 0),s([tm(Am.dirty),a("design:type",P)],t.prototype,"dirty$",void 0),t}(),vI=ca({encapsulation:2,styles:[["filter-drawer.controls-drawer .filter-list{justify-content:flex-start}filter-drawer .button-with-image{position:relative}filter-drawer .button-with-image:first-of-type{margin-left:0}filter-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}filter-drawer .button-with-image .bottom-label{margin-top:3px;font-size:11px}"]],data:{}});function yI(t){return ru(0,[(t()(),Va(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.showFilterControls(t.parent.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},Ak,Ik)),Tl(1,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(3,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"settings")},function(t,e){t(e,0,0,gl(e,1).disabled||null,"NoopAnimations"===gl(e,1)._animationMode),t(e,2,0,gl(e,3).inline,"primary"!==gl(e,3).color&&"accent"!==gl(e,3).color&&"warn"!==gl(e,3).color)})}function bI(t){return ru(0,[(t()(),Va(0,0,null,null,6,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.removeFilter(t.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","cancel"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(4,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Ba(16777216,null,null,1,null,yI)),Tl(6,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,"cancel"),t(e,6,0,n.filterTool.hasOptions(e.parent.context.$implicit))},function(t,e){t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,gl(e,4).inline,"primary"!==gl(e,4).color&&"accent"!==gl(e,4).color&&"warn"!==gl(e,4).color)})}function _I(t){return ru(0,[(t()(),Va(0,0,null,null,7,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyFilter(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,3,"div",[["class","image-container"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,0,"img",[["alt","Filter preview"]],[[8,"src",4]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,bI)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(5,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(6,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(7,null,["",""]))],function(t,e){var n=e.parent.context.ngIf.indexOf(e.context.$implicit)>-1;t(e,4,0,n)},function(t,e){var n=e.component;t(e,2,0,n.getFilterImage(e.context.$implicit)),t(e,7,0,n.getFilterDisplayName(e.context.$implicit))})}function wI(t){return ru(0,[(t()(),Va(0,0,null,null,3,"div",[["class","content filter-list"]],[[2,"hidden",null]],null,null,null,null)),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,1,null,_I)),Tl(3,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,3,0,e.component.filterList)},function(t,e){var n=e.component;t(e,0,0,aa(e,0,0,gl(e,1).transform(n.selectedFilter$)))})}function xI(t){return ru(0,[(t()(),Va(0,0,null,null,2,"filter-controls",[["class","content"]],null,null,null,gI,lI)),Tl(1,278528,null,0,lh,[Fs,Ls,Ki,tr],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Tl(2,49152,null,0,oI,[aI,Jg],null,null)],function(t,e){t(e,1,0,"content",e.context.ngIf)},null)}function CI(t){return ru(2,[(t()(),Ba(16777216,null,null,2,null,wI)),Tl(1,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,2,null,xI)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,1,0,aa(e,1,0,gl(e,2).transform(n.activeFilters$))),t(e,4,0,aa(e,4,0,gl(e,5).transform(n.selectedFilter$)))},null)}var SI=new Et("mat-checkbox-click-action"),kI=0,EI=0,OI=function(){var t={Init:0,Checked:1,Unchecked:2,Indeterminate:3};return t[t.Init]="Init",t[t.Checked]="Checked",t[t.Unchecked]="Unchecked",t[t.Indeterminate]="Indeterminate",t}(),TI=function(){return function(){}}(),II=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this,e)||this;return l._changeDetectorRef=n,l._focusMonitor=i,l._ngZone=r,l._clickAction=s,l._animationMode=a,l.ariaLabel="",l.ariaLabelledby=null,l._uniqueId="mat-checkbox-"+ ++kI,l.id=l._uniqueId,l.labelPosition="after",l.name=null,l.change=new Lr,l.indeterminateChange=new Lr,l._onTouched=function(){},l._currentAnimationClass="",l._currentCheckState=OI.Init,l._controlValueAccessorChangeFn=function(){},l._checked=!1,l._disabled=!1,l._indeterminate=!1,l.tabIndex=parseInt(o)||0,l._focusMonitor.monitor(e,!0).subscribe(function(t){t||Promise.resolve().then(function(){return l._onTouched()})}),l}return r(e,t),Object.defineProperty(e.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(t){this._required=qm(t)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){this._calculateRippleRadius()},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef)},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){var e=qm(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=t,e&&(this._transitionCheckState(this._indeterminate?OI.Indeterminate:this.checked?OI.Checked:OI.Unchecked),this.indeterminateChange.emit(this._indeterminate))},enumerable:!0,configurable:!0}),e.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},e.prototype._onLabelTextChange=function(){this._changeDetectorRef.detectChanges()},e.prototype.writeValue=function(t){this.checked=!!t},e.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},e.prototype.registerOnTouched=function(t){this._onTouched=t},e.prototype.setDisabledState=function(t){this.disabled=t},e.prototype._getAriaChecked=function(){return this.checked?"true":this.indeterminate?"mixed":"false"},e.prototype._transitionCheckState=function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);var i=this._currentAnimationClass;this._ngZone.runOutsideAngular(function(){setTimeout(function(){n.classList.remove(i)},1e3)})}},e.prototype._emitChangeEvent=function(){var t=new TI;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)},e.prototype.toggle=function(){this.checked=!this.checked},e.prototype._onInputClick=function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?OI.Checked:OI.Unchecked),this._emitChangeEvent())},e.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement,"keyboard")},e.prototype._onInteractionEvent=function(t){t.stopPropagation()},e.prototype._getAnimationClassForCheckStateTransition=function(t,e){if("NoopAnimations"===this._animationMode)return"";var n="";switch(t){case OI.Init:if(e===OI.Checked)n="unchecked-checked";else{if(e!=OI.Indeterminate)return"";n="unchecked-indeterminate"}break;case OI.Unchecked:n=e===OI.Checked?"unchecked-checked":"unchecked-indeterminate";break;case OI.Checked:n=e===OI.Unchecked?"checked-unchecked":"checked-indeterminate";break;case OI.Indeterminate:n=e===OI.Checked?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n},e.prototype._calculateRippleRadius=function(){if(!EI){var t=this._elementRef.nativeElement.querySelector(".mat-checkbox-ripple").clientWidth||0;EI=t/2}this.ripple.radius=EI},e}(_w(yw(bw(vw(function(){return function(t){this._elementRef=t}}())),"accent"))),AI=function(){return function(){}}(),PI=ca({encapsulation:2,styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.91026}50%{animation-timing-function:cubic-bezier(0,0,.2,.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);stroke-dashoffset:0}to{stroke-dashoffset:-22.91026}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}100%,32.8%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0,0,.2,.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}@media (-ms-high-contrast:active){.mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0,0,.2,.1),opacity 90ms cubic-bezier(0,0,.2,.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.91026;stroke-dasharray:22.91026;stroke-width:2.13333px}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0);border-radius:2px}@media (-ms-high-contrast:active){.mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0s mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0s mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:.3s linear 0s mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}"],data:{}});function DI(t){return ru(2,[Xl(402653184,1,{_inputElement:0}),Xl(402653184,2,{ripple:0}),(t()(),Va(2,0,[["label",1]],null,16,"label",[["class","mat-checkbox-layout"]],[[1,"for",0]],null,null,null,null)),(t()(),Va(3,0,null,null,10,"div",[["class","mat-checkbox-inner-container"]],[[2,"mat-checkbox-inner-container-no-side-margin",null]],null,null,null,null)),(t()(),Va(4,0,[[1,0],["input",1]],null,0,"input",[["class","mat-checkbox-input cdk-visually-hidden"],["type","checkbox"]],[[8,"id",0],[8,"required",0],[8,"checked",0],[1,"value",0],[8,"disabled",0],[1,"name",0],[8,"tabIndex",0],[8,"indeterminate",0],[1,"aria-label",0],[1,"aria-labelledby",0],[1,"aria-checked",0]],[[null,"change"],[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"change"===e&&(i=!1!==r._onInteractionEvent(n)&&i),"click"===e&&(i=!1!==r._onInputClick(n)&&i),i},null,null)),(t()(),Va(5,0,null,null,3,"div",[["class","mat-checkbox-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Tl(6,212992,[[2,4]],0,Mw,[Ki,Ko,Dm,[2,jw],[2,nk]],{centered:[0,"centered"],radius:[1,"radius"],animation:[2,"animation"],disabled:[3,"disabled"],trigger:[4,"trigger"]},null),$l(7,{enterDuration:0}),(t()(),Va(8,0,null,null,0,"div",[["class","mat-ripple-element mat-checkbox-persistent-ripple"]],null,null,null,null,null)),(t()(),Va(9,0,null,null,0,"div",[["class","mat-checkbox-frame"]],null,null,null,null,null)),(t()(),Va(10,0,null,null,3,"div",[["class","mat-checkbox-background"]],null,null,null,null,null)),(t()(),Va(11,0,null,null,1,":svg:svg",[[":xml:space","preserve"],["class","mat-checkbox-checkmark"],["focusable","false"],["version","1.1"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),Va(12,0,null,null,0,":svg:path",[["class","mat-checkbox-checkmark-path"],["d","M4.1,12.7 9,17.6 20.3,6.3"],["fill","none"],["stroke","white"]],null,null,null,null,null)),(t()(),Va(13,0,null,null,0,"div",[["class","mat-checkbox-mixedmark"]],null,null,null,null,null)),(t()(),Va(14,0,[["checkboxLabel",1]],null,4,"span",[["class","mat-checkbox-label"]],null,[[null,"cdkObserveContent"]],function(t,e,n){var i=!0;return"cdkObserveContent"===e&&(i=!1!==t.component._onLabelTextChange()&&i),i},null,null)),Tl(15,1196032,null,0,cw,[uw,Ki,Ko],null,{event:"cdkObserveContent"}),(t()(),Va(16,0,null,null,1,"span",[["style","display:none"]],null,null,null,null,null)),(t()(),eu(-1,null,["\xa0"])),Zl(null,0)],function(t,e){var n=e.component,i=t(e,7,0,150);t(e,6,0,!0,20,i,n._isRippleDisabled(),gl(e,2))},function(t,e){var n=e.component;t(e,2,0,n.inputId),t(e,3,0,!gl(e,14).textContent||!gl(e,14).textContent.trim()),t(e,4,1,[n.inputId,n.required,n.checked,n.value,n.disabled,n.name,n.tabIndex,n.indeterminate,n.ariaLabel||null,n.ariaLabelledby,n._getAriaChecked()]),t(e,5,0,gl(e,6).unbounded)})}var RI=function(){function t(t,e,n,i,r,o){this.canvas=t,this.history=e,this.resizeTool=n,this.controls=i,this.toast=r,this.store=o,this.resizeForm=new bf({width:new yf,height:new yf,usePercentages:new yf(!1),maintainAspectRatio:new yf(!0)})}return t.prototype.ngOnInit=function(){this.resizeForm.patchValue({width:this.resizeForm.value.usePercentages?100:this.canvas.state.original.width,height:this.resizeForm.value.usePercentages?100:this.canvas.state.original.height}),this.bindToWidthControl(),this.bindToHeightControl(),this.bindToPercentageControl(),this.syncFormWithState()},t.prototype.applyChanges=function(){this.store.selectSnapshot(tb.dirty)&&this.store.dispatch(new Pc(dc.RESIZE))},t.prototype.syncFormWithState=function(){var t=this;this.resizeForm.valueChanges.pipe(Wm(200),qc(function(){return t.store.selectSnapshot(Fb.activePanel)===dc.RESIZE})).subscribe(function(){t.store.dispatch(new Qy(t.resizeForm.getRawValue()))})},t.prototype.bindToPercentageControl=function(){var t=this;this.resizeForm.get("usePercentages").valueChanges.subscribe(function(e){t.resizeForm.patchValue(e?{width:100,height:100}:{width:t.canvas.state.original.width,height:t.canvas.state.original.height})})},t.prototype.bindToWidthControl=function(){var t=this;this.resizeForm.get("width").valueChanges.pipe(qc(function(){return t.resizeForm.value.maintainAspectRatio})).subscribe(function(e){t.resizeForm.get("height").setValue(t.aspectToHeight(e),{emitEvent:!1})})},t.prototype.bindToHeightControl=function(){var t=this;this.resizeForm.get("height").valueChanges.pipe(qc(function(){return t.resizeForm.value.maintainAspectRatio})).subscribe(function(e){t.resizeForm.get("width").setValue(t.aspectToWidth(e),{emitEvent:!1})})},t.prototype.aspectToWidth=function(t){if(this.resizeForm.value.usePercentages)return t;var e=parseFloat((this.canvas.state.original.height/t).toPrecision(3));return Math.floor(this.canvas.state.original.width/e)},t.prototype.aspectToHeight=function(t){if(this.resizeForm.value.usePercentages)return t;var e=parseFloat((this.canvas.state.original.width/t).toPrecision(3));return Math.floor(this.canvas.state.original.height/e)},t}(),jI=ca({encapsulation:2,styles:[["resize-drawer{display:block}resize-drawer .input-container{display:inline-block;width:auto;margin:0 15px;text-align:center}resize-drawer .input-container.checkbox-container{text-align:left}resize-drawer .input-container input{width:95px;height:45px;border-radius:3px}resize-drawer .input-container label{padding:0}resize-drawer .input-container .mat-checkbox{display:block}resize-drawer .input-container .mat-checkbox:first-of-type{margin-bottom:8px}resize-drawer form{margin:0}@media only screen and (max-width:599.99px){resize-drawer .content{flex-direction:column;justify-content:center}resize-drawer .content>:first-child,resize-drawer .content>:last-child{margin:auto}resize-drawer .input-container .percentages-checkbox{display:none}resize-drawer .input-container>.aspect-ratio-checkbox{margin-bottom:0}}"]],data:{}});function MI(t){return ru(2,[(t()(),Va(0,0,null,null,48,"form",[["class","content"],["ngNativeValidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0,r=t.component;return"submit"===e&&(i=!1!==gl(t,1).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,1).onReset()&&i),"ngSubmit"===e&&(i=!1!==r.applyChanges()&&i),i},null,null)),Tl(1,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},{ngSubmit:"ngSubmit"}),Al(2048,null,bd,null,[Af]),Tl(3,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(4,0,null,null,26,"div",[["class","size-inputs-container"]],null,null,null,null,null)),(t()(),Va(5,0,null,null,12,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(6,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Tl(7,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Width"])),(t()(),Va(9,0,null,null,8,"input",[["formControlName","width"],["id","width"],["name","width"],["required",""],["type","number"]],[[8,"min",0],[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==gl(t,10)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,10).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,10)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,10)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,11).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,11).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,11).onTouched()&&i),i},null,null)),Tl(10,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(11,16384,null,0,Rd,[tr,Ki],null,null),Tl(12,16384,null,0,Mf,[],{required:[0,"required"]},null),Al(1024,null,wd,function(t){return[t]},[Mf]),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(15,671744,null,0,jf,[[3,bd],[6,wd],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(17,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(18,0,null,null,12,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(19,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Tl(20,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Height"])),(t()(),Va(22,0,null,null,8,"input",[["formControlName","height"],["id","height"],["name","height"],["required",""],["type","number"]],[[8,"min",0],[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==gl(t,23)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,23).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,23)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,23)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,24).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,24).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,24).onTouched()&&i),i},null,null)),Tl(23,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(24,16384,null,0,Rd,[tr,Ki],null,null),Tl(25,16384,null,0,Mf,[],{required:[0,"required"]},null),Al(1024,null,wd,function(t){return[t]},[Mf]),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(28,671744,null,0,jf,[[3,bd],[6,wd],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(30,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(31,0,null,null,0,"button",[["class","hidden"],["type","submit"]],null,null,null,null,null)),(t()(),Va(32,0,null,null,16,"div",[["class","input-container checkbox-container"]],null,null,null,null,null)),(t()(),Va(33,0,null,null,7,"mat-checkbox",[["class","aspect-ratio-checkbox mat-checkbox"],["formControlName","maintainAspectRatio"],["trans",""]],[[8,"id",0],[1,"tabindex",0],[2,"mat-checkbox-indeterminate",null],[2,"mat-checkbox-checked",null],[2,"mat-checkbox-disabled",null],[2,"mat-checkbox-label-before",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,DI,PI)),Tl(34,8568832,null,0,II,[Ki,ys,By,Ko,[8,null],[2,SI],[2,nk]],null,null),Al(1024,null,Od,function(t){return[t]},[II]),Tl(36,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(38,16384,null,0,pf,[[4,Md]],null,null),Tl(39,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,0,["Maintain Aspect Ratio"])),(t()(),Va(41,0,null,null,7,"mat-checkbox",[["class","percentages-checkbox mat-checkbox"],["formControlName","usePercentages"],["trans",""]],[[8,"id",0],[1,"tabindex",0],[2,"mat-checkbox-indeterminate",null],[2,"mat-checkbox-checked",null],[2,"mat-checkbox-disabled",null],[2,"mat-checkbox-label-before",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,DI,PI)),Tl(42,8568832,null,0,II,[Ki,ys,By,Ko,[8,null],[2,SI],[2,nk]],null,null),Al(1024,null,Od,function(t){return[t]},[II]),Tl(44,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(46,16384,null,0,pf,[[4,Md]],null,null),Tl(47,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,0,["Use Percentages"]))],function(t,e){t(e,1,0,e.component.resizeForm),t(e,12,0,""),t(e,15,0,"width"),t(e,25,0,""),t(e,28,0,"height"),t(e,36,0,"maintainAspectRatio"),t(e,44,0,"usePercentages")},function(t,e){t(e,0,0,gl(e,3).ngClassUntouched,gl(e,3).ngClassTouched,gl(e,3).ngClassPristine,gl(e,3).ngClassDirty,gl(e,3).ngClassValid,gl(e,3).ngClassInvalid,gl(e,3).ngClassPending),t(e,9,0,1,gl(e,12).required?"":null,gl(e,17).ngClassUntouched,gl(e,17).ngClassTouched,gl(e,17).ngClassPristine,gl(e,17).ngClassDirty,gl(e,17).ngClassValid,gl(e,17).ngClassInvalid,gl(e,17).ngClassPending),t(e,22,0,1,gl(e,25).required?"":null,gl(e,30).ngClassUntouched,gl(e,30).ngClassTouched,gl(e,30).ngClassPristine,gl(e,30).ngClassDirty,gl(e,30).ngClassValid,gl(e,30).ngClassInvalid,gl(e,30).ngClassPending),t(e,33,1,[gl(e,34).id,null,gl(e,34).indeterminate,gl(e,34).checked,gl(e,34).disabled,"before"==gl(e,34).labelPosition,"NoopAnimations"===gl(e,34)._animationMode,gl(e,38).ngClassUntouched,gl(e,38).ngClassTouched,gl(e,38).ngClassPristine,gl(e,38).ngClassDirty,gl(e,38).ngClassValid,gl(e,38).ngClassInvalid,gl(e,38).ngClassPending]),t(e,41,1,[gl(e,42).id,null,gl(e,42).indeterminate,gl(e,42).checked,gl(e,42).disabled,"before"==gl(e,42).labelPosition,"NoopAnimations"===gl(e,42)._animationMode,gl(e,46).ngClassUntouched,gl(e,46).ngClassTouched,gl(e,46).ngClassPristine,gl(e,46).ngClassDirty,gl(e,46).ngClassValid,gl(e,46).ngClassInvalid,gl(e,46).ngClassPending])})}var FI=function(){function t(t,e){this.store=t,this.transformTool=e}return t.prototype.rotateLeft=function(){this.transformTool.rotate("basic",-90),this.markAsDirty()},t.prototype.rotateRight=function(){this.transformTool.rotate("basic",90),this.markAsDirty()},t.prototype.skew=function(t){this.transformTool.rotate("skew",t.value)},t.prototype.flipHorizontal=function(){this.transformTool.flip("horizontal"),this.markAsDirty()},t.prototype.flipVertical=function(){this.transformTool.flip("vertical"),this.markAsDirty()},t.prototype.markAsDirty=function(){this.store.dispatch(new ub)},t}(),LI=function(){function t(t){this.canvas=t}return t.prototype.rotate=function(t,e,n){"basic"===t?this.rotateFixed(e):this.rotateFree(e,n)},t.prototype.flip=function(t){var e="horizontal"===t?"flipY":"flipX";this.canvas.fabric().forEachObject(function(t){t[e]=!t[e]}),this.canvas.render()},t.prototype.rotateFixed=function(t){this.canvas.zoom.set(1);var e=(this.canvas.getMainImage().angle+t)%360,n=Math.abs(this.canvas.getMainImage().width*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().height*Math.cos(e*Math.PI/180)),i=Math.abs(this.canvas.getMainImage().height*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().width*Math.cos(e*Math.PI/180));this.canvas.resize(i,n),this.canvas.getMainImage().viewportCenter(),this.canvas.fabric().forEachObject(function(e){e.rotate((e.angle+t)%360),e.setCoords()}),this.canvas.render(),this.canvas.zoom.fitToScreen()},t.prototype.rotateFree=function(t,e){var n=this;if(!(t>360||t<0)){var i=!1;this.canvas.fabric().forEachObject(function(r){e&&"left"===e?t=r.angle-90:e&&"right"===e&&(t=r.angle+90),"center"===r.originX&&"center"===r.originY||!r.centeredRotation||(n.setOriginToCenter(r),i=!0),r.angle=t=t>360?90:t<0?270:t,r.setCoords(),i&&n.setCenterToOrigin(r)}),this.canvas.render()}},t.prototype.setOriginToCenter=function(t){t._originalOriginX=t.originX,t._originalOriginY=t.originY;var e=t.getCenterPoint();t.set({originX:"center",originY:"center",left:e.x,top:e.y})},t.prototype.setCenterToOrigin=function(t){var e=t.translateToOriginPoint(t.getCenterPoint(),t._originalOriginX,t._originalOriginY);t.set({originX:t._originalOriginX,originY:t._originalOriginY,left:e.x,top:e.y})},t}(),NI=ca({encapsulation:2,styles:[["transform-drawer{display:block}transform-drawer .content{flex-wrap:wrap}transform-drawer .buttons-container{margin:0 20px}transform-drawer .button-with-image.small{width:55px;height:55px}transform-drawer .button-with-image.small img,transform-drawer .button-with-image.small mat-icon{width:30px;height:30px}@media only screen and (max-width:599.99px){transform-drawer.controls-drawer .content{justify-content:center}transform-drawer .buttons-container,transform-drawer.controls-drawer .content>:first-child,transform-drawer.controls-drawer .content>:last-child{margin:0}transform-drawer .mat-slider{display:none}}"]],data:{}});function BI(t){return ru(2,[(t()(),Va(0,0,null,null,17,"div",[["class","content"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,6,"div",[["class","buttons-container"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.rotateLeft()&&i),i},null,null)),(t()(),Va(3,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","rotate-left"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(4,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(5,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.rotateRight()&&i),i},null,null)),(t()(),Va(6,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","rotate-right"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(7,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(8,0,null,null,6,"div",[["class","buttons-container"]],null,null,null,null,null)),(t()(),Va(9,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.flipVertical()&&i),i},null,null)),(t()(),Va(10,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-vertical-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(11,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(12,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.flipHorizontal()&&i),i},null,null)),(t()(),Va(13,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-horizontal-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(14,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(15,0,null,null,2,"mat-slider",[["class","mat-slider"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null]],[[null,"input"],[null,"change"],[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==gl(t,17)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,17)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,17)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,17)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,17)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,17)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,17)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,17)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,17)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.skew(n)&&i),"change"===e&&(i=!1!==r.markAsDirty()&&i),i},sT,oT)),Al(5120,null,Od,function(t){return[t]},[iT]),Tl(17,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},{change:"change",input:"input"})],function(t,e){t(e,4,0,"rotate-left"),t(e,7,0,"rotate-right"),t(e,11,0,"flip-vertical-custom"),t(e,14,0,"flip-horizontal-custom"),t(e,17,0,360,0)},function(t,e){t(e,3,0,gl(e,4).inline,"primary"!==gl(e,4).color&&"accent"!==gl(e,4).color&&"warn"!==gl(e,4).color),t(e,6,0,gl(e,7).inline,"primary"!==gl(e,7).color&&"accent"!==gl(e,7).color&&"warn"!==gl(e,7).color),t(e,10,0,gl(e,11).inline,"primary"!==gl(e,11).color&&"accent"!==gl(e,11).color&&"warn"!==gl(e,11).color),t(e,13,0,gl(e,14).inline,"primary"!==gl(e,14).color&&"accent"!==gl(e,14).color&&"warn"!==gl(e,14).color),t(e,15,1,[gl(e,17).tabIndex,gl(e,17).disabled,gl(e,17).max,gl(e,17).min,gl(e,17).value,gl(e,17).vertical?"vertical":"horizontal",gl(e,17).disabled,gl(e,17).tickInterval,!gl(e,17).vertical,gl(e,17)._invertAxis,gl(e,17)._isSliding,gl(e,17).thumbLabel,gl(e,17).vertical,gl(e,17)._isMinValue,gl(e,17).disabled||gl(e,17)._isMinValue&&gl(e,17)._thumbGap&&gl(e,17)._invertAxis,"NoopAnimations"===gl(e,17)._animationMode])})}var VI=function(){function t(t,e){this.cropZone=t,this.config=e,this.aspectRatios=this.config.get("pixie.tools.crop.items"),this.cropZone.aspectRatio=this.config.get("pixie.tools.crop.defaultRatio")}return t.prototype.ngAfterViewInit=function(){var t=this;this.ratioPreviews.forEach(function(e){var n=t.cropZone.getAdjustedSize(e.nativeElement.dataset.ratio,40,30);e.nativeElement.style.width=n.width+"px",e.nativeElement.style.height=n.height+"px"})},t.prototype.ngOnInit=function(){var t=this;this.cropZone.draw(),this.updateZoneSize(),this.cropZone.resize$.subscribe(function(){return t.updateZoneSize()})},t.prototype.ngOnDestroy=function(){this.cropZone.remove()},t.prototype.applyAspectRatio=function(t){this.cropZone.changeAspectRatio(t),this.updateZoneSize()},t.prototype.updateZoneSize=function(){var t=this.cropZone.getSize();this.cropzoneHeight=Math.floor(t.height),this.cropzoneWidth=Math.floor(t.width)},t.prototype.resizeCropzone=function(){this.cropZone.resize(this.cropzoneWidth,this.cropzoneHeight)},t}(),zI=ca({encapsulation:2,styles:[["crop-drawer{display:block}crop-drawer .custom-ratio-container{padding-right:10px;border-right:1px solid #e0e0e0}crop-drawer .custom-ratio-container .input-container{display:inline-block;width:auto;margin:0 15px;text-align:center}crop-drawer .custom-ratio-container .input-container.checkbox-container{text-align:left}crop-drawer .custom-ratio-container .input-container>input{width:95px;height:45px;border-radius:3px}crop-drawer .custom-ratio-container .input-container>label{padding:0}crop-drawer .custom-ratio-container .input-container>.mat-checkbox{display:block}crop-drawer .custom-ratio-container .input-container>.mat-checkbox:first-of-type{margin-bottom:8px}crop-drawer .aspect-ratios{display:flex;align-items:flex-end}crop-drawer .aspect-ratios>.aspect-ratio{cursor:pointer;padding:0 20px}crop-drawer .aspect-ratios>.aspect-ratio.selected,crop-drawer .aspect-ratios>.aspect-ratio:hover .name{color:#009688}crop-drawer .aspect-ratios>.aspect-ratio>.preview{width:40px;height:30px;border:3px solid currentColor}crop-drawer .aspect-ratios>.aspect-ratio>.name{font-size:15px;text-align:center;margin-top:6px}@media only screen and (max-width:1168px){crop-drawer .custom-ratio-container{display:none}}@media only screen and (max-width:768px){crop-drawer.controls-drawer .content{justify-content:flex-start}crop-drawer .custom-ratio-container{display:none}}"]],data:{}});function HI(t){return ru(0,[(t()(),Va(0,0,null,null,23,"div",[["class","custom-ratio-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,22,"div",[["class","inputs"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(3,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Tl(4,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Width"])),(t()(),Va(6,0,null,null,6,"input",[["id","width"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,7)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,7).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,7)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,7)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,8).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,8).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,8).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.cropzoneWidth=n)&&i),"ngModelChange"===e&&(i=!1!==r.resizeCropzone()&&i),i},null,null)),Tl(7,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(8,16384,null,0,Rd,[tr,Ki],null,null),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(10,671744,null,0,Of,[[8,null],[8,null],[8,null],[6,Od]],{model:[0,"model"]},{update:"ngModelChange"}),Al(2048,null,Md,null,[Of]),Tl(12,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(13,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),Va(14,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Tl(15,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Height"])),(t()(),Va(17,0,null,null,6,"input",[["id","height"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==gl(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==gl(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==gl(t,18)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==gl(t,19).onChange(n.target.value)&&i),"input"===e&&(i=!1!==gl(t,19).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==gl(t,19).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.cropzoneHeight=n)&&i),"ngModelChange"===e&&(i=!1!==r.resizeCropzone()&&i),i},null,null)),Tl(18,16384,null,0,Ad,[tr,Ki,[2,Id]],null,null),Tl(19,16384,null,0,Rd,[tr,Ki],null,null),Al(1024,null,Od,function(t,e){return[t,e]},[Ad,Rd]),Tl(21,671744,null,0,Of,[[8,null],[8,null],[8,null],[6,Od]],{model:[0,"model"]},{update:"ngModelChange"}),Al(2048,null,Md,null,[Of]),Tl(23,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,10,0,n.cropzoneWidth),t(e,21,0,n.cropzoneHeight)},function(t,e){t(e,6,0,gl(e,12).ngClassUntouched,gl(e,12).ngClassTouched,gl(e,12).ngClassPristine,gl(e,12).ngClassDirty,gl(e,12).ngClassValid,gl(e,12).ngClassInvalid,gl(e,12).ngClassPending),t(e,17,0,gl(e,23).ngClassUntouched,gl(e,23).ngClassTouched,gl(e,23).ngClassPristine,gl(e,23).ngClassDirty,gl(e,23).ngClassValid,gl(e,23).ngClassInvalid,gl(e,23).ngClassPending)})}function WI(t){return ru(0,[(t()(),Va(0,0,null,null,4,"div",[["class","aspect-ratio"]],[[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyAspectRatio(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,[[1,0],["ratioPreview",1]],null,0,"div",[["class","preview"]],[[1,"data-ratio",0]],null,null,null,null)),(t()(),Va(2,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Tl(3,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(4,null,["",""]))],null,function(t,e){t(e,0,0,e.component.cropZone.aspectRatio===e.context.$implicit),t(e,1,0,e.context.$implicit),t(e,4,0,e.context.$implicit)})}function UI(t){return ru(2,[Xl(671088640,1,{ratioPreviews:1}),(t()(),Va(1,0,null,null,5,"div",[["class","content"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,4,"div",[["class","aspect-ratios"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,HI)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,WI)),Tl(6,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,4,0,!n.config.get("pixie.tools.crop.hideCustomControls")),t(e,6,0,n.aspectRatios)},null)}var XI=function(){return(XI=Object.assign||function(t){for(var e,n=1,i=arguments.length;nsvg path{fill:transparent;stroke:currentColor;stroke-width:25}shapes-drawer .basic-shape{margin:0 10px;cursor:pointer}shapes-drawer .basic-shape .preview{background-color:#009688;height:50px}shapes-drawer .basic-shape .rectangle{width:50px}shapes-drawer .basic-shape .circle{width:50px;border-radius:50%}shapes-drawer .basic-shape .triangle{width:50px;background-color:transparent;border-left:18px solid transparent;border-right:18px solid transparent;border-bottom:33px solid #009688}shapes-drawer .basic-shape .ellipse{width:80px;height:50px;border-radius:50%}shapes-drawer .stickers-drawer .content-wrapper>.shapes{justify-content:initial}shapes-drawer .shape:first-of-type{margin-left:0}@media only screen and (max-width:768px){shapes-drawer.controls-drawer .content{justify-content:flex-start}}"]],data:{}});function uA(t){return ru(0,[(t()(),Va(0,0,null,null,1,":svg:svg",[["viewBox","0 -100 512 700"],["xmlns","http://www.w3.org/2000/svg"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,0,":svg:path",[],[[1,"d",0],[1,"stroke-width",0]],null,null,null,null))],null,function(t,e){t(e,1,0,e.parent.context.$implicit.options.path,e.parent.context.$implicit.options.strokeWidth||10)})}function cA(t){return ru(0,[(t()(),Va(0,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(1,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,1,0,e.parent.context.$implicit.name+"-custom")},function(t,e){t(e,0,0,gl(e,1).inline,"primary"!==gl(e,1).color&&"accent"!==gl(e,1).color&&"warn"!==gl(e,1).color)})}function hA(t){return ru(0,[(t()(),Va(0,0,null,null,7,"button",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.addShape(t.context.$implicit.name)&&i),i},null,null)),(t()(),Ba(16777216,null,null,1,null,uA)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Ba(16777216,null,null,1,null,cA)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(5,0,null,null,2,"span",[["class","name bottom-label"],["trans",""]],null,null,null,null,null)),Tl(6,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(7,null,["",""]))],function(t,e){t(e,2,0,"Path"===e.context.$implicit.type),t(e,4,0,"Path"!==e.context.$implicit.type)},function(t,e){t(e,7,0,e.context.$implicit.name)})}function pA(t){return ru(2,[(t()(),Va(0,0,null,null,2,"div",[["class","content"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,hA)),Tl(2,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.shapes)},null)}var dA=function(){function t(t,e,n){this.shapesTool=t,this.config=e,this.store=n,this.categories=this.config.get("pixie.tools.stickers.items")}return t.prototype.addSticker=function(t,e){var n=this;this.shapesTool.addSticker(t,e).then(function(){n.store.dispatch(new xb)})},t.prototype.openStickersCategory=function(t){this.store.dispatch(new wb(t))},t.prototype.getStickersIterable=function(t){return t.list?t.list:Array.from(Array(t.items).keys())},s([tm(Sb.activeCategory),a("design:type",P)],t.prototype,"activeCategory$",void 0),t}(),fA=ca({encapsulation:2,styles:[["stickers-drawer .button-with-image.dark-bg{background-color:rgba(0,0,0,.12)}"]],data:{}});function gA(t){return ru(0,[(t()(),Va(0,0,null,null,2,"span",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(2,null,["",""]))],null,function(t,e){t(e,2,0,e.parent.context.$implicit)})}function mA(t){return ru(0,[(t()(),Va(0,0,[["button",1]],null,3,"button",[["class","sticker button-with-image"]],[[2,"no-label",null],[2,"dark-bg",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.addSticker(t.parent.context.ngIf,t.context.$implicit),i=!1!==gl(t,0).blur()&&i),i},null,null)),(t()(),Va(1,0,null,null,0,"img",[["alt","Sticker preview image"]],[[8,"src",4]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,gA)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,3,0,e.parent.context.ngIf.list)},function(t,e){var n=e.component;t(e,0,0,!e.parent.context.ngIf.list,e.parent.context.ngIf.darkBg),t(e,1,0,n.shapesTool.getStickerUrl(e.parent.context.ngIf,e.context.$implicit))})}function vA(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[["class","content"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,mA)),Tl(2,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.getStickersIterable(e.context.ngIf))},null)}function yA(t){return ru(0,[(t()(),Va(0,0,null,null,4,"div",[["class","category button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openStickersCategory(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,0,"img",[["alt","Sticker category preview image"]],[[8,"src",4]],null,null,null,null)),(t()(),Va(2,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(3,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(4,null,["",""]))],null,function(t,e){t(e,1,0,e.component.shapesTool.getStickerCategoryUrl(e.context.$implicit)),t(e,4,0,e.context.$implicit.name)})}function bA(t){return ru(0,[(t()(),Va(0,0,null,null,2,"div",[["class","content"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,yA)),Tl(2,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.categories)},null)}function _A(t){return ru(2,[(t()(),Ba(16777216,null,null,2,null,vA)),Tl(1,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),Il(131072,Ch,[ys]),(t()(),Ba(0,[["categoryList",2]],null,0,null,bA))],function(t,e){var n=e.component;t(e,1,0,aa(e,1,0,gl(e,2).transform(n.activeCategory$)),gl(e,3))},null)}var wA=function(){function t(t,e){this.activeObject=t,this.roundTool=e,this.radius=50}return t.prototype.ngOnInit=function(){this.roundTool.showPreview()},t.prototype.ngOnDestroy=function(){this.roundTool.hidePreview()},t}(),xA=ca({encapsulation:2,styles:[[""]],data:{}});function CA(t){return ru(2,[(t()(),Va(0,0,null,null,10,"div",[["class","content"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(3,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Radius"])),(t()(),Va(5,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","300"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"ngModelChange"],[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==gl(t,6)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,6)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,6)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,6)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,6)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,6)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,6)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,6)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,6)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.roundTool.updatePreview(n.value)&&i),"ngModelChange"===e&&(i=!1!==(r.radius=n)&&i),i},sT,oT)),Tl(6,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(8,671744,null,0,Of,[[8,null],[8,null],[8,null],[6,Od]],{model:[0,"model"]},{update:"ngModelChange"}),Al(2048,null,Md,null,[Of]),Tl(10,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,6,0,"300","1"),t(e,8,0,n.radius)},function(t,e){t(e,5,1,[gl(e,6).tabIndex,gl(e,6).disabled,gl(e,6).max,gl(e,6).min,gl(e,6).value,gl(e,6).vertical?"vertical":"horizontal",gl(e,6).disabled,gl(e,6).tickInterval,!gl(e,6).vertical,gl(e,6)._invertAxis,gl(e,6)._isSliding,gl(e,6).thumbLabel,gl(e,6).vertical,gl(e,6)._isMinValue,gl(e,6).disabled||gl(e,6)._isMinValue&&gl(e,6)._thumbGap&&gl(e,6)._invertAxis,"NoopAnimations"===gl(e,6)._animationMode,gl(e,10).ngClassUntouched,gl(e,10).ngClassTouched,gl(e,10).ngClassPristine,gl(e,10).ngClassDirty,gl(e,10).ngClassValid,gl(e,10).ngClassInvalid,gl(e,10).ngClassPending])})}var SA=function(){function t(t,e,n){this.frameTool=t,this.activeFrame=e,this.store=n,this.frameControlsForm=new bf({size:new yf,color:new yf})}return t.prototype.ngOnInit=function(){var t=this;this.frameControlsForm.get("color").valueChanges.subscribe(function(e){t.frameTool.changeColor(e)}),this.frameControlsForm.valueChanges.pipe(Wm(150)).subscribe(function(){t.markAsDirty()})},t.prototype.getFrameThumbUrl=function(t){return this.frameTool.patterns.getBaseUrl(t)+"/thumbnail.png"},t.prototype.selectFrame=function(t){this.markAsDirty(),this.frameTool.add(t.name)},t.prototype.scaleFrame=function(t){this.frameTool.resize(t)},t.prototype.frameIsActive=function(t){return this.activeFrame.is(t)},t.prototype.removeFrame=function(){this.activeFrame.remove()},t.prototype.showFrameConfig=function(t){this.frameControlsForm.patchValue({size:t.size.default},{emitEvent:!1}),this.store.dispatch(new db)},t.prototype.markAsDirty=function(){this.store.dispatch(new pb)},s([tm(gb.controlsOpen),a("design:type",P)],t.prototype,"controlsOpen$",void 0),t}(),kA=function(){return(kA=Object.assign||function(t){for(var e,n=1,i=arguments.length;n1&&i>1&&(n.setDimensions({width:e,height:i}),n.renderAll()),n.getElement()},repeat:"repeat"===e?"repeat":"no-repeat"});this.activeFrame[t.name].set("fill",i)},t.prototype.scale=function(t){var e=this,n=this.activeFrame.config.mode;this.patternCache&&(t/=this.canvas.fabric().getRetinaScaling(),this.patternCache.forEach(function(i){"top"===i.name||"bottom"===i.name?"stretch"===n?(e.scalePatternToWidth(i.img,e.canvas.state.original.width-2*t+4),e.scalePatternToHeight(i.img,t)):i.img.scaleToHeight(t):"left"!==i.name&&"right"!==i.name||"stretch"!==n?i.img.scaleToWidth(t):(e.scalePatternToWidth(i.img,t),e.scalePatternToHeight(i.img,e.canvas.state.original.height-2*t+4))}))},t.prototype.scalePatternToWidth=function(t,e){var n=t.getBoundingRect().width/t.getScaledWidth();t.set("scaleX",e/t.width/n),t.setCoords()},t.prototype.scalePatternToHeight=function(t,e){var n=t.getBoundingRect().height/t.getScaledHeight();t.set("scaleY",e/t.height/n),t.setCoords()},t.prototype.load=function(t){var e=this,n=this.activeFrame.getPartNames().map(function(n){return new Promise(function(i){var r=new Image;r.onload=function(){var t=kA({},kc);e.config.get("pixie.crossOrigin")&&(t.crossOrigin="anonymous"),i({name:n,img:new Sc.fabric.Image(r,t)})},r.src=e.getPartUrl(t,n)})});return Promise.all(n).then(function(n){e.patternCache=n,e.fillParts(t.mode)})},t.prototype.getPartUrl=function(t,e){return this.getBaseUrl(t)+"/"+e+".png"},t.prototype.getBaseUrl=function(t){return this.config.getAssetUrl("images/frames/"+t.name)},t}(),OA=function(){function t(t){this.canvas=t,this.corners=["topLeft","topRight","bottomLeft","bottomRight"],this.sides=["top","right","bottom","left"]}return t.prototype.getPartNames=function(){return this.corners.concat(this.sides)},t.prototype.exists=function(){return null!=this.config},t.prototype.remove=function(){var t=this;this.exists()&&(this.canvas.fabric().remove(this.group),this.group.off(),this.group=null,this.config=null,this.getPartNames().forEach(function(e){t[e]=null}),this.canvas.render())},t.prototype.is=function(t){return!!this.config&&this.config.name===t.name},t.prototype.changeColor=function(t){var e=this;"basic"===this.config.mode&&(this.getPartNames().forEach(function(n){e[n].set("fill",t)}),this.canvas.render())},t.prototype.isBasic=function(){return this.config&&"basic"===this.config.mode},t.prototype.getMinSize=function(){if(this.exists())return this.config.size.min||1},t.prototype.getMaxSize=function(){if(this.exists())return this.config.size.max||35},t.prototype.getDefaultSize=function(){if(this.exists())return this.config.size.default||15},t}(),TA=function(){function t(t,e,n,i){this.config=t,this.activeFrame=e,this.canvas=n,this.patterns=i}return t.prototype.build=function(t,e){var n=this;if(this.createGroup(t),this.createParts(),this.resize(e),this.activeFrame.config=t,this.canvas.fabric().add(this.activeFrame.group),"basic"===t.mode)return this.canvas.render();this.patterns.load(t).then(function(){n.patterns.scale(e),n.canvas.render()})},t.prototype.createGroup=function(t){this.activeFrame.group=new Sc.fabric.Group([],Object.assign({name:"frame.group",excludeFromExport:!0,width:this.canvas.state.original.width,height:this.canvas.state.original.height,data:{frameName:t.name}},kc))},t.prototype.createParts=function(){var t=this;this.activeFrame.getPartNames().forEach(function(e){t.activeFrame[e]=new Sc.fabric.Rect(Object.assign({},kc,{name:"frame.rect."+e})),t.activeFrame.group.add(t.activeFrame[e])})},t.prototype.resize=function(t){var e=this.canvas.state.original.width,n=this.canvas.state.original.height,i=this.activeFrame,r=t;this.positionPart("topLeft",{width:r,height:r}),this.positionPart("topRight",{left:e-i.topLeft.getScaledWidth(),width:r,height:r}),this.positionPart("top",{left:i.topLeft.getScaledWidth()-2,width:e-i.topLeft.getScaledWidth()-i.topRight.getScaledWidth()+4,height:r}),this.positionPart("bottomLeft",{top:n-i.topLeft.getScaledHeight(),width:r,height:r}),this.positionPart("left",{top:i.topLeft.getScaledHeight()-2,width:r,height:n-i.topLeft.getScaledHeight()-i.bottomLeft.getScaledHeight()+4}),this.positionPart("bottomRight",{left:e-i.bottomLeft.getScaledWidth(),top:n-i.topRight.getScaledWidth(),width:r,height:r}),this.positionPart("bottom",{left:i.bottomLeft.getScaledWidth()-2,top:n-i.top.getScaledHeight(),width:i.top.getScaledWidth()+4,height:r}),this.positionPart("right",{left:e-i.left.getScaledWidth(),top:i.topRight.getScaledHeight()-2,width:i.left.width,height:n-i.topRight.getScaledHeight()-i.bottomRight.getScaledHeight()+4})},t.prototype.positionPart=function(t,e){e.top=-this.activeFrame.group.height/2+(e.top||0),e.left=-this.activeFrame.group.width/2+(e.left||0),this.activeFrame[t].set(e)},t}(),IA=function(){function t(t,e,n,i,r){var o=this;this.config=t,this.canvas=e,this.patterns=n,this.activeFrame=i,this.frameBuilder=r,this.frames=[],this.config.onChange.subscribe(function(){o.frames=o.config.get("pixie.tools.frame.items")}),this.canvas.state.loaded.subscribe(function(){o.canvas.fabric().on("object:added",function(){o.activeFrame.group&&o.activeFrame.group.moveTo(98)})})}return t.prototype.add=function(t){var e=this.getByName(t);if(!this.activeFrame.is(e)){this.activeFrame.exists()&&this.activeFrame.remove();var n=this.calcFrameSize(e.size.default);this.frameBuilder.build(e,n)}},t.prototype.resize=function(t){var e=this.calcFrameSize(t);this.frameBuilder.resize(e),this.patterns.scale(e),this.canvas.render()},t.prototype.changeColor=function(t){this.activeFrame.changeColor(t)},t.prototype.remove=function(){this.activeFrame.remove()},t.prototype.getByName=function(t){return this.getAll().find(function(e){return e.name===t})},t.prototype.getActive=function(){return this.activeFrame.config},t.prototype.getAll=function(){return this.frames},t.prototype.calcFrameSize=function(t){return t/100*Math.min(this.canvas.state.original.width,this.canvas.state.original.height)},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Hc),Ne(zc),Ne(EA),Ne(OA),Ne(TA))},token:t,providedIn:"root"}),t}(),AA=ca({encapsulation:2,styles:[["frame-drawer .button-with-image{position:relative}frame-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}frame-drawer .button-with-image .bottom-label{margin-top:3px;font-size:11px}@media only screen and (max-width:599.99px){frame-drawer.controls-drawer .main-content{justify-content:flex-start}frame-drawer .frame-controls{padding:0 15px}}"]],data:{}});function PA(t){return ru(0,[(t()(),Va(0,0,null,null,8,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.removeFrame(),i=!1!==n.stopPropagation()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","cancel"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(4,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(5,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.showFrameConfig(t.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},Ak,Ik)),Tl(6,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(7,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(8,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,4,0,"cancel"),t(e,8,0,"settings")},function(t,e){t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,gl(e,4).inline,"primary"!==gl(e,4).color&&"accent"!==gl(e,4).color&&"warn"!==gl(e,4).color),t(e,5,0,gl(e,6).disabled||null,"NoopAnimations"===gl(e,6)._animationMode),t(e,7,0,gl(e,8).inline,"primary"!==gl(e,8).color&&"accent"!==gl(e,8).color&&"warn"!==gl(e,8).color)})}function DA(t){return ru(0,[(t()(),Va(0,0,null,null,7,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.selectFrame(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,3,"div",[["class","image-container"]],null,null,null,null,null)),(t()(),Va(2,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,PA)),Tl(4,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(5,0,null,null,2,"span",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(6,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(7,null,["",""]))],function(t,e){t(e,4,0,e.component.frameIsActive(e.context.$implicit))},function(t,e){t(e,2,0,e.component.getFrameThumbUrl(e.context.$implicit)),t(e,7,0,e.context.$implicit.display_name||e.context.$implicit.name)})}function RA(t){return ru(0,[(t()(),Va(0,0,null,null,5,"color-widget",[["class","color-widget"],["formControlName","color"]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,rI,nI)),Tl(1,49152,null,0,eI,[Hb,Hc],null,null),Al(1024,null,Od,function(t){return[t]},[eI]),Tl(3,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(5,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){t(e,3,0,"color")},function(t,e){t(e,0,0,gl(e,1).compact,gl(e,5).ngClassUntouched,gl(e,5).ngClassTouched,gl(e,5).ngClassPristine,gl(e,5).ngClassDirty,gl(e,5).ngClassValid,gl(e,5).ngClassInvalid,gl(e,5).ngClassPending)})}function jA(t){return ru(2,[(t()(),Va(0,0,null,null,3,"section",[["class","content main-content"]],[[2,"hidden",null]],null,null,null,null)),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,1,null,DA)),Tl(3,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null),(t()(),Va(4,0,null,null,16,"section",[["class","content frame-controls"]],[[2,"hidden",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==gl(t,5).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,5).onReset()&&i),i},null,null)),Tl(5,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},null),Al(2048,null,bd,null,[Af]),Tl(7,16384,null,0,df,[[4,bd]],null,null),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,1,null,RA)),Tl(10,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(11,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(12,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(13,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Size"])),(t()(),Va(15,0,null,null,5,"mat-slider",[["class","mat-slider"],["formControlName","size"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==gl(t,16)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,16)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,16)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,16)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,16)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,16)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,16)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,16)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,16)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.scaleFrame(n.value)&&i),i},sT,oT)),Tl(16,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(18,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(20,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,3,0,n.frameTool.getAll()),t(e,5,0,n.frameControlsForm),t(e,10,0,n.activeFrame.isBasic()),t(e,16,0,n.activeFrame.getMaxSize(),n.activeFrame.getMinSize()),t(e,18,0,"size")},function(t,e){var n=e.component;t(e,0,0,aa(e,0,0,gl(e,1).transform(n.controlsOpen$))),t(e,4,0,!aa(e,4,0,gl(e,8).transform(n.controlsOpen$)),gl(e,7).ngClassUntouched,gl(e,7).ngClassTouched,gl(e,7).ngClassPristine,gl(e,7).ngClassDirty,gl(e,7).ngClassValid,gl(e,7).ngClassInvalid,gl(e,7).ngClassPending),t(e,15,1,[gl(e,16).tabIndex,gl(e,16).disabled,gl(e,16).max,gl(e,16).min,gl(e,16).value,gl(e,16).vertical?"vertical":"horizontal",gl(e,16).disabled,gl(e,16).tickInterval,!gl(e,16).vertical,gl(e,16)._invertAxis,gl(e,16)._isSliding,gl(e,16).thumbLabel,gl(e,16).vertical,gl(e,16)._isMinValue,gl(e,16).disabled||gl(e,16)._isMinValue&&gl(e,16)._thumbGap&&gl(e,16)._invertAxis,"NoopAnimations"===gl(e,16)._animationMode,gl(e,20).ngClassUntouched,gl(e,20).ngClassTouched,gl(e,20).ngClassPristine,gl(e,20).ngClassDirty,gl(e,20).ngClassValid,gl(e,20).ngClassInvalid,gl(e,20).ngClassPending])})}var MA=function(){function t(t,e){this.store=t,this.canvas=e,this.colorControl=new yf}return t.prototype.ngOnInit=function(){var t=this;this.colorControl.valueChanges.subscribe(function(e){e&&(t.canvas.fabric().setBackgroundColor(e),t.canvas.render(),t.store.dispatch(new Tb))})},t}(),FA=ca({encapsulation:2,styles:[[""]],data:{}});function LA(t){return ru(2,[(t()(),Va(0,0,null,null,8,"div",[["class","content"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,7,"color-widget",[["class","color-widget"],["trans",""]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,rI,nI)),Tl(2,49152,null,0,eI,[Hb,Hc],null,null),Al(1024,null,Od,function(t){return[t]},[eI]),Tl(4,540672,null,0,If,[[8,null],[8,null],[6,Od],[2,Tf]],{form:[0,"form"]},null),Al(2048,null,Md,null,[If]),Tl(6,16384,null,0,pf,[[4,Md]],null,null),Tl(7,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,0,["Canvas Background"]))],function(t,e){t(e,4,0,e.component.colorControl)},function(t,e){t(e,1,0,gl(e,2).compact,gl(e,6).ngClassUntouched,gl(e,6).ngClassTouched,gl(e,6).ngClassPristine,gl(e,6).ngClassDirty,gl(e,6).ngClassValid,gl(e,6).ngClassInvalid,gl(e,6).ngClassPending)})}var NA=new Et("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),BA=function(){return function(){}}(),VA=0,zA=function(){return function(t,e){this.source=t,this.value=e}}(),HA=function(){function t(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=function(){},this._onTouched=function(){},this._name="mat-button-toggle-group-"+VA++,this.valueChange=new Lr,this.change=new Lr,this.appearance=e&&e.appearance?e.appearance:"standard"}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach(function(t){return t.name=e._name})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(function(t){return t.value}):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){var t=this._selectionModel.selected;return this.multiple?t:t[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multiple",{get:function(){return this._multiple},set:function(t){this._multiple=qm(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=qm(t),this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._selectionModel=new Lv(this.multiple,void 0,!1)},t.prototype.ngAfterContentInit=function(){var t;(t=this._selectionModel).select.apply(t,this._buttonToggles.filter(function(t){return t.checked}))},t.prototype.writeValue=function(t){this.value=t,this._changeDetector.markForCheck()},t.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype._emitChangeEvent=function(){var t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,n=new zA(e,this.value);this._controlValueAccessorChangeFn(n.value),this.change.emit(n)},t.prototype._syncButtonToggle=function(t,e,n){void 0===n&&(n=!1),this.multiple||!this.selected||t.checked||(this.selected.checked=!1),e?this._selectionModel.select(t):this._selectionModel.deselect(t),n&&this._emitChangeEvent(),this.valueChange.emit(this.value)},t.prototype._isSelected=function(t){return this._selectionModel.isSelected(t)},t.prototype._isPrechecked=function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(function(e){return null!=t.value&&e===t.value}):t.value===this._rawValue)},t.prototype._setSelectionByValue=function(t){var e=this;if(this._rawValue=t,this._buttonToggles)if(this.multiple&&t){if(!Array.isArray(t))throw Error("Value must be an array in multiple-selection mode.");this._clearSelection(),t.forEach(function(t){return e._selectValue(t)})}else this._clearSelection(),this._selectValue(t)},t.prototype._clearSelection=function(){this._selectionModel.clear(),this._buttonToggles.forEach(function(t){return t.checked=!1})},t.prototype._selectValue=function(t){var e=this._buttonToggles.find(function(e){return null!=e.value&&e.value===t});e&&(e.checked=!0,this._selectionModel.select(e))},t}(),WA=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;a._changeDetectorRef=n,a._elementRef=i,a._focusMonitor=r,a._isSingleSelector=!1,a._checked=!1,a.ariaLabelledby=null,a._disabled=!1,a.change=new Lr;var l=Number(o);return a.tabIndex=l||0===l?l:null,a.buttonToggleGroup=e,a.appearance=s&&s.appearance?s.appearance:"standard",a}return r(e,t),Object.defineProperty(e.prototype,"buttonId",{get:function(){return this.id+"-button"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"appearance",{get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checked",{get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=qm(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=qm(t)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._isSingleSelector=this.buttonToggleGroup&&!this.buttonToggleGroup.multiple,this._type=this._isSingleSelector?"radio":"checkbox",this.id=this.id||"mat-button-toggle-"+VA++,this._isSingleSelector&&(this.name=this.buttonToggleGroup.name),this.buttonToggleGroup&&this.buttonToggleGroup._isPrechecked(this)&&(this.checked=!0),this._focusMonitor.monitor(this._elementRef,!0)},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef)},e.prototype.focus=function(){this._buttonElement.nativeElement.focus()},e.prototype._onButtonClick=function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new zA(this,this.value))},e.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},e}(bw(function(){return function(){}}())),UA=function(){return function(){}}(),XA=ca({encapsulation:2,styles:[".mat-button-toggle-group,.mat-button-toggle-standalone{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}@media (-ms-high-contrast:active){.mat-button-toggle-group,.mat-button-toggle-standalone{outline:solid 1px}}.mat-button-toggle-group-appearance-standard,.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{border-radius:4px}@media (-ms-high-contrast:active){.mat-button-toggle-group-appearance-standard,.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}@media (-ms-high-contrast:active){.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}@media (-ms-high-contrast:active){.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}}@media (hover:none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:48px;padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}@media (-ms-high-contrast:active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}}@media (-ms-high-contrast:active){.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 48px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:0 0;color:inherit;padding:0;margin:0;font:inherit;outline:0;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}"],data:{}});function YA(t){return ru(2,[Xl(402653184,1,{_buttonElement:0}),(t()(),Va(1,0,[[1,0],["button",1]],null,2,"button",[["class","mat-button-toggle-button"],["type","button"]],[[8,"id",0],[1,"tabindex",0],[1,"aria-pressed",0],[8,"disabled",0],[1,"name",0],[1,"aria-label",0],[1,"aria-labelledby",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component._onButtonClick()&&i),i},null,null)),(t()(),Va(2,0,null,null,1,"div",[["class","mat-button-toggle-label-content"]],null,null,null,null,null)),Zl(null,0),(t()(),Va(4,0,null,null,0,"div",[["class","mat-button-toggle-focus-overlay"]],null,null,null,null,null)),(t()(),Va(5,0,null,null,1,"div",[["class","mat-button-toggle-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Tl(6,212992,null,0,Mw,[Ki,Ko,Dm,[2,jw],[2,nk]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,6,0,n.disableRipple||n.disabled,gl(e,1))},function(t,e){var n=e.component;t(e,1,0,n.buttonId,n.disabled?-1:n.tabIndex,n.checked,n.disabled||null,n.name||null,n.ariaLabel,n.ariaLabelledby),t(e,5,0,gl(e,6).unbounded)})}var GA=function(){function t(t){this.activeObject=t}return t.prototype.setTextStyle=function(t){this.activeObject.form.patchValue({underline:t.value.indexOf("underline")>-1,linethrough:t.value.indexOf("linethrough")>-1,fontStyle:t.value.indexOf("italic")>-1?"italic":"normal"})},t}(),qA=ca({encapsulation:2,styles:[["text-controls-drawer .mat-button-toggle-group{margin-right:15px}text-controls-drawer text-font-selector{line-height:48px}"]],data:{}});function KA(t){return ru(2,[(t()(),Va(0,0,null,null,46,null,null,null,null,function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==gl(t,1).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,1).onReset()&&i),i},null,null)),Tl(1,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},null),Al(2048,null,bd,null,[Af]),Tl(3,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(4,0,null,null,19,"mat-button-toggle-group",[["aria-label","Text Align"],["class","text-align-group mat-button-toggle-group"],["formControlName","textAlign"],["role","group"]],[[1,"aria-disabled",0],[2,"mat-button-toggle-vertical",null],[2,"mat-button-toggle-group-appearance-standard",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,null,null)),Al(6144,null,BA,null,[HA]),Tl(6,1130496,null,1,HA,[ys,[2,NA]],null,null),Xl(603979776,1,{_buttonToggles:1}),Al(1024,null,Od,function(t){return[t]},[HA]),Tl(9,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(11,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(12,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","left"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,13).focus()&&i),i},YA,XA)),Tl(13,245760,[[1,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"]},null),(t()(),Va(14,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-left"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(15,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(16,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","center"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,17).focus()&&i),i},YA,XA)),Tl(17,245760,[[1,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"]},null),(t()(),Va(18,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-center"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(19,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(20,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","right"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,21).focus()&&i),i},YA,XA)),Tl(21,245760,[[1,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"]},null),(t()(),Va(22,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-right"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(23,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(24,0,null,null,16,"mat-button-toggle-group",[["aria-label","Text Style"],["class","mat-button-toggle-group"],["role","group"]],[[1,"aria-disabled",0],[2,"mat-button-toggle-vertical",null],[2,"mat-button-toggle-group-appearance-standard",null]],[[null,"change"]],function(t,e,n){var i=!0;return"change"===e&&(i=!1!==t.component.setTextStyle(n)&&i),i},null,null)),Al(5120,null,Od,function(t){return[t]},[HA]),Al(6144,null,BA,null,[HA]),Tl(27,1130496,null,1,HA,[ys,[2,NA]],{multiple:[0,"multiple"]},{change:"change"}),Xl(603979776,2,{_buttonToggles:1}),(t()(),Va(29,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","underline"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,30).focus()&&i),i},YA,XA)),Tl(30,245760,[[2,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"],checked:[1,"checked"]},null),(t()(),Va(31,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-underlined"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(32,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(33,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","linethrough"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,34).focus()&&i),i},YA,XA)),Tl(34,245760,[[2,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"],checked:[1,"checked"]},null),(t()(),Va(35,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-strikethrough"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(36,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(37,0,null,null,3,"mat-button-toggle",[["class","mat-button-toggle"],["value","italic"]],[[2,"mat-button-toggle-standalone",null],[2,"mat-button-toggle-checked",null],[2,"mat-button-toggle-disabled",null],[2,"mat-button-toggle-appearance-standard",null],[1,"tabindex",0],[1,"id",0]],[[null,"focus"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,38).focus()&&i),i},YA,XA)),Tl(38,245760,[[2,4]],0,WA,[[2,HA],ys,Ki,By,[8,null],[2,NA]],{value:[0,"value"],checked:[1,"checked"]},null),(t()(),Va(39,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-italic"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(40,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(41,0,null,null,5,"text-font-selector",[["formControlName","fontFamily"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,iA,nA)),Tl(42,49152,null,0,eA,[Hb],null,null),Al(1024,null,Od,function(t){return[t]},[eA]),Tl(44,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(46,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,1,0,n.activeObject.form),t(e,6,0),t(e,9,0,"textAlign"),t(e,13,0,"left"),t(e,15,0,"format-align-left"),t(e,17,0,"center"),t(e,19,0,"format-align-center"),t(e,21,0,"right"),t(e,23,0,"format-align-right"),t(e,27,0,!0),t(e,30,0,"underline",n.activeObject.form.get("underline").value),t(e,32,0,"format-underlined"),t(e,34,0,"linethrough",n.activeObject.form.get("linethrough").value),t(e,36,0,"format-strikethrough"),t(e,38,0,"italic","italic"===n.activeObject.form.get("fontStyle").value),t(e,40,0,"format-italic"),t(e,44,0,"fontFamily")},function(t,e){t(e,4,0,gl(e,6).disabled,gl(e,6).vertical,"standard"===gl(e,6).appearance,gl(e,11).ngClassUntouched,gl(e,11).ngClassTouched,gl(e,11).ngClassPristine,gl(e,11).ngClassDirty,gl(e,11).ngClassValid,gl(e,11).ngClassInvalid,gl(e,11).ngClassPending),t(e,12,0,!gl(e,13).buttonToggleGroup,gl(e,13).checked,gl(e,13).disabled,"standard"===gl(e,13).appearance,-1,gl(e,13).id),t(e,14,0,gl(e,15).inline,"primary"!==gl(e,15).color&&"accent"!==gl(e,15).color&&"warn"!==gl(e,15).color),t(e,16,0,!gl(e,17).buttonToggleGroup,gl(e,17).checked,gl(e,17).disabled,"standard"===gl(e,17).appearance,-1,gl(e,17).id),t(e,18,0,gl(e,19).inline,"primary"!==gl(e,19).color&&"accent"!==gl(e,19).color&&"warn"!==gl(e,19).color),t(e,20,0,!gl(e,21).buttonToggleGroup,gl(e,21).checked,gl(e,21).disabled,"standard"===gl(e,21).appearance,-1,gl(e,21).id),t(e,22,0,gl(e,23).inline,"primary"!==gl(e,23).color&&"accent"!==gl(e,23).color&&"warn"!==gl(e,23).color),t(e,24,0,gl(e,27).disabled,gl(e,27).vertical,"standard"===gl(e,27).appearance),t(e,29,0,!gl(e,30).buttonToggleGroup,gl(e,30).checked,gl(e,30).disabled,"standard"===gl(e,30).appearance,-1,gl(e,30).id),t(e,31,0,gl(e,32).inline,"primary"!==gl(e,32).color&&"accent"!==gl(e,32).color&&"warn"!==gl(e,32).color),t(e,33,0,!gl(e,34).buttonToggleGroup,gl(e,34).checked,gl(e,34).disabled,"standard"===gl(e,34).appearance,-1,gl(e,34).id),t(e,35,0,gl(e,36).inline,"primary"!==gl(e,36).color&&"accent"!==gl(e,36).color&&"warn"!==gl(e,36).color),t(e,37,0,!gl(e,38).buttonToggleGroup,gl(e,38).checked,gl(e,38).disabled,"standard"===gl(e,38).appearance,-1,gl(e,38).id),t(e,39,0,gl(e,40).inline,"primary"!==gl(e,40).color&&"accent"!==gl(e,40).color&&"warn"!==gl(e,40).color),t(e,41,0,gl(e,46).ngClassUntouched,gl(e,46).ngClassTouched,gl(e,46).ngClassPristine,gl(e,46).ngClassDirty,gl(e,46).ngClassValid,gl(e,46).ngClassInvalid,gl(e,46).ngClassPending)})}var ZA=function(){return function(t){this.activeObject=t}}(),QA=ca({encapsulation:2,styles:[["color-controls-drawer{display:block}color-controls-drawer color-widget{margin:0 auto}"]],data:{}});function JA(t){return ru(2,[(t()(),Va(0,0,null,null,6,"color-widget",[["class","color-widget"]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,rI,nI)),Tl(1,49152,null,0,eI,[Hb,Hc],null,null),Al(1024,null,Od,function(t){return[t]},[eI]),Tl(3,540672,null,0,If,[[8,null],[8,null],[6,Od],[2,Tf]],{form:[0,"form"]},null),Al(2048,null,Md,null,[If]),Tl(5,16384,null,0,pf,[[4,Md]],null,null),Zl(0,0)],function(t,e){var n=e.component;t(e,3,0,n.activeObject.form.get(n.controlName))},function(t,e){t(e,0,0,gl(e,1).compact,gl(e,5).ngClassUntouched,gl(e,5).ngClassTouched,gl(e,5).ngClassPristine,gl(e,5).ngClassDirty,gl(e,5).ngClassValid,gl(e,5).ngClassInvalid,gl(e,5).ngClassPending)})}var $A=function(){function t(t,e){this.overlayPanel=t,this.activeObject=e}return t.prototype.openColorPicker=function(){var t=this;this.overlayPanel.open(K_,{position:tI,origin:this.colorPickerButton}).valueChanged().subscribe(function(e){t.activeObject.form.get("shadow.color").patchValue(e)})},t}(),tP=ca({encapsulation:2,styles:[["shadow-controls-drawer{padding:0 20px}@media only screen and (max-width:599.99px){shadow-controls-drawer{padding:0 5px}shadow-controls-drawer .slider-container{margin:0 5px}}"]],data:{}});function eP(t){return ru(0,[Xl(402653184,1,{colorPickerButton:0}),(t()(),Va(1,0,[[1,0]],null,3,"button",[["class","round-action-button color-picker-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openColorPicker()&&i),i},Ak,Ik)),Tl(2,180224,[["colorPickerButton",4]],0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Va(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-wheel-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(4,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(5,0,null,null,33,null,null,null,null,function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==gl(t,6).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,6).onReset()&&i),i},null,null)),Tl(6,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},null),Al(2048,null,bd,null,[Af]),Tl(8,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(9,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(10,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(11,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Blur"])),(t()(),Va(13,0,null,null,5,"mat-slider",[["class","mat-slider"],["formControlName","blur"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,14)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,14)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,14)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,14)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,14)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,14)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,14)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,14)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,14)._onSlideStart(n)&&i),i},sT,oT)),Tl(14,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(16,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(18,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(19,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(20,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(21,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Offset X"])),(t()(),Va(23,0,null,null,5,"mat-slider",[["class","mat-slider"],["formControlName","offsetX"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,24)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,24)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,24)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,24)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,24)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,24)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,24)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,24)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,24)._onSlideStart(n)&&i),i},sT,oT)),Tl(24,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(26,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(28,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(29,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(30,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(31,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Offset Y"])),(t()(),Va(33,0,null,null,5,"mat-slider",[["class","mat-slider"],["formControlName","offsetY"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,34)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,34)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,34)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,34)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,34)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,34)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,34)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,34)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,34)._onSlideStart(n)&&i),i},sT,oT)),Tl(34,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(36,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(38,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,4,0,"color-wheel-custom"),t(e,6,0,n.activeObject.form.get("shadow")),t(e,14,0,"20","1"),t(e,16,0,"blur"),t(e,24,0,"20","1"),t(e,26,0,"offsetX"),t(e,34,0,"20","1"),t(e,36,0,"offsetY")},function(t,e){t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,3,0,gl(e,4).inline,"primary"!==gl(e,4).color&&"accent"!==gl(e,4).color&&"warn"!==gl(e,4).color),t(e,13,1,[gl(e,14).tabIndex,gl(e,14).disabled,gl(e,14).max,gl(e,14).min,gl(e,14).value,gl(e,14).vertical?"vertical":"horizontal",gl(e,14).disabled,gl(e,14).tickInterval,!gl(e,14).vertical,gl(e,14)._invertAxis,gl(e,14)._isSliding,gl(e,14).thumbLabel,gl(e,14).vertical,gl(e,14)._isMinValue,gl(e,14).disabled||gl(e,14)._isMinValue&&gl(e,14)._thumbGap&&gl(e,14)._invertAxis,"NoopAnimations"===gl(e,14)._animationMode,gl(e,18).ngClassUntouched,gl(e,18).ngClassTouched,gl(e,18).ngClassPristine,gl(e,18).ngClassDirty,gl(e,18).ngClassValid,gl(e,18).ngClassInvalid,gl(e,18).ngClassPending]),t(e,23,1,[gl(e,24).tabIndex,gl(e,24).disabled,gl(e,24).max,gl(e,24).min,gl(e,24).value,gl(e,24).vertical?"vertical":"horizontal",gl(e,24).disabled,gl(e,24).tickInterval,!gl(e,24).vertical,gl(e,24)._invertAxis,gl(e,24)._isSliding,gl(e,24).thumbLabel,gl(e,24).vertical,gl(e,24)._isMinValue,gl(e,24).disabled||gl(e,24)._isMinValue&&gl(e,24)._thumbGap&&gl(e,24)._invertAxis,"NoopAnimations"===gl(e,24)._animationMode,gl(e,28).ngClassUntouched,gl(e,28).ngClassTouched,gl(e,28).ngClassPristine,gl(e,28).ngClassDirty,gl(e,28).ngClassValid,gl(e,28).ngClassInvalid,gl(e,28).ngClassPending]),t(e,33,1,[gl(e,34).tabIndex,gl(e,34).disabled,gl(e,34).max,gl(e,34).min,gl(e,34).value,gl(e,34).vertical?"vertical":"horizontal",gl(e,34).disabled,gl(e,34).tickInterval,!gl(e,34).vertical,gl(e,34)._invertAxis,gl(e,34)._isSliding,gl(e,34).thumbLabel,gl(e,34).vertical,gl(e,34)._isMinValue,gl(e,34).disabled||gl(e,34)._isMinValue&&gl(e,34)._thumbGap&&gl(e,34)._invertAxis,"NoopAnimations"===gl(e,34)._animationMode,gl(e,38).ngClassUntouched,gl(e,38).ngClassTouched,gl(e,38).ngClassPristine,gl(e,38).ngClassDirty,gl(e,38).ngClassValid,gl(e,38).ngClassInvalid,gl(e,38).ngClassPending])})}var nP=function(){return function(t){this.activeObject=t}}(),iP=ca({encapsulation:2,styles:[["outline-controls-drawer{display:block}outline-controls-drawer .slider-container{margin:0}outline-controls-drawer .content{flex-direction:column}"]],data:{}});function rP(t){return ru(2,[(t()(),Va(0,0,null,null,19,null,null,null,null,function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==gl(t,1).onSubmit(n)&&i),"reset"===e&&(i=!1!==gl(t,1).onReset()&&i),i},null,null)),Tl(1,540672,null,0,Af,[[8,null],[8,null]],{form:[0,"form"]},null),Al(2048,null,bd,null,[Af]),Tl(3,16384,null,0,df,[[4,bd]],null,null),(t()(),Va(4,0,null,null,5,"color-widget",[["class","color-widget"],["formControlName","stroke"]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,rI,nI)),Tl(5,49152,null,0,eI,[Hb,Hc],null,null),Al(1024,null,Od,function(t){return[t]},[eI]),Tl(7,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(9,16384,null,0,pf,[[4,Md]],null,null),(t()(),Va(10,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(11,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(12,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Outline Width"])),(t()(),Va(14,0,null,null,5,"mat-slider",[["class","mat-slider"],["formControlName","strokeWidth"],["max","20"],["min","0"],["role","slider"],["step","1"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,15)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,15)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,15)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,15)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,15)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,15)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,15)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,15)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,15)._onSlideStart(n)&&i),i},sT,oT)),Tl(15,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"],step:[2,"step"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(17,671744,null,0,jf,[[3,bd],[8,null],[8,null],[6,Od],[2,Tf]],{name:[0,"name"]},null),Al(2048,null,Md,null,[jf]),Tl(19,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){t(e,1,0,e.component.activeObject.form),t(e,7,0,"stroke"),t(e,15,0,"20","0","1"),t(e,17,0,"strokeWidth")},function(t,e){t(e,4,0,gl(e,5).compact,gl(e,9).ngClassUntouched,gl(e,9).ngClassTouched,gl(e,9).ngClassPristine,gl(e,9).ngClassDirty,gl(e,9).ngClassValid,gl(e,9).ngClassInvalid,gl(e,9).ngClassPending),t(e,14,1,[gl(e,15).tabIndex,gl(e,15).disabled,gl(e,15).max,gl(e,15).min,gl(e,15).value,gl(e,15).vertical?"vertical":"horizontal",gl(e,15).disabled,gl(e,15).tickInterval,!gl(e,15).vertical,gl(e,15)._invertAxis,gl(e,15)._isSliding,gl(e,15).thumbLabel,gl(e,15).vertical,gl(e,15)._isMinValue,gl(e,15).disabled||gl(e,15)._isMinValue&&gl(e,15)._thumbGap&&gl(e,15)._invertAxis,"NoopAnimations"===gl(e,15)._animationMode,gl(e,19).ngClassUntouched,gl(e,19).ngClassTouched,gl(e,19).ngClassPristine,gl(e,19).ngClassDirty,gl(e,19).ngClassValid,gl(e,19).ngClassInvalid,gl(e,19).ngClassPending])})}var oP=function(){function t(t,e,n,i,r){this.activeObject=t,this.settings=e,this.sanitizer=n,this.fillTool=i,this.importTool=r,this.defaultTextures=Array.from(Array(28).keys())}return t.prototype.getTextureBgStyle=function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getTextureUrl(t)+")")},t.prototype.getTextureUrl=function(t){return this.settings.getAssetUrl("images/textures/"+t+".png")},t.prototype.fillWithPattern=function(t){this.fillTool.withPattern(this.getTextureUrl(t))},t.prototype.openUploadDialog=function(){var t=this;this.importTool.importAndGetData().then(function(e){t.fillTool.withPattern(e)})},t}(),sP=[{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#ff4040",1:"#e6399b"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#200772"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:0,y2:0,colorStops:{0:"#FF4F4F",1:"rgb(255, 239, 64)"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:20,y2:20,colorStops:{0:"#ffe47b",.5:"rgb(111,154,211)",1:"rgb(166,111,213)"}},{type:"radial",r1:50,r2:80,x1:45,y1:45,x2:52,y2:50,colorStops:{0:"rgb(155, 237, 0)",1:"rgba(0, 164, 128,0.4)"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"#9ecb2d",.5:"#72aa00",1:"#bfd255"}},{type:"radial",r1:100,r2:50,x1:30,y1:0,x2:0,y2:0,colorStops:{0:"#aebcbf",1:"#0a0809"}},{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffffff",1:"#f6f6f6"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#fefcea",1:"#f1da36"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#ff1a00"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#b7deed",1:"#21b4e2"}},{type:"linear",x1:-80,y1:100,x2:80,y2:-100,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}}],aP=function(){function t(t,e){this.activeObject=t,this.canvas=e}return t.prototype.withPattern=function(t){var e=this;Sc.fabric.util.loadImage(t,function(t){var n=new Sc.fabric.Pattern({source:t,repeat:"repeat"});e.activeObject.setValues({fill:n})})},t.prototype.withGradient=function(t,e){void 0===e&&(e="fill");var n=this.activeObject.get();n&&(n.setGradient(e,sP[t]),this.activeObject.propsChanged$.next(),this.canvas.render())},t.prototype.addGradient=function(t){sP.unshift(t)},t}(),lP=ca({encapsulation:2,styles:[["texture-controls-drawer .texture{margin:0 5px}texture-controls-drawer .texture:first-of-type{margin-left:0}"]],data:{}});function uP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","texture button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.fillWithPattern(t.context.$implicit)&&i),i},null,null)),(t()(),Va(1,0,null,null,0,"div",[["class","bg-image"]],[[4,"background-image",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.getTextureBgStyle(e.context.$implicit))})}function cP(t){return ru(2,[(t()(),Va(0,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openUploadDialog()&&i),i},null,null)),(t()(),Va(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add-image-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(2,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(3,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(4,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Upload"])),(t()(),Ba(16777216,null,null,1,null,uP)),Tl(7,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,2,0,"add-image-custom"),t(e,7,0,n.defaultTextures)},function(t,e){t(e,1,0,gl(e,2).inline,"primary"!==gl(e,2).color&&"accent"!==gl(e,2).color&&"warn"!==gl(e,2).color)})}var hP=function(){function t(t,e,n,i){this.activeObject=t,this.settings=e,this.sanitizer=n,this.fillTool=i,this.defaultGradients=sP}return t.prototype.getGradientBgStyle=function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getGradientUrl(t)+")")},t.prototype.getGradientUrl=function(t){return this.settings.getAssetUrl("images/gradients/"+t+".png")},t.prototype.fillWithGradient=function(t){this.fillTool.withGradient(t)},t}(),pP=ca({encapsulation:2,styles:[["@media only screen and (max-width:768px){gradient-controls-drawer{justify-content:flex-start}}"]],data:{}});function dP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"div",[["class","gradient button-with-image no-label"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.fillWithGradient(t.context.index)&&i),i},null,null)),(t()(),Va(1,0,null,null,0,"div",[["class","bg-image"]],[[4,"background-image",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.getGradientBgStyle(e.context.index+1))})}function fP(t){return ru(2,[(t()(),Ba(16777216,null,null,1,null,dP)),Tl(1,278528,null,0,ch,[ms,Nr,Fs],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,1,0,e.component.defaultGradients)},null)}var gP=function(){return function(t){this.activeObject=t}}(),mP=ca({encapsulation:2,styles:[[""]],data:{}});function vP(t){return ru(2,[(t()(),Va(0,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Tl(2,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Opacity"])),(t()(),Va(4,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","1"],["min","0.1"],["role","slider"],["step","0.1"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focus"],[null,"blur"],[null,"mousedown"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0;return"focus"===e&&(i=!1!==gl(t,5)._onFocus()&&i),"blur"===e&&(i=!1!==gl(t,5)._onBlur()&&i),"mousedown"===e&&(i=!1!==gl(t,5)._onMousedown(n)&&i),"keydown"===e&&(i=!1!==gl(t,5)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==gl(t,5)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==gl(t,5)._onMouseenter()&&i),"slide"===e&&(i=!1!==gl(t,5)._onSlide(n)&&i),"slideend"===e&&(i=!1!==gl(t,5)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==gl(t,5)._onSlideStart(n)&&i),i},sT,oT)),Tl(5,245760,null,0,iT,[Ki,By,ys,[2,dw],[8,null],[2,nk]],{max:[0,"max"],min:[1,"min"],step:[2,"step"]},null),Al(1024,null,Od,function(t){return[t]},[iT]),Tl(7,540672,null,0,If,[[8,null],[8,null],[6,Od],[2,Tf]],{form:[0,"form"]},null),Al(2048,null,Md,null,[If]),Tl(9,16384,null,0,pf,[[4,Md]],null,null)],function(t,e){var n=e.component;t(e,5,0,"1","0.1","0.1"),t(e,7,0,n.activeObject.form.get("opacity"))},function(t,e){t(e,4,1,[gl(e,5).tabIndex,gl(e,5).disabled,gl(e,5).max,gl(e,5).min,gl(e,5).value,gl(e,5).vertical?"vertical":"horizontal",gl(e,5).disabled,gl(e,5).tickInterval,!gl(e,5).vertical,gl(e,5)._invertAxis,gl(e,5)._isSliding,gl(e,5).thumbLabel,gl(e,5).vertical,gl(e,5)._isMinValue,gl(e,5).disabled||gl(e,5)._isMinValue&&gl(e,5)._thumbGap&&gl(e,5)._invertAxis,"NoopAnimations"===gl(e,5)._animationMode,gl(e,9).ngClassUntouched,gl(e,9).ngClassTouched,gl(e,9).ngClassPristine,gl(e,9).ngClassDirty,gl(e,9).ngClassValid,gl(e,9).ngClassInvalid,gl(e,9).ngClassPending])})}var yP=function(){function t(t,e,n){this.activeObject=t,this.history=e,this.store=n}return t.prototype.ngOnInit=function(){var t=this;this.subscription=this.activeObject.propsChanged$.pipe(rg(1)).subscribe(function(){t.store.dispatch(new pm)})},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.openPanel=function(t){this.store.dispatch(new hm(t))},s([tm(km.activePanel),a("design:type",P)],t.prototype,"activePanel$",void 0),s([tm(Fb.activeObjIsText),a("design:type",P)],t.prototype,"activeObjIsText$",void 0),s([tm(Fb.activeObjIsShape),a("design:type",P)],t.prototype,"activeObjIsShape$",void 0),t}(),bP=ca({encapsulation:2,styles:[["object-settings-drawer .button-with-image mat-icon{margin-top:8px;vertical-align:middle}"]],data:{}});function _P(t){return ru(0,[(t()(),Va(0,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("textStyle")&&i),i},null,null)),(t()(),Va(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","text-options-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(2,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(3,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(4,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Text Style"]))],function(t,e){t(e,2,0,"text-options-custom")},function(t,e){t(e,1,0,gl(e,2).inline,"primary"!==gl(e,2).color&&"accent"!==gl(e,2).color&&"warn"!==gl(e,2).color)})}function wP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"text-controls-drawer",[["class","content"]],null,null,null,KA,qA)),Tl(1,49152,null,0,GA,[gm],null,null)],null,null)}function xP(t){return ru(0,[(t()(),Va(0,0,null,null,3,"color-controls-drawer",[["class","content"],["controlName","fill"],["trans",""]],null,null,null,JA,QA)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(2,49152,null,0,ZA,[gm],{controlName:[0,"controlName"]},null),(t()(),eu(-1,0,["Color"]))],function(t,e){t(e,2,0,"fill")},null)}function CP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"shadow-controls-drawer",[["class","content"]],null,null,null,eP,tP)),Tl(1,49152,null,0,$A,[Hb,gm],null,null)],null,null)}function SP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"outline-controls-drawer",[["class","content"]],null,null,null,rP,iP)),Tl(1,49152,null,0,nP,[gm],null,null)],null,null)}function kP(t){return ru(0,[(t()(),Va(0,0,null,null,3,"color-controls-drawer",[["class","content"],["controlName","backgroundColor"],["trans",""]],null,null,null,JA,QA)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(2,49152,null,0,ZA,[gm],{controlName:[0,"controlName"]},null),(t()(),eu(-1,0,["Background Color"]))],function(t,e){t(e,2,0,"backgroundColor")},null)}function EP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"texture-controls-drawer",[["class","content"]],null,null,null,cP,lP)),Tl(1,49152,null,0,oP,[gm,Hc,ld,aP,Kb],null,null)],null,null)}function OP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"gradient-controls-drawer",[["class","content"]],null,null,null,fP,pP)),Tl(1,49152,null,0,hP,[gm,Hc,ld,aP],null,null)],null,null)}function TP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"opacity-controls-drawer",[["class","content"]],null,null,null,vP,mP)),Tl(1,49152,null,0,gP,[gm],null,null)],null,null)}function IP(t){return ru(2,[(t()(),Va(0,0,null,null,46,"div",[["class","content"]],[[2,"hidden",null]],null,null,null,null)),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,2,null,_P)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Va(5,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("color")&&i),i},null,null)),(t()(),Va(6,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(7,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(8,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(9,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Color"])),(t()(),Va(11,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("shadow")&&i),i},null,null)),(t()(),Va(12,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","shadow-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(13,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(14,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(15,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Shadow"])),(t()(),Va(17,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("outline")&&i),i},null,null)),(t()(),Va(18,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","outline-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(19,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(20,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(21,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Outline"])),(t()(),Va(23,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("background")&&i),i},null,null)),(t()(),Va(24,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","background-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(25,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(26,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(27,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Background"])),(t()(),Va(29,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("texture")&&i),i},null,null)),(t()(),Va(30,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","texture-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(31,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(32,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(33,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Texture"])),(t()(),Va(35,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("gradient")&&i),i},null,null)),(t()(),Va(36,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","gradient-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(37,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(38,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(39,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Gradient"])),(t()(),Va(41,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openPanel("opacity")&&i),i},null,null)),(t()(),Va(42,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","opacity-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(43,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(44,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Tl(45,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Opacity"])),(t()(),Va(47,0,null,null,18,null,null,null,null,null,null,null)),Tl(48,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,1,null,wP)),Tl(51,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,xP)),Tl(53,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,CP)),Tl(55,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,SP)),Tl(57,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,kP)),Tl(59,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,EP)),Tl(61,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,OP)),Tl(63,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,TP)),Tl(65,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){var n=e.component;t(e,3,0,aa(e,3,0,gl(e,4).transform(n.activeObjIsText$))),t(e,7,0,"color-custom"),t(e,13,0,"shadow-custom"),t(e,19,0,"outline-custom"),t(e,25,0,"background-custom"),t(e,31,0,"texture-custom"),t(e,37,0,"gradient-custom"),t(e,43,0,"opacity-custom"),t(e,48,0,aa(e,48,0,gl(e,49).transform(n.activePanel$))),t(e,51,0,"textStyle"),t(e,53,0,"color"),t(e,55,0,"shadow"),t(e,57,0,"outline"),t(e,59,0,"background"),t(e,61,0,"texture"),t(e,63,0,"gradient"),t(e,65,0,"opacity")},function(t,e){var n=e.component;t(e,0,0,aa(e,0,0,gl(e,1).transform(n.activePanel$))),t(e,6,0,gl(e,7).inline,"primary"!==gl(e,7).color&&"accent"!==gl(e,7).color&&"warn"!==gl(e,7).color),t(e,12,0,gl(e,13).inline,"primary"!==gl(e,13).color&&"accent"!==gl(e,13).color&&"warn"!==gl(e,13).color),t(e,18,0,gl(e,19).inline,"primary"!==gl(e,19).color&&"accent"!==gl(e,19).color&&"warn"!==gl(e,19).color),t(e,24,0,gl(e,25).inline,"primary"!==gl(e,25).color&&"accent"!==gl(e,25).color&&"warn"!==gl(e,25).color),t(e,30,0,gl(e,31).inline,"primary"!==gl(e,31).color&&"accent"!==gl(e,31).color&&"warn"!==gl(e,31).color),t(e,36,0,gl(e,37).inline,"primary"!==gl(e,37).color&&"accent"!==gl(e,37).color&&"warn"!==gl(e,37).color),t(e,42,0,gl(e,43).inline,"primary"!==gl(e,43).color&&"accent"!==gl(e,43).color&&"warn"!==gl(e,43).color)})}var AP=function(){function t(t,e,n,i,r,o){this.history=t,this.activeObject=e,this.controls=n,this.breakpoints=i,this.objects=r,this.store=o}return t.prototype.deleteObject=function(){var t=this.activeObject.get();t&&(this.activeObject.delete(),this.history.add({name:"Deleted: "+t.name,icon:"delete-custom"}))},t.prototype.openObjectDrawer=function(){switch(this.activeObject.get().name){case Nc.shape.name:this.controls.openPanel(dc.SHAPES);break;case Nc.sticker.name:this.controls.openPanel(dc.STICKERS);break;case Nc.text.name:this.controls.openPanel(dc.TEXT)}},t.prototype.openObjSettingsPanel=function(){this.store.dispatch(new Ic(dc.OBJECT_SETTINGS))},t.prototype.bringActiveObjectToFront=function(){this.activeObject.bringToFront(),this.objects.syncObjects()},s([tm(wm.canUndo),a("design:type",P)],t.prototype,"canUndo$",void 0),s([tm(wm.canRedo),a("design:type",P)],t.prototype,"canRedo$",void 0),s([tm(Fb.activeObjId),a("design:type",P)],t.prototype,"activeObjId$",void 0),s([tm(Fb.dirty),a("design:type",P)],t.prototype,"dirty$",void 0),t}(),PP=ca({encapsulation:2,styles:[["floating-object-controls{display:flex;position:absolute;bottom:-60px;height:50px;left:10px;right:10px;padding:5px;max-width:210px;background-color:#fff;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);border-radius:2px}floating-object-controls .left{flex:1 1 auto;text-align:left}floating-object-controls .right{flex:0 0 100px;text-align:right}@media only screen and (max-width:768px){floating-object-controls{top:-50px;height:40px;bottom:0;background-color:transparent;box-shadow:none;padding:0;max-width:none}floating-object-controls .mat-icon-button{background-color:#fff;border-radius:3px;margin:0 3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}floating-object-controls .mat-icon-button .mat-button-ripple{border-radius:3px}}"]],data:{}});function DP(t){return ru(0,[(t()(),Va(0,0,null,null,31,null,null,null,null,null,null,null)),(t()(),Va(1,16777216,null,null,5,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,3).show()&&i),"keydown"===e&&(i=!1!==gl(t,3)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,3)._handleTouchend()&&i),"click"===e&&(i=!1!==r.activeObject.duplicate()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),Tl(3,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{message:[0,"message"]},null),Jl(4,1),(t()(),Va(5,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","copy-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(6,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(7,16777216,null,null,5,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,9).show()&&i),"keydown"===e&&(i=!1!==gl(t,9)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,9)._handleTouchend()&&i),"click"===e&&(i=!1!==r.activeObject.flipHorizontal()&&i),i},Ak,Ik)),Tl(8,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),Tl(9,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{message:[0,"message"]},null),Jl(10,1),(t()(),Va(11,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(12,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(13,16777216,null,null,5,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,15).show()&&i),"keydown"===e&&(i=!1!==gl(t,15)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,15)._handleTouchend()&&i),"click"===e&&(i=!1!==r.bringActiveObjectToFront()&&i),i},Ak,Ik)),Tl(14,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),Tl(15,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{message:[0,"message"]},null),Jl(16,1),(t()(),Va(17,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-to-front"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(18,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(19,16777216,null,null,5,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,21).show()&&i),"keydown"===e&&(i=!1!==gl(t,21)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,21)._handleTouchend()&&i),"click"===e&&(i=!1!==r.deleteObject()&&i),i},Ak,Ik)),Tl(20,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),Tl(21,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{message:[0,"message"]},null),Jl(22,1),(t()(),Va(23,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","delete-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(24,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(25,16777216,null,null,6,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==gl(t,28).show()&&i),"keydown"===e&&(i=!1!==gl(t,28)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==gl(t,28)._handleTouchend()&&i),"click"===e&&(i=!1!==r.openObjSettingsPanel()&&i),i},Ak,Ik)),Tl(26,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Il(131072,Ch,[ys]),Tl(28,147456,null,0,ow,[py,Ki,Bv,ms,Ko,Dm,Ey,By,nw,[2,dw],[2,rw],[2,nd]],{message:[0,"message"]},null),Jl(29,1),(t()(),Va(30,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings-custom"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(31,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component,i=aa(e,3,0,t(e,4,0,gl(e.parent,0),"Duplicate"));t(e,3,0,i),t(e,6,0,"copy-custom");var r=aa(e,9,0,t(e,10,0,gl(e.parent,0),"Flip"));t(e,9,0,r),t(e,12,0,"flip");var o=aa(e,15,0,t(e,16,0,gl(e.parent,0),"Bring to front"));t(e,15,0,o),t(e,18,0,"flip-to-front");var s=aa(e,21,0,t(e,22,0,gl(e.parent,0),"Delete"));t(e,21,0,s),t(e,24,0,"delete-custom"),t(e,26,0,aa(e,26,0,gl(e,27).transform(n.dirty$)));var a=aa(e,28,0,t(e,29,0,gl(e.parent,0),"Customize"));t(e,28,0,a),t(e,31,0,"settings-custom")},function(t,e){t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,5,0,gl(e,6).inline,"primary"!==gl(e,6).color&&"accent"!==gl(e,6).color&&"warn"!==gl(e,6).color),t(e,7,0,gl(e,8).disabled||null,"NoopAnimations"===gl(e,8)._animationMode),t(e,11,0,gl(e,12).inline,"primary"!==gl(e,12).color&&"accent"!==gl(e,12).color&&"warn"!==gl(e,12).color),t(e,13,0,gl(e,14).disabled||null,"NoopAnimations"===gl(e,14)._animationMode),t(e,17,0,gl(e,18).inline,"primary"!==gl(e,18).color&&"accent"!==gl(e,18).color&&"warn"!==gl(e,18).color),t(e,19,0,gl(e,20).disabled||null,"NoopAnimations"===gl(e,20)._animationMode),t(e,23,0,gl(e,24).inline,"primary"!==gl(e,24).color&&"accent"!==gl(e,24).color&&"warn"!==gl(e,24).color),t(e,25,0,gl(e,26).disabled||null,"NoopAnimations"===gl(e,26)._animationMode),t(e,30,0,gl(e,31).inline,"primary"!==gl(e,31).color&&"accent"!==gl(e,31).color&&"warn"!==gl(e,31).color)})}function RP(t){return ru(0,[(t()(),Va(0,0,null,null,10,"div",[["class","right"]],null,null,null,null,null)),(t()(),Va(1,0,null,null,4,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.undo()&&i),i},Ak,Ik)),Tl(2,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Il(131072,Ch,[ys]),(t()(),Va(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","undo"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(5,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null),(t()(),Va(6,0,null,null,4,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.redo()&&i),i},Ak,Ik)),Tl(7,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"]},null),Il(131072,Ch,[ys]),(t()(),Va(9,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","redo"]],[[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,mx,gx)),Tl(10,9158656,null,0,dx,[Ki,ox,[8,null],[2,ux]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){var n=e.component;t(e,2,0,!aa(e,2,0,gl(e,3).transform(n.canUndo$))),t(e,5,0,"undo"),t(e,7,0,!aa(e,7,0,gl(e,8).transform(n.canRedo$))),t(e,10,0,"redo")},function(t,e){t(e,1,0,gl(e,2).disabled||null,"NoopAnimations"===gl(e,2)._animationMode),t(e,4,0,gl(e,5).inline,"primary"!==gl(e,5).color&&"accent"!==gl(e,5).color&&"warn"!==gl(e,5).color),t(e,6,0,gl(e,7).disabled||null,"NoopAnimations"===gl(e,7)._animationMode),t(e,9,0,gl(e,10).inline,"primary"!==gl(e,10).color&&"accent"!==gl(e,10).color&&"warn"!==gl(e,10).color)})}function jP(t){return ru(0,[Il(0,qO,[uv]),(t()(),Va(1,0,null,null,3,"div",[["class","left"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,2,null,DP)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,2,null,RP)),Tl(6,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,3,0,aa(e,3,0,gl(e,4).transform(n.activeObjId$))),t(e,6,0,aa(e,6,0,gl(e,7).transform(n.breakpoints.isMobile$)))},null)}var MP=function(){function t(t,e,n,i,r){this.controls=t,this.settings=e,this.activeObject=n,this.store=i,this.breakpoints=r}return t.prototype.applyChanges=function(){var t=this.store.selectSnapshot(Fb.activePanel);this.store.dispatch(new Pc(t))},t.prototype.cancelChanges=function(){var t=this.store.selectSnapshot(Fb.activePanel);this.store.dispatch(new Dc(t))},s([tm(Fb.activePanel),a("design:type",P)],t.prototype,"activePanel$",void 0),s([tm(Fb.controlsPosition),a("design:type",P)],t.prototype,"controlsPosition$",void 0),s([tm(Fb.activeObjId),a("design:type",P)],t.prototype,"activeObjId$",void 0),s([tm(Fb.dirty),a("design:type",P)],t.prototype,"dirty$",void 0),t}(),FP=ca({encapsulation:2,styles:[["editor-controls{display:block;z-index:2;width:100%;background-color:#fff;height:115px;position:relative;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}editor-controls .drawer,editor-controls navigation-bar{position:absolute;top:0;left:0}editor-controls .bottom-label{display:block;margin-top:5px;text-align:center;font-size:13px;text-transform:capitalize}editor-controls .button-with-image{text-align:center;cursor:pointer;margin:0 5px;padding:5px;width:90px;height:90px;flex-shrink:0;border:1px solid #e0e0e0;border-radius:4px;background-color:#fafafa;transition:box-shadow .3s ease}editor-controls .button-with-image.no-label>img,editor-controls .button-with-image.no-label>mat-icon{width:80px;height:80px}editor-controls .button-with-image:hover{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}editor-controls .button-with-image>.bottom-label{font-size:12px}editor-controls .button-with-image img,editor-controls .button-with-image>svg{display:block;width:60px;height:60px;margin:0 auto}editor-controls .button-with-image mat-icon{width:40px;height:40px;margin:auto}editor-controls .button-with-image .bg-image{width:100%;height:100%}editor-controls .button-with-image .image-container{width:100%;position:relative;border-radius:3px;overflow:hidden}editor-controls .button-with-image .overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:rgba(255,255,255,.8);color:#009688;padding-top:5px}editor-controls .button-with-image .overlay mat-icon{width:34px;height:34px;line-height:34px}editor-controls .round-action-button{display:flex;justify-content:center;align-items:center;border:1px solid #e0e0e0;width:60px;height:60px;line-height:60px;border-radius:50%;cursor:pointer}editor-controls .round-action-button mat-icon{width:45px;height:45px}@media only screen and (max-width:768px){editor-controls .round-action-button{width:40px;height:40px;line-height:40px}editor-controls .round-action-button mat-icon{width:25px;height:25px}}editor-controls .slider-container{display:inline-flex;align-items:center;width:100%;max-width:400px;margin:0 30px}editor-controls .slider-container>.slider-label{text-transform:capitalize;white-space:nowrap;font-size:13px;margin-right:10px;padding-left:8px}editor-controls .slider-container>.mat-slider{flex:1 1 auto}editor-controls.position-bottom floating-object-controls{bottom:120px}"]],data:{animation:[{type:7,name:"controlsAnimation",definitions:[{type:1,expr:":enter",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"225ms cubic-bezier(.4,0,.2,1)"}],options:null},{type:1,expr:":leave",animation:[{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"0ms cubic-bezier(.4,0,.2,1)"}],options:null}],options:{}}]}});function LP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"navigation-bar",[],[[24,"@controlsAnimation",0]],null,null,$T,KT)),Tl(1,114688,null,0,GT,[Ub,zc,hT,Hc,qT,Cm,Zy,Jg,Lg,ys],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function NP(t){return ru(0,[(t()(),Va(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Cancel"]))],null,null)}function BP(t){return ru(0,[(t()(),Va(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Tl(1,4341760,null,0,Jw,[Ki,uv,Hc],null,null),(t()(),eu(-1,null,["Close"]))],null,null)}function VP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"filter-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,CI,vI)),Tl(1,49152,null,0,mI,[Hc,aI,Jg,Hc],null,null)],null,function(t,e){t(e,0,0,void 0)})}function zP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"resize-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,MI,jI)),Tl(1,114688,null,0,RI,[zc,Cm,av,Ub,Zy,Jg],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function HP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"transform-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,BI,NI)),Tl(1,49152,null,0,FI,[Jg,LI],null,null)],null,function(t,e){t(e,0,0,void 0)})}function WP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"crop-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,UI,zI)),Tl(1,4440064,null,0,VI,[ib,Hc],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function UP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"draw-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,tA,QI)),Tl(1,245760,null,0,YI,[ZI,Hc,zc,Hc,Jg],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function XP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"text-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,sA,oA)),Tl(1,49152,null,0,rA,[Jg,gm],null,null)],null,function(t,e){t(e,0,0,void 0)})}function YP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"shapes-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,pA,lA)),Tl(1,49152,null,0,aA,[Hc,Jg],null,null)],null,function(t,e){t(e,0,0,void 0)})}function GP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"stickers-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,_A,fA)),Tl(1,49152,null,0,dA,[sb,Hc,Jg],null,null)],null,function(t,e){t(e,0,0,void 0)})}function qP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"round-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,CA,xA)),Tl(1,245760,null,0,wA,[gm,kb],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function KP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"frame-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,jA,AA)),Tl(1,114688,null,0,SA,[IA,OA,Jg],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function ZP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"canvas-background-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,LA,FA)),Tl(1,114688,null,0,MA,[Jg,zc],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function QP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"object-settings-drawer",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,IP,bP)),Tl(1,245760,null,0,yP,[gm,Cm,Jg],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,void 0)})}function JP(t){return ru(0,[(t()(),Va(0,0,null,null,1,"floating-object-controls",[],null,null,null,jP,PP)),Tl(1,49152,null,0,AP,[Cm,gm,Ub,sv,VO,Jg],null,null)],null,null)}function $P(t){return ru(0,[(t()(),Va(0,0,null,null,46,null,null,null,null,null,null,null)),(t()(),Ba(16777216,null,null,1,null,LP)),Tl(2,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),(t()(),Va(3,0,null,null,39,"div",[["class","tool-panel-container"]],[[2,"hidden",null]],null,null,null,null)),Tl(4,16384,null,0,mh,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Va(5,0,null,null,6,"button",[["class","cancel-button"],["mat-raised-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.cancelChanges()&&i),i},Ak,Ik)),Tl(6,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(7,180224,null,0,Px,[Ki,Dm,By,[2,nk]],null,null),(t()(),Ba(16777216,null,0,2,null,NP)),Tl(9,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),Il(131072,Ch,[ys]),(t()(),Ba(0,[["close",2]],0,0,null,BP)),(t()(),Va(12,0,null,null,25,"div",[["class","drawer-wrapper"],["customScrollbar",""]],null,null,null,null,null)),Tl(13,4341760,null,0,JE,[Ki,tr,sv,Ko,lw,Hc,$E],{suppressX:[0,"suppressX"]},null),(t()(),Ba(16777216,null,null,1,null,VP)),Tl(15,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,zP)),Tl(17,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,HP)),Tl(19,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,WP)),Tl(21,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,UP)),Tl(23,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,XP)),Tl(25,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,YP)),Tl(27,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,GP)),Tl(29,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,qP)),Tl(31,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,KP)),Tl(33,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,ZP)),Tl(35,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ba(16777216,null,null,1,null,QP)),Tl(37,278528,null,0,vh,[ms,Nr,mh],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Va(38,0,null,null,4,"button",[["class","apply-button"],["color","accent"],["mat-raised-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyChanges()&&i),i},Ak,Ik)),Tl(39,4341760,null,0,Jw,[Ki,uv,Hc],null,null),Tl(40,180224,null,0,Px,[Ki,Dm,By,[2,nk]],{disabled:[0,"disabled"],color:[1,"color"]},null),Il(131072,Ch,[ys]),(t()(),eu(-1,0,["Apply"])),(t()(),Ba(16777216,null,null,3,null,JP)),Tl(44,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),Il(131072,Ch,[ys]),(t()(),Ba(0,null,null,0))],function(t,e){var n=e.component;t(e,2,0,"navigation"===e.context.ngIf),t(e,4,0,e.context.ngIf),t(e,9,0,aa(e,9,0,gl(e,10).transform(n.dirty$)),gl(e,11)),t(e,13,0,!1),t(e,15,0,"filter"),t(e,17,0,"resize"),t(e,19,0,"transform"),t(e,21,0,"crop"),t(e,23,0,"draw"),t(e,25,0,"text"),t(e,27,0,"shapes"),t(e,29,0,"stickers"),t(e,31,0,"corners"),t(e,33,0,"frame"),t(e,35,0,"background"),t(e,37,0,"objectSettings"),t(e,40,0,!aa(e,40,0,gl(e,41).transform(n.dirty$)),"accent"),t(e,44,0,aa(e,44,0,gl(e,45).transform(n.activeObjId$))||aa(e,44,0,gl(e,46).transform(n.breakpoints.isMobile$)))},function(t,e){t(e,3,0,"navigation"===e.context.ngIf),t(e,5,0,gl(e,7).disabled||null,"NoopAnimations"===gl(e,7)._animationMode),t(e,38,0,gl(e,40).disabled||null,"NoopAnimations"===gl(e,40)._animationMode)})}function tD(t){return ru(2,[(t()(),Ba(16777216,null,null,2,null,$P)),Tl(1,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,1,0,aa(e,1,0,gl(e,2).transform(n.activePanel$)))},null)}var eD=function(){function t(t,e,n){this.domSanitizer=t,this.el=e,this.config=n}return t.prototype.ngAfterViewInit=function(){this.el.nativeElement.style.backgroundImage=this.getStyle()},t.prototype.getStyle=function(){return"url("+this.config.getAssetUrl(this.url)+")"},t}(),nD=function(){function t(t,e,n,i,r,o,s,a,l,u,c,h){this.canvas=t,this.history=e,this.controls=n,this.breakpoints=i,this.floatingPanels=r,this.canvasKeybinds=o,this.el=s,this.activeObject=a,this.state=l,this.config=u,this.store=c,this.i18n=h}return t.prototype.ngOnInit=function(){var t=this;this.state.wrapperEl=this.canvasWrapper.nativeElement,this.state.maskWrapperEl=this.canvasMaskWrapper.nativeElement,this.setLocalization(),this.config.onChange.subscribe(function(){t.setLocalization()}),this.canvas.init().subscribe(function(){t.activeObject.init(),t.canvasKeybinds.init(),t.fitCanvasToScreenOnResize(),t.openObjectSettingsOnDoubleClick(),t.closePanelsOnObjectDelete(),t.handleObjectSelection(),t.updateHistoryOnObjectModification(),t.canvasMaskWrapper.nativeElement.classList.remove("not-loaded")})},t.prototype.closePanelsOnObjectDelete=function(){var t=this;this.canvas.fabric().on("object:delete",function(){return t.controls.closeCurrentPanel()})},t.prototype.openObjectSettingsOnDoubleClick=function(){var t=this;this.canvas.fabric().on("mouse:dblclick",function(){t.activeObject.getId()&&!t.store.selectSnapshot(Fb.dirty)&&t.store.dispatch(new Ic(dc.OBJECT_SETTINGS))})},t.prototype.updateHistoryOnObjectModification=function(){var t=this;this.canvas.fabric().on("object:modified",function(e){e.e&&!t.store.selectSnapshot(Fb.dirty)&&t.history.replaceCurrent()})},t.prototype.handleObjectSelection=function(){var t=this;this.canvas.fabric().on("selection:created",function(e){return t.onObjectSelection(e)}),this.canvas.fabric().on("selection:updated",function(e){return t.onObjectSelection(e)}),this.canvas.fabric().on("selection:cleared",function(e){t.store.dispatch(new jc(null!=e.e))})},t.prototype.onObjectSelection=function(t){this.store.dispatch(new Rc(t.target.name,null!=t.e))},t.prototype.fitCanvasToScreenOnResize=function(){var t=this;Tv(window,"resize").pipe(Wm(200),vg()).subscribe(function(){t.canvas.zoom.fitToScreen()})},t.prototype.setLocalization=function(){var t=this.config.get("pixie.languages.active","default");if("default"!==t){this.config.set("i18n.enable",!0);var e=this.config.get("pixie.languages.custom."+t);this.i18n.setLocalization({model:new lv({name:t}),lines:e})}},s([tm(Fb.controlsPosition),a("design:type",P)],t.prototype,"controlsPosition$",void 0),s([tm(Fb.toolbarHidden),a("design:type",P)],t.prototype,"toolbarHidden$",void 0),s([tm(Fb.contentLoaded),a("design:type",P)],t.prototype,"contentLoaded$",void 0),t}(),iD=function(){function t(t,e,n){this.state=t,this.keybinds=e,this.activeObject=n}return t.prototype.init=function(){var t=this;this.state.loaded.subscribe(function(){t.keybinds.listenOn(document),t.keybinds.add("arrow_up",function(e){t.maybePreventDefault(e),t.activeObject.move("top",-1)}),t.keybinds.add("arrow_right",function(e){t.maybePreventDefault(e),t.activeObject.move("left",1)}),t.keybinds.add("arrow_down",function(e){t.maybePreventDefault(e),t.activeObject.move("top",1)}),t.keybinds.add("arrow_left",function(e){t.maybePreventDefault(e),t.activeObject.move("left",-1)}),t.keybinds.add("delete",function(e){t.maybePreventDefault(e),t.activeObject.isEditing()||t.activeObject.delete()})})},t.prototype.maybePreventDefault=function(t){t.preventDefault&&"pixie-editor"===document.activeElement.tagName.toLowerCase()&&t.preventDefault()},t}(),rD=ca({encapsulation:2,styles:[["image-editor{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;margin:0 auto;position:relative}image-editor .canvas-wrapper{height:calc(100% - 165px);width:100%;display:flex;align-items:center}image-editor .canvas-wrapper .canvas-mask-wrapper{margin:auto}image-editor .canvas-wrapper .canvas-mask-wrapper.empty,image-editor .canvas-wrapper .canvas-mask-wrapper.not-loaded{visibility:hidden}image-editor .canvas-wrapper .canvas-container{margin:auto;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}"]],data:{}});function oD(t){return ru(0,[(t()(),Va(0,0,null,null,1,"toolbar",[],null,null,null,YT,jT)),Tl(1,4243456,null,0,PT,[Cm,Hc,DT,RT,sv,Kb,hT,zc,RT,Jg],null,null)],null,null)}function sD(t){return ru(0,[(t()(),Va(0,0,null,null,1,"editor-controls",[["class","position-top"]],null,null,null,tD,FP)),Tl(1,49152,null,0,MP,[Ub,Hc,gm,Jg,sv],null,null)],null,null)}function aD(t){return ru(0,[(t()(),Va(0,0,null,null,1,"editor-controls",[["class","position-bottom"]],null,null,null,tD,FP)),Tl(1,49152,null,0,MP,[Ub,Hc,gm,Jg,sv],null,null)],null,null)}function lD(t){return ru(2,[Xl(402653184,1,{canvasWrapper:0}),Xl(402653184,2,{canvasMaskWrapper:0}),(t()(),Ba(16777216,null,null,2,null,oD)),Tl(3,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Ba(16777216,null,null,2,null,sD)),Tl(6,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys]),(t()(),Va(8,0,[[1,0],["canvasWrapper",1]],null,5,"div",[["backgroundImage","images/viewport-bg.png"],["class","canvas-wrapper"]],null,null,null,null,null)),Tl(9,4210688,null,0,eD,[ld,Ki,Hc],{url:[0,"url"]},null),(t()(),Va(10,0,[[2,0],["canvasMaskWrapper",1]],null,3,"div",[["backgroundImage","images/canvas-bg.png"],["class","canvas-mask-wrapper not-loaded"]],[[2,"empty",null]],null,null,null,null)),Tl(11,4210688,null,0,eD,[ld,Ki,Hc],{url:[0,"url"]},null),Il(131072,Ch,[ys]),(t()(),Va(13,0,null,null,0,"canvas",[["id","pixie-canvas"]],null,null,null,null,null)),(t()(),Ba(16777216,null,null,2,null,aD)),Tl(15,16384,null,0,ph,[ms,Nr],{ngIf:[0,"ngIf"]},null),Il(131072,Ch,[ys])],function(t,e){var n=e.component;t(e,3,0,!aa(e,3,0,gl(e,4).transform(n.toolbarHidden$))),t(e,6,0,"top"===aa(e,6,0,gl(e,7).transform(n.controlsPosition$))),t(e,9,0,"images/viewport-bg.png"),t(e,11,0,"images/canvas-bg.png"),t(e,15,0,"bottom"===aa(e,15,0,gl(e,16).transform(n.controlsPosition$)))},function(t,e){var n=e.component;t(e,10,0,!aa(e,10,0,gl(e,12).transform(n.contentLoaded$)))})}var uD=ca({encapsulation:2,styles:[["pixie-editor{display:block;width:100%;height:100%}pixie-editor .overlay{display:none}"]],data:{animation:[{type:7,name:"editorVisible",definitions:[{type:0,name:"true",styles:{type:6,styles:{opacity:"*",display:"block"},offset:null},options:void 0},{type:0,name:"false",styles:{type:6,styles:{opacity:"0",display:"none"},offset:null},options:void 0},{type:1,expr:"true <=> false",animation:{type:4,styles:null,timings:"325ms cubic-bezier(.4,0,.2,1)"},options:null}],options:{}}]}});function cD(t){return ru(2,[Xl(402653184,1,{overlay:0}),(t()(),Va(1,0,null,null,1,"image-editor",[],null,null,null,lD,rD)),Tl(2,114688,null,0,nD,[zc,Cm,Ub,sv,RT,iD,Ki,gm,Lb,Hc,Jg,uv],null,null),(t()(),Va(3,0,[[1,0],["overlay",1]],null,0,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),Va(4,0,null,null,1,"div",[["class","loader"]],null,null,null,null,null)),Zl(null,0)],function(t,e){t(e,2,0)},null)}function hD(t){return ru(0,[(t()(),Va(0,0,null,null,1,"pixie-editor",[],[[40,"@editorVisible",0],[2,"theme-dark",null],[2,"theme-light",null],[2,"mode-overlay",null],[2,"mode-inline",null],[4,"width",null],[4,"height",null],[2,"ui-compact",null]],null,null,cD,uD)),Tl(1,114688,null,0,t_,[Ki,Jg,Hc],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,gl(e,1).animate,gl(e,1).darkTheme,gl(e,1).lightTheme,gl(e,1).overlayMode,gl(e,1).inlineMode,gl(e,1).width,gl(e,1).height,gl(e,1).compact)})}var pD=rl("pixie-editor",t_,hD,{},{},["*"]),dD=function(){function t(t){this.state=t,this.lastPosX=0,this.lastPosY=0,this.isDragging=!1}return t.prototype.set=function(t){if(t||(t=this.lastE),t){var e=this.state.calcWrapperSize(),n=this.state.fabric.getWidth(),i=this.state.fabric.getHeight(),r=this.getClientCoords(t),o=this.state.fabric.viewportTransform[4]+r.clientX-this.lastPosX,s=this.state.fabric.viewportTransform[5]+r.clientY-this.lastPosY;o>0||e.width>n?o=0:o+Math.floor(n)-e.width<0&&(o=e.width-Math.floor(n)),s>0||e.height>i?s=0:s+Math.floor(i)-e.height<0&&(s=e.height-Math.floor(i)),this.state.fabric.viewportTransform[4]=o,this.state.fabric.viewportTransform[5]=s,this.state.fabric.requestRenderAll(),this.lastPosX=r.clientX,this.lastPosY=r.clientY,this.lastE=t}},t.prototype.reset=function(){this.lastPosX=0,this.lastPosY=0,this.lastE=null,this.state.fabric.viewportTransform[4]=0,this.state.fabric.viewportTransform[5]=0},t.prototype.init=function(){var t=this;this.state.fabric.on("mouse:down",function(e){if(e.target||t.state.fabric.isDrawingMode)return t.isDragging=!1;var n=t.getClientCoords(e.e);t.isDragging=!0,t.lastPosX=n.clientX,t.lastPosY=n.clientY}),this.state.fabric.on("mouse:move",function(e){t.isDragging&&t.set(e.e)}),this.state.fabric.on("mouse:up",function(){t.isDragging=!1})},t.prototype.getClientCoords=function(t){var e=0,n=0;return(t=t).touches&&t.touches[0]?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY),{clientX:e,clientY:n}},t}(),fD=function(){function t(t){this.config=t,this.original=[],this.filtered=[],this.filters=new bf({search:new yf,category:new yf("handwriting")}),this.totalPages=0,this.perPage=10,this.currentPage=0,this.current$=new zf([]),this.reset(),this.bindToFilters()}return t.prototype.next=function(){this.totalPages>this.currentPage+1&&this.setPage(this.currentPage+1)},t.prototype.previous=function(){this.currentPage-1>0&&this.setPage(this.currentPage-1)},t.prototype.setPage=function(t){this.currentPage=t,this.current$.next(this.filtered[this.currentPage])},t.prototype.filter=function(t,e){var n=[];this.original.forEach(function(i){var r=!e||i.family.toLowerCase().indexOf(e)>-1;i.category.toLowerCase()===t&&r&&n.push(i)}),this.filtered=this.chunkFonts(n),this.totalPages=this.filtered.length,this.setPage(0)},t.prototype.setFonts=function(t){this.original=t,this.filter(this.filters.get("category").value),this.filters.patchValue({category:this.config.get("pixie.tools.text.defaultCategory","handwriting")})},t.prototype.getTotal=function(){return this.filtered.length*this.perPage},t.prototype.reset=function(){this.filters.setValue({search:null,category:"handwriting"}),this.setPage(0)},t.prototype.chunkFonts=function(t){for(var e=[];t.length>0;)e.push(t.splice(0,this.perPage));return e},t.prototype.bindToFilters=function(){var t=this;this.filters.valueChanges.pipe(Wm(100),vg()).subscribe(function(e){return t.filter(e.category,e.search)})},t}();function gD(t){return Math.round(100*t.loaded/t.total)}function mD(t,e){if(!t.loaded)return 0;var n=new Date-e;return t.loaded/(n/1e3)}function vD(t,e){if(!t.loaded)return 0;var n=mD(t,e);return Math.round((t.total-t.loaded)/n*10)/10}function yD(t){var e,n=(e=t,{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)});n.seconds||(n.seconds=1);var i=n.hours?n.hours+"h ":"",r=n.hours?("0"+n.minutes).substr(-2):n.minutes;return i+(r?r+"m ":"")+(r?("0"+n.seconds).substr(-2):n.seconds)+"s"}var bD,_D=["bytes","KB","MB","GB","TB","PB"];function wD(t,e){if(isNaN(parseFloat(String(t)))||!isFinite(t))return null;for(var n=0;t>=1024;)t/=1024,n++;var i=_D[n];return e||(e=function(t){switch(t){case"MB":return 1;case"GB":case"TB":case"PB":return 2;default:return 0}}(i)),"bytes"===i&&t<2&&(i="byte"),parseFloat(t.toFixed(+e).toString()).toString()+" "+i}!function(t){t.STARTED="uploadStarted",t.PROGRESS="uploadProgress",t.COMPLETED="uploadCompleted",t.OTHER="unrecognizedEvent"}(bD||(bD={}));var xD=function(){function t(t){this.i18n=t}return t.prototype.handle=function(t,e){var n=this.parseJson(t.error),i={uri:e,messages:n.messages,type:"http",status:t.status,originalError:new Error(t.message)};return 403!==t.status&&401!==t.status||this.handle403Error(n),qf(i)},t.prototype.parseJson=function(t){var e;if("string"!=typeof t)e=t;else try{e=JSON.parse(t)}catch(i){e=this.getEmptyErrorBody()}var n=this.getEmptyErrorBody();return e&&e.messages?(Object.keys(e.messages).forEach(function(t){var i=e.messages[t];n.messages[t]=Array.isArray(i)?i[0]:i}),n):n},t.prototype.getEmptyErrorBody=function(){return{status:"error",messages:{}}},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(uv))},token:t,providedIn:"root"}),t}(),CD=function(){return(CD=Object.assign||function(t){for(var e,n=1,i=arguments.length;n-1?e:t.prefix+"/"+e},t.prototype.generateHttpParams=function(t){var e=new Mh;return t?(Object.keys(t).forEach(function(n){var i=t[n];null==i&&(i=""),e=e.append(n,i)}),e):e},t.prototype.spoofHttpMethod=function(t,e){return t instanceof FormData?t.append("_method",e):t._method=e,t},t.prefix="secure",t.ngInjectableDef=Ct({factory:function(){return new t(Ne(Yh),Ne(xD))},token:t,providedIn:"root"}),t}()),kD=function(){function t(t,e){this.canvas=t,this.canvasState=e,this.lineStyle={stroke:"rgba(255,255,255,0.3)",strokeWidth:5,strokeLineCap:"round",strokeLineJoin:"round"}}return t.prototype.add=function(t){this.createGroup(),this.addText(t),this.addLines(),this.canvas.fabric().add(this.watermark),this.canvas.render()},t.prototype.remove=function(){this.watermark&&(this.canvas.fabric().remove(this.watermark),this.watermark=null,this.canvas.render())},t.prototype.createGroup=function(){this.watermark=new Sc.fabric.Group(null,Object.assign({},kc,{width:this.canvasState.original.width,height:this.canvasState.original.height,excludeFromExport:!0,top:0,left:0}))},t.prototype.addText=function(t){var e=new Sc.fabric.Text(t,{fill:"rgba(255,255,255,0.3)",strokeWidth:2,stroke:"rgba(255,255,255,0.4)",originX:"center",originY:"center",fontWeight:600,fontSize:150,fontFamily:"Courier New"});e.scaleToWidth(this.canvasState.original.width/2),this.watermark.add(e)},t.prototype.addLines=function(){var t=this.watermark.getObjects("text")[0],e=this.canvasState.original.width/2,n=this.canvasState.original.height/2,i=t.width/4,r=new Sc.fabric.Line(null,this.lineStyle),o=new Sc.fabric.Line(null,this.lineStyle),s=new Sc.fabric.Line(null,this.lineStyle),a=new Sc.fabric.Line(null,this.lineStyle);this.watermark.add(r,o,s,a),r.set({x1:i,y1:-100,x2:e,y2:-n}),o.set({x1:i,y1:100,x2:e,y2:n}),s.set({x1:-i,y1:-100,x2:-e,y2:-n}),a.set({x1:-i,y1:100,x2:-e,y2:n})},t}(),ED=function(t){return t[t.ENTER=13]="ENTER",t[t.SPACE=32]="SPACE",t[t.ESCAPE=27]="ESCAPE",t[t.DELETE=46]="DELETE",t[t.ARROW_UP=38]="ARROW_UP",t[t.ARROW_RIGHT=39]="ARROW_RIGHT",t[t.ARROW_DOWN=40]="ARROW_DOWN",t[t.ARROW_LEFT=37]="ARROW_LEFT",t[t.S=83]="S",t[t.N=78]="N",t[t.A=65]="A",t[t.T=84]="T",t[t.B=66]="B",t[t.C=67]="C",t[t.O=79]="O",t[t.P=80]="P",t[t.R=82]="R",t[t.F=70]="F",t[t.Y=89]="Y",t[t.Z=90]="Z",t}({}),OD=function(){function t(){this.bindings=[]}return t.prototype.add=function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e})},t.prototype.addWithPreventDefault=function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e,preventDefault:!0})},t.prototype.listenOn=function(t){var e=this;t.addEventListener("keydown",function(t){e.executeBindings(t)})},t.prototype.executeBindings=function(t){var e=this;this.bindings.forEach(function(n){e.bindingMatches(n.keybind,t)&&(n.preventDefault&&t.preventDefault&&t.preventDefault(),n.callback(t))})},t.prototype.bindingMatches=function(t,e){return ED[t.key.toUpperCase()]===e.keyCode&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift},t.prototype.parseKeybindString=function(t){var e=t.trim().split("+"),n={ctrl:!1,shift:!1,key:""};return e.forEach(function(t){"ctrl"===(t=t.trim().toLowerCase())?n.ctrl=!0:"shift"===t?n.shift=!0:n.key=t}),n},t.ngInjectableDef=Ct({factory:function(){return new t},token:t,providedIn:"root"}),t}(),TD=function(t){function e(e,n){var i=t.call(this,e)||this;return i.i18n=e,i.toast=n,i}return r(e,t),e.prototype.handle403Error=function(t){},e.ngInjectableDef=Ct({factory:function(){return new e(Ne(uv),Ne(Zy))},token:e,providedIn:"root"}),e}(xD),ID=function(){function t(t,e,n){this.settings=t,this.toast=e,this.i18n=n,this.validations=[]}return t.prototype.validate=function(t){this.validations.length||this.initValidations();var e=this.validations.find(function(e){return e.fails(t)});return e&&this.showToast&&this.openErrorToast(e.errorMessage),{failed:!!e,errorMessage:e?e.errorMessage:null}},t.prototype.validateWithToast=function(t){var e=this.validate(t);return this.openErrorToast(e.errorMessage),e},t.prototype.openErrorToast=function(t){this.toast.open(t)},t}(),AD=function(){function t(){}return t.prototype.passes=function(t){return!this.fails(t)},t}(),PD=function(t){function e(e,n){var i=t.call(this)||this;return i.params=e,i.i18n=n,i.errorMessage=i.i18n.t("Maximum file size is :number",{number:wD(i.params.maxSize)}),i}return r(e,t),e.prototype.fails=function(t){return this.params.maxSize0},t.ngInjectableDef=Ct({factory:function(){return new t(Ne(fE))},token:t,providedIn:"root"}),t}(),LD=function(){return(LD=Object.assign||function(t){for(var e,n=1,i=arguments.length;n-1?t:"pixie."+t;n.set(i,e,!0)}else if("object"==typeof t){var r={pixie:t};r.pixie.sentry_public&&n.set("logging.sentry_public",r.pixie.sentry_public),n.merge(r,!0)}},t.prototype.getDefaultConfig=function(t){return Cc.pick(t,_c)},t.prototype.http=function(){return this.get(Yh)},t.prototype.getTool=function(t){if(!this.injector)throw'Pixie is not loaded yet. Are you using "onLoad" callback?';return this.get(Wc).get(t)},t.prototype.get=function(t){return this.injector.get(t)},t.prototype.initPixie=function(t){var e=this.mergeConfig(t);md([{provide:yc,useValue:e}]).bootstrapModuleFactory(GD).then(this.onAngularReady.bind(this)).catch(function(t){return console.log(t)})},t.prototype.mergeConfig=function(t){var e=xc()(_c,t||{});return this.replaceDefaultConfigItems(e,t)},t.prototype.replaceDefaultConfigItems=function(t,e){for(var n in t)"replaceDefault"===n&&t[n]?t.items=e?e.items:[]:"object"==typeof t[n]&&this.replaceDefaultConfigItems(t[n],e&&e[n]);return t},t.prototype.onAngularReady=function(t){var e=this;this.appModule=t,this.injector=t.injector,this.get(zc).state.loaded.subscribe(function(){var t=e.get(Hc).get("pixie.onLoad");t&&t()})},t.prototype.destroyEditor=function(){this.appModule.destroy(),this.appModule=null},t}();n("yLV6"),function(){if(dr)throw new Error("Cannot enable prod mode after platform setup.");pr=!1}(),window.Pixie=qD}},[[0,0]]]); //# sourceMappingURL=main.2def2dda39ce4e57c515.js.map