diff --git a/dist/bundle.js b/dist/bundle.js index 16a5e9e6..649031a2 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={1606:function(e,t){var n;!function(r){"use strict";function a(e,t){e.className+=" "+t}function i(e,t){for(var n=e.className.split(" "),r=t.split(" "),a=0;a-1&&n.splice(i,1)}e.className=n.join(" ")}function o(){return"rtl"===r.getComputedStyle(document.body).direction}function s(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function l(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function c(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function u(e){if(null===e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n0){for(var n=[],r=0;r=0?(i(document.body,ge.noOverflow),v(!1)):e>0&&document.body.className.indexOf(ge.noOverflow)<0&&(v(!0),a(document.body,ge.noOverflow))}function v(e){k.defaults.preventBodyShift&&(e&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(ve=de,Ae=r.getComputedStyle(document.body).top,a(document.body,ge.fixed),document.body.style.top=-de+"px"):e||(de=ve,document.body.style.top=Ae,i(document.body,ge.fixed),n()))}function y(e,t){for(var n=A.indexOf(t)+1;n200&&(_e=e.timeStamp)&&!ye){var n=e.srcElement||e.target;!0===t.get("closableByDimmer")&&n===t.elements.modal&&B(t)}ye=!1}function M(e,t){if(Date.now()-be>200&&(be=Date.now()))for(var n=0;n-1?(M(t,(function(e){return e.key===n})),!1):void 0}Ce=!1}function j(e){var t=A[A.length-1],n=e.keyCode;if(37===n||39===n){for(var r=t.__internal.buttons,a=0;a111&&he.indexOf(n)>-1)return e.preventDefault(),e.stopPropagation(),M(t,(function(e){return e.key===n})),!1}function H(e,t){if(t)t.focus();else{var n=e.__internal.focus,r=n.element;switch(typeof n.element){case"number":e.__internal.buttons.length>n.element&&(r=!0===e.get("basic")?e.elements.reset[0]:e.__internal.buttons[n.element].element);break;case"string":r=e.elements.body.querySelector(n.element);break;case"function":r=n.element.call(e)}!0!==e.get("defaultFocusOff")&&(null!=r||0!==e.__internal.buttons.length)||(r=e.elements.reset[0]),r&&r.focus&&(r.focus(),n.select&&r.select&&r.select())}}function N(e,t){if(!t)for(var n=A.length-1;n>-1;n-=1)if(A[n].isModal()){t=A[n];break}if(t&&t.isModal()){var r,a=t.elements.reset[0],i=t.elements.reset[1],o=e.relatedTarget,s=t.elements.root.contains(o),l=e.srcElement||e.target;if(l===a&&!s||l===i&&o===a)return;l===i||l===document.body?r=a:l===a&&o===i?r=G(t):l===a&&s&&(r=G(t,!0)),H(t,r)}}function G(e,t){var n=[].slice.call(e.elements.dialog.querySelectorAll(g.tabbable));t&&n.reverse();for(var r=0;rPe?t.style.left=Re+u+"px":t.offsetWidth>=De&&(t.style.left=Re-u+"px")}}(t,Te.elements.dialog,!Te.get("modal")&&!Te.get("pinned")))}function ee(){if(Te){var e=Te;Te=null,i(document.body,ge.noSelection),i(e.elements.dialog,ge.capture),ye=!0,f("onresized",e)}}function te(e){Te=null;var t=e.elements.dialog;"none"===t.style.maxWidth&&(t.style.maxWidth=t.style.minWidth=t.style.width=t.style.height=t.style.minHeight=t.style.left="",Re=Number.Nan,Pe=De=Le=0)}function ne(){for(var e=0;e-1&&r.navigator.userAgent.indexOf("Chrome")<0,me={dimmer:'
',modal:'
',dialog:'
',reset:'',commands:'
',header:'
',body:'
',content:'
',footer:'',buttons:{primary:'
',auxiliary:'
'},button:'',resizeHandle:'
'},ge={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned",noTransition:"ajs-no-transition"},Ae="",ve=0,ye=!1,_e=0,be=0,Ce=!1,we=null,xe=0,ke=0,Be="pageX",Se="pageY",Ze=null,Ie=!1,Ee=null,Te=null,Re=Number.Nan,Pe=0,De=0,Le=0;return{__init:e,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(ge.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(ge.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(ge.unpinned)<0},maximize:function(){return this.isMaximized()||E(this),this},restore:function(){return this.isMaximized()&&T(this),this},pin:function(){return this.isPinned()||Z(this),this},unpin:function(){return this.isPinned()&&I(this),this},bringToFront:function(){return y(0,this),this},moveTo:function(e,t){if(!isNaN(e)&&!isNaN(t)){f("onmove",this);var n=this.elements.dialog,r=n,a=0,i=0;n.style.left&&(a-=parseInt(n.style.left,10)),n.style.top&&(i-=parseInt(n.style.top,10));do{a+=r.offsetLeft,i+=r.offsetTop}while(r=r.offsetParent);var s=e-a,l=t-i;o()&&(s*=-1),n.style.left=s+"px",n.style.top=l+"px",f("onmoved",this)}return this},resizeTo:function(e,t){var n=parseFloat(e),r=parseFloat(t),a=/(\d*\.\d+|\d+)%/;if(!isNaN(n)&&!isNaN(r)&&!0===this.get("resizable")){f("onresize",this),(""+e).match(a)&&(n=n/100*document.documentElement.clientWidth),(""+t).match(a)&&(r=r/100*document.documentElement.clientHeight);var i=this.elements.dialog;"none"!==i.style.maxWidth&&(i.style.minWidth=(De=i.offsetWidth)+"px"),i.style.maxWidth="none",i.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",i.style.width=n+"px",i.style.height=r+"px",f("onresized",this)}return this},setting:function(e,t){var n=this,r=x(this,this.__internal.options,(function(e,t,r){w(n,e,t,r)}),e,t);if("get"===r.op)return r.found?r.value:void 0!==this.settings?x(this,this.settings,this.settingUpdated||function(){},e,t).value:void 0;if("set"===r.op){if(r.items.length>0)for(var a=this.settingUpdated||function(){},i=0;i0){var t=this;this.__internal.timer=setTimeout((function(){t.dismiss()}),1e3*this.__internal.delay)}return this},setContent:function(e){if("string"==typeof e?(c(this.element),this.element.innerHTML=e):e instanceof r.HTMLElement&&this.element.firstChild!==e&&(c(this.element),this.element.appendChild(e)),this.__internal.closeButton){var t=document.createElement("span");a(t,d.close),t.setAttribute("data-close",!0),this.element.appendChild(t)}return this},dismissOthers:function(){return x.dismissAll(this),this}})}var l,u=[],d=g.notifier.classes,p=d.base;return{setting:function(t,n){if(e(this),void 0===n)return this.__internal[t];switch(t){case"position":this.__internal.position=n,o(this);break;case"delay":this.__internal.delay=n}return this},set:function(e,t){return this.setting(e,t),this},get:function(e){return this.setting(e)},create:function(t,n){e(this);var r=document.createElement("div");return r.className=d.message+("string"==typeof t&&""!==t?" "+d.prefix+t:""),s(r,n)},dismissAll:function(e){for(var t=u.slice(0),n=0;n{"use strict";n.d(t,{Z:()=>r});const r={GUI:null,Tools:null,Layers:null,Config:null,State:null,FileOpen:null,FileSave:null,Actions:null}},9314:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2982),a={TRANSPARENCY:!1,TRANSPARENCY_TYPE:"squares",LANG:"en",WIDTH:null,HEIGHT:null,visible_width:null,visible_height:null,COLOR:"#008000",ALPHA:255,ZOOM:1,SNAP:!0,pixabay_key:"3ca2cd8af3fde33af218bea02-9021417",safe_search_can_be_disabled:!0,google_webfonts_key:"AIzaSyAC_Tx8RKkvN235fXCUyi_5XhSaRCzNhMg",layers:[],layer:null,need_render:!1,need_render_changed_params:!1,mouse:{},mouse_lock:null,swatches:{default:[]},user_fonts:{},guides_enabled:!0,guides:[],ruler_active:!1,themes:["dark","light","green"],FONTS:["Arial","Courier","Impact","Helvetica","Monospace","Tahoma","Times New Roman","Verdana","Amatic SC","Arimo","Codystar","Creepster","Indie Flower","Lato","Lora","Merriweather","Monoton","Montserrat","Mukta","Muli","Nosifer","Nunito","Oswald","Orbitron","Pacifico","PT Sans","PT Serif","Playfair Display","Poppins","Raleway","Roboto","Rubik","Special Elite","Tangerine","Titillium Web","Ubuntu"]};a.TOOLS=[{name:"select",title:"Select object tool",attributes:{auto_select:!0}},{name:"selection",attributes:{},on_leave:"on_leave"},{name:"brush",attributes:{size:4,pressure:!1}},{name:"pencil",attributes:{size:1,pressure:!1}},{name:"pick_color",attributes:{global:!1}},{name:"erase",on_update:"on_params_update",attributes:{size:30,circle:!0,strict:!0}},{name:"magic_erase",title:"Magic Eraser Tool",attributes:{power:15,anti_aliasing:!0,contiguous:!1}},{name:"fill",attributes:{power:5,anti_aliasing:!1,contiguous:!1}},{name:"shape",on_activate:"on_activate",title:"Shapes (H)",attributes:{size:3,stroke:"#00aa00"}},{name:"line",visible:!1,attributes:{size:4}},{name:"arrow",visible:!1,attributes:{size:4}},{name:"rectangle",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa",radius:{value:0,min:0},square:!1}},{name:"ellipse",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa",circle:!1}},{name:"media",title:"Search Images",on_activate:"on_activate",attributes:{size:30}},{name:"triangle",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"right_triangle",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"romb",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"parallelogram",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"trapezoid",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"plus",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"pentagon",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"hexagon",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"star",visible:!1,attributes:{border_size:4,corners:5,inner_radius:40,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"heart",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"cylinder",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"human",visible:!1,attributes:{border_size:4,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"tear",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"cog",visible:!1,attributes:{fill_color:"#555555"}},{name:"bezier_curve",visible:!1,attributes:{size:4}},{name:"moon",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"callout",visible:!1,attributes:{border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}},{name:"text",on_update:"on_params_update",attributes:{font:{value:"Arial",values:function(){var e=Object.keys(a.user_fonts);return["","[Add Font...]"].concat((0,r.Z)(Array.from(new Set([].concat((0,r.Z)(a.FONTS),e).sort()))))}},size:40,bold:{value:!1,icon:"bold.svg"},italic:{value:!1,icon:"italic.svg"},underline:{value:!1,icon:"underline.svg"},strikethrough:{value:!1,icon:"strikethrough.svg"},fill:"#008800",stroke:"#000000",stroke_size:{value:0,min:0,step:.1},kerning:{value:0,min:-999,max:999,step:1},leading:{value:0,min:-999,max:999,step:1}}},{name:"gradient",attributes:{color_1:"#008000",color_2:"#ffffff",alpha:0,radial:!1,radial_power:50}},{name:"clone",attributes:{size:30,anti_aliasing:!0,source_layer:{value:"Current",values:["Current","Previous"]}}},{name:"crop",on_update:"on_params_update",on_leave:"on_leave",attributes:{crop:!0}},{name:"blur",attributes:{size:30,strength:1}},{name:"sharpen",attributes:{size:30}},{name:"desaturate",attributes:{size:50,anti_aliasing:!0}},{name:"bulge_pinch",title:"Bulge/Pinch Tool",attributes:{radius:80,power:50,bulge:!0}},{name:"animation",on_activate:"on_activate",on_update:"on_params_update",on_leave:"on_leave",attributes:{play:!1,delay:400}},{name:"polygon",visible:!1,attributes:{size:4,border_size:4,border:!0,fill:!0,border_color:"#555555",fill_color:"#aaaaaa"}}],a.TOOL=a.TOOLS[2];const i=a},1125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(5671),a=n(3144),i=n(9314),o=n(699),s=n(4182),l=n(8476),c=n(9687),u=n(8562),d=n(1748),h=n(6031),p=n(2448),f=n(2414),m=n(9250);const g=function(){function e(t){(0,r.Z)(this,e),this.Base_layers=new o.Z,this.Helper=new d.Z,this.Layer_rename=new h.default,this.Effects_browser=new p.default,this.Layer_duplicate=new f.default,this.Layer_raster=new m.default}return(0,a.Z)(e,[{key:"render_main_layers",value:function(){document.getElementById("layers_base").innerHTML='\n\t\n\t\n\t\n\n\t\n\t\n\n\t
\n',this.render_layers(),this.set_events()}},{key:"set_events",value:function(){var e=this;document.getElementById("layers_base").addEventListener("click",(function(t){var n=t.target;if("insert_layer"==n.id)u.Z.State.do_action(new u.Z.Actions.Insert_layer_action);else if("layer_duplicate"==n.id)e.Layer_duplicate.duplicate();else if("layer_raster"==n.id)e.Layer_raster.raster();else if("layer_up"==n.id)u.Z.State.do_action(new u.Z.Actions.Reorder_layer_action(i.Z.layer.id,1));else if("layer_down"==n.id)u.Z.State.do_action(new u.Z.Actions.Reorder_layer_action(i.Z.layer.id,-1));else{if("visibility"==n.id)return u.Z.State.do_action(new u.Z.Actions.Toggle_layer_visibility_action(n.dataset.id));if("delete"==n.id)u.Z.State.do_action(new u.Z.Actions.Delete_layer_action(n.dataset.id));else if("layer_name"==n.id){if(n.dataset.id==i.Z.layer.id)return;u.Z.State.do_action(new u.Z.Actions.Select_layer_action(n.dataset.id))}else if("delete_filter"==n.id)u.Z.State.do_action(new u.Z.Actions.Delete_layer_filter_action(n.dataset.pid,n.dataset.id));else if("filter_name"==n.id){var r=e.Effects_browser.get_effects_list(),a=n.dataset.filter.toLowerCase();for(var o in r)if(r[o].title.toLowerCase()==a){e.Base_layers.select(n.dataset.pid);var s=e.Effects_browser.get_function_from_path(a);r[o].object[s](n.dataset.id)}}}})),document.getElementById("layers_base").addEventListener("dblclick",(function(t){var n=t.target;"layer_name"==n.id&&e.Layer_rename.rename(n.dataset.id)}))}},{key:"render_layers",value:function(){var e="layers",t=i.Z.layers.concat().sort((function(e,t){return t.order-e.order}));document.getElementById(e).innerHTML="";var n="";if(i.Z.layer)for(var r in t){var a=t[r],o="";if("source-atop"===a.composition&&(o+=" shorter"),a.id==i.Z.layer.id&&(o+=" active"),n+='
',1==a.visible?n+='\t':n+='\t',n+='\t',"source-atop"===a.composition&&(n+='\t'),n+='\t",n+='\t
',n+="
",t[r].filters.length>0){for(var s in n+='
',t[r].filters){var l=t[r].filters[s],c=this.Helper.ucfirst(l.name);c=c.replace(/-/g," "),n+='
',n+='\t',n+='\t'+c+"",n+='\t
',n+="
"}n+="
"}}document.getElementById(e).innerHTML=n}}]),e}();var A=n(440);const v=function(){function e(t){(0,r.Z)(this,e),this.Base_layers=new o.Z,this.Tools_settings=new A.default,this.Helper=new d.Z,this.last_width=null,this.last_height=null,this.units=this.Tools_settings.get_setting("default_units"),this.resolution=this.Tools_settings.get_setting("resolution")}return(0,a.Z)(e,[{key:"render_main_information",value:function(){document.getElementById("toggle_info").innerHTML='\n\tSize:\n\t-\n\t
\n\tMouse:\n\t-\n',this.set_events(),this.show_size()}},{key:"set_events",value:function(){var e=this,t=document.getElementById("mouse_info_mouse");document.addEventListener("mousemove",(function(t){e.show_size()}),!1),document.getElementById("canvas_minipaint").addEventListener("mousemove",(function(n){var r=e.Base_layers.get_world_coords(n.offsetX,n.offsetY),a=Math.ceil(r.x),i=Math.ceil(r.y);a=e.Helper.get_user_unit(a,e.units,e.resolution),i=e.Helper.get_user_unit(i,e.units,e.resolution),t.innerHTML=a+", "+i}),!1)}},{key:"update_units",value:function(){this.units=this.Tools_settings.get_setting("default_units"),this.resolution=this.Tools_settings.get_setting("resolution"),this.show_size(!0)}},{key:"show_size",value:function(e){if(null!=e||this.last_width!=i.Z.WIDTH||this.last_height!=i.Z.HEIGHT){var t=this.Helper.get_user_unit(i.Z.WIDTH,this.units,this.resolution),n=this.Helper.get_user_unit(i.Z.HEIGHT,this.units,this.resolution);document.getElementById("mouse_info_size").innerHTML=t+" x "+n,this.last_width=i.Z.WIDTH,this.last_height=i.Z.HEIGHT}}}]),e}();var y=n(1002),_=n(4942),b=n(7477),C=n(312),w=n(9755);const x=function(){function e(){(0,r.Z)(this,e),this.POP=new b.Z,this.Text=new C.default,this.Base_layers=new o.Z,this.Tools_settings=new A.default,this.Helper=new d.Z}return(0,a.Z)(e,[{key:"render_main_details",value:function(){document.getElementById("toggle_details").innerHTML='\n\t
\n\t\tX\n\t\t\n\t\t\n\t
\n\t
\n\t\tY:\n\t\t\n\t\t\n\t
\n\t
\n\t\tWidth:\n\t\t\n\t\t\n\t
\n\t
\n\t\tHeight:\n\t\t\n\t
\n\t
\n\t
\n\t\tRotate:\n\t\t\n\t\t\n\t
\n\t
\n\t\tOpacity:\n\t\t\n\t\t\n\t
\n\t
\n\t\tColor:\n\t\t\n\t
\n\t
\n\t\t
\n\t\t
\n\t\t\t \n\t\t\t\n\t\t
\n\t\t
\n\t\t\tBounds:\n\t\t\t\n\t\t
\n\t\t
\n\t\t\tKerning:\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t\t
\n\t\t\tWrap At:\n\t\t\t\n\t\t
\n\t\t
\n\t\t\tH. Align:\n\t\t\t\n\t\t
\n\t\t\n\t
\n',this.render_details(!0)}},{key:"render_details",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.render_general("x",e),this.render_general("y",e),this.render_general("width",e),this.render_general("height",e),this.render_general("rotate",e),this.render_general("opacity",e),this.render_color(e),this.render_reset(e),null!=i.Z.layer&&"text"==i.Z.layer.type?(document.getElementById("text_detail_params").style.display="block",document.getElementById("detail_color").closest(".row").style.display="none"):(document.getElementById("text_detail_params").style.display="none",null==i.Z.layer||null!==i.Z.layer.color&&"image"!=i.Z.layer.type?document.getElementById("detail_color").closest(".row").style.display="block":document.getElementById("detail_color").closest(".row").style.display="none"),this.render_text(e),this.render_general_select_param("boundary",e),this.render_general_select_param("kerning",e),this.render_general_select_param("text_direction",e),this.render_general_select_param("wrap",e),this.render_general_select_param("wrap_direction",e),this.render_general_select_param("halign",e),this.render_general_select_param("valign",e)}},{key:"render_general",value:function(e,t){var n=i.Z.layer,r=this,a=this.Tools_settings.get_setting("default_units"),o=this.Tools_settings.get_setting("resolution");if(null!=n)if((l=document.getElementById("detail_"+e)).dataset.layer=n.id,null==n[e])l.value="",l.disabled=!0;else{var s=n[e];s="x"==e||"y"==e||"width"==e||"height"==e?this.Helper.get_user_unit(s,a,o):Math.round(s),l.value=s,l.disabled=!1}if(t){var l;if(null==(l=document.getElementById("detail_"+e)))return void console.log("Error: missing details event target detail_"+e);var c=null;l.addEventListener("focus",(function(e){c=parseFloat(this.value)})),l.addEventListener("blur",(function(t){if("x"==e||"y"==e||"width"==e||"height"==e)var n=r.Helper.get_internal_unit(this.value,a,o);else n=parseInt(this.value);var i=r.Base_layers.get_layer(t.target.dataset.layer);i[e]=c,c!==n&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.id,(0,_.Z)({},e,n))]))})),l.addEventListener("change",(function(t){if("x"==e||"y"==e||"width"==e||"height"==e)var n=r.Helper.get_internal_unit(this.value,a,o);else n=parseInt(this.value);null!=this.min&&""!=this.min&&nthis.max&&(document.getElementById("detail_opacity").value=n,n=this.max),i.Z.layer[e]=n,i.Z.need_render=!0})),l.addEventListener("keyup",(function(t){if(13==t.keyCode){if("x"==e||"y"==e||"width"==e||"height"==e)var n=r.Helper.get_internal_unit(this.value,a,o);else n=parseInt(this.value);null!=this.min&&""!=this.min&&nthis.max&&(document.getElementById("detail_opacity").value=n,n=this.max),i.Z.layer[e]=n,i.Z.need_render=!0}}))}}},{key:"render_general_param",value:function(e,t){var n=i.Z.layer;if(null!=n){var r=document.getElementById("detail_param_"+e);null==n.params[e]?(r.value="",r.disabled=!0):("boolean"==typeof n.params[e]?"BUTTON"==r.tagName&&(n.params[e]?r.classList.add("active"):r.classList.remove("active")):r.value=n.params[e],r.disabled=!1)}if(t){r=document.getElementById("detail_param_"+e);var a=null;r.addEventListener("focus",(function(e){a=parseInt(this.value)})),r.addEventListener("blur",(function(t){var n=parseInt(this.value);i.Z.layer.params[e]=a;var r=JSON.parse(JSON.stringify(i.Z.layer.params));r[e]=n,a!==n&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{params:r})]))})),r.addEventListener("change",(function(t){var n=parseInt(this.value);i.Z.layer.params[e]=n,i.Z.need_render=!0,i.Z.need_render_changed_params=!0})),r.addEventListener("click",(function(t){"boolean"==typeof i.Z.layer.params[e]&&(this.classList.toggle("active"),i.Z.layer.params[e]=!i.Z.layer.params[e],i.Z.need_render=!0,i.Z.need_render_changed_params=!0)}))}}},{key:"render_general_select_param",value:function(e,t){var n=i.Z.layer;if(null!=n){var r=document.getElementById("detail_param_"+e);null==n.params[e]?(r.value="",r.disabled=!0):("object"==(0,y.Z)(n.params[e])?r.value=n.params[e].value:r.value=n.params[e],r.disabled=!1)}if(t){r=document.getElementById("detail_param_"+e);var a=null;r.addEventListener("focus",(function(e){a=this.value})),r.addEventListener("blur",(function(t){var n=this.value;i.Z.layer.params[e]=a;var r=JSON.parse(JSON.stringify(i.Z.layer.params));r[e]=n,a!==n&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{params:r})]))})),r.addEventListener("change",(function(t){var n=this.value;i.Z.layer.params[e]=n,i.Z.need_render=!0,i.Z.need_render_changed_params=!0}))}}},{key:"render_color",value:function(e){var t,n=i.Z.layer;if(t=e?w(document.getElementById("detail_color")).uiColorInput():w(document.getElementById("detail_color")),null!=n&&t.uiColorInput("set_value",n.color),e){var r=null;t.on("focus",(function(e){r=t.uiColorInput("get_value")})),t.on("change",(function(e){var n=t.uiColorInput("get_value");i.Z.layer.color=r,r!==n&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{color:n})]))}))}}},{key:"render_reset",value:function(e){var t=i.Z.layer;null!=t&&(null!=t.width_original?document.getElementById("reset_size").classList.remove("hidden"):document.getElementById("reset_size").classList.add("hidden")),e&&(document.getElementById("reset_x").addEventListener("click",(function(e){i.Z.layer.x&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{x:0})]))})),document.getElementById("reset_y").addEventListener("click",(function(e){i.Z.layer.y&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{y:0})]))})),document.getElementById("reset_size").addEventListener("click",(function(e){i.Z.layer.width===i.Z.layer.width_original&&i.Z.layer.height===i.Z.layer.height_original||u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{width:i.Z.layer.width_original,height:i.Z.layer.height_original})]))})),document.getElementById("reset_rotate").addEventListener("click",(function(e){i.Z.layer.rotate&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{rotate:0})]))})),document.getElementById("reset_opacity").addEventListener("click",(function(e){100!=i.Z.layer.opacity&&u.Z.State.do_action(new u.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new u.Z.Actions.Update_layer_action(i.Z.layer.id,{opacity:100})]))})))}},{key:"render_text",value:function(e){e&&document.getElementById("detail_param_text").addEventListener("click",(function(e){document.querySelector("#tools_container #text").click(),document.getElementById("text_tool_keyboard_input").focus(),i.Z.need_render=!0}))}}]),e}(),k=[{name:"File",children:[{name:"New",target:"file/new.new"},{divider:!0},{name:"Open",children:[{name:"Open File",shortcut:"O",ellipsis:!0,target:"file/open.open_file"},{name:"Open Directory",ellipsis:!0,target:"file/open.open_dir"},{name:"Open from Webcam",target:"file/open.open_webcam"},{name:"Open URL",ellipsis:!0,target:"file/open.open_url"},{name:"Open Data URL",ellipsis:!0,target:"file/open.open_data_url"},{name:"Open Test Template",target:"file/open.open_template_test"}]},{name:"Search Images",ellipsis:!0,target:"file/open.search"},{divider:!0},{name:"Export",ellipsis:!0,shortcut:"S",target:"file/save.export"},{name:"Save As",ellipsis:!0,shortcut:"Shift + S",target:"file/save.save"},{name:"Save As Data URL",ellipsis:!0,target:"file/save.save_data_url"},{name:"Print",ellipsis:!0,shortcut:"Ctrl+P",target:"file/print.print"},{divider:!0},{name:"Quick Save",shortcut:"F9",target:"file/quicksave.quicksave"},{name:"Quick Load",shortcut:"F10",target:"file/quickload.quickload"}]},{name:"Edit",children:[{name:"Undo",shortcut:"Ctrl+Z",target:"edit/undo.undo"},{name:"Redo",shortcut:"Ctrl+Y",target:"edit/redo.redo"},{divider:!0},{name:"Delete Selection",shortcut:"Del",target:"edit/selection.delete"},{name:"Copy Selection",target:"layer/new.new_selection"},{name:"Copy to Clipboard",shortcut:"Ctrl+C",target:"edit/copy.copy_to_clipboard"},{name:"Paste",shortcut:"Ctrl+V",target:"edit/paste.paste"},{divider:!0},{name:"Select All",shortcut:"Ctrl+A",target:"edit/selection.select_all"}]},{name:"View",children:[{name:"Zoom",children:[{name:"Zoom In",target:"view/zoom.in"},{name:"Zoom Out",target:"view/zoom.out"},{divider:!0},{name:"Original Size",target:"view/zoom.original"},{name:"Fit Window",target:"view/zoom.auto"}]},{name:"Grid",shortcut:"G",target:"view/grid.grid"},{name:"Guides",children:[{name:"Insert",ellipsis:!0,target:"view/guides.insert"},{name:"Update",target:"view/guides.update"},{name:"Remove all",target:"view/guides.remove"}]},{name:"Ruler",target:"view/ruler.ruler"},{divider:!0},{name:"Full Screen",target:"view/full_screen.fs"}]},{name:"Image",children:[{name:"Information",shortcut:"I",ellipsis:!0,target:"image/information.information"},{name:"Canvas Size",ellipsis:!0,target:"image/size.size"},{name:"Trim",ellipsis:!0,shortcut:"T",target:"image/trim.trim"},{divider:!0},{name:"Resize",ellipsis:!0,shortcut:"R",target:"image/resize.resize"},{name:"Rotate",ellipsis:!0,target:"image/rotate.rotate"},{name:"Flip",children:[{name:"Vertical",target:"image/flip.vertical"},{name:"Horizontal",target:"image/flip.horizontal"}]},{name:"Translate",ellipsis:!0,target:"image/translate.translate"},{name:"Opacity",ellipsis:!0,target:"image/opacity.opacity"},{divider:!0},{name:"Color Corrections",ellipsis:!0,target:"image/color_corrections.color_corrections"},{name:"Auto Adjust Colors",shortcut:"F",target:"image/auto_adjust.auto_adjust"},{name:"Decrease Color Depth",target:"image/decrease_colors.decrease_colors"},{name:"Color Palette",ellipsis:!0,target:"image/palette.palette"},{divider:!0},{name:"Histogram",ellipsis:!0,target:"image/histogram.histogram"}]},{name:"Layer",children:[{name:"New",shortcut:"N",target:"layer/new.new"},{name:"New from Selection",target:"layer/new.new_selection"},{divider:!0},{name:"Duplicate",shortcut:"D",target:"layer/duplicate.duplicate"},{name:"Show / Hide",target:"layer/visibility.toggle"},{name:"Delete",target:"layer/delete.delete"},{name:"Convert to Raster",target:"layer/raster.raster"},{divider:!0},{name:"Move",children:[{name:"Up",target:"layer/move.up"},{name:"Down",target:"layer/move.down"}]},{name:"Composition",ellipsis:!0,target:"layer/composition.composition"},{name:"Rename",ellipsis:!0,target:"layer/rename.rename"},{name:"Clear",target:"layer/clear.clear"},{divider:!0},{name:"Differences Down",target:"layer/differences.differences"},{name:"Merge Down",target:"layer/merge.merge"},{name:"Flatten Image",target:"layer/flatten.flatten"}]},{name:"Effects",children:[{name:"Effect browser",ellipsis:!0,target:"effects/browser.browser"},{divider:!0},{name:"Common Filters",children:[{name:"Gaussian Blur",ellipsis:!0,target:"effects/common/blur.blur"},{name:"Brightness",ellipsis:!0,target:"effects/common/brightness.brightness"},{name:"Contrast",ellipsis:!0,target:"effects/common/contrast.contrast"},{name:"Grayscale",ellipsis:!0,target:"effects/common/grayscale.grayscale"},{name:"Hue Rotate",ellipsis:!0,target:"effects/common/hue-rotate.hue_rotate"},{name:"Negative",ellipsis:!0,target:"effects/common/invert.invert"},{name:"Saturate",ellipsis:!0,target:"effects/common/saturate.saturate"},{name:"Sepia",ellipsis:!0,target:"effects/common/sepia.sepia"},{name:"Shadow",ellipsis:!0,target:"effects/common/shadow.shadow"}]},{name:"Instagram Filters",children:[{name:"1977",target:"effects/instagram/1977.1977"},{name:"Aden",target:"effects/instagram/aden.aden"},{name:"Clarendon",target:"effects/instagram/clarendon.clarendon"},{name:"Gingham",target:"effects/instagram/gingham.gingham"},{name:"Inkwell",target:"effects/instagram/inkwell.inkwell"},{name:"Lo-fi",target:"effects/instagram/lofi.lofi"},{name:"Toaster",target:"effects/instagram/toaster.toaster"},{name:"Valencia",target:"effects/instagram/valencia.valencia"},{name:"X-Pro II",target:"effects/instagram/xpro2.xpro2"}]},{name:"Black and White",ellipsis:!0,target:"effects/black_and_white.black_and_white"},{name:"Borders",ellipsis:!0,target:"effects/borders.borders"},{name:"Blueprint",target:"effects/blueprint.blueprint"},{name:"Box Blur",ellipsis:!0,target:"effects/box_blur.box_blur"},{name:"Denoise",ellipsis:!0,target:"effects/denoise.denoise"},{name:"Dither",ellipsis:!0,target:"effects/dither.dither"},{name:"Dot Screen",ellipsis:!0,target:"effects/dot_screen.dot_screen"},{name:"Edge",target:"effects/edge.edge"},{name:"Emboss",target:"effects/emboss.emboss"},{name:"Enrich",ellipsis:!0,target:"effects/enrich.enrich"},{name:"Grains",ellipsis:!0,target:"effects/grains.grains"},{name:"Heatmap",target:"effects/heatmap.heatmap"},{name:"Mosaic",ellipsis:!0,target:"effects/mosaic.mosaic"},{name:"Night Vision",target:"effects/night_vision.night_vision"},{name:"Oil",ellipsis:!0,target:"effects/oil.oil"},{name:"Pencil",target:"effects/pencil.pencil"},{name:"Sharpen",ellipsis:!0,target:"effects/sharpen.sharpen"},{name:"Solarize",target:"effects/solarize.solarize"},{name:"Tilt Shift",ellipsis:!0,target:"effects/tilt_shift.tilt_shift"},{name:"Vignette",ellipsis:!0,target:"effects/vignette.vignette"},{name:"Vibrance",ellipsis:!0,target:"effects/vibrance.vibrance"},{name:"Vintage",ellipsis:!0,target:"effects/vintage.vintage"},{name:"Zoom Blur",ellipsis:!0,target:"effects/zoom_blur.zoom_blur"}]},{name:"Tools",children:[{name:"Sprites",target:"tools/sprites.sprites"},{name:"Key-Points",target:"tools/keypoints.keypoints"},{name:"Content Fill",ellipsis:!0,target:"tools/content_fill.content_fill"},{divider:!0},{name:"Color Zoom",ellipsis:!0,target:"tools/color_zoom.color_zoom"},{name:"Replace Color",ellipsis:!0,target:"tools/replace_color.replace_color"},{name:"Restore Alpha",ellipsis:!0,target:"tools/restore_alpha.restore_alpha"},{name:"External",children:[{name:"TINYPNG - Compress PNG and JPEG",href:"https://tinypng.com"},{name:"REMOVE.BG - Remove Image Background",href:"https://www.remove.bg"},{name:"PNGTOSVG - Convert Image to SVG",href:"https://www.pngtosvg.com"},{name:"SQUOOSH - Compress and Compare Images",href:"https://squoosh.app"}]},{divider:!0},{name:"Language",children:[{name:"English",target:"tools/translate.translate",parameter:"en"},{divider:!0},{name:"عربي",target:"tools/translate.translate",parameter:"ar"},{name:"简体中文",target:"tools/translate.translate",parameter:"zh"},{name:"Deutsch",target:"tools/translate.translate",parameter:"de"},{name:"English (UK)",target:"tools/translate.translate",parameter:"uk"},{name:"Español",target:"tools/translate.translate",parameter:"es"},{name:"Français",target:"tools/translate.translate",parameter:"fr"},{name:"Greek",target:"tools/translate.translate",parameter:"el"},{name:"Italiano",target:"tools/translate.translate",parameter:"it"},{name:"日本語",target:"tools/translate.translate",parameter:"ja"},{name:"한국어",target:"tools/translate.translate",parameter:"ko"},{name:"Lietuvių",target:"tools/translate.translate",parameter:"lt"},{name:"Português",target:"tools/translate.translate",parameter:"pt"},{name:"русский язык",target:"tools/translate.translate",parameter:"ru"},{name:"Türkçe",target:"tools/translate.translate",parameter:"tr"}]},{name:"Search",shortcut:"F3",ellipsis:!0,target:"tools/search.search"},{name:"Settings",ellipsis:!0,target:"tools/settings.settings"}]},{name:"Help",children:[{name:"Keyboard Shortcuts",ellipsis:!0,target:"help/shortcuts.shortcuts"},{name:"Report Issues",href:"https://github.com/viliusle/miniPaint/issues"},{divider:!0},{name:"About",ellipsis:!0,target:"help/about.about"}]}];var B=n(5405);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",this.menuContainer.innerHTML=t,this.menuBarNode=this.menuContainer.querySelector('[role="menubar"]'),this.menuContainer.addEventListener("click",(function(t){return e.on_click_menu(t)}),!0),this.menuContainer.addEventListener("keydown",(function(t){return e.on_key_down_menu(t)}),!0),this.menuBarNode.addEventListener("focus",(function(t){return e.on_focus_menu_bar(t)})),this.menuBarNode.addEventListener("blur",(function(t){return e.on_blur_menu_bar(t)})),this.menuBarNode.querySelectorAll("a").forEach((function(t){t.addEventListener("focus",(function(t){return e.on_focus_menu_bar_link(t)}))})),document.body.addEventListener("mousedown",(function(t){return e.on_mouse_down_body(t)}),!0),document.body.addEventListener("touchstart",(function(t){return e.on_mouse_down_body(t)}),!0),window.addEventListener("resize",(function(t){return e.on_resize_window(t)}),!0),document.body.classList.add("loaded")}},{key:"on",value:function(e,t){this.eventSubscriptions[e]||(this.eventSubscriptions[e]=[]),this.eventSubscriptions[e].includes(t)||this.eventSubscriptions[e].push(t)}},{key:"emit",value:function(e,t,n){if(this.eventSubscriptions[e]){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(this.eventSubscriptions[e]);try{for(a.s();!(r=a.n()).done;)(0,r.value)(t,n)}catch(e){a.e(e)}finally{a.f()}}}},{key:"generate_menu_bar_item_template",value:function(e,t){return'\n\t\t\t
  • \n\t\t\t\t\n\t\t\t
  • \n\t\t").trim()}},{key:"generate_menu_dropdown_item_template",value:function(e,t,n){return e.divider?'\n\t\t\t\t
  • \n\t\t\t\t\t
    \n\t\t\t\t
  • \n\t\t\t'.trim():'\n\t\t\t\t
  • \n\t\t\t\t\t\n\t\t\t\t\t\t').concat(e.name,"").concat(e.ellipsis?" ...":"","\n\t\t\t\t\t\t").concat(e.shortcut?'\n\t\t\t\t\t\t\tShortcut Key: '.concat(e.shortcut,"\n\t\t\t\t\t\t"):"","\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t").trim()}},{key:"on_mouse_down_body",value:function(e){var t=e.touches&&e.touches.length>0?e.touches[0].target:e.target;t&&!this.menuContainer.contains(t)&&this.close_child_dropdowns(0)}},{key:"on_focus_menu_bar",value:function(e){if(document.activeElement===this.menuBarNode){var t=this.menuBarNode.querySelector('[data-index="'.concat(this.lastFocusedMenuBarLink,'"]'));t||(t=this.menuBarNode.querySelector("a")),t.focus()}}},{key:"on_focus_menu_bar_link",value:function(e){this.lastFocusedMenuBarLink=parseInt(e.target.getAttribute("data-index"),10)||0}},{key:"on_blur_menu_bar",value:function(e){}},{key:"on_key_down_menu",value:function(e){e.key;var t=document.activeElement;if(t&&"A"===t.tagName){var n=parseInt(t.getAttribute("data-level"),10)||0,r=parseInt(t.getAttribute("data-index"),10)||0,a=t.closest("ul");if(0===n)if(["Right","ArrowRight"].includes(e.key)){var i=a.querySelector('[data-index="'.concat(r+1,'"]'));i||(i=a.querySelector('[data-index="0"]')),i.focus()}else if(["Left","ArrowLeft"].includes(e.key)){var o=a.querySelector('[data-index="'.concat(r-1,'"]'));o||(o=a.querySelector('[data-index="'.concat(a.querySelectorAll("[data-index]").length-1,'"]'))),o.focus()}else["Down","ArrowDown"].includes(e.key)?"true"===t.getAttribute("aria-haspopup")&&(e.preventDefault(),t.click()):"Home"===e.key?a.querySelector('[data-index="0"]').focus():"End"===e.key?a.querySelector('[data-index="'.concat(a.querySelectorAll("[data-index]").length-1,'"]')).focus():[" ","Enter"].includes(e.key)&&(e.preventDefault(),t.click());else if(["Up","ArrowUp"].includes(e.key)){e.preventDefault();var s=a.querySelector('[data-index="'.concat(r-1,'"]'));s||(s=a.querySelector('[data-index="'.concat(r-2,'"]'))),s||(s=a.querySelector('[data-index="'.concat(this.dropdownStack[n-1].children.length-1,'"]'))),s.focus()}else if(["Down","ArrowDown"].includes(e.key)){e.preventDefault();var l=a.querySelector('[data-index="'.concat(r+1,'"]'));l||(l=a.querySelector('[data-index="'.concat(r+2,'"]'))),l||(l=a.querySelector('[data-index="0"]')),l.focus()}else if(["Right","ArrowRight"].includes(e.key))if("true"===t.getAttribute("aria-haspopup"))t.click();else if(this.dropdownStack.length>1){var c=this.dropdownStack[n-1].opener;c.click(),c.focus()}else{var u=parseInt(this.dropdownStack[0].opener.getAttribute("data-index"),10)||0,d=this.menuBarNode.querySelector('[data-index="'.concat(u+1,'"]'));d||(d=this.menuBarNode.querySelector('[data-index="0"]')),d.click()}else if(["Left","ArrowLeft"].includes(e.key))if(this.dropdownStack.length>1){var h=this.dropdownStack[n-1].opener;h.click(),h.focus()}else{var p=parseInt(this.dropdownStack[0].opener.getAttribute("data-index"),10)||0,f=this.menuBarNode.querySelector('[data-index="'.concat(p-1,'"]'));f||(f=this.menuBarNode.querySelector('[data-index="'.concat(this.menuBarNode.querySelectorAll("[data-index]").length-1,'"]'))),f.click()}else if("Home"===e.key)a.querySelector('[data-index="0"]').focus();else if("End"===e.key)a.querySelector('[data-index="'.concat(this.dropdownStack[n-1].children.length-1,'"]')).focus();else if([" ","Enter"].includes(e.key))e.preventDefault(),t.click();else if(["Esc","Escape"].includes(e.key)){var m=this.dropdownStack[n-1].opener;m.click(),m.focus()}else"Tab"===e.key&&this.close_child_dropdowns(0)}}},{key:"on_click_menu",value:function(e){var t=e.target.closest("a");t&&"A"===t.tagName?"true"===t.getAttribute("aria-haspopup")?this.toggle_dropdown(t,e.isTrusted):this.trigger_link(t):this.close_child_dropdowns(0)}},{key:"on_resize_window",value:function(e){this.dropdownStack.length>0&&this.position_dropdowns()}},{key:"toggle_dropdown",value:function(e,t){var n=parseInt(e.getAttribute("data-level"),10)||0,r=parseInt(e.getAttribute("data-index"),10)||0;"true"===e.getAttribute("aria-expanded")?this.close_child_dropdowns(n):(e.closest("ul").querySelectorAll("a").forEach((function(e){e.setAttribute("aria-expanded","false")})),e.setAttribute("aria-expanded",!0),this.create_dropdown(e,n,r,!t))}},{key:"trigger_link",value:function(e){for(var t=parseInt(e.getAttribute("data-level"),10)||0,n=parseInt(e.getAttribute("data-index"),10)||0,r=k,a=0;a=0;t--)t>=e&&(this.dropdownStack[t].element.parentNode.removeChild(this.dropdownStack[t].element),this.dropdownStack[t].opener.setAttribute("aria-expanded",!1));this.dropdownStack=this.dropdownStack.slice(0,e)}},{key:"create_dropdown",value:function(e,t,n,r){this.close_child_dropdowns(t);for(var a=k,o=0;o<=t;o++)a=a[null!=this.dropdownStack[o]?this.dropdownStack[o].index:n].children;var s=document.createElement("ul");s.className="menu_dropdown",s.role="menu",s.tabIndex=0,s.setAttribute("aria-labelledby","main_menu_"+t+"_"+n);for(var l="",c=0;ce&&(s=a.x+a.width-o.width),s+o.width>e&&(s=e-o.width),s<0&&(s=0),r.style.left=s+"px"}else{var l=a.y;l+o.height>t-this.dropdownMaxHeightMargin&&(l=t-this.dropdownMaxHeightMargin-o.height),r.style.top=l+"px";var c=a.x+a.width+1;c+o.width>e&&(c=a.x-o.width-1),c<0&&(a.x+a.width/2>e/2||(c=e-o.width-1)<0)&&(c=1),r.style.left=c+"px"}}}}]),e}();var I=n(1606),E=n.n(I),T=null;const R=function(){function e(){if((0,r.Z)(this,e),T)return T;T=this,this.Helper=new d.Z,this.Base_layers=new o.Z,this.last_menu="",this.grid_size=[50,50],this.grid=!1,this.canvas_offset={x:0,y:0},this.common_dimensions=[[640,480,"480p"],[800,600,"SVGA"],[1024,768,"XGA"],[1280,720,"hdtv, 720p"],[1600,1200,"UXGA"],[1920,1080,"Full HD, 1080p"],[3840,2160,"4K UHD"]],this.GUI_tools=new s.Z(this),this.GUI_preview=new l.Z(this),this.GUI_colors=new c.Z(this),this.GUI_layers=new g(this),this.GUI_information=new v(this),this.GUI_details=new x(this),this.GUI_menu=new Z,this.Tools_translate=new B.default,this.Tools_settings=new A.default,this.modules={}}return(0,a.Z)(e,[{key:"init",value:function(){this.load_modules(),this.load_default_values(),this.render_main_gui(),this.init_service_worker()}},{key:"load_modules",value:function(){var e=this,t=n(6090);t.keys().forEach((function(n){if(n.indexOf("Base/")<0){var r=n.replace("./","").replace(".js",""),a=t(n);e.modules[r]=new a.default}}))}},{key:"load_default_values",value:function(){var e=this.Helper.getCookie("transparency");null===e&&(i.Z.TRANSPARENCY=!1),i.Z.TRANSPARENCY=!!e;var t=this.Helper.getCookie("transparency_type");null===t&&(i.Z.TRANSPARENCY_TYPE="squares"),t&&(i.Z.TRANSPARENCY_TYPE=t);var n=this.Helper.getCookie("snap");i.Z.SNAP=null===n||Boolean(n);var r=this.Helper.getCookie("guides");i.Z.guides_enabled=null===r||Boolean(r)}},{key:"render_main_gui",value:function(){this.autodetect_dimensions(),this.change_theme(),this.prepare_canvas(),this.GUI_tools.render_main_tools(),this.GUI_preview.render_main_preview(),this.GUI_colors.render_main_colors(),this.GUI_layers.render_main_layers(),this.GUI_information.render_main_information(),this.GUI_details.render_main_details(),this.GUI_menu.render_main(),this.load_saved_changes(),this.set_events(),this.load_translations()}},{key:"init_service_worker",value:function(){}},{key:"set_events",value:function(){var e=this,t=this;this.GUI_menu.on("select_target",(function(t,n){var r,a=t.split("."),i=a[0],o=a[1],s=null!==(r=n.parameter)&&void 0!==r?r:n.parameter=null;null!=e.modules[i]?null!=e.modules[i][o]?e.modules[i][o](s):E().error("Module function not found. "+i+"."+o):E().error("Modules class not found: "+i)}));for(var n=document.querySelectorAll(".toggle"),r=0;r1||0==t.Base_layers.is_layer_empty(i.Z.layer.id))&&(e.preventDefault(),e.returnValue="")})),document.getElementById("canvas_minipaint").addEventListener("contextmenu",(function(e){e.preventDefault()}),!1)}},{key:"check_canvas_offset",value:function(){var e=document.body.getBoundingClientRect(),t=document.getElementById("canvas_minipaint").getBoundingClientRect();this.canvas_offset.x=t.left-e.left,this.canvas_offset.y=t.top-e.top}},{key:"prepare_canvas",value:function(){var e=document.getElementById("canvas_minipaint"),t=e.getContext("2d"),n=document.getElementById("main_wrapper"),r=n.clientWidth,a=n.clientHeight,o=Math.min(Math.ceil(i.Z.WIDTH*i.Z.ZOOM),r),s=Math.min(Math.ceil(i.Z.HEIGHT*i.Z.ZOOM),a);e.width=o,e.height=s,i.Z.visible_width=o,i.Z.visible_height=s,i.Z.ZOOM>=1?t.imageSmoothingEnabled=!1:t.imageSmoothingEnabled=!0,this.render_canvas_background("canvas_minipaint"),document.getElementById("canvas_wrapper").style.width=o+"px",document.getElementById("canvas_wrapper").style.height=s+"px",this.check_canvas_offset()}},{key:"load_saved_changes",value:function(){for(var e=document.querySelectorAll(".toggle"),t=0;t=0;a--)if(!(this.common_dimensions[a][0]>t||this.common_dimensions[a][1]>n)){i.Z.WIDTH=parseInt(this.common_dimensions[a][0]),i.Z.HEIGHT=parseInt(this.common_dimensions[a][1]),r=!0;break}0==r&&(i.Z.WIDTH=parseInt(t)-15,i.Z.HEIGHT=parseInt(n)-10)}},{key:"render_canvas_background",value:function(e,t){null==t&&(t=10);var n=document.getElementById(e+"_background");if(0==i.Z.TRANSPARENCY)return n.className="transparent-grid white",!1;n.className="transparent-grid "+i.Z.TRANSPARENCY_TYPE,n.style.backgroundSize=2*t+"px auto"}},{key:"draw_grid",value:function(e){if(0!=this.grid){var t=this.grid_size[0],n=this.grid_size[1],r=i.Z.WIDTH,a=i.Z.HEIGHT;null!=t&&null!=n?this.grid_size=[t,n]:(t=this.grid_size[0],n=this.grid_size[1]),t=parseInt(t),n=parseInt(n),e.lineWidth=1,e.beginPath(),t<2&&(t=2),n<2&&(n=2);for(var o=t;o0&&void 0!==arguments[0]?arguments[0]:null;if(null==e){var t=this.Helper.getCookie("theme");e=t||this.Tools_settings.get_setting("theme")}for(var n in i.Z.themes)document.querySelector("body").classList.remove("theme-"+i.Z.themes[n]);document.querySelector("body").classList.add("theme-"+e)}},{key:"get_language",value:function(){return i.Z.LANG}},{key:"get_color",value:function(){return i.Z.COLOR}},{key:"get_alpha",value:function(){return i.Z.ALPHA}},{key:"get_zoom",value:function(){return i.Z.ZOOM}},{key:"get_transparency_support",value:function(){return i.Z.TRANSPARENCY}},{key:"get_active_tool",value:function(){return i.Z.TOOL}}]),e}()},699:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(5861),a=n(4942),i=n(5671),o=n(3144),s=n(4687),l=n.n(s),c=n(8562),u=n(9314),d=n(1125),h=n(3991),p=n(2998),f=n(7389),m=n(1927),g=n(1748),A=n(1606),v=n.n(A);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t=0;o--){var s=n[o],l=n[o-1];if(!a||!a(s))if("source-atop"===s.composition||l&&"source-atop"===l.composition)if(i.globalAlpha=s.opacity/100,i.globalCompositeOperation=s.composition,"source-atop"===(null==l?void 0:l.composition)){this.render_object(e,s);var c=s.filters.filter((function(e){return"shadow"!==e.name}));this.render_object(i,_(_({},s),{},{filters:c}))}else this.render_object(i,s),e.restore(),e.drawImage(t,0,0),r&&r(),i.globalCompositeOperation=null,i.clearRect(0,0,t.width,t.height);else e.globalAlpha=s.opacity/100,e.globalCompositeOperation=s.composition,this.render_object(e,s)}}},{key:"render_preview",value:function(e){var t=this,n=this.Base_gui.GUI_preview.PREVIEW_SIZE.w,r=this.Base_gui.GUI_preview.PREVIEW_SIZE.h;this.ctx_preview.save(),this.ctx_preview.clearRect(0,0,n,r);var a=this.create_new_canvas(this.ctx_preview);a.getContext("2d").scale(n/u.Z.WIDTH,r/u.Z.HEIGHT),this.render_objects(this.ctx_preview,a,e,(function(){t.ctx_preview.save(),t.ctx_preview.scale(n/u.Z.WIDTH,r/u.Z.HEIGHT)})),this.ctx_preview.restore(),this.Base_gui.GUI_preview.render_preview_active_zone()}},{key:"render_object",value:function(e,t,n){if(0!=t.visible&&null!=t.type){if(this.pre_render_object(e,t),"image"==t.type)e.save(),e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),e.drawImage(null!=t.link_canvas?t.link_canvas:t.link,-t.width/2,-t.height/2,t.width,t.height),e.restore();else{var r=t.render_function[0],a=t.render_function[1];void 0!==this.Base_gui.GUI_tools.tools_modules[r]?this.Base_gui.GUI_tools.tools_modules[r].object[a](e,t,n):(this.render_success=!1,console.log("Error: unknown layer type: "+t.type))}this.after_render_object(e,t)}}},{key:"pre_render_object",value:function(e,t){for(var n in t.filters){var r=t.filters[n];if(r.id!=this.disabled_filter_id){r.name=r.name.replace("drop-shadow","shadow");var a=!1;for(var n in this.Base_gui.modules)if(!(-1==n.indexOf("effects")||n.indexOf("abstract")>-1)){var i=this.Base_gui.modules[n];n.split("/").pop()==r.name&&(a=!0,i.render_pre(e,r,t))}0==a&&(this.render_success=!1,console.log("Error: can not find filter: "+r.name))}}}},{key:"after_render_object",value:function(e,t){for(var n in t.filters){var r=t.filters[n];if(r.id!=this.disabled_filter_id){r.name=r.name.replace("drop-shadow","shadow");var a=!1;for(var n in this.Base_gui.modules)if(!(-1==n.indexOf("effects")||n.indexOf("abstract")>-1)){var i=this.Base_gui.modules[n];n.split("/").pop()==r.name&&(a=!0,i.render_post(e,r,t))}0==a&&(this.render_success=!1,console.log("Error: can not find filter: "+r.name))}}}},{key:"insert",value:(x=(0,r.Z)(l().mark((function e(t){var n,r=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!(r.length>1&&void 0!==r[1])||r[1],e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Insert_layer_action(t,n)));case 2:case"end":return e.stop()}}),e)}))),function(e){return x.apply(this,arguments)})},{key:"autoresize",value:(w=(0,r.Z)(l().mark((function e(t,n,r){var a,i=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=!(i.length>3&&void 0!==i[3])||i[3],e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Autoresize_canvas_action(t,n,r,a)));case 2:case"end":return e.stop()}}),e)}))),function(e,t,n){return w.apply(this,arguments)})},{key:"get_layer",value:function(e){for(var t in null==e&&(e=u.Z.layer.id),u.Z.layers)if(u.Z.layers[t].id==e)return u.Z.layers[t];return v().error("Error: can not find layer with id:"+e),null}},{key:"delete",value:(C=(0,r.Z)(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Delete_layer_action(t,n)));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return C.apply(this,arguments)})},{key:"reset_layers",value:(y=(0,r.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Reset_layers_action(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return y.apply(this,arguments)})},{key:"toggle_visibility",value:(A=(0,r.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Toggle_layer_visibility_action(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"refresh_gui",value:function(){this.Base_gui.GUI_layers.render_layers()}},{key:"select",value:(s=(0,r.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Select_layer_action(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"set_opacity",value:(a=(0,r.Z)(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return((n=parseInt(n))<0||n>100)&&(n=100),e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Update_layer_action(t,{opacity:n})));case 3:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)})},{key:"layer_clear",value:(n=(0,r.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Clear_layer_action(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"move",value:(t=(0,r.Z)(l().mark((function e(t,n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Reorder_layer_action(t,n)));case 1:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"get_sorted_layers",value:function(){return u.Z.layers.concat().sort((function(e,t){return t.order-e.order}))}},{key:"is_layer_empty",value:function(e){var t=this.get_layer(e);return!(0!=t.width&&null!==t.width||0!=t.height&&null!==t.height||null!=t.data)}},{key:"find_next",value:function(e){e=parseInt(e);for(var t=this.get_layer(e),n=this.get_sorted_layers(),r=null,a=n.length-1;a>=0;a--){var i=n[a];if(null!=r&&r.id==t.id)return i;r=i}return null}},{key:"find_previous",value:function(e){e=parseInt(e);var t=this.get_layer(e),n=this.get_sorted_layers(),r=null;for(var a in n){var i=n[a];if(null!=r&&r.id==t.id)return i;r=i}return null}},{key:"get_world_coords",value:function(e,t){return m.Z.toWorld(e,t)}},{key:"add_filter",value:function(e,t,n){return c.Z.State.do_action(new c.Z.Actions.Add_layer_filter_action(e,t,n))}},{key:"delete_filter",value:function(e,t){return c.Z.State.do_action(new c.Z.Actions.Delete_layer_filter_action(e,t))}},{key:"convert_layers_to_canvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.create_new_canvas(e),r=this.get_sorted_layers();this.render_objects(e,n,r,(function(){e.save()}),(function(e){return 0==e.visible||null==e.type||null!=t&&e.id!=t||void 0}))}},{key:"convert_layer_to_canvas",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;null==t&&(t=!1),null==e&&(e=u.Z.layer.id);var r=this.get_layer(e),a=0,i=0,o=document.createElement("canvas");if(!0===t&&"image"==r.type?(o.width=r.width_original,o.height=r.height_original,n=!1):(o.width=Math.max(r.width,u.Z.WIDTH),o.height=Math.max(r.height,u.Z.HEIGHT)),!0===t&&"image"==r.type?o.getContext("2d").drawImage(r.link,0,0):this.render_object(o.getContext("2d"),r),(1==n||null==n)&&null!=r.type){var s=this.Image_trim.get_trim_info(e);if(s.left>0||s.top>0||s.right>0||s.bottom>0){a=s.left,i=s.top;var l=o.width-s.left-s.right,c=o.height-s.top-s.bottom;l>1&&c>1&&this.Helper.change_canvas_size(o,l,c,a,i)}}return o.dataset.x=a,o.dataset.y=i,o}},{key:"update_layer_image",value:function(e,t){return c.Z.State.do_action(new c.Z.Actions.Update_layer_image_action(e,t))}},{key:"get_dimensions",value:function(){return{width:u.Z.WIDTH,height:u.Z.HEIGHT}}},{key:"get_layers",value:function(){return u.Z.layers}},{key:"disable_filter",value:function(e){this.disabled_filter_id=e}},{key:"find_filter_by_id",value:function(e,t,n){if(void 0===n)var r=u.Z.layer;else r=this.get_layer(n);for(var a in r.filters)if(r.filters[a].name==t&&r.filters[a].id==e)return r.filters[a].params;return{}}}]),e}()},2610:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(5671),a=n(3144),i=(n(9314),n(7477)),o=n(1125),s=n(7360),l=null;const c=function(){function e(){if((0,r.Z)(this,e),l)return l;l=this,this.POP=new i.Z,this.Base_gui=new o.Z,this.db=null,this.events()}return(0,a.Z)(e,[{key:"events",value:function(){var e=this;document.addEventListener("keydown",(function(t){if(!(e.POP.get_active_instances()>0)){var n=t.key;("F3"==n||(1==t.ctrlKey||t.metaKey)&&"f"==n)&&(e.search(),t.preventDefault())}}),!1),document.addEventListener("input",(function(t){if(null!=document.querySelector("#pop_data_search")){var n=document.querySelector("#global_search_results");n.innerHTML="";var r=t.target.value;if(""!=r)for(var a=s.go(r,e.db,{keys:["title"],limit:10,threshold:-5e4}),i=0;i"+s.highlight(o[0])+"
    "}}}),!1),document.addEventListener("keydown",(function(e){if(null!=document.querySelector("#global_search_results")&&null!=document.querySelector(".search-result")){var t=e.key;if("ArrowUp"==t){var n=document.querySelector(".search-result.active");(r=Array.from(n.parentNode.children).indexOf(n))>0&&r--,n.classList.remove("active"),document.querySelector("#global_search_results").childNodes[r].classList.add("active"),e.preventDefault()}else if("ArrowDown"==t){var r;n=document.querySelector(".search-result.active"),(r=Array.from(n.parentNode.children).indexOf(n)){"use strict";n.d(t,{Z:()=>c});var r=n(5671),a=n(3144),i=n(9314),o=null,s=[],l=12;const c=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if((0,r.Z)(this,e),null!=a&&(s[a]=n),o)return o;o=this,this.ctx=t,this.mouse_lock=null,this.selected_obj_positions={},this.selected_obj_rotate_position={},this.selected_object_drag_type=null,this.click_details={},this.is_touch=!1,this.is_drag=!1,this.current_angle=null,this.events()}return(0,a.Z)(e,[{key:"events",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.is_drag=!1,1!=e.is_touch&&t.target.closest("#main_wrapper")&&(e.is_drag=!0,e.selected_object_actions(t))})),document.addEventListener("mousemove",(function(t){1!=e.is_touch&&e.selected_object_actions(t)})),document.addEventListener("mouseup",(function(t){1!=e.is_touch&&e.selected_object_actions(t)})),document.addEventListener("touchstart",(function(t){e.is_drag=!1,e.is_touch=!0,t.target.closest("#main_wrapper")&&(e.is_drag=!0,e.selected_object_actions(t))})),document.addEventListener("touchmove",(function(t){e.selected_object_actions(t)}),{passive:!1}),document.addEventListener("touchend",(function(t){e.selected_object_actions(t)}))}},{key:"set_selection",value:function(e,t,n,r){var a=this.find_settings();null!=e&&(a.data.x=e),null!=t&&(a.data.y=t),null!=n&&(a.data.width=n),null!=r&&(a.data.height=r),i.Z.need_render=!0}},{key:"reset_selection",value:function(){this.find_settings().data={x:null,y:null,width:null,height:null},i.Z.need_render=!0}},{key:"get_selection",value:function(){return this.find_settings().data}},{key:"find_settings",value:function(){var e=i.Z.TOOL.name,t=null;for(var n in s)n==e&&(t=s[n]);return null===t&&(t=s.main),t.data=t.data_function.call(),t}},{key:"calcRotateDistanceFromX",value:function(e){var t=l/i.Z.ZOOM;return Math.max(Math.min(.9*e,Math.abs(e-2*t)),e/2-t/2)}},{key:"draw_selection",value:function(){var e=this,t=this.find_settings(),n=t.data;if(null!==t.data&&"draft"!=t.data.status&&(!0!==t.data.hide_selection_if_active||t.data.type!=i.Z.TOOL.name)){var r=t.data.x,a=t.data.y,o=t.data.width,s=t.data.height;if(null!=r&&null!=a&&null!=o&&null!=s){var c=l/i.Z.ZOOM;1!=i.Z.ZOOM&&(r=Math.round(r),a=Math.round(a),o=Math.round(o),s=Math.round(s));var u=c,d=u/2.4,h=u/1.9;this.ctx.save(),this.ctx.globalAlpha=1;var p=!1;null!=n.rotate&&0!=n.rotate&&(p=!0,this.ctx.translate(n.x+n.width/2,n.y+n.height/2),this.ctx.rotate(n.rotate*Math.PI/180),r=Math.round(-n.width/2),a=Math.round(-n.height/2)),1==t.enable_background&&(this.ctx.fillStyle="rgba(0, 255, 0, 0.3)",this.ctx.fillRect(r,a,o,s));var f=2/i.Z.ZOOM,m=f/2;if(1!=t.enable_borders||0==r&&0==a&&o==i.Z.WIDTH&&s==i.Z.HEIGHT||(this.ctx.lineWidth=f,this.ctx.strokeStyle="rgb(255, 255, 255)",this.ctx.strokeRect(r-m,a-m,o+f,s+f),this.ctx.lineWidth=m,this.ctx.strokeStyle="rgb(0, 0, 0)",this.ctx.strokeRect(r-f,a-f,o+2*f,s+2*f)),!0===t.crop_lines){for(var g=1;g<3;g++)this.ctx.lineWidth=f,this.ctx.strokeStyle="rgb(255, 255, 255)",this.ctx.beginPath(),this.ctx.moveTo(r+o/3*g-m,a),this.ctx.lineTo(r+o/3*g-m,a+s),this.ctx.stroke(),this.ctx.lineWidth=m,this.ctx.strokeStyle="rgb(0, 0, 0)",this.ctx.beginPath(),this.ctx.moveTo(r+o/3*g-m,a),this.ctx.lineTo(r+o/3*g-m,a+s),this.ctx.stroke();for(g=1;g<3;g++)this.ctx.lineWidth=f,this.ctx.strokeStyle="rgb(255, 255, 255)",this.ctx.beginPath(),this.ctx.moveTo(r,a+s/3*g-m),this.ctx.lineTo(r+o,a+s/3*g-m),this.ctx.stroke(),this.ctx.lineWidth=m,this.ctx.strokeStyle="rgb(0, 0, 0)",this.ctx.beginPath(),this.ctx.moveTo(r,a+s/3*g-m),this.ctx.lineTo(r+o,a+s/3*g-m),this.ctx.stroke()}var A=!p&&ri.Z.WIDTH-l,_=!p&&a+s>i.Z.HEIGHT-l,b=function(n,r,a,i,o,s){var l=0;null!=t.data.rotate&&0!=t.data.rotate&&(l=t.data.rotate),0==t.enable_controls||0!=l?(e.ctx.strokeStyle="rgba(0, 0, 0, 0.4)",e.ctx.fillStyle="rgba(255, 255, 255, 0.8)"):(e.ctx.strokeStyle="#000000",e.ctx.fillStyle="#ffffff"),e.ctx.lineWidth=f;var c=new Path2D;c.arc(n+a*u,r+i*u,u/2,0,2*Math.PI),e.ctx.fill(c),e.ctx.stroke(c),e.selected_obj_positions[o]={cursor:s,path:c}};1==t.enable_rotation&&function(){var t=e.find_settings();if(null!==t.data&&"draft"!=t.data.status&&null!==t.data.rotate&&(!0!==t.data.hide_selection_if_active||t.data.type!=i.Z.TOOL.name)){var n=r+e.calcRotateDistanceFromX(o)+d+f,s=a-d-f,l=y?-.5:0,c=v?.5:0;e.ctx.strokeStyle="#000000",e.ctx.fillStyle="#d0d62a",e.ctx.lineWidth=f;var h=new Path2D;h.arc(n+l*u,s+c*u,u/2,0,2*Math.PI),e.ctx.fill(h),e.ctx.stroke(h),e.selected_obj_rotate_position={cursor:"pointer",path:h}}}(),1==t.enable_controls&&(b(r-d-f,a-d-f,A?.5:0,v?.5:0,5,"nwse-resize"),b(r+o+d+f,a-d-f,y?-.5:0,v?.5:0,9,"nesw-resize"),b(r-d-f,a+s+d+f,A?.5:0,_?-.5:0,6,"nesw-resize"),b(r+o+d+f,a+s+d+f,y?-.5:0,_?-.5:0,10,"nwse-resize")),1==t.enable_controls&&(Math.abs(o)>5*u&&(b(r+o/2,a-h-f,0,v?.5:0,1,"ns-resize"),b(r+o/2,a+s+h+f,0,_?-.5:0,2,"ns-resize")),Math.abs(s)>5*u&&(b(r-h-f,a+s/2,A?.5:0,0,4,"ew-resize"),b(r+o+h+f,a+s/2,y?-.5:0,0,8,"ew-resize"))),this.ctx.restore()}}}},{key:"selected_object_actions",value:function(e){var t=this.find_settings(),n=t.data;if(null!=n){this.ctx.save(),null!=n.rotate&&0!=n.rotate&&(this.ctx.translate(n.x+n.width/2,n.y+n.height/2),this.ctx.rotate(n.rotate*Math.PI/180));var r=t.data.x,a=t.data.y,o=t.data.width,s=t.data.height,l=e.type;if("touchstart"==l&&(l="mousedown"),"touchmove"==l&&(l="mousemove"),"touchend"==l&&(l="mouseup"),this.is_drag||!["mousedown","mouseup"].includes(l)){var c=document.getElementById("main_wrapper"),u=i.Z.TOOL&&"text"===i.Z.TOOL.name?"text":"default";if(c.style.cursor!=u&&(c.style.cursor=u),("mousedown"!=l||0!=i.Z.mouse.valid)&&0!=t.enable_controls){var d=i.Z.mouse,h=this.selected_object_drag_type;if("mousedown"==l&&null!==t.data&&(this.click_details={x:t.data.x,y:t.data.y,width:t.data.width,height:t.data.height},this.current_angle=null),"mousemove"==l&&"selected_object_actions"==this.mouse_lock&&this.is_drag){var p=t.data.render_function&&["line","arrow","gradient"].includes(t.data.render_function[0]);c.style.cursor="pointer";var f=!1;(1==e.ctrlKey||e.metaKey)&&(f=!0);var m=Math.floor(h/4)%2==1,g=Math.floor(h/8)%2==1,A=Math.floor(h/1)%2==1,v=Math.floor(h/2)%2==1;if(m&&A?c.style.cursor="nwse-resize":A&&g?c.style.cursor="nesw-resize":g&&v?c.style.cursor="nwse-resize":v&&m?c.style.cursor="nesw-resize":A?c.style.cursor="ns-resize":g?c.style.cursor="ew-resize":v?c.style.cursor="ns-resize":m&&(c.style.cursor="ew-resize"),"rotate"==h){var y=r+this.calcRotateDistanceFromX(o)-(r+o/2),_=s/2,b=Math.atan2(_,y)/Math.PI*180,C=(y=d.x-(r+o/2),_=d.y-(a+s/2),Math.atan2(_,y)/Math.PI*180+b);this.current_angle=C,i.Z.need_render=!0}else if(1==e.buttons||void 0===e.buttons){y=Math.round(d.x-d.click_x),_=Math.round(d.y-d.click_y);var w=this.click_details.width+y,x=this.click_details.height+_;if(A&&(x=this.click_details.height-_),m&&(w=this.click_details.width-y),h&&0!=(h&h-1)&&1==t.keep_ratio&&0==f||!0!==t.keep_ratio&&1==f){var k=this.click_details.width/this.click_details.height,B=Math.round(x*k),S=Math.round(w/k);Math.abs(100*w/B)>Math.abs(100*x/S)?x=S:w=B}t.data.x=this.click_details.x,t.data.y=this.click_details.y,A&&(t.data.y=this.click_details.y-(x-this.click_details.height)),m&&(t.data.x=this.click_details.x-(w-this.click_details.width)),(m||g)&&(t.data.width=w),(A||v)&&(t.data.height=x),p||(t.data.width<=0&&(t.data.width=Math.abs(t.data.width),m?t.data.x-=t.data.width:t.data.x=this.click_details.x-t.data.width),t.data.height<=0&&(t.data.height=Math.abs(t.data.height),A?t.data.y-=t.data.height:t.data.y=this.click_details.y-t.data.height)),i.Z.need_render=!0}}else if("mouseup"==l&&"selected_object_actions"==this.mouse_lock&&(this.mouse_lock=null),!this.mouse_lock){for(var Z in t.enable_move&&d.x>r&&d.xa&&d.y{"use strict";n.d(t,{Z:()=>A});var r=n(5861),a=n(5671),i=n(3144),o=n(4687),s=n.n(o),l=(n(9314),n(699)),c=n(1125),u=n(1748),d=n(1606),h=n.n(d),p=n(8562);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==d[1]?d[1]:{},r=!1,e.prev=2,e.next=5,t.do();case 5:e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",{status:"aborted",reason:e.t0});case 10:if(!(this.action_history_indexthis.action_history_max)){e.next=55;break}return u=this.action_history.shift(),e.prev=45,e.next=48,u.free();case 48:e.next=53;break;case 50:e.prev=50,e.t3=e.catch(45),r=!0;case 53:e.next=56;break;case 55:this.action_history_index++;case 56:return window.performance&&window.performance.memory&&window.performance.memory.usedJSHeapSize>.8*window.performance.memory.jsHeapSizeLimit&&this.free(.2*window.performance.memory.jsHeapSizeLimit),r&&h().error("A problem occurred while removing undo history. It's suggested you save your work and refresh the page in order to free up memory."),e.abrupt("return",{status:"completed"});case 59:case"end":return e.stop()}}),e,this,[[2,7],[14,30,33,36],[18,23],[45,50]])}))),function(e){return m.apply(this,arguments)})},{key:"can_redo",value:function(){return this.action_history_index0}},{key:"redo_action",value:(d=(0,r.Z)(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.can_redo()){e.next=7;break}return t=this.action_history[this.action_history_index],e.next=4,t.do();case 4:this.action_history_index++,e.next=8;break;case 7:h().success("There's nothing to redo",3);case 8:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"undo_action",value:(o=(0,r.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.can_undo()){e.next=6;break}return this.action_history_index--,e.next=4,this.action_history[this.action_history_index].undo();case 4:e.next=7;break;case 6:h().success("There's nothing to undo",3);case 7:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"scrap_last_action",value:(n=(0,r.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.can_undo()){e.next=4;break}return e.next=3,this.undo_action();case 3:this.action_history.pop();case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"free",value:(t=(0,r.Z)(s().mark((function e(){var t,n,r,a,i,o,l,c,u,d=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=d.length>0&&void 0!==d[0]?d[0]:0,n=d.length>1&&void 0!==d[1]?d[1]:0,r=0,a=0,i=!1,o=!1;case 6:if(!(this.action_history_index>0)){e.next=24;break}return l=this.action_history.shift(),r+=l.memory_estimate,a+=l.database_estimate,e.prev=10,e.next=13,l.free();case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),i=!0;case 18:if(!(r>=t&&a>=n)){e.next=21;break}return o=!0,e.abrupt("break",24);case 21:this.action_history_index--,e.next=6;break;case 24:if(o){e.next=44;break}c=this.action_history.length-1;case 26:if(!(c>=0)){e.next=44;break}return u=this.action_history[c],r+=u.memory_estimate,a+=u.database_estimate,e.prev=30,e.next=33,u.free();case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(30),i=!0;case 38:if(!(r>=t&&a>=n)){e.next=41;break}return o=!0,e.abrupt("break",44);case 41:c--,e.next=26;break;case 44:return i&&h().error("A problem occurred while removing undo history. It's suggested you save your work and refresh the page in order to free up memory."),e.abrupt("return",{total_memory_freed:r,total_database_freed:a});case 46:case"end":return e.stop()}}),e,this,[[10,15],[30,35]])}))),function(){return t.apply(this,arguments)})},{key:"save",value:function(){var e="window.State.save() is removed. Use State.do_action() to manage undo history instead.";console.warn(e),h().error(e)}},{key:"undo",value:function(){this.undo_action()}},{key:"redo",value:function(){this.redo_action()}}]),e}()},5071:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(5671),a=n(3144),i=n(9314),o=n(699),s=n(1125),l=n(8562),c=n(1748),u=n(9755);const d=function(){function e(t){(0,r.Z)(this,e),this.Base_layers=new o.Z,this.Base_gui=new s.Z,this.Helper=new c.Z,this.is_drag=!1,this.mouse_last_click_pos=[!1,!1],this.mouse_click_pos=[!1,!1],this.mouse_move_last=[!1,!1],this.mouse_valid=!1,this.mouse_click_valid=!1,this.speed_average=0,this.save_mouse=t,this.is_touch=!1,this.shape_mouse_click={x:null,y:null},this.prepare(),1==this.save_mouse&&this.events()}return(0,a.Z)(e,[{key:"dragStart",value:function(e){var t=this,n=t.get_mouse_info(e,!0);t.mouse_click_pos[0]=n.x,t.mouse_click_pos[1]=n.y,t.set_mouse_info(e),t.is_drag=!0,t.speed_average=0,n=t.get_mouse_info(e,!0),t.mouse_last_click_pos[0]=n.x,t.mouse_last_click_pos[1]=n.y}},{key:"dragMove",value:function(e){var t=this;t.set_mouse_info(e),t.speed_average=t.calc_average_mouse_speed(e)}},{key:"dragEnd",value:function(e){this.is_drag=!1,this.set_mouse_info(e)}},{key:"events",value:function(){var e=this;document.addEventListener("mousedown",(function(t){1!=e.is_touch&&e.dragStart(t)})),document.addEventListener("mousemove",(function(t){1!=e.is_touch&&e.dragMove(t)})),document.addEventListener("mouseup",(function(t){1!=e.is_touch&&e.dragEnd(t)})),document.addEventListener("touchstart",(function(t){e.is_touch=!0,e.dragStart(t)})),document.addEventListener("touchmove",(function(t){e.dragMove(t),"canvas_minipaint"!==t.target.id||u(".scroll").has(u(t.target)).length||t.preventDefault()}),{passive:!1}),document.addEventListener("touchend",(function(t){e.dragEnd(t)})),window.addEventListener("resize",(function(t){e.prepare()}))}},{key:"prepare",value:function(){this.is_drag=i.Z.mouse.is_drag}},{key:"set_mouse_info",value:function(e){if(!0!==this.save_mouse)return!1;var t=e.type;"canvas_minipaint"!=e.target.id&&"main_wrapper"!=e.target.id?this.mouse_valid=!1:this.mouse_valid=!0,"mousedown"!==t&&"touchstart"!==t||("canvas_minipaint"!=e.target.id&&"main_wrapper"!=e.target.id||1!=e.which&&"touchstart"!==t?this.mouse_click_valid=!1:this.mouse_click_valid=!0,this.mouse_valid=!0),e.changedTouches&&(e=e.changedTouches[0]);var n=this.get_mouse_coordinates_from_event(e),r=n.x,a=n.y,o=this.Base_layers.get_world_coords(0,0),s=r-o.x,l=a-o.y;i.Z.mouse={x:r,y:a,x_rel:s,y_rel:l,last_click_x:this.mouse_last_click_pos[0],last_click_y:this.mouse_last_click_pos[1],click_x:this.mouse_click_pos[0],click_y:this.mouse_click_pos[1],last_x:this.mouse_move_last[0],last_y:this.mouse_move_last[1],valid:this.mouse_valid,click_valid:this.mouse_click_valid,is_drag:this.is_drag,speed_average:this.speed_average},"mousemove"!==t&&"touchmove"!==t||(this.mouse_move_last[0]=r,this.mouse_move_last[1]=a)}},{key:"get_mouse_coordinates_from_event",value:function(e){var t=e.pageX-this.Base_gui.canvas_offset.x,n=e.pageY-this.Base_gui.canvas_offset.y,r=this.Base_layers.get_world_coords(t,n);return{x:t=r.x,y:n=r.y}}},{key:"get_mouse_info",value:function(e){return void 0!==e&&void 0===mouse.x&&this.set_mouse_info(e),i.Z.mouse}},{key:"calc_average_mouse_speed",value:function(e){if(0==this.is_drag)return null;var t=this.get_mouse_info(e,!0),n=Math.abs(t.x-t.last_x),r=Math.abs(t.y-t.last_y),a=Math.sqrt(n*n+r*r),i=this.speed_average;return a>15?i+=2:i-=2,i=Math.max(0,i),Math.min(30,i)}},{key:"get_params_hash",value:function(){var e=[this.getParams(),i.Z.COLOR,i.Z.ALPHA];return JSON.stringify(e)}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"show_mouse_cursor",value:function(e,t,n,r){var a=this.Base_layers.get_world_coords(0,0);e-=a.x,t-=a.y;var o=document.getElementById("mouse");n*=i.Z.ZOOM,e*=i.Z.ZOOM,t*=i.Z.ZOOM,n<5?o.className="":(o.style.width=n+"px",o.style.height=n+"px",o.style.left=e-Math.ceil(n/2)+"px",o.style.top=t-Math.ceil(n/2)+"px",o.className="",o.classList.add(r))}},{key:"getParams",value:function(){var e={};for(var t in i.Z.TOOL.attributes){var n=i.Z.TOOL.attributes[t];isNaN(n.value)||null==n.value||"string"==typeof n.value?e[t]=n:e[t]=n.value}return e}},{key:"adaptSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"width";return null==i.Z.layer.width_original?e:"width"===t?e/(i.Z.layer.width/i.Z.layer.width_original):e/(i.Z.layer.height/i.Z.layer.height_original)}},{key:"draw_shape",value:function(e,t,n,r,a,i,o){for(var s in!1!==o&&(e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2),e.lineJoin="round",e.beginPath(),i)if(null!==i[s]){var l=t+i[s][0]*r/100,c=n+i[s][1]*a/100;"0"==s?e.moveTo(l,c):e.lineTo(l,c)}else e.closePath(),e.fill(),e.stroke(),e.beginPath();e.closePath(),e.fill(),e.stroke()}},{key:"default_events",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.default_dragStart(t)})),document.addEventListener("mousemove",(function(t){e.default_dragMove(t)})),document.addEventListener("mouseup",(function(t){e.default_dragEnd(t)})),document.addEventListener("touchstart",(function(t){e.default_dragStart(t)})),document.addEventListener("touchmove",(function(t){e.default_dragMove(t)})),document.addEventListener("touchend",(function(t){e.default_dragEnd(t)}))}},{key:"default_dragStart",value:function(e){i.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"default_dragMove",value:function(e){i.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"default_dragEnd",value:function(e){i.Z.TOOL.name==this.name&&this.mouseup(e)}},{key:"shape_mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=t.x,r=t.y,a=this.calc_snap_position(e,n,r);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),this.shape_mouse_click.x=n,this.shape_mouse_click.y=r,this.layer={type:this.name,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:Math.round(n),y:Math.round(r),color:null,is_vector:!0},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_"+this.name+"_layer","New "+this.Helper.ucfirst(this.name)+" Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"shape_mousemove",value:function(e){var t=this.get_mouse_info(e);if(this.getParams(),0!=t.is_drag&&0!=t.click_valid){var n=Math.round(t.x),r=Math.round(t.y),a=Math.round(this.shape_mouse_click.x),o=Math.round(this.shape_mouse_click.y),s=this.calc_snap_position(e,n,r,i.Z.layer.id);null!=s&&(null!=s.x&&(n=s.x),null!=s.y&&(r=s.y));var l=Math.min(n,a),c=Math.min(r,o),u=Math.abs(n-a),d=Math.abs(r-o);(1==e.ctrlKey||e.metaKey)&&(u0&&a0&&a0&&a0&&o0&&o0&&o{var r,a,i,o,s,l,c,u,d,h=n(9755);a='\n\t\t
    \n\t\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t',i=function(e){var t=r(e.target.closest(".ui_range")),n=e.key,a=t.data(),i=a.value,o=a.step,s=a.min,l=a.max;["Left","ArrowLeft","Down","ArrowDown"].includes(n)?(e.preventDefault(),d(t,i-o),t.trigger("input")):["Right","ArrowRight","Up","ArrowUp"].includes(n)?(e.preventDefault(),d(t,i+o),t.trigger("input")):["PageUp"].includes(n)?(e.preventDefault(),d(t,i+10*o),t.trigger("input")):["PageDown"].includes(n)?(e.preventDefault(),d(t,i-10*o),t.trigger("input")):["Home"].includes(n)?(e.preventDefault(),d(t,s),t.trigger("input")):["End"].includes(n)&&(e.preventDefault(),d(t,l),t.trigger("input"))},o=function(e){var t=r(e.target.closest(".ui_range"));if(document.activeElement===t[0]){var n=t.data(),a=n.value,i=n.step;e.originalEvent.deltaY<0?(e.preventDefault(),d(t,a+i),t.trigger("input")):e.originalEvent.deltaY>0&&(e.preventDefault(),d(t,a-i),t.trigger("input"))}},s=function(e){e.preventDefault();var t=e.touches&&e.touches.length>0?e.touches[0].target:e.target,n=r(t.closest(".ui_range")),a=n.data(),i=a.handle,o=a.paddedTrack,s=a.value,l=a.min,h=a.max,p=a.vertical,f=e.touches&&e.touches.length>0?e.touches[0].clientX:e.clientX,m=e.touches&&e.touches.length>0?e.touches[0].clientY:e.clientY,g=o.getBoundingClientRect(),A=s;if(t!==i){var v,y;p?(v=g.top-g.bottom,y=m-g.bottom):(v=g.right-g.left,y=f-g.left);var _=Math.max(0,Math.min(1,y/v));d(n,A=(h-l)*_),n.trigger("input")}n.data({mouseDownValue:A,mouseDownClientX:f,mouseDownClientY:m,mouseDownPaddedTrackRect:g,mouseMoveWindowHandler:c(n),mouseUpWindowHandler:u(n)}),n.addClass("active");var b=r(window);b.on("mousemove touchmove",n.data("mouseMoveWindowHandler")),b.on("mouseup touchend",n.data("mouseUpWindowHandler")),n[0].focus()},l=function(e){e.preventDefault()},c=function(e){return function(t){t.preventDefault(),t.stopPropagation();var n,r,a,i=e.data(),o=i.mouseDownValue,s=i.min,l=i.max,c=i.vertical,u=i.mouseDownClientX,h=i.mouseDownClientY,p=i.mouseDownPaddedTrackRect;r=c?(t.touches&&t.touches.length>0?t.touches[0].clientY:t.clientY)-h+((o-s)/(l-s)*(n=p.top-p.bottom)-(a=h-p.bottom)):(t.touches&&t.touches.length>0?t.touches[0].clientX:t.clientX)-u+((o-s)/(l-s)*(n=p.right-p.left)-(a=u-p.left));var f=Math.max(0,Math.min(1,(a+r)/n));d(e,(l-s)*f),e.trigger("input")}},u=function(e){return function(t){var n=r(window);e.removeClass("active"),n.off("mousemove touchmove",e.data("mouseMoveWindowHandler")),n.off("mouseup touchend",e.data("mouseUpWindowHandler"))}},d=function(e,t){var n=e.data(),r=n.bar,a=n.min,i=n.max,o=n.step,s=n.vertical;t=o*Math.round(t/o),t=Math.max(a,Math.min(i,t)),e.data("value",t),e.attr("aria-valuemin",a),e.attr("aria-valuemax",i),e.attr("aria-valuenow",t),s?r.style.height=(t-a)/(i-a)*100+"%":r.style.width=(t-a)/(i-a)*100+"%"},(r=h).fn.uiRange=function(e){for(var t=[],n=0;n0?1===t.length?t[0]:t:this}},6100:(e,t,n)=>{var r,a,i,o,s,l,c,u=n(9755);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?1===t.length?t[0]:t:this}},9687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(4942),a=n(885),i=n(2982),o=n(5671),s=n(3144),l=n(9314),c=n(1748),u=n(9755);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t
    \n';else{var t=this.Helper.getCookie("color");null!=t&&(l.Z.COLOR=t),this.el=document.getElementById("toggle_colors"),this.el.innerHTML='\n\t
    \n\t\t
    \n\t\t
    \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n\t
    \n\t\t
    \n\t
    \n\t
    \n\t\t\n\t\t
    \n\t\t\t\n\t\t\t\n\t\t
    \n\t
    \n\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t
    \n'}this.init_components(),this.render_ui_deferred=h.throttle(this.render_ui_deferred,50)}},{key:"init_components",value:function(){var e=this;this.buttons={toggleColorSwatches:u("#toggle_color_swatches_section_button",this.el),toggleColorPicker:u("#toggle_color_picker_section_button",this.el),toggleColorChannels:u("#toggle_color_channels_section_button",this.el)},this.sections={swatches:u("#color_section_swatches",this.el),swatchesPlaceholder:document.createComment("Placeholder comment for color swatches"),picker:u("#color_section_picker",this.el),pickerPlaceholder:document.createComment("Placeholder comment for color picker"),channels:u("#color_section_channels",this.el),channelsPlaceholder:document.createComment("Placeholder comment for color channels")};var t="dialog"===this.uiType?"dialog_":"";this.inputs={sample:u("#".concat(t,"selected_color_sample"),this.el),swatches:u("#".concat(t,"color_swatches"),this.el),pickerGradient:u("#".concat(t,"color_picker_gradient"),this.el),hex:u("#".concat(t,"color_hex"),this.el),rgb:{r:{range:u("#".concat(t,"rgb_r_range"),this.el),number:u("#".concat(t,"rgb_r"),this.el)},g:{range:u("#".concat(t,"rgb_g_range"),this.el),number:u("#".concat(t,"rgb_g"),this.el)},b:{range:u("#".concat(t,"rgb_b_range"),this.el),number:u("#".concat(t,"rgb_b"),this.el)},a:{range:u("#".concat(t,"rgb_a_range"),this.el),number:u("#".concat(t,"rgb_a"),this.el)}},hsl:{h:{range:u("#".concat(t,"hsl_h_range"),this.el),number:u("#".concat(t,"hsl_h"),this.el)},s:{range:u("#".concat(t,"hsl_s_range"),this.el),number:u("#".concat(t,"hsl_s"),this.el)},l:{range:u("#".concat(t,"hsl_l_range"),this.el),number:u("#".concat(t,"hsl_l"),this.el)}}},this.buttons.toggleColorSwatches.on("click",(function(){e.buttons.toggleColorSwatches.attr("aria-pressed","true"===e.buttons.toggleColorSwatches.attr("aria-pressed")?"false":"true");var t="true"===e.buttons.toggleColorSwatches.attr("aria-pressed");t?(e.sections.swatchesPlaceholder.parentNode.insertBefore(e.sections.swatches[0],e.sections.swatchesPlaceholder.nextSibling),e.sections.swatchesPlaceholder.parentNode.removeChild(e.sections.swatchesPlaceholder)):(e.sections.swatches[0].parentNode.insertBefore(e.sections.swatchesPlaceholder,e.sections.swatches[0].nextSibling),e.sections.swatches[0].parentNode.removeChild(e.sections.swatches[0])),h.setCookie("toggle_color_swatches",t?1:0)}));var n=h.getCookie("toggle_color_swatches");0!==n&&null!=n||this.buttons.toggleColorSwatches.trigger("click"),this.buttons.toggleColorPicker.on("click",(function(){e.buttons.toggleColorPicker.attr("aria-pressed","true"===e.buttons.toggleColorPicker.attr("aria-pressed")?"false":"true");var t="true"===e.buttons.toggleColorPicker.attr("aria-pressed");t?(e.sections.pickerPlaceholder.parentNode.insertBefore(e.sections.picker[0],e.sections.pickerPlaceholder.nextSibling),e.sections.pickerPlaceholder.parentNode.removeChild(e.sections.pickerPlaceholder)):(e.sections.picker[0].parentNode.insertBefore(e.sections.pickerPlaceholder,e.sections.picker[0].nextSibling),e.sections.picker[0].parentNode.removeChild(e.sections.picker[0])),h.setCookie("toggle_color_picker",t?1:0)})),this.inputs.sample.on("click",(function(t){e.buttons.toggleColorPicker.click()})),0===h.getCookie("toggle_color_picker")&&this.buttons.toggleColorPicker.trigger("click"),this.buttons.toggleColorChannels.on("click",(function(){e.buttons.toggleColorChannels.attr("aria-pressed","true"===e.buttons.toggleColorChannels.attr("aria-pressed")?"false":"true");var t="true"===e.buttons.toggleColorChannels.attr("aria-pressed");t?(e.sections.channelsPlaceholder.parentNode.insertBefore(e.sections.channels[0],e.sections.channelsPlaceholder.nextSibling),e.sections.channelsPlaceholder.parentNode.removeChild(e.sections.channelsPlaceholder)):(e.sections.channels[0].parentNode.insertBefore(e.sections.channelsPlaceholder,e.sections.channels[0].nextSibling),e.sections.channels[0].parentNode.removeChild(e.sections.channels[0])),h.setCookie("toggle_color_channels",t?1:0)}));var o=h.getCookie("toggle_color_channels");0!==o&&null!=o||this.buttons.toggleColorChannels.trigger("click"),this.inputs.swatches.uiSwatches({rows:3,cols:7,count:21,readonly:"dialog"===this.uiType}).on("input",(function(){e.set_color({hex:e.inputs.swatches.uiSwatches("get_selected_hex")})})),"dialog"===this.uiType&&this.inputs.swatches.uiSwatches("set_all_hex",l.Z.swatches.default),this.inputs.pickerGradient.uiColorPickerGradient().on("input",(function(){var t=e.inputs.pickerGradient.uiColorPickerGradient("get_hsv");e.set_color({h:360*t.h,s:100*t.s,v:100*t.v})})),this.inputs.hex.on("input",(function(t){var n=e.inputs.hex.val(),r=n.trim();n!==r&&e.inputs.hex.val(r),e.inputs.hex[0].setCustomValidity(/^\#[0-9A-F]{6}$/gi.test(r)?"":"Invalid Hex Code"),e.set_color({hex:e.inputs.hex.val()})})).on("blur",(function(){var t=e.inputs.hex.val();/^\#[0-9A-F]{6}$/gi.test(t)||(e.inputs.hex.val("dialog"===e.uiType?e.COLOR:l.Z.COLOR),e.inputs.hex[0].setCustomValidity(""))}));var s,c=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}([].concat((0,i.Z)(Object.entries(this.inputs.rgb)),(0,i.Z)(Object.entries(this.inputs.hsl))));try{var p=function(){var t=(0,a.Z)(s.value,2),n=t[0],i=t[1];i.range&&i.range.uiRange().on("input",(function(){e.set_color((0,r.Z)({},n,i.range.uiRange("get_value")))})),i.number&&i.number.uiNumberInput().on("input",(function(){e.set_color((0,r.Z)({},n,i.number.uiNumberInput("get_value")))}))};for(c.s();!(s=c.n()).done;)p()}catch(e){c.e(e)}finally{c.f()}this.render_selected_color()}},{key:"set_color",value:function(e){var t=null,n=null,r=null,a=null;if("hex"in e){var i="#"+e.hex.replace(/[^0-9A-F]*/gi,"");/^\#[0-9A-F]{6}$/gi.test(i)&&(t="#"+e.hex.trim().replace(/^\#/,""))}else if("r"in e||"b"in e||"g"in e){var o=h.hexToRgb("dialog"===this.uiType?this.COLOR:l.Z.COLOR);t=h.rgbToHex("r"in e?Math.min(255,Math.max(0,parseInt(e.r,10)||0)):o.r,"g"in e?Math.min(255,Math.max(0,parseInt(e.g,10)||0)):o.g,"b"in e?Math.min(255,Math.max(0,parseInt(e.b,10)||0)):o.b)}else if("v"in e){var s=h.hexToRgb("dialog"===this.uiType?this.COLOR:l.Z.COLOR),c=h.rgbToHsv(s.r,s.g,s.b);a={h:"h"in e?Math.min(360,Math.max(0,parseInt(e.h,10)||0))/360:c.h,s:"s"in e?Math.min(100,Math.max(0,parseInt(e.s,10)||0))/100:c.s,v:"v"in e?Math.min(100,Math.max(0,parseInt(e.v,10)||0))/100:c.v},t=h.hsvToHex(a.h,a.s,a.v)}else("h"in e||"s"in e||"l"in e)&&(r={h:("h"in e?Math.min(360,Math.max(0,parseInt(e.h,10)||0)):parseInt(this.inputs.hsl.h.number.uiNumberInput("get_value"),10))/360,s:("s"in e?Math.min(100,Math.max(0,parseInt(e.s,10)||0)):parseInt(this.inputs.hsl.s.number.uiNumberInput("get_value"),10))/100,l:("l"in e?Math.min(100,Math.max(0,parseInt(e.l,10)||0)):parseInt(this.inputs.hsl.l.number.uiNumberInput("get_value"),10))/100},t=h.hslToHex(r.h,r.s,r.l));"a"in e&&(n=Math.min(255,Math.max(0,parseInt(Math.ceil(e.a),10)))),null==t&&null==n||("dialog"===this.uiType?(this.COLOR=null!=t?t:this.COLOR,this.ALPHA=null!=n?n:this.ALPHA,this.colorNotSet&&(this.colorNotSet=!1,u("#dialog_previous_color_sample",this.el)[0].style.background=this.COLOR)):(l.Z.COLOR=null!=t?t:l.Z.COLOR,l.Z.ALPHA=null!=n?n:l.Z.ALPHA),r&&!a&&(a=h.hslToHsv(r.h,r.s,r.l)),a&&!r&&(r=h.hsvToHsl(a.h,a.s,a.v)),this.render_selected_color({hsl:r,hsv:a})),"sidebar"===this.uiType&&this.Helper.setCookie("color",l.Z.COLOR)}},{key:"render_selected_color",value:function(e){e=e||{};var t="dialog"===this.uiType?this.COLOR:l.Z.COLOR,n="dialog"===this.uiType?this.ALPHA:l.Z.ALPHA;this.inputs.sample.css("background",t),"dialog"!==this.uiType&&this.inputs.swatches.uiSwatches("set_selected_hex",t);var r=this.inputs.hex[0];r.value=t,r.setCustomValidity("");var a=h.hexToRgb(t);for(var i in delete a.a,a)this.inputs.rgb[i].range.uiRange("set_value",a[i]),this.inputs.rgb[i].number.uiNumberInput("set_value",a[i]);this.inputs.rgb.a.range.uiRange("set_value",n),this.inputs.rgb.a.number.uiNumberInput("set_value",n);var o=e.hsv||h.rgbToHsv(a.r,a.g,a.b),s=e.hsl||h.rgbToHsl(a.r,a.g,a.b);for(var c in s){var u=Math.round(s[c]*("h"===c?360:100));this.inputs.hsl[c].range.uiRange("set_value",u),this.inputs.hsl[c].number.uiNumberInput("set_value",u)}this.render_ui_deferred({hsl:s,hsv:o})}},{key:"render_ui_deferred",value:function(e){e=e||{};var t="dialog"===this.uiType?this.COLOR:l.Z.COLOR,n=h.hexToRgb(t);for(var r in delete n.a,n){var a=JSON.parse(JSON.stringify(n)),i=JSON.parse(JSON.stringify(n));a[r]=0,i[r]=255,this.inputs.rgb[r].range.uiRange("set_background","linear-gradient(to right, ".concat(h.rgbToHex(a.r,a.g,a.b),", ").concat(h.rgbToHex(i.r,i.g,i.b),")"))}this.inputs.rgb.a.range.uiRange("set_background","linear-gradient(to right, transparent, ".concat(t,")"));var o=e.hsv||h.rgbToHsv(n.r,n.g,n.b);this.inputs.pickerGradient.uiColorPickerGradient("set_hsv",o);var s=e.hsl||h.rgbToHsl(n.r,n.g,n.b);this.inputs.hsl.h.range.uiRange("set_background","linear-gradient(to right, ".concat(h.hex_set_hsl("#ff0000",{s:s.s,l:s.l})," 0%, ").concat(h.hex_set_hsl("#ffff00",{s:s.s,l:s.l})," 17%, ").concat(h.hex_set_hsl("#00ff00",{s:s.s,l:s.l})," 33%, ").concat(h.hex_set_hsl("#00ffff",{s:s.s,l:s.l})," 50%, ").concat(h.hex_set_hsl("#0000ff",{s:s.s,l:s.l})," 67%, ").concat(h.hex_set_hsl("#ff00ff",{s:s.s,l:s.l})," 83%, ").concat(h.hex_set_hsl("#ff0000",{s:s.s,l:s.l})," 100%)"));var c=JSON.parse(JSON.stringify(s)),u=JSON.parse(JSON.stringify(s));c.s=0,u.s=1,this.inputs.hsl.s.range.uiRange("set_background","linear-gradient(to right, ".concat(h.hslToHex(c.h,c.s,c.l),", ").concat(h.hslToHex(u.h,u.s,u.l),")"));var d=JSON.parse(JSON.stringify(s));d.l=.5,this.inputs.hsl.l.range.uiRange("set_background","linear-gradient(to right, #000000 0%, ".concat(h.hslToHex(d.h,d.s,d.l)," 50%, #ffffff 100%)")),"sidebar"===this.uiType&&(l.Z.swatches.default=this.inputs.swatches.uiSwatches("get_all_hex"))}}]),e}()},8476:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(5861),a=n(5671),i=n(3144),o=n(4687),s=n.n(o),l=n(9314),c=n(699),u=null;const d=function(){function e(t){if((0,a.Z)(this,e),u)return u;u=this,document.getElementById("toggle_preview").innerHTML='\n\t
    \n\t\t
    \n\t\t\n\t
    \n\t
    \n\t\t
    \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    \n\t\t\n\t
    \n',this.PREVIEW_SIZE={w:176,h:100},this.canvas_offset={x:0,y:0},this.zoom_data={x:0,y:0,move_pos:null},this.mouse_pressed=!1,this.canvas_preview=null,null!=t&&(this.GUI=t),this.Base_layers=new c.Z}var t;return(0,i.Z)(e,[{key:"render_main_preview",value:function(){this.canvas_preview=document.getElementById("canvas_preview").getContext("2d"),this.prepare_canvas(),l.Z.need_render=!0,this.set_events()}},{key:"set_events",value:function(){var e=this,t=!1;document.addEventListener("mousedown",(function(t){e.mouse_pressed=!0}),!1),document.addEventListener("mouseup",(function(t){e.mouse_pressed=!1}),!1),document.addEventListener("touchstart",(function(t){e.mouse_pressed=!0}),!1),document.addEventListener("touchend",(function(t){e.mouse_pressed=!1}),!1),document.getElementById("zoom_range").addEventListener("input",(function(t){e.set_center_zoom(),e.zoom(this.value)}),!1),document.getElementById("zoom_range").addEventListener("change",(function(t){this.value!=100*l.Z.ZOOM&&(e.set_center_zoom(),e.zoom(this.value))}),!1),document.getElementById("zoom_less").addEventListener("click",(function(t){e.set_center_zoom(),e.zoom(-1)}),!1),document.getElementById("zoom_100").addEventListener("click",(function(t){e.zoom(100)}),!1),document.getElementById("zoom_more").addEventListener("click",(function(t){e.set_center_zoom(),e.zoom(1)}),!1),document.getElementById("zoom_fit").addEventListener("click",(function(t){e.zoom_auto()}),!1),document.getElementById("main_wrapper").addEventListener("wheel",(function(t){t.preventDefault(),e.zoom_data.x=t.offsetX,e.zoom_data.y=t.offsetY,Math.max(-1,Math.min(1,t.wheelDelta||-t.detail||-t.deltaY))>0?e.zoom(1,t):e.zoom(-1,t)}),!1),window.addEventListener("resize",(function(e){l.Z.need_render=!0}),!1),document.getElementById("canvas_preview").addEventListener("mousedown",(function(n){t||e.set_zoom_position(n)}),!1),document.getElementById("canvas_preview").addEventListener("mousemove",(function(n){t||0!=e.mouse_pressed&&e.set_zoom_position(n)}),!1),document.getElementById("canvas_preview").addEventListener("touchstart",(function(n){t=!0;var r=document.body.getBoundingClientRect(),a=document.getElementById("canvas_preview").getBoundingClientRect();e.canvas_offset.x=a.left-r.left,e.canvas_offset.y=a.top-r.top,e.set_zoom_position(n)})),document.getElementById("canvas_preview").addEventListener("touchmove",(function(t){0!=e.mouse_pressed&&e.set_zoom_position(t)}))}},{key:"prepare_canvas",value:function(){this.canvas_preview.webkitImageSmoothingEnabled=!1,this.canvas_preview.msImageSmoothingEnabled=!1,this.canvas_preview.imageSmoothingEnabled=!1,this.GUI.render_canvas_background("canvas_preview",8)}},{key:"render_preview_active_zone",value:function(){null==this.canvas_preview&&(this.canvas_preview=document.getElementById("canvas_preview").getContext("2d"));var e=l.Z.visible_width/l.Z.ZOOM,t=l.Z.visible_height/l.Z.ZOOM,n=this.PREVIEW_SIZE.w*e/l.Z.WIDTH,r=this.PREVIEW_SIZE.h*t/l.Z.HEIGHT,a=this.Base_layers.get_world_coords(0,0),i=a.x/l.Z.WIDTH*this.PREVIEW_SIZE.w,o=a.y/l.Z.HEIGHT*this.PREVIEW_SIZE.h;i=Math.max(0,i),o=Math.max(0,o),n=Math.min(this.PREVIEW_SIZE.w-1,n),r=Math.min(this.PREVIEW_SIZE.h-1,r),i+n>this.PREVIEW_SIZE.w&&(i=this.PREVIEW_SIZE.w-n),o+r>this.PREVIEW_SIZE.h&&(o=this.PREVIEW_SIZE.h-r),0==i&&0==o&&n==this.PREVIEW_SIZE.w-1&&r==this.PREVIEW_SIZE.h-1||(this.canvas_preview.lineWidth=1,this.canvas_preview.beginPath(),this.canvas_preview.rect(Math.round(i)+.5,Math.round(o)+.5,n,r),this.canvas_preview.fillStyle="rgba(0, 255, 0, 0.3)",this.canvas_preview.strokeStyle="#00ff00",this.canvas_preview.fill(),this.canvas_preview.stroke())}},{key:"zoom",value:(t=(0,r.Z)(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null!=t&&(1==t||-1==t?(l.Z.ZOOM>1&&l.Z.ZOOM<1.5&&(l.Z.ZOOM=1),l.Z.ZOOM>.9&&l.Z.ZOOM<1&&(l.Z.ZOOM=1),t<0?l.Z.ZOOM>3?l.Z.ZOOM-=1:l.Z.ZOOM>1?l.Z.ZOOM-=.5:l.Z.ZOOM>.1?l.Z.ZOOM-=.1:l.Z.ZOOM-=.01:l.Z.ZOOM<.1?l.Z.ZOOM+=.01:l.Z.ZOOM<1?l.Z.ZOOM+=.1:l.Z.ZOOM<3?l.Z.ZOOM+=.5:l.Z.ZOOM+=1):l.Z.ZOOM=t/100,l.Z.ZOOM=Math.round(100*l.Z.ZOOM)/100,l.Z.ZOOM=Math.max(l.Z.ZOOM,.01),l.Z.ZOOM=Math.min(l.Z.ZOOM,500)),document.getElementById("zoom_100").innerHTML=Math.round(100*l.Z.ZOOM)+"%",document.getElementById("zoom_range").value=100*l.Z.ZOOM,l.Z.need_render=!0,this.GUI.prepare_canvas(),e.next=7,new Promise((function(e){return setTimeout(e,10)}));case 7:return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"zoom_auto",value:function(e){var t,n=document.getElementById("main_wrapper"),r=n.clientWidth,a=n.clientHeight,i=r/l.Z.WIDTH,o=a/l.Z.HEIGHT;if(t=Math.min(i,o),null!=e&&t>1)return!1;this.zoom(100*Math.min(i,o))}},{key:"set_center_zoom",value:function(){this.zoom_data.x=l.Z.visible_width/2,this.zoom_data.y=l.Z.visible_height/2}},{key:"set_zoom_position",value:function(e){var t=e.offsetX,n=e.offsetY;e.changedTouches&&(t=(e=e.changedTouches[0]).pageX-this.canvas_offset.x,n=e.pageY-this.canvas_offset.y);var r=l.Z.visible_width/l.Z.ZOOM,a=l.Z.visible_height/l.Z.ZOOM,i=this.PREVIEW_SIZE.w*r/l.Z.WIDTH,o=this.PREVIEW_SIZE.h*a/l.Z.HEIGHT,s=(t-i/2)/this.PREVIEW_SIZE.w*l.Z.WIDTH,c=(n-o/2)/this.PREVIEW_SIZE.h*l.Z.HEIGHT,u=this.zoom_data;u.move_pos={},u.move_pos.x=s,u.move_pos.y=c,l.Z.need_render=!0}},{key:"zoom_to_position",value:function(e,t){var n=this.zoom_data;n.move_pos={},n.move_pos.x=parseInt(e),n.move_pos.y=parseInt(t),l.Z.need_render=!0}}]),e}()},4182:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(1002),a=n(5861),i=n(5671),o=n(3144),s=n(4687),l=n.n(s),c=n(8562),u=n(9314),d=n(1748),h=n(5405),p=n(1606),f=n.n(p),m=n(1125),g=n(9755),A=null;const v=function(){function e(t){if((0,i.Z)(this,e),A)return A;A=this,this.Helper=new d.Z,this.Tools_translate=new h.default,this.Base_gui=new m.Z,this.active_tool="brush",this.tools_modules={}}var t;return(0,o.Z)(e,[{key:"load_plugins",value:function(){var e=this,t=document.getElementById("canvas_minipaint").getContext("2d"),r=n(3832);r.keys().forEach((function(n){if(n.indexOf("Base/")<0){var a=n.replace("./","").replace(".js",""),i=a;if(a.indexOf("/")>-1){var o=a.split("/");a=o[o.length-1]}var s=new(r(n).default)(t),l=e.Helper.ucfirst(s.name);l=l.replace(/_/," "),e.tools_modules[a]={key:a,full_key:i,name:s.name,title:l,object:s},void 0!==s.load&&s.load()}}))}},{key:"render_main_tools",value:function(){this.load_plugins(),this.render_tools()}},{key:"render_tools",value:function(){var e=this,t=this.Helper.getCookie("active_tool");for(var n in"media"!=t&&"shape"!=t||(t=null),null!=t&&(this.active_tool=t),u.Z.TOOLS){var r=u.Z.TOOLS[n];if(r.title)var a=r.title;else a=this.Helper.ucfirst(r.name).replace(/_/," ");var i=document.createElement("span");i.id=r.name,i.title=a,r.name==this.active_tool?i.className="item trn active "+r.name:i.className="item trn "+r.name,!1===r.visible&&(i.style.display="none"),i.addEventListener("click",(function(t){e.activate_tool(this.id)})),document.getElementById("tools_container").appendChild(i)}this.show_action_attributes(),new c.Z.Actions.Activate_tool_action(this.active_tool,!0).do(),this.Base_gui.check_canvas_offset()}},{key:"activate_tool",value:(t=(0,a.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.Z.State.do_action(new c.Z.Actions.Activate_tool_action(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"action_data",value:function(){for(var e in u.Z.TOOLS)if(u.Z.TOOLS[e].name==this.active_tool)return u.Z.TOOLS[e];return this.active_tool=u.Z.TOOLS[0].name,u.Z.TOOLS[0]}},{key:"show_action_attributes",value:function(){var e=this,t=document.getElementById("action_attributes");t.innerHTML="";var n,a=this.action_data().attributes,i=null;for(var o in a){var s=a[o],l=o[0].toUpperCase()+o.slice(1);if(l=l.replace("_"," "),"object"==(0,r.Z)(s)&&"boolean"==typeof s.value&&s.icon?null==i?((i=document.createElement("div")).className="ui_button_group no_wrap",(n=document.createElement("div")).className="item "+o,t.appendChild(n),n.appendChild(i)):n.classList.add(o):((n=document.createElement("div")).className="item "+o,t.appendChild(n),i=null),"boolean"==typeof s||"object"==(0,r.Z)(s)&&"boolean"==typeof s.value)!function(){var t=s,a=null;"object"==(0,r.Z)(s)&&(t=s.value,s.icon&&(a=s.icon));var c=document.createElement("button");c.className="trn",c.type="button",c.id=o,c.innerHTML=l,c.setAttribute("aria-pressed",t),a?(c.classList.add("ui_icon_button"),c.classList.add("input_height"),c.innerHTML=a,c.title=o,c.innerHTML=''+l+''):c.classList.add("ui_toggle_button"),c.addEventListener("click",(function(t){var n="true"!==c.getAttribute("aria-pressed"),a=e.action_data(),i=a.attributes,o=t.target.closest("button").id;if("object"===(0,r.Z)(i[o])?i[o].value=n:i[o]=n,c.setAttribute("aria-pressed",n),null!=a.on_update){var s=a.name,l=a.on_update;e.tools_modules[s].object[l]({key:o,value:n})}})),i?i.appendChild(c):n.appendChild(c)}();else if("number"==typeof s||"object"==(0,r.Z)(s)&&"number"==typeof s.value)!function(){var t=1,a="power"===o?100:999,i=s,c=null;"object"==(0,r.Z)(s)&&(i=s.value,null!=s.min&&(t=s.min),null!=s.max&&(a=s.max),null!=s.step&&(c=s.step)),(m=document.createElement("label")).innerHTML=l+": ",m.id="attribute_label_"+o;var u=document.createElement("input");u.type="number",u.setAttribute("aria-labelledby","attribute_label_"+o);var d=g(u).uiNumberInput({id:o,min:t,max:a,value:i,step:c||1,exponentialStepButtons:!c}).on("input",(function(){var t=d.uiNumberInput("get_value"),n=d.uiNumberInput("get_id"),a=e.action_data(),i=a.attributes;if("object"===(0,r.Z)(i[n])?i[n].value=t:i[n]=t,null!=a.on_update){var o=a.name,s=a.on_update;e.tools_modules[o].object[s]({key:n,value:t})}}));n.appendChild(m),n.appendChild(d[0])}();else if("object"==(0,r.Z)(s)){(m=document.createElement("label")).innerHTML=l+": ",m.for=o;var c=document.createElement("select");c.id=o;var d="function"==typeof s.values?s.values():s.values;for(var h in d){var p=document.createElement("option");s.value==d[h]&&(p.selected="selected"),p.className="trn",p.name=d[h],p.value=d[h],p.text=d[h],c.appendChild(p)}c.addEventListener("change",(function(t){var n=e.action_data();if(n.attributes[t.target.id].value=t.target.value,null!=n.on_update){var r=n.name,a=n.on_update,i=e.tools_modules[r].object[a]({key:t.target.id,value:t.target.value});if(i&&i.new_values)for(var o in i.new_values)n.attributes[o].value=i.new_values[o]}e.show_action_attributes()})),n.appendChild(m),n.appendChild(c)}else if("string"==typeof s&&"#"==s[0]){var m,A;!function(){(m=document.createElement("label")).innerHTML=l+": ",m.for=o,(A=document.createElement("input")).type="color";var t=g(A).uiColorInput({id:o,value:s}).on("change",(function(){var n=t.uiColorInput("get_value"),r=t.uiColorInput("get_id"),a=e.action_data();if(a.attributes[r]=n,null!=a.on_update){var i=a.name,o=a.on_update;e.tools_modules[i].object[o]({key:r,value:n})}}));n.appendChild(m),n.appendChild(t[0])}()}else f().error("Error: unsupported attribute type:"+(0,r.Z)(s)+", "+o)}"en"!=u.Z.LANG&&this.Tools_translate.translate(u.Z.LANG)}}]),e}()},291:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){function e(e,t,n){return Math.max(e,Math.min(t,n))}function t(e){return{_:e,loadContentsOf:function(e){z=this._.gl,this._.loadContentsOf(e)},destroy:function(){z=this._.gl,this._.destroy()}}}function n(e){return t(N.fromElement(e))}function r(e,t){var n=z.UNSIGNED_BYTE;if(z.getExtension("OES_texture_float")&&z.getExtension("OES_texture_float_linear")){var r=new N(100,100,z.RGBA,z.FLOAT);try{r.drawTo((function(){n=z.FLOAT}))}catch(e){}r.destroy()}this._.texture&&this._.texture.destroy(),this._.spareTexture&&this._.spareTexture.destroy(),this.width=e,this.height=t,this._.texture=new N(e,t,z.RGBA,n),this._.spareTexture=new N(e,t,z.RGBA,n),this._.extraTexture=this._.extraTexture||new N(0,0,z.RGBA,n),this._.flippedShader=this._.flippedShader||new H(null,"uniform sampler2D texture;varying vec2 texCoord;void main(){gl_FragColor=texture2D(texture,vec2(texCoord.x,1.0-texCoord.y));}"),this._.isInitialized=!0}function a(e,t,n){return this._.isInitialized&&e._.width==this.width&&e._.height==this.height||r.call(this,t||e._.width,n||e._.height),e._.use(),this._.texture.drawTo((function(){H.getDefaultShader().drawRect()})),this}function i(){return this._.texture.use(),this._.flippedShader.drawRect(),this}function o(e,t,n,r){(n||this._.texture).use(),this._.spareTexture.drawTo((function(){e.uniforms(t).drawRect()})),this._.spareTexture.swapWith(r||this._.texture)}function s(e){return e.parentNode.insertBefore(this,e),e.parentNode.removeChild(e),this}function l(){var e=new N(this._.texture.width,this._.texture.height,z.RGBA,z.UNSIGNED_BYTE);return this._.texture.use(),e.drawTo((function(){H.getDefaultShader().drawRect()})),t(e)}function c(){var e=this._.texture.width,t=this._.texture.height,n=new Uint8Array(4*e*t);return this._.texture.drawTo((function(){z.readPixels(0,0,e,t,z.RGBA,z.UNSIGNED_BYTE,n)})),n}function u(e){return function(){return z=this._.gl,e.apply(this,arguments)}}function d(e,t,n,r,a,i,o,s){var l,c,u=r-i,d=s-i,h=(c=n-a)*d-(l=o-a)*u;return[n-e+(l=((a=e-n+a-o)*d-l*(i=t-r+i-s))/h)*n,r-t+l*r,l,o-e+(c=(c*i-a*u)/h)*o,s-t+c*s,c,e,t,1]}function h(e){var t=e[0],n=e[1],r=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],c=t*i*(e=e[8])-t*o*l-n*a*e+n*o*s+r*a*l-r*i*s;return[(i*e-o*l)/c,(r*l-n*e)/c,(n*o-r*i)/c,(o*s-a*e)/c,(t*e-r*s)/c,(r*a-t*o)/c,(a*l-i*s)/c,(n*s-t*l)/c,(t*i-n*a)/c]}function p(e){var t=e.length;this.xa=[],this.ya=[],this.u=[],this.y2=[],e.sort((function(e,t){return e[0]-t[0]}));for(var n=0;n0.0){color.rgb=(color.rgb-0.5)/(1.0-contrast)+0.5;}else{color.rgb=(color.rgb-0.5)*(1.0+contrast)+0.5;}gl_FragColor=color;}"),o.call(this,z.brightnessContrast,{brightness:e(-1,t,1),contrast:e(-1,n,1)}),this}function g(t){t=new p(t);for(var n=[],r=0;256>r;r++)n.push(e(0,Math.floor(256*t.interpolate(r/255)),255));return n}function A(e,t,n){e=g(e),1==arguments.length?t=n=e:(t=g(t),n=g(n));for(var r=[],a=0;256>a;a++)r.splice(r.length,0,e[a],t[a],n[a],255);return this._.extraTexture.initFromBytes(256,1,r),this._.extraTexture.use(1),z.curves=z.curves||new H(null,"uniform sampler2D texture;uniform sampler2D map;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color.r=texture2D(map,vec2(color.r)).r;color.g=texture2D(map,vec2(color.g)).g;color.b=texture2D(map,vec2(color.b)).b;gl_FragColor=color;}"),z.curves.textures({map:1}),o.call(this,z.curves,{}),this}function v(e){z.denoise=z.denoise||new H(null,"uniform sampler2D texture;uniform float exponent;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;void main(){vec4 center=texture2D(texture,texCoord);vec4 color=vec4(0.0);float total=0.0;for(float x=-4.0;x<=4.0;x+=1.0){for(float y=-4.0;y<=4.0;y+=1.0){vec4 sample=texture2D(texture,texCoord+vec2(x,y)/texSize);float weight=1.0-abs(dot(sample.rgb-center.rgb,vec3(0.25)));weight=pow(weight,exponent);color+=sample*weight;total+=weight;}}gl_FragColor=color/total;}");for(var t=0;2>t;t++)o.call(this,z.denoise,{exponent:Math.max(0,e),texSize:[this.width,this.height]});return this}function y(t,n){return z.hueSaturation=z.hueSaturation||new H(null,"uniform sampler2D texture;uniform float hue;uniform float saturation;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float angle=hue*3.14159265;float s=sin(angle),c=cos(angle);vec3 weights=(vec3(2.0*c,-sqrt(3.0)*s-c,sqrt(3.0)*s-c)+1.0)/3.0;float len=length(color.rgb);color.rgb=vec3(dot(color.rgb,weights.xyz),dot(color.rgb,weights.zxy),dot(color.rgb,weights.yzx));float average=(color.r+color.g+color.b)/3.0;if(saturation>0.0){color.rgb+=(average-color.rgb)*(1.0-1.0/(1.001-saturation));}else{color.rgb+=(average-color.rgb)*(-saturation);}gl_FragColor=color;}"),o.call(this,z.hueSaturation,{hue:e(-1,t,1),saturation:e(-1,n,1)}),this}function _(t){return z.noise=z.noise||new H(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec4 color=texture2D(texture,texCoord);float diff=(rand(texCoord)-0.5)*amount;color.r+=diff;color.g+=diff;color.b+=diff;gl_FragColor=color;}"),o.call(this,z.noise,{amount:e(0,t,1)}),this}function b(t){return z.sepia=z.sepia||new H(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float r=color.r;float g=color.g;float b=color.b;color.r=min(1.0,(r*(1.0-(0.607*amount)))+(g*(0.769*amount))+(b*(0.189*amount)));color.g=min(1.0,(r*0.349*amount)+(g*(1.0-(0.314*amount)))+(b*0.168*amount));color.b=min(1.0,(r*0.272*amount)+(g*0.534*amount)+(b*(1.0-(0.869*amount))));gl_FragColor=color;}"),o.call(this,z.sepia,{amount:e(0,t,1)}),this}function C(e,t){return z.unsharpMask=z.unsharpMask||new H(null,"uniform sampler2D blurredTexture;uniform sampler2D originalTexture;uniform float strength;uniform float threshold;varying vec2 texCoord;void main(){vec4 blurred=texture2D(blurredTexture,texCoord);vec4 original=texture2D(originalTexture,texCoord);gl_FragColor=mix(blurred,original,1.0+strength);}"),this._.extraTexture.ensureFormat(this._.texture),this._.texture.use(),this._.extraTexture.drawTo((function(){H.getDefaultShader().drawRect()})),this._.extraTexture.use(1),this.triangleBlur(e),z.unsharpMask.textures({originalTexture:1}),o.call(this,z.unsharpMask,{strength:t}),this._.extraTexture.unuse(1),this}function w(t){return z.vibrance=z.vibrance||new H(null,"uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;float mx=max(color.r,max(color.g,color.b));float amt=(mx-average)*(-amount*3.0);color.rgb=mix(color.rgb,vec3(mx),amt);gl_FragColor=color;}"),o.call(this,z.vibrance,{amount:e(-1,t,1)}),this}function x(t,n){return z.vignette=z.vignette||new H(null,"uniform sampler2D texture;uniform float size;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float dist=distance(texCoord,vec2(0.5,0.5));color.rgb*=smoothstep(0.8,size*0.799,dist*(amount+size));gl_FragColor=color;}"),o.call(this,z.vignette,{size:e(0,t,1),amount:e(0,n,1)}),this}function k(t,n,r){z.lensBlurPrePass=z.lensBlurPrePass||new H(null,"uniform sampler2D texture;uniform float power;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color=pow(color,vec4(power));gl_FragColor=vec4(color);}");var a="uniform sampler2D texture0;uniform sampler2D texture1;uniform vec2 delta0;uniform vec2 delta1;uniform float power;varying vec2 texCoord;"+G+"vec4 sample(vec2 delta){float offset=random(vec3(delta,151.7182),0.0);vec4 color=vec4(0.0);float total=0.0;for(float t=0.0;t<=30.0;t++){float percent=(t+offset)/30.0;color+=texture2D(texture0,texCoord+delta*percent);total+=1.0;}return color/total;}";z.lensBlur0=z.lensBlur0||new H(null,a+"void main(){gl_FragColor=sample(delta0);}"),z.lensBlur1=z.lensBlur1||new H(null,a+"void main(){gl_FragColor=(sample(delta0)+sample(delta1))*0.5;}"),z.lensBlur2=z.lensBlur2||new H(null,a+"void main(){vec4 color=(sample(delta0)+2.0*texture2D(texture1,texCoord))/3.0;gl_FragColor=pow(color,vec4(power));}").textures({texture1:1}),a=[];for(var i=0;3>i;i++){var s=r+2*i*Math.PI/3;a.push([t*Math.sin(s)/this.width,t*Math.cos(s)/this.height])}return t=Math.pow(10,e(-1,n,1)),o.call(this,z.lensBlurPrePass,{power:t}),this._.extraTexture.ensureFormat(this._.texture),o.call(this,z.lensBlur0,{delta0:a[0]},this._.texture,this._.extraTexture),o.call(this,z.lensBlur1,{delta0:a[1],delta1:a[2]},this._.extraTexture,this._.extraTexture),o.call(this,z.lensBlur0,{delta0:a[1]}),this._.extraTexture.use(1),o.call(this,z.lensBlur2,{power:1/t,delta0:a[2]}),this}function B(e,t,n,r,a,i){z.tiltShift=z.tiltShift||new H(null,"uniform sampler2D texture;uniform float blurRadius;uniform float gradientRadius;uniform vec2 start;uniform vec2 end;uniform vec2 delta;uniform vec2 texSize;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);vec2 normal=normalize(vec2(start.y-end.y,end.x-start.x));float radius=smoothstep(0.0,1.0,abs(dot(texCoord*texSize-start,normal))/gradientRadius)*blurRadius;for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta/texSize*percent*radius);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}");var s=n-e,l=r-t,c=Math.sqrt(s*s+l*l);return o.call(this,z.tiltShift,{blurRadius:a,gradientRadius:i,start:[e,t],end:[n,r],delta:[s/c,l/c],texSize:[this.width,this.height]}),o.call(this,z.tiltShift,{blurRadius:a,gradientRadius:i,start:[e,t],end:[n,r],delta:[-l/c,s/c],texSize:[this.width,this.height]}),this}function S(e){return z.triangleBlur=z.triangleBlur||new H(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta*percent);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}"),o.call(this,z.triangleBlur,{delta:[e/this.width,0]}),o.call(this,z.triangleBlur,{delta:[0,e/this.height]}),this}function Z(e,t,n){return z.zoomBlur=z.zoomBlur||new H(null,"uniform sampler2D texture;uniform vec2 center;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;"+G+"void main(){vec4 color=vec4(0.0);float total=0.0;vec2 toCenter=center-texCoord*texSize;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=0.0;t<=40.0;t++){float percent=(t+offset)/40.0;float weight=4.0*(percent-percent*percent);vec4 sample=texture2D(texture,texCoord+toCenter*percent*strength/texSize);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}"),o.call(this,z.zoomBlur,{center:[e,t],strength:n,texSize:[this.width,this.height]}),this}function I(e,t,n,r){return z.colorHalftone=z.colorHalftone||new H(null,"uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(float angle){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);vec3 cmy=1.0-color.rgb;float k=min(cmy.x,min(cmy.y,cmy.z));cmy=(cmy-k)/(1.0-k);cmy=clamp(cmy*10.0-3.0+vec3(pattern(angle+0.26179),pattern(angle+1.30899),pattern(angle)),0.0,1.0);k=clamp(k*10.0-5.0+pattern(angle+0.78539),0.0,1.0);gl_FragColor=vec4(1.0-cmy-k,color.a);}"),o.call(this,z.colorHalftone,{center:[e,t],angle:n,scale:Math.PI/r,texSize:[this.width,this.height]}),this}function E(e,t,n,r){return z.dotScreen=z.dotScreen||new H(null,"uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;gl_FragColor=vec4(vec3(average*10.0-5.0+pattern()),color.a);}"),o.call(this,z.dotScreen,{center:[e,t],angle:n,scale:Math.PI/r,texSize:[this.width,this.height]}),this}function T(e){return z.edgeWork1=z.edgeWork1||new H(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec3 sample=texture2D(texture,texCoord+delta*percent).rgb;float average=(sample.r+sample.g+sample.b)/3.0;color.x+=average*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=average*weight;total.y+=weight;}}gl_FragColor=vec4(color/total,0.0,1.0);}"),z.edgeWork2=z.edgeWork2||new H(null,"uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;"+G+"void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec2 sample=texture2D(texture,texCoord+delta*percent).xy;color.x+=sample.x*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=sample.y*weight;total.y+=weight;}}float c=clamp(10000.0*(color.y/total.y-color.x/total.x)+0.5,0.0,1.0);gl_FragColor=vec4(c,c,c,1.0);}"),o.call(this,z.edgeWork1,{delta:[e/this.width,0]}),o.call(this,z.edgeWork2,{delta:[0,e/this.height]}),this}function R(e,t,n){return z.hexagonalPixelate=z.hexagonalPixelate||new H(null,"uniform sampler2D texture;uniform vec2 center;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;void main(){vec2 tex=(texCoord*texSize-center)/scale;tex.y/=0.866025404;tex.x-=tex.y*0.5;vec2 a;if(tex.x+tex.y-floor(tex.x)-floor(tex.y)<1.0)a=vec2(floor(tex.x),floor(tex.y));else a=vec2(ceil(tex.x),ceil(tex.y));vec2 b=vec2(ceil(tex.x),floor(tex.y));vec2 c=vec2(floor(tex.x),ceil(tex.y));vec3 TEX=vec3(tex.x,tex.y,1.0-tex.x-tex.y);vec3 A=vec3(a.x,a.y,1.0-a.x-a.y);vec3 B=vec3(b.x,b.y,1.0-b.x-b.y);vec3 C=vec3(c.x,c.y,1.0-c.x-c.y);float alen=length(TEX-A);float blen=length(TEX-B);float clen=length(TEX-C);vec2 choice;if(alen0.0){coord*=mix(1.0,smoothstep(0.0,radius/distance,percent),strength*0.75);}else{coord*=mix(1.0,pow(percent,1.0+strength*0.75)*radius/distance,1.0-percent);}}coord+=center;"),o.call(this,z.bulgePinch,{radius:r,strength:e(-1,a,1),center:[t,n],texSize:[this.width,this.height]}),this}function L(e,t,n){if(z.matrixWarp=z.matrixWarp||f("uniform mat3 matrix;uniform bool useTextureSpace;","if(useTextureSpace)coord=coord/texSize*2.0-1.0;vec3 warp=matrix*vec3(coord,1.0);coord=warp.xy/warp.z;if(useTextureSpace)coord=(coord*0.5+0.5)*texSize;"),4==(e=Array.prototype.concat.apply([],e)).length)e=[e[0],e[1],0,e[2],e[3],0,0,0,1];else if(9!=e.length)throw"can only warp with 2x2 or 3x3 matrix";return o.call(this,z.matrixWarp,{matrix:t?h(e):e,texSize:[this.width,this.height],useTextureSpace:0|n}),this}function M(e,t){var n=d.apply(null,t),r=d.apply(null,e);return n=h(n),this.matrixWarp([n[0]*r[0]+n[1]*r[3]+n[2]*r[6],n[0]*r[1]+n[1]*r[4]+n[2]*r[7],n[0]*r[2]+n[1]*r[5]+n[2]*r[8],n[3]*r[0]+n[4]*r[3]+n[5]*r[6],n[3]*r[1]+n[4]*r[4]+n[5]*r[7],n[3]*r[2]+n[4]*r[5]+n[5]*r[8],n[6]*r[0]+n[7]*r[3]+n[8]*r[6],n[6]*r[1]+n[7]*r[4]+n[8]*r[7],n[6]*r[2]+n[7]*r[5]+n[8]*r[8]])}function O(e,t,n,r){return z.swirl=z.swirl||f("uniform float radius;uniform float angle;uniform vec2 center;","coord-=center;float distance=length(coord);if(distance>1;this.xa[r]>e?n=r:t=r}r=this.xa[n]-this.xa[t];var a=(this.xa[n]-e)/r;return e=(e-this.xa[t])/r,a*this.ya[t]+e*this.ya[n]+((a*a*a-a)*this.y2[t]+(e*e*e-e)*this.y2[n])*r*r/6};var N=function(){function e(e,t,n,r){this.gl=z,this.id=z.createTexture(),this.width=e,this.height=t,this.format=n,this.type=r,z.bindTexture(z.TEXTURE_2D,this.id),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),e&&t&&z.texImage2D(z.TEXTURE_2D,0,this.format,e,t,0,this.format,this.type,null)}function t(e){return null==n&&(n=document.createElement("canvas")),n.width=e.width,n.height=e.height,(e=n.getContext("2d")).clearRect(0,0,n.width,n.height),e}e.fromElement=function(t){var n=new e(0,0,z.RGBA,z.UNSIGNED_BYTE);return n.loadContentsOf(t),n},e.prototype.loadContentsOf=function(e){this.width=e.width||e.videoWidth,this.height=e.height||e.videoHeight,z.bindTexture(z.TEXTURE_2D,this.id),z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,e)},e.prototype.initFromBytes=function(e,t,n){this.width=e,this.height=t,this.format=z.RGBA,this.type=z.UNSIGNED_BYTE,z.bindTexture(z.TEXTURE_2D,this.id),z.texImage2D(z.TEXTURE_2D,0,z.RGBA,e,t,0,z.RGBA,this.type,new Uint8Array(n))},e.prototype.destroy=function(){z.deleteTexture(this.id),this.id=null},e.prototype.use=function(e){z.activeTexture(z.TEXTURE0+(e||0)),z.bindTexture(z.TEXTURE_2D,this.id)},e.prototype.unuse=function(e){z.activeTexture(z.TEXTURE0+(e||0)),z.bindTexture(z.TEXTURE_2D,null)},e.prototype.ensureFormat=function(e,t,n,r){if(1==arguments.length){var a=arguments[0];e=a.width,t=a.height,n=a.format,r=a.type}e==this.width&&t==this.height&&n==this.format&&r==this.type||(this.width=e,this.height=t,this.format=n,this.type=r,z.bindTexture(z.TEXTURE_2D,this.id),z.texImage2D(z.TEXTURE_2D,0,this.format,e,t,0,this.format,this.type,null))},e.prototype.drawTo=function(e){if(z.framebuffer=z.framebuffer||z.createFramebuffer(),z.bindFramebuffer(z.FRAMEBUFFER,z.framebuffer),z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,this.id,0),z.checkFramebufferStatus(z.FRAMEBUFFER)!==z.FRAMEBUFFER_COMPLETE)throw Error("incomplete framebuffer");z.viewport(0,0,this.width,this.height),e(),z.bindFramebuffer(z.FRAMEBUFFER,null)};var n=null;return e.prototype.fillUsingCanvas=function(e){return e(t(this)),this.format=z.RGBA,this.type=z.UNSIGNED_BYTE,z.bindTexture(z.TEXTURE_2D,this.id),z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,n),this},e.prototype.toImage=function(e){this.use(),H.getDefaultShader().drawRect();var r=4*this.width*this.height,a=new Uint8Array(r),i=t(this),o=i.createImageData(this.width,this.height);z.readPixels(0,0,this.width,this.height,z.RGBA,z.UNSIGNED_BYTE,a);for(var s=0;s{"use strict";n.d(t,{Z:()=>o});var r=n(5671),a=n(3144),i=n(9314);const o=function(){function e(){(0,r.Z)(this,e),this.time=null}return(0,a.Z)(e,[{key:"get_url_parameters",value:function(){var e={};return location.search.substr(1).split("&").forEach((function(t){e[t.split("=")[0]]=t.split("=")[1]})),e}},{key:"timer_start",value:function(){this.time=Date.now()}},{key:"timer_end",value:function(e,t){var n=Math.round(Date.now()-this.time)/1e3+" s";if(null!=t&&!1===t)return n;null!=e&&(n+=" ("+e+")"),console.log(n)}},{key:"format_time",value:function(e){return new Date(e).toJSON().slice(0,19).replace(/T/g," ")}},{key:"strpos",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(e+"").indexOf(t,n||0);return-1!==r&&r}},{key:"getCookie",value:function(e){var t=this._getCookie("config");return null!=(t=""==t?{}:JSON.parse(t))[e]?t[e]:null}},{key:"setCookie",value:function(e,t){(n=""==(n=this._getCookie("config"))?{}:JSON.parse(n))[e]=t;var n=JSON.stringify(n);this._setCookie("config",n)}},{key:"_getCookie",value:function(e){if(document.cookie.length>0){var t=document.cookie.indexOf(e+"=");if(-1!=t){t+=e.length+1;var n=document.cookie.indexOf(";",t);return-1==n&&(n=document.cookie.length),document.cookie.substring(t,n)}}return""}},{key:"_setCookie",value:function(e,t,n){null==n&&(n=180);var r=new Date;r.setTime(r.getTime()+24*n*3600*1e3),document.cookie=e+"="+t+(null==n?"":"; expires="+r.toGMTString())}},{key:"delCookie",value:function(e){this.getCookie(e)&&(document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT")}},{key:"getRandomInt",value:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}},{key:"font_pixel_to_height",value:function(e){return Math.round(.75*e)}},{key:"hex",value:function(e){return("0"+(e=parseInt(e)).toString(16)).slice(-2)}},{key:"hex_set_hsl",value:function(e,t){var n=this.hexToRgb(e),r=this.rgbToHsl(n.r,n.g,n.b);return"h"in t&&(r.h=t.h),"s"in t&&(r.s=t.s),"l"in t&&(r.l=t.l),this.hslToHex(r.h,r.s,r.l)}},{key:"rgbToHex",value:function(e,t,n){if(e>255||t>255||n>255)throw"Invalid color component";return"#"+("000000"+(e<<16|t<<8|n).toString(16)).slice(-6)}},{key:"hexToRgb",value:function(e){if("#"==e[0]&&(e=e.substr(1)),3==e.length){var t=e;e="",t=/^([a-f0-9])([a-f0-9])([a-f0-9])$/i.exec(t).slice(1);for(var n=0;n<3;n++)e+=t[n]+t[n]}var r=/^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i.exec(e).slice(1);return{r:parseInt(r[0],16),g:parseInt(r[1],16),b:parseInt(r[2],16),a:255}}},{key:"hslToHex",value:function(e,t,n){var r=this.hslToRgb(e,t,n);return this.rgbToHex(r.r,r.g,r.b)}},{key:"hsvToHex",value:function(e,t,n){var r=this.hsvToRgb(e,t,n);return this.rgbToHex(r.r,r.g,r.b)}},{key:"hueToRgb",value:function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}},{key:"hslToRgb",value:function(e,t,n){var r,a,i;if(0==t)r=a=i=n;else{var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=this.hueToRgb(s,o,e+1/3),a=this.hueToRgb(s,o,e),i=this.hueToRgb(s,o,e-1/3)}return{r:Math.round(255*r),g:Math.round(255*a),b:Math.round(255*i)}}},{key:"rgbToHsl",value:function(e,t,n){e/=255,t/=255,n/=255;var r,a,i=Math.max(e,t,n),o=Math.min(e,t,n),s=(i+o)/2;if(i==o)r=a=0;else{var l=i-o;switch(a=s>.5?l/(2-i-o):l/(i+o),i){case e:r=(t-n)/l+(t6&&(e=e.substring(1,e.length));var n=parseInt(e,16),r=Math.abs((n>>16&255)+t);r>255&&(r-=r-255);var a=Math.abs((n>>8&255)+t);a>255&&(a-=a-255);var i=Math.abs((255&n)+t);return i>255&&(i-=i-255),1==(r=Number(r<0||isNaN(r))?0:(r>255?255:r).toString(16)).length&&(r="0"+r),1==(a=Number(a<0||isNaN(a))?0:(a>255?255:a).toString(16)).length&&(a="0"+a),1==(i=Number(i<0||isNaN(i))?0:(i>255?255:i).toString(16)).length&&(i="0"+i),"#"+r+a+i}},{key:"number_format",value:function(e,t,n,r){t=isNaN(t=Math.abs(t))?2:t,r=null==r?".":r,n=null==n?",":n;var a=e<0?"-":"",i=parseInt(e=Math.abs(+e||0).toFixed(t))+"",o=(o=i.length)>3?o%3:0,s=a+(o?i.substr(0,o)+n:"")+i.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n)+(t?r+Math.abs(e-i).toFixed(t).slice(2):"");return parseFloat(s)}},{key:"check_input_color_support",value:function(){var e=document.createElement("input");return e.setAttribute("type","color"),"text"!==e.type}},{key:"b64toBlob",value:function(e,t,n){t=t||"",n=n||512;for(var r=atob(e),a=[],i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"ucfirst",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"change_canvas_size",value:function(e,t,n,r,a){null==r&&(r=0),null==a&&(a=0);var i=document.createElement("canvas"),o=i.getContext("2d");i.width=e.width,i.height=e.height,o.drawImage(e,0,0),e.width=Math.max(1,t),e.height=Math.max(1,n),e.getContext("2d").drawImage(i,-r,-a)}},{key:"image_round",value:function(e,t,n,r,a,i){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=document.createElement("canvas");s.width=r,s.height=a;var l=Math.round(r/2),c=Math.round(a/2),u=s.getContext("2d"),d=s.width,h=s.height,p=t-l,f=n-c;u.clearRect(0,0,d,h),u.save(),u.putImageData(i,0,0),u.globalCompositeOperation="destination-in";var m=u.createRadialGradient(l,c,0,l,c,l);m.addColorStop(0,"#ffffff"),1==o?m.addColorStop(.8,"#ffffff"):m.addColorStop(.99,"#ffffff"),m.addColorStop(1,"rgba(255,255,255,0"),u.fillStyle=m,u.beginPath(),u.ellipse(l,c,2*r,2*a,0,0,2*Math.PI),u.fill(),e.drawImage(s,0,0,r,a,p,f,r,a),u.restore(),u.clearRect(0,0,d,h)}},{key:"is_input",value:function(e){return!!e&&("text"==e.type||"INPUT"==e.tagName||"textarea"==e.type||null!=e.closest(".ui_color_picker_gradient, .ui_number_input, .ui_range, .ui_swatches"))}},{key:"is_edge_or_ie",value:function(){return!window.ActiveXObject&&"ActiveXObject"in window||-1!=navigator.userAgent.indexOf("Edge/")}},{key:"throttle",value:function(e,t,n){var r,a,i,o=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Date.now(),o=null,i=e.apply(r,a),o||(r=a=null)};return function(){var c=Date.now();s||!1!==n.leading||(s=c);var u=t-(c-s);return r=this,a=arguments,u<=0||u>t?(o&&(clearTimeout(o),o=null),s=c,i=e.apply(r,a),o||(r=a=null)):o||!1===n.trailing||(o=setTimeout(l,u)),i}}},{key:"draw_special_line",value:function(e,t,n,r,a){var o=2/i.Z.ZOOM,s=o/2;e.lineWidth=o,e.strokeStyle="rgb(255, 255, 255)",e.beginPath(),e.moveTo(t-s,n),e.lineTo(r-s,a),e.stroke(),e.lineWidth=s,e.strokeStyle="rgb(0, 0, 0)",e.beginPath(),e.moveTo(t-s,n),e.lineTo(r-s,a),e.stroke()}},{key:"draw_control_point",value:function(e,t,n){var r=12/i.Z.ZOOM,a=2/i.Z.ZOOM;e.strokeStyle="#000000",e.fillStyle="#ffffff",e.lineWidth=a;var o=new Path2D;return o.arc(t+0*r,n+0*r,r/2,0,2*Math.PI),e.fill(o),e.stroke(o),o}},{key:"get_user_unit",value:function(e,t,n){return e=parseFloat(e),"pixels"==t?parseInt(e):"inches"==t?this.number_format(e/n,3):"centimeters"==t?this.number_format(e/n*2.54,3):"millimetres"==t?this.number_format(e/n*25.4,3):void 0}},{key:"get_internal_unit",value:function(e,t,n){return e=parseFloat(e),"pixels"==t?parseInt(e):"inches"==t?Math.ceil(e*n):"centimeters"==t?Math.ceil(e*n/2.54):"millimetres"==t?Math.ceil(e*n/25.4):void 0}}]),e}()},896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r,a={};a.utils={initSampleCanvas:function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.width=0,e.height=0,this.getSampleCanvas=function(){return e},this.getSampleContext=function(){return t},this.createImageData=t.createImageData?function(e,n){return t.createImageData(e,n)}:function(e,t){return new ImageData(e,t)}},getSampleCanvas:function(){return this.initSampleCanvas(),this.getSampleCanvas()},getSampleContext:function(){return this.initSampleCanvas(),this.getSampleContext()},createImageData:function(e,t){return this.initSampleCanvas(),this.createImageData(e,t)},clamp:function(e){return e>255?255:e<0?0:e},buildMap:function(e){for(var t,n=[],r=0;r<256;r+=1)n[r]=(t=e(r))>255?255:t<0?0:0|t;return n},applyMap:function(e,t,n){for(var r=0,a=e.length;r=n||t<0||t>=r)switch(a){case 1:e=e<0?0:e>=n?n-1:e,t=t<0?0:t>=r?r-1:t;break;case 2:e=(e%=n)<0?e+n:e,t=(t%=r)<0?t+r:t;break;default:return null}return t*n+e<<2},getPixel:function(e,t,n,r,a,i){if(t<0||t>=r||n<0||n>=a)switch(i){case 1:t=t<0?0:t>=r?r-1:t,n=n<0?0:n>=a?a-1:n;break;case 2:t=(t%=r)<0?t+r:t,n=(n%=a)<0?n+a:n;break;default:return 0}var o=n*r+t<<2;return e[o+3]<<24|e[o]<<16|e[o+1]<<8|e[o+2]},getPixelByIndex:function(e,t){return e[t+3]<<24|e[t]<<16|e[t+1]<<8|e[t+2]},copyBilinear:function(e,t,n,r,a,i,o,s){var l,c,u,d,h,p,f,m=t<0?t-1|0:0|t,g=n<0?n-1|0:0|n,A=t-m,v=n-g,y=0,_=0,b=0,C=0;if(m>=0&&m=0&&g>16&255,i[o+1]=y>>8&255,i[o+2]=255&y,void(i[o+3]=y>>24&255);_=this.getPixel(e,m+1,g,r,a,s),b=this.getPixel(e,m,g+1,r,a,s),C=this.getPixel(e,m+1,g+1,r,a,s)}d=((y>>16&255)*(c=1-A)+(_>>16&255)*A)*(u=1-v)+((b>>16&255)*c+(C>>16&255)*A)*v,h=((y>>8&255)*c+(_>>8&255)*A)*u+((b>>8&255)*c+(C>>8&255)*A)*v,p=((255&y)*c+(255&_)*A)*u+((255&b)*c+(255&C)*A)*v,f=((y>>24&255)*c+(_>>24&255)*A)*u+((b>>24&255)*c+(C>>24&255)*A)*v,i[o]=d>255?255:d<0?0:0|d,i[o+1]=h>255?255:h<0?0:0|h,i[o+2]=p>255?255:p<0?0:0|p,i[o+3]=f>255?255:f<0?0:0|f},rgbToHsl:function(e,t,n){n/=255;var r=(e/=255)>(t/=255)?e>n?e:n:t>n?t:n,a=e.5?i/(2-r-a):i/(r+a)),[o,s,l]},hslToRgb:function(e,t,n){var r,a,i,o,s,l=[];if(0===t)l=[o=s=255*n+.5|0,o,s];else{var c;r=2*n-(a=n<=.5?n*(t+1):n+t-n*t),i=e+1/3;for(var u=0;u<3;u+=1)i<0?i+=1:i>1&&(i-=1),c=6*i<1?r+(a-r)*i*6:2*i<1?a:3*i<2?r+(a-r)*(2/3-i)*6:r,l[u]=255*c+.5|0,i-=1/3}return l}},a.Translate=function(e,t,n,r){},a.Scale=function(e,t,n,r){},a.Rotate=function(e,t,n,r,a,i){},a.Affine=function(e,t,n,r){},a.UnsharpMask=function(e,t){},a.ConvolutionFilter=function(e,t,n,r,a,i,o,s,l,c){var u=e.data,d=e.width,h=e.height,p=(u.length,this.utils.createImageData(d,h)),f=p.data;a=a||1,i=i||0,!1!==o&&(o=!0),!1!==s&&(s=!0);for(var m=0,g=t>>1,A=n>>1,v=(l=l||0)>>16&255,y=l>>8&255,_=255&l,b=255*(c=c||0),C=0;C255?255:x<0?0:0|x,f[m+1]=(x=B/a+i)>255?255:x<0?0:0|x,f[m+2]=(x=S/a+i)>255?255:x<0?0:0|x,f[m+3]=o?u[m+3]:(x=Z/a+i)>255?255:x<0?0:0|x}return p},a.Binarize=function(e,t){var n=e.data,r=e.width,a=e.height,i=n.length,o=this.utils.createImageData(r,a),s=o.data;isNaN(t)&&(t=.5),t*=255;for(var l=0;l255?255:a,u[h+1]=(a=i[h+1]+d[h+1])>255?255:a,u[h+2]=(a=i[h+2]+d[h+2])>255?255:a,u[h+3]=255;return c},a.BlendSubtract=function(e,t,n,r){for(var a,i=e.data,o=e.width,s=e.height,l=i.length,c=this.utils.createImageData(o,s),u=c.data,d=t.data,h=0;hb&&(A=b),(v=m-a)<0&&(v=0),h=C+v<<2,i+=e[d=C+A<<2]-e[h],o+=e[d+1]-e[h+1],s+=e[d+2]-e[h+2],l+=e[d+3]-e[h+3],c+=r;C+=n}},function(e,t,n,a){for(var i=e.data,o=e.width,s=e.height,l=(i.length,this.utils.createImageData(o,s)),c=l.data,u=this.utils.createImageData(o,s).data,d=0;d>W,M[u+1]=p*F>>W,M[u+2]=f*F>>W,M[u+3]=m*F>>W,h-=g,p-=A,f-=v,m-=y,g-=I.r,A-=I.g,v-=I.b,y-=I.a,l=d+((l=i+a+1)>W,M[l+1]=p*F>>W,M[l+2]=f*F>>W,M[l+3]=m*F>>W,h-=g,p-=A,f-=v,m-=y,g-=I.r,A-=I.g,v-=I.b,y-=I.a,l=i+((l=o+H)255?255:e})),i},a.BrightnessContrastGimp=function(e,t,n){var r=e.data,a=e.width,i=e.height,o=r.length,s=this.utils.createImageData(a,i),l=s.data,c=Math.PI/4;t/=100,n*=.99,n/=100,n=Math.tan((n+1)*c);for(var u=0,d=0;d>16;return u/=o/4,this.utils.mapRGB(r,l,(function(e){return t<0?e*=1+t:t>0&&(e+=(255-e)*t),0!==n&&(e=(e-u)*n+u),e+.5|0})),s},a.BrightnessContrastPhotoshop=function(e,t,n){var r=e.data,a=e.width,i=e.height,o=(r.length,this.utils.createImageData(a,i)),s=o.data;return t=(t+100)/100,n=(n+100)/100,this.utils.mapRGB(r,s,(function(e){return.5+(e=((e*=t)-127.5)*n+127.5)|0})),o},a.Channels=function(e,t){var n;switch(t){case 2:n=[0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0];break;case 3:n=[0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0];break;default:n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0]}return this.ColorMatrixFilter(e,n)},a.Clone=function(e){return this.Copy(e,this.utils.createImageData(e.width,e.height))},a.CloneBuiltin=function(e){var t,n=e.width,r=e.height,a=this.utils.getSampleCanvas(),i=this.utils.getSampleContext();return a.width=n,a.height=r,i.putImageData(e,0,0),t=i.getImageData(0,0,n,r),a.width=0,a.height=0,t},a.ColorMatrixFilter=function(e,t){var n,r,a,i,o,s,l=e.data,c=e.width,u=e.height,d=l.length,h=this.utils.createImageData(c,u),p=h.data,f=t[0],m=t[1],g=t[2],A=t[3],v=t[4],y=t[5],_=t[6],b=t[7],C=t[8],w=t[9],x=t[10],k=t[11],B=t[12],S=t[13],Z=t[14],I=t[15],E=t[16],T=t[17],R=t[18],P=t[19];for(r=0;r255?255:n<0?0:0|n,p[r+1]=(n=a*y+i*_+o*b+s*C+w)>255?255:n<0?0:0|n,p[r+2]=(n=a*x+i*k+o*B+s*S+Z)>255?255:n<0?0:0|n,p[r+3]=(n=a*I+i*E+o*T+s*R+P)>255?255:n<0?0:0|n;return h},a.ColorTransformFilter=function(e,t,n,r,a,i,o,s,l){var c,u,d=e.data,h=e.width,p=e.height,f=d.length,m=this.utils.createImageData(h,p),g=m.data;for(c=0;c255?255:u<0?0:u,g[c+1]=(u=d[c+1]*n+o)>255?255:u<0?0:u,g[c+2]=(u=d[c+2]*r+s)>255?255:u<0?0:u,g[c+3]=(u=d[c+3]*a+l)>255?255:u<0?0:u;return m},a.Copy=function(e,t){for(var n=e.data,r=n.length,a=t.data;r--;)a[r]=n[r];return t},a.Crop=function(e,t,n,r,a){var i,o,s,l,c=e.data,u=e.width,d=e.height,h=(c.length,this.utils.createImageData(r,a)),p=h.data,f=Math.max(t,0),m=Math.max(n,0),g=Math.min(t+r,u),A=Math.min(n+a,d),v=f-t;for(i=m,dstRow=m-n;ic?l>u?l:u:c>u?c:u)+(l=k||b>=B?g=m:(v=_+((x[(A=(b-r)*C+(_-n)<<2)+i]-128)*s>>8),y=b+((x[A+o]-128)*l>>8),null===(g=a.utils.getPixelIndex(v+.5|0,y+.5|0,d,h,c))&&(g=m)),f[m]=u[g],f[m+1]=u[g+1],f[m+2]=u[g+2],f[m+3]=u[g+3];return p},a.Dither=function(e,t){var n,r,a=e.width,i=e.height,o=this.Clone(e),s=o.data,l=[],c=(t=t<2?2:t>255?255:t)-1,u=0,d=0;for(r=0;r255&&(d-=255,u+=1),n}));var h,p,f,m,g,A,v,y,_,b,C,w,x,k,B,S=a-1,Z=i-1,I=7/16,E=3/16,T=5/16,R=1/16;for(p=0;p255?255:x<0?0:0|x,s[f+1]=k>255?255:k<0?0:0|k,s[f+2]=B>255?255:B<0?0:0|B),f+=a-2<<2,h>0&&p255?255:x<0?0:0|x,s[f+1]=k>255?255:k<0?0:0|k,s[f+2]=B>255?255:B<0?0:0|B),f+=4,p255?255:x<0?0:0|x,s[f+1]=k>255?255:k<0?0:0|k,s[f+2]=B>255?255:B<0?0:0|B),f+=4,h255?255:x<0?0:0|x,s[f+1]=k>255?255:k<0?0:0|k,s[f+2]=B>255?255:B<0?0:0|B);return o},a.Edge=function(e){return this.ConvolutionFilter(e,3,3,[-1,-1,-1,-1,8,-1,-1,-1,-1])},a.Emboss=function(e){return this.ConvolutionFilter(e,3,3,[-2,-1,0,-1,1,1,0,1,2])},a.Enrich=function(e){return this.ConvolutionFilter(e,3,3,[0,-2,0,-2,20,-2,0,-2,0],10,-40)},a.Flip=function(e,t){var n,r,a,i,o=e.data,s=e.width,l=e.height,c=(o.length,this.utils.createImageData(s,l)),u=c.data;for(r=0;r255?255:e+.5|0})),i},a.GrayScale=function(e){for(var t=e.data,n=e.width,r=e.height,a=t.length,i=this.utils.createImageData(n,r),o=i.data,s=0;s>16;o[s]=o[s+1]=o[s+2]=l,o[s+3]=t[s+3]}return i},a.HSLAdjustment=function(e,t,n,r){var a=e.data,i=e.width,o=e.height,s=a.length,l=this.utils.createImageData(i,o),c=l.data;t/=360,n/=100,r/=100;var u,d,h,p,f,m,g=this.utils.rgbToHsl,A=this.utils.hslToRgb;for(m=0;m1;)u-=1;(d=p[1]+p[1]*n)<0?d=0:d>1&&(d=1),h=p[2],r>0?h+=(1-h)*r:r<0&&(h+=h*r),f=A(u,d,h),c[m]=f[0],c[m+1]=f[1],c[m+2]=f[2],c[m+3]=a[m+3]}return l},a.Invert=function(e){var t=e.data,n=e.width,r=e.height,a=(t.length,this.utils.createImageData(n,r)),i=a.data;return this.utils.mapRGB(t,i,(function(e){return 255-e})),a},a.Mosaic=function(e,t){var n,r,a,i,o,s,l,c,u,d,h,p,f,m,g,A=e.data,v=e.width,y=e.height,_=(A.length,this.utils.createImageData(v,y)),b=_.data,C=Math.ceil(v/t),w=Math.ceil(y/t);for(n=0;ny&&(s=y),r=0;rv&&(i=v),p=f=m=g=0,h=(i-a)*(s-o),c=o;c=w))for(u=l*C,s=-t;s<=t;s+=1)(c=r+s)<0||c>=C||(h=b[d=u+c<<2],g=(p=b[d+1])*n>>8,A=(f=b[d+2])*n>>8,E[m=h*n>>8]+=h,T[g]+=p,R[A]+=f,S[m]+=1,Z[g]+=1,I[A]+=1);for(v=y=_=0,i=1;iS[v]&&(v=i),Z[i]>Z[y]&&(y=i),I[i]>I[_]&&(_=i);k[B]=E[v]/S[v]|0,k[B+1]=T[y]/Z[y]|0,k[B+2]=R[_]/I[_]|0,k[B+3]=b[B+3],B+=4}return x},a.OpacityFilter=function(e,t){for(var n=e.data,r=e.width,a=e.height,i=n.length,o=this.utils.createImageData(r,a),s=o.data,l=0;l255?255:t)-1,u=0,d=0;for(n=0;n255&&(d-=255,u+=1),n})),o},a.Rescale=function(e,t){var n=e.data,r=e.width,a=e.height,i=(n.length,this.utils.createImageData(r,a)),o=i.data;return this.utils.mapRGB(n,o,(function(e){return(e*=t)>255?255:e+.5|0})),i},a.ResizeNearestNeighbor=function(e,t,n){var r,a,i,o,s=e.data,l=e.width,c=e.height,u=(s.length,this.utils.createImageData(t,n)),d=u.data,h=l/t,p=c/n,f=0;for(i=0;i255?255:i<0?0:i+.5|0,d[a+1]=(i=.349*t+.686*n+.168*r)>255?255:i<0?0:i+.5|0,d[a+2]=(i=.272*t+.534*n+.131*r)>255?255:i<0?0:i+.5|0,d[a+3]=o[a+3];return u},a.Sharpen=function(e,t){return this.ConvolutionFilter(e,3,3,[-t/16,-t/8,-t/16,-t/8,.75*t+1,-t/8,-t/16,-t/8,-t/16])},a.Solarize=function(e){var t=e.data,n=e.width,r=e.height,a=(t.length,this.utils.createImageData(n,r)),i=a.data;return this.utils.mapRGB(t,i,(function(e){return e>127?2*(e-127.5):2*(127.5-e)})),a},a.Transpose=function(e){var t,n,r=e.data,a=e.width,i=e.height,o=(r.length,this.utils.createImageData(i,a)),s=o.data;for(y=0;yb?(d[C]=s[C],d[C+1]=s[C+1],d[C+2]=s[C+2],d[C+3]=s[C+3]):(g=Math.sqrt(g),A=Math.atan2(m,f)+a*(r-g)/r,v=t+g*Math.cos(A),y=n+g*Math.sin(A),o?this.utils.copyBilinear(s,v,y,l,c,d,C,i):(_=(y+.5|0)*l+(v+.5|0)<<2,d[C]=s[_],d[C+1]=s[_+1],d[C+2]=s[_+2],d[C+3]=s[_+3])),C+=4;return u};const i=a},7183:(e,t,n)=>{var r,a=n(9755);(r=a).fn.translate=function(e){var t=this,n={css:"trn",attrs:["alt","placeholder","title"],lang:"pt",langDefault:"pt"};0!==(n=r.extend(n,e||{})).css.lastIndexOf(".",0)&&(n.css="."+n.css);var a=n.t;return this.lang=function(e){return e&&(n.lang=e,this.translate(n)),n.lang},this.get=function(e){var t=e;try{t=a[e][n.lang]}catch(t){return e}return t||e},this.g=this.get,this.find(n.css).each((function(e){var a=r(this),i=a.attr("data-trn-key");i||(i=a.html(),a.attr("data-trn-key",i)),r.each(this.attributes,(function(){if(-1!==r.inArray(this.name,n.attrs)){var e=a.attr("data-trn-attr");e||(e=a.attr(this.name),a.attr("data-trn-attr",e)),a.attr(this.name,t.get(e))}})),a.html(t.get(i))})),this}},7477:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(5671),a=n(3144),i=n(3379),o=n.n(i),s=n(5823);o()(s.Z,{insert:"head",singleton:!1}),s.Z.locals;var l=n(699),c=n(1125),u=n(5405),d=n(9755);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(this.eventHandles);try{for(t.s();!(e=t.n()).done;)e.value.remove()}catch(e){t.e(e)}finally{t.f()}this.eventHandles=[]}},{key:"onChangeEvent",value:function(e){var t=this.get_params(),n=JSON.stringify(t);if((this.last_params_hash!=n||0!=this.onchange)&&(this.last_params_hash=n,0!=this.onchange))if(0!=this.preview){var r=this.el.querySelector('[data-id="pop_post"]'),a=r.getContext("2d");a.clearRect(0,0,this.width_mini,this.height_mini),a.drawImage(this.layer_active_small,this.preview_padding,this.preview_padding,this.width_mini-2*this.preview_padding,this.height_mini-2*this.preview_padding),this.onchange(t,a,this.width_mini,this.height_mini,r)}else this.onchange(t)}},{key:"preview_handler",value:function(e){!1!==this.preview&&this.onChangeEvent(e)}},{key:"save",value:function(){var e=this.get_params();this.onfinish&&this.onfinish(e),this.hide(!0)}},{key:"cancel",value:function(){if(this.oncancel){var e=this.get_params();this.oncancel(e)}}},{key:"get_params",value:function(){var e={};if(null==this.el)return null;for(var t=this.el.querySelectorAll("input"),n=0;n',t+='',t+='
    ',t+='\t',t+='\t',t+="
    ",t+=""),n+=this.generateParamsHtml(),this.el.innerHTML='\n\t\n\t
    \n\t\n\t

    \n\t
    \n\t\t
    \n\t\t
    \n\t
    \n\t
    \n\t\t\n\t\t\n\t
    \n',this.el.querySelector('[data-id="pretitle_area"]').innerHTML="",this.el.querySelector('[data-id="popup_title"]').innerHTML=this.title,this.el.querySelector('[data-id="popup_comment"]').innerHTML=this.comment,this.el.querySelector('[data-id="preview_content"]').innerHTML=t,this.el.querySelector('[data-id="params_content"]').innerHTML=n,0!=this.onfinish?this.el.querySelector('[data-id="popup_cancel"]').style.display="":this.el.querySelector('[data-id="popup_cancel"]').style.display="none",this.el.style.display="block",this.className&&this.el.classList.add(this.className),this.el.querySelectorAll('input[type="color"]').forEach((function(t){var n=t.getAttribute("id");t.removeAttribute("id"),d(t).uiColorInput({inputId:n}).on("change",(function(t){e.onChangeEvent(t)}))})),this.el.querySelector('[data-id="popup_ok"]').addEventListener("click",(function(t){e.save()})),this.el.querySelector('[data-id="popup_cancel"]').addEventListener("click",(function(t){e.hide(!1)})),this.el.querySelector('[data-id="popup_close"]').addEventListener("click",(function(t){e.hide(!1)}));for(var r=this.el.querySelectorAll("input"),a=0;a',"Error"!=t&&null!=r.title&&(e+=''+r.title+""),null!=r.name){if(null!=r.values)if(r.values.length>10||"select"==r.type){e+='"}else{for(var i in e+='',r.values.length>2&&(e+='"),e+=""}else if(null!=r.value){var c=1;if(null!=r.step&&(c=r.step),null!=r.range)e+='',e+=''+r.value+"";else if("color"==r.type)e+='';else if("boolean"==typeof r.value){var u="";!0===r.value&&(u="checked"),e+=' '}else if(null==r.placeholder&&(r.placeholder=""),"textarea"==r.type)e+='";else{var d="text";""==r.placeholder||isNaN(r.placeholder)||(d="number"),null!=r.value&&"number"==typeof r.value&&(d="number");var h="";void 0!==r.comment&&(h=''+r.comment+""),e+='"+h+""}}}else if(null!=r.function)e+=''+r.function()+"";else if(null!=r.html)e+=''+r.html+"";else if(null==r.title)e+='';else{var p=""+r.value,f=r.title.toLowerCase().replace(/[^\w]+/g,"").replace(/ +/g,"-");f=f.substring(0,10),e+=p.length<40?'
    '+r.value+"
    ":'"}e+=""}return e+""}},{key:"onkeyup",value:function(e){"Enter"==e.key&&(e.target.hasAttribute("data-prevent-submission")?e.preventDefault():this.save())}},{key:"getRandomInt",value:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}},{key:"strpos",value:function(e,t,n){var r=(e+"").indexOf(t,n||0);return-1!==r&&r}},{key:"draw_background",value:function(e,t,n,r,a){if(0==this.Base_gui.get_transparency_support()&&null==a)return e.beginPath(),e.rect(0,0,t,n),e.fillStyle="#ffffff",e.fill(),!1;null==r&&(r=10);for(var i=!0,o=0;o{"use strict";var r,a,i,o,s,l,c,u,d,h,p,f,m;n.d(t,{Z:()=>g});const g=(o=a=[1,0,0,1,0,0],s=i=[1,0,0,1,0,0],l=1,c={top:0,left:0,right:200,bottom:200},u=!0,d=1,h={x:0,y:0},p={x:0,y:0},f={x:0,y:0},m=!0,{canvasDefault:function(){r.setTransform(1,0,0,1,0,0)},apply:function(){m&&this.update(),r.setTransform(o[0],o[1],o[2],o[3],o[4],o[5])},getPosition:function(){return{x:f.x,y:f.y}},getContext:function(){return r},getBounds:function(){return c},getScale:function(){return l},getMaxScale:function(){return d},matrix:a,invMatrix:i,update:function(){m=!1,o[3]=o[0]=l,o[1]=o[2]=0,o[4]=f.x,o[5]=f.y,u&&this.constrain(),this.invScale=1/l;var e=o[0]*o[3]-o[1]*o[2];s[0]=o[3]/e,s[1]=-o[1]/e,s[2]=-o[2]/e,s[3]=o[0]/e},constrain:function(){d=Math.min(r.canvas.width/(c.right-c.left),r.canvas.height/(c.bottom-c.top)),l0&&(o[4]=f.x-=p.x),p.y>0&&(o[5]=f.y-=p.y),h.x=c.right,h.y=c.bottom,this.toScreen(h,p),p.x1&&void 0!==arguments[1]?arguments[1]:{};return m&&this.update(),t.x=e.x*o[0]+e.y*o[2]+o[4],t.y=e.x*o[1]+e.y*o[3]+o[5],t},scaleAt:function(e,t,n){m&&this.update(),l*=n,f.x=e-(e-f.x)*n,f.y=t-(t-f.y)*n,m=!0},move:function(e,t){f.x+=e,f.y+=t,m=!0},setContext:function(e){r=e,m=!0},setBounds:function(e,t,n,r){c.top=e,c.left=t,c.right=n,c.bottom=r,u=!0,m=!0}})},3793:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(4942),a=n(5861),i=n(5671),o=n(3144),s=n(4687),l=n.n(s),c=n(9314),u=n(699),d=n(8496),h=n(1748),p=n(1606),f=n.n(p),m=null;const g=function(){function e(){var t=this;if((0,i.Z)(this,e),m)return m;m=this,this.Base_layers=new u.Z,this.Helper=new h.Z,this.File_save=new d.default,document.addEventListener("keydown",(function(e){var n=e.key.toLowerCase(),r=e.ctrlKey||e.metaKey;t.Helper.is_input(e.target)||"c"==n&&1==r&&t.copy_to_clipboard()}),!1)}var t,n,s;return(0,o.Z)(e,[{key:"copy_to_clipboard",value:(s=(0,a.Z)(l().mark((function e(){var t,n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,this.askWritePermission();case 3:e.sent?(n=this.Base_layers.convert_layer_to_canvas(),r=n.getContext("2d"),0==c.Z.TRANSPARENCY&&(r.globalCompositeOperation="destination-over",this.File_save.fillCanvasBackground(r,"#ffffff"),r.globalCompositeOperation="source-over"),n.toBlob((function(e){t.setToClipboard(e)}))):f().error("Missing permissions to write to Clipboard.cc");case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"setToClipboard",value:(n=(0,a.Z)(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[new ClipboardItem((0,r.Z)({},t.type,t))],e.next=3,navigator.clipboard.write(n);case 3:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"askWritePermission",value:(t=(0,a.Z)(l().mark((function e(){var t,n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.permissions.query({name:"clipboard-write"});case 3:return t=e.sent,n=t.state,e.abrupt("return","granted"===n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(){return t.apply(this,arguments)})}]),e}()},8703:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5671),a=n(3144),i=n(1606),o=n.n(i);const s=function(){function e(){(0,r.Z)(this,e)}return(0,a.Z)(e,[{key:"paste",value:function(){o().error("Use Ctrl+V keyboard shortcut to paste from Clipboard.")}}]),e}()},9315:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5671),a=n(3144),i=n(7647);const o=function(){function e(){(0,r.Z)(this,e),this.Base_state=new i.Z}return(0,a.Z)(e,[{key:"redo",value:function(){this.Base_state.redo()}}]),e}()},7641:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(9314),o=n(699),s=n(3684),l=n(1606),c=n.n(l);const u=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new o.Z,this.Selection=new s.default(this.Base_layers.ctx)}return(0,a.Z)(e,[{key:"select_all",value:function(){"image"==i.Z.layer.type?this.Selection.select_all():c().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"delete",value:function(){this.Selection.delete_selection()}}]),e}()},3700:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5671),a=n(3144),i=n(7647),o=null;const s=function(){function e(){if((0,r.Z)(this,e),o)return o;o=this,this.Base_state=new i.Z,this.events()}return(0,a.Z)(e,[{key:"events",value:function(){var e=this;document.querySelector("#undo_button").addEventListener("click",(function(t){e.Base_state.undo()}))}},{key:"undo",value:function(){this.Base_state.undo()}}]),e}()},7140:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(8562),o=(n(9314),n(7477)),s=n(699),l=n(1748);const c=function(){function e(){(0,r.Z)(this,e),this.POP=new o.Z,this.Base_layers=new s.Z,this.Helper=new l.Z,this.params=null}return(0,a.Z)(e,[{key:"show_dialog",value:function(e,t,n){var r=this,a=this.Helper.ucfirst(e);a=a.replace(/-/g," ");var i=0;void 0!==this.preview_padding&&(i=this.preview_padding);var o={title:a,preview:!0,preview_padding:i,effects:!0,params:t,on_change:function(t,n,a,o){r.params=t,n.filter=r.preview(t,e),n.drawImage(this.layer_active_small,i,i,r.POP.width_mini-2*i,r.POP.height_mini-2*i)},on_finish:function(t){r.params=t,r.save(t,e,n)}};this.Base_layers.disable_filter(n),this.POP.show(o),this.Base_layers.disable_filter(null)}},{key:"save",value:function(e,t,n){return i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(null,t,e,n))}},{key:"preview",value:function(e,t){return"shadow"==t&&(t="drop-shadow"),t+"("+this.convert_value(e.value,e,"preview")+")"}},{key:"convert_value",value:function(e,t){return e}}]),e}()},5164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1748),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.Helper=new c.Z}return(0,a.Z)(e,[{key:"black_and_white",value:function(){var e=this;if("image"==o.Z.layer.type){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r={title:"Black and White",preview:!0,effects:!0,params:[{name:"level",title:"Level:",value:this.thresholding(n,t.width,t.height,!0),range:[0,255]},{name:"dithering",title:"Dithering:",value:!1}],on_change:function(t,n,r,a){var i=document.getElementById("pop_data_level");0==t.dithering?i.disabled=!1:i.disabled=!0;var o=n.getImageData(0,0,r,a),s=e.change(o,t);n.putImageData(s,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(r)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=e.width,r=e.height,a=document.createElement("canvas");a.width=n,a.height=r;var i,o,s,l=e.data;if(!0!==t.dithering)for(var c=0;c0&&d+1u&&(u=a,d=o)}return d}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a={level:this.thresholding(n,t.width,t.height,!0),dithering:!1},i=this.change(r,a);n.putImageData(i,0,0)}}]),e}()},8620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(291),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.ImageFilters=c.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"blueprint",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){0==this.fx_filter&&(this.fx_filter=u.Z.canvas());var r=e.getContext("2d"),a=document.createElement("canvas"),i=a.getContext("2d");a.width=t,a.height=n,i.fillStyle="#0e58a3",i.fillRect(0,0,t,n);var o=r.getImageData(0,0,t,n);o=this.ImageFilters.Edge(o),r.putImageData(o,0,0);var s=this.fx_filter.texture(e);return this.fx_filter.draw(s).denoise(20).update(),e=this.fx_filter,o=r.getImageData(0,0,t,n),o=this.ImageFilters.BrightnessContrastPhotoshop(o,80,0),r.putImageData(o,0,0),i.globalCompositeOperation="screen",i.filter="grayscale(1)",i.drawImage(e,0,0),i.globalCompositeOperation="source-over",i.filter="none",this.draw_grid(i,20),a}},{key:"draw_grid",value:function(e,t){if(0!=this.grid){var n=o.Z.WIDTH,r=o.Z.HEIGHT,a="rgba(255, 255, 255, 0.5)",i="rgba(255, 255, 255, 0.1)";null!=t&&null!=t?this.grid_size=[t,t]:(t=this.grid_size[0],t=this.grid_size[1]),t=parseInt(t),t=parseInt(t),e.lineWidth=1,e.beginPath(),t<2&&(t=2),t<2&&(t=2);for(var s=t;s{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1606),u=n.n(c),d=n(2448);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Effects_browser=new d.default}return(0,a.Z)(e,[{key:"borders",value:function(e){var t,n;if(null!=o.Z.layer.type){var r=this,a=this.Base_layers.find_filter_by_id(e,"borders"),i={title:"Borders",params:[{name:"color",title:"Color:",value:null!==(t=a.color)&&void 0!==t?t:a.color=o.Z.COLOR,type:"color"},{name:"size",title:"Size:",value:null!==(n=a.size)&&void 0!==n?n:a.size=10}],on_finish:function(t){Math.min(o.Z.WIDTH,o.Z.HEIGHT),r.add_borders(t,e)}},s=o.Z.layer.rotate;o.Z.layer.rotate=0,this.Base_layers.disable_filter(e),this.POP.show(i),o.Z.layer.rotate=s,this.Base_layers.disable_filter(null)}else u().error("Layer is empty.")}},{key:"demo",value:function(e,t){var n=document.getElementById(e),r=n.getContext("2d");r.drawImage(t,5,5,this.Effects_browser.preview_width-10,this.Effects_browser.preview_height-10),r.strokeStyle="#000000",r.lineWidth=10,r.beginPath(),r.rect(0,0,n.width,n.height),r.stroke()}},{key:"render_pre",value:function(e,t){}},{key:"render_post",value:function(e,t,n){var r=Math.max(0,t.params.size),a=n.x,i=n.y,s=parseInt(n.width),l=parseInt(n.height);null==a&&(a=0),null==i&&(i=0),s||(s=o.Z.WIDTH),l||(l=o.Z.HEIGHT),e.save(),e.strokeStyle=t.params.color,e.lineWidth=r,e.translate(n.x+s/2,n.y+l/2),e.rotate(n.rotate*Math.PI/180);var c=-s/2,u=-l/2;e.beginPath(),e.rect(c-.5*r,u-.5*r,s+r,l+r),e.stroke(),e.restore()}},{key:"add_borders",value:function(e,t){return i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(o.Z.layer.id,"borders",e,t))}}]),e}()},4681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"box_blur",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Box blur",preview:!0,effects:!0,params:[{name:"param1",title:"H Radius:",value:3,range:[1,20]},{name:"param2",title:"V Radius:",value:3,range:[1,20]},{name:"param3",title:"Quality:",value:3,range:[1,20]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=t.param1,r=t.param2,a=t.param3;return c.Z.BoxBlur(e,n,r,a)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{param1:20,param2:1,param3:1});n.putImageData(a,0,0)}}]),e}()},2448:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5861),a=n(5671),i=n(3144),o=n(136),s=n(2963),l=n(1120),c=n(4687),u=n.n(c),d=n(9314),h=n(5071),p=n(7477),f=n(1606),m=n.n(f);const g=function(e){(0,o.Z)(f,e);var t,n,c,h=(n=f,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(n);if(c){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,s.Z)(this,e)});function f(e){var t;return(0,a.Z)(this,f),(t=h.call(this)).POP=new p.Z,t.preview_width=150,t.preview_height=120,t}return(0,i.Z)(f,[{key:"browser",value:(t=(0,r.Z)(u().mark((function e(){var t,n,r,a,i,o,s,l,c,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this,n="","image"==d.Z.layer.type){e.next=5;break}return m().error("This layer must contain an image. Please convert it to raster to apply this tool."),e.abrupt("return");case 5:for(a in r=this.get_effects_list())i=r[a].title,n+='
    ',n+='\t',n+='
    '+i+"
    ",n+="
    ";for(a=0;a<4;a++)n+='
    ';return o={title:"Effects browser",className:"wide",on_load:function(e,a){var i=document.createElement("div");i.classList.add("flex-container"),i.innerHTML=n,a.el.querySelector(".dialog_content").appendChild(i);for(var o=a.el.querySelectorAll(".item canvas"),s=0;s-1||t.indexOf("browser")>-1||e.push({title:this.get_filter_title(t),key:t,object:this.Base_gui.modules[t]});return e.sort((function(e,t){var n=e.title.toUpperCase(),r=t.title.toUpperCase();return nr?1:0})),e}},{key:"get_filter_title",value:function(e){var t=e.split("/"),n=t[t.length-1];return"negative"==n&&(n="invert"),(n=n.replace(/_/g," ")).charAt(0).toUpperCase()+n.slice(1)}},{key:"get_function_from_path",value:function(e){var t=e.split("/"),n=t[t.length-1];return n.replace(/-/,"_")}}]),f}(h.Z)},502:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(9314),c=n(7140),u=n(7477),d=n(699),h=n(1606),p=n.n(h);const f=function(e){(0,i.Z)(h,e);var t,n,c=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(){var e;return(0,r.Z)(this,h),(e=c.call(this)).POP=new u.Z,e.Base_layers=new d.Z,e}return(0,a.Z)(h,[{key:"blur",value:function(e){var t;if(null!=l.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"blur"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=5,range:[0,50]}];this.show_dialog("blur",r,e)}else p().error("Layer is empty.")}},{key:"convert_value",value:function(e,t,n){return"preview"==n&&(e*=this.POP.width_mini/this.POP.height_mini/(l.Z.WIDTH/l.Z.HEIGHT)),e+"px"}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(5,null,"preview");n.filter="blur("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="blur("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),h}(c.default)},3022:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"brightness",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"brightness"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=50,range:[-100,100]}];this.show_dialog("brightness",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e>0||e<0?e/100+1:1}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(30,null,"preview");n.filter="brightness("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="brightness("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},6463:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"contrast",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"contrast"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=40,range:[-100,100]}];this.show_dialog("contrast",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e>0||e<0?e/100+1:1}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(40,null,"preview");n.filter="contrast("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="contrast("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},4407:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"grayscale",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"grayscale"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=100,range:[0,100]}];this.show_dialog("grayscale",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e/100}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(100,null,"preview");n.filter="grayscale("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="grayscale("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},2175:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"hue_rotate",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"hue-rotate"),r=[{name:"value",title:"Degree:",value:null!==(t=n.value)&&void 0!==t?t:n.value=90,range:[0,360]}];this.show_dialog("hue-rotate",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e+"deg"}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(90,null,"preview");n.filter="hue-rotate("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="hue-rotate("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},2288:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"invert",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"invert"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=100,range:[0,100]}];this.show_dialog("invert",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e/100}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(100,null,"preview");n.filter="invert("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="invert("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},4494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"saturate",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"saturate"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=-50,range:[-100,100]}];this.show_dialog("saturate",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e>0||e<0?e/100+1:1}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(-50,null,"preview");n.filter="saturate("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="saturate("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},9172:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(7140),c=n(699),u=n(9314),d=n(1606),h=n.n(d);const p=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(){var e;return(0,r.Z)(this,d),(e=l.call(this)).Base_layers=new c.Z,e}return(0,a.Z)(d,[{key:"sepia",value:function(e){var t;if(null!=u.Z.layer.type){var n=this.Base_layers.find_filter_by_id(e,"sepia"),r=[{name:"value",title:"Percentage:",value:null!==(t=n.value)&&void 0!==t?t:n.value=60,range:[0,100]}];this.show_dialog("sepia",r,e)}else h().error("Layer is empty.")}},{key:"convert_value",value:function(e){return e/100}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(60,null,"preview");n.filter="sepia("+r+")",n.drawImage(t,0,0),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="sepia("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),d}(l.default)},8106:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(9314),c=n(7140),u=n(7477),d=n(2448),h=n(699),p=n(1606),f=n.n(p);const m=function(e){(0,i.Z)(p,e);var t,n,c=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(){var e;return(0,r.Z)(this,p),(e=c.call(this)).POP=new u.Z,e.Effects_browser=new d.default,e.Base_layers=new h.Z,e.preview_padding=20,e}return(0,a.Z)(p,[{key:"shadow",value:function(e){var t,n,r,a;if(null!=l.Z.layer.type){var i=this.Base_layers.find_filter_by_id(e,"shadow"),o=[{name:"x",title:"Offset X:",value:null!==(t=i.x)&&void 0!==t?t:i.x=10,range:[-100,100]},{name:"y",title:"Offset Y:",value:null!==(n=i.y)&&void 0!==n?n:i.y=10,range:[-100,100]},{name:"value",title:"Radius:",value:null!==(r=i.value)&&void 0!==r?r:i.value=5,range:[0,100]},{name:"color",title:"Color:",value:null!==(a=i.color)&&void 0!==a?a:i.color="#000000",type:"color"}];this.show_dialog("shadow",o,e)}else f().error("Layer is empty.")}},{key:"convert_value",value:function(e,t,n){if("preview"==n){var r=this.POP.width_mini/this.POP.height_mini/(l.Z.WIDTH/l.Z.HEIGHT);t.x=t.x*(this.POP.width_mini/l.Z.WIDTH),t.y=t.y*(this.POP.height_mini/l.Z.HEIGHT),t.value=t.value*r}return t.x+"px "+t.y+"px "+t.value+"px "+t.color}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.convert_value(null,{x:5,y:5,value:5,color:"#000000"},"preview");n.filter="drop-shadow("+r+")",n.drawImage(t,10,10,this.Effects_browser.preview_width-20,this.Effects_browser.preview_height-20),n.filter="none"}},{key:"render_pre",value:function(e,t){var n="drop-shadow("+this.convert_value(t.params.value,t.params,"save")+")";"none"==e.filter?e.filter=n:e.filter+=" "+n}},{key:"render_post",value:function(e,t){e.filter="none"}}]),p}(c.default)},8752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"denoise",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Denoise",preview:!0,effects:!0,params:[{name:"param1",title:"Exponent:",value:20,range:[0,50]}],on_change:function(t,n,r,a,i){var o=e.change(i,t);n.clearRect(0,0,i.width,i.height),n.drawImage(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=this.change(t,e);return n.clearRect(0,0,t.width,t.height),n.drawImage(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var n=parseFloat(t.param1),r=this.fx_filter.texture(e);return this.fx_filter.draw(r).denoise(n).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,{param1:20});n.drawImage(r,0,0)}}]),e}()},3212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"dither",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Dither",preview:!0,effects:!0,params:[{name:"param1",title:"Levels:",value:"8",range:[2,32]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=parseFloat(t.param1);return c.Z.Dither(e,n)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{param1:8});n.putImageData(a,0,0)}}]),e}()},2846:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"dot_screen",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Dot Screen",preview:!0,effects:!0,params:[{name:"size",title:"Size:",value:"3",range:[1,20]}],on_change:function(t,n,r,a,i){var o=e.change(i,t);n.clearRect(0,0,i.width,i.height),n.drawImage(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=this.change(t,e);return n.clearRect(0,0,t.width,t.height),n.drawImage(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var n=parseFloat(t.size),r=this.fx_filter.texture(e);return this.fx_filter.draw(r).dotScreen(Math.round(e.width/2),Math.round(e.height/2),0,n).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,{size:3});n.drawImage(r,0,0)}}]),e}()},1613:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"edge",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),r=this.change(n);return t.putImageData(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e){return c.Z.Edge(e)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r);n.putImageData(a,0,0)}}]),e}()},8829:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"emboss",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),r=this.change(n);return t.putImageData(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e){return c.Z.Emboss(e)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r);n.putImageData(a,0,0)}}]),e}()},5322:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"enrich",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Enrich",preview:!0,effects:!0,params:[],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){return c.Z.Enrich(e)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{});n.putImageData(a,0,0)}}]),e}()},9224:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1748),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.Helper=new c.Z}return(0,a.Z)(e,[{key:"grains",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Grains",preview:!0,effects:!0,params:[{name:"level",title:"Level:",value:"30",range:[0,50]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){if(0==t.level)return e;for(var n=e.data,r=e.height,a=e.width,i=0;i{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"heatmap",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),r=this.change(n);return t.putImageData(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e){for(var t,n,r=e.data,a=0;a{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"1977",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");return r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="screen",a.fillStyle="rgba(243, 106, 188, 0.3)",a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="contrast(1.1) brightness(1.1) saturate(1.3)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},7365:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"aden",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n;var i=a.createLinearGradient(0,0,t,n);return i.addColorStop(0,"rgba(66, 10, 14, 0.2)"),i.addColorStop(1,"rgba(66, 10, 14, 0.2)"),a.fillStyle=i,a.fillRect(0,0,t,n),a.globalCompositeOperation="darken",a.drawImage(e,0,0),a.globalCompositeOperation="source-over",a.filter="hue-rotate(-20deg) contrast(0.9) saturate(0.85) brightness(1.2)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},4171:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"clarendon",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");return r.width=t,r.height=n,a.fillStyle="rgba(127, 187, 227, 0.2)",a.fillRect(0,0,t,n),a.globalCompositeOperation="overlay",a.drawImage(e,0,0),a.globalCompositeOperation="source-over",a.filter="contrast(1.2) saturate(1.35)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},7353:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"gingham",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");return r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="soft-light",a.fillStyle="#e6e6fa",a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="brightness(1.05) hue-rotate(-10deg)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},2324:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"inkwell",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");return r.width=t,r.height=n,a.filter="sepia(0.3) contrast(1.1) brightness(1.1) grayscale(1)",a.drawImage(e,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},3895:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"lofi",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="multiply";var i=Math.min(t,n),o=a.createRadialGradient(t/2,n/2,.7*i,t/2,n/2,1.5*i);return o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"#222222"),a.fillStyle=o,a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="saturate(1.1) contrast(1.5)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},8541:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"toaster",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="screen";var i=a.createRadialGradient(t/2,n/2,0,t/2,n/2,.6*t);return i.addColorStop(0,"#804e0f"),i.addColorStop(1,"#3b003b"),a.fillStyle=i,a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="contrast(1.5) brightness(0.9)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},1259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"valencia",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");return r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="exclusion",a.fillStyle="3a0339",a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="contrast(1.08) brightness(1.08) sepia(0.08)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},603:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"xpro2",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n,a.drawImage(e,0,0),a.globalCompositeOperation="color-burn";var i=Math.min(t,n),o=a.createRadialGradient(t/2,n/2,.4*i,t/2,n/2,1.1*i);return o.addColorStop(0,"#e6e7e0"),o.addColorStop(1,"rgba(43, 42, 161, 0.6)"),a.fillStyle=o,a.fillRect(0,0,t,n),a.globalCompositeOperation="source-over",a.filter="sepia(0.3)",a.drawImage(r,0,0),a.filter="none",r}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},1743:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"mosaic",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Mosaic",preview:!0,effects:!0,params:[{name:"size",title:"Size:",value:10,range:[1,100]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=parseFloat(t.size);return n=Math.min(e.width,e.height)*n/100,n=Math.round(n),c.Z.Mosaic(e,n)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{size:10});n.putImageData(a,0,0)}}]),e}()},7710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(896),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1,this.ImageFilters=u.Z}return(0,a.Z)(e,[{key:"night_vision",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var r=document.createElement("canvas"),a=r.getContext("2d");r.width=t,r.height=n,a.drawImage(e,0,0);var i=a.getImageData(0,0,t,n);i=this.ImageFilters.ColorTransformFilter(i,1,1,1,1,0,100,0,1),i=this.ImageFilters.HSLAdjustment(i,0,0,-50),a.putImageData(i,0,0);var o=this.fx_filter.texture(r);return this.fx_filter.draw(o).vignette(.2,.9).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},9480:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"oil",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Oil",preview:!0,effects:!0,params:[{name:"param1",title:"Range:",value:2,range:[1,10]},{name:"param2",title:"Levels:",value:"32",range:[1,256]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=parseFloat(t.param1),r=parseInt(t.param2);return c.Z.Oil(e,n,r)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{param1:2,param2:32});n.putImageData(a,0,0)}}]),e}()},6040:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"pencil",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=this.change(e,e.width,e.height);return t.clearRect(0,0,e.width,e.height),t.drawImage(n,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e,t,n){var r=Math.min(t,n)/1e3;r=Math.ceil(r);var a=document.createElement("canvas"),i=a.getContext("2d");return a.width=t,a.height=n,i.drawImage(e,-r,-r),i.globalCompositeOperation="difference",i.drawImage(e,0,0),i.globalCompositeOperation="source-over",i.filter="brightness(2) invert(1) grayscale(1)",i.drawImage(a,0,0),i.filter="none",a}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,t.width,t.height);n.drawImage(r,0,0)}}]),e}()},8820:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"sharpen",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Sharpen",preview:!0,effects:!0,params:[{name:"param1",title:"Factor:",value:"3",range:[1,10],step:.1}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t);n.putImageData(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){var n=parseFloat(t.param1);return c.Z.Sharpen(e,n)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r,{param1:3});n.putImageData(a,0,0)}}]),e}()},5959:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z}return(0,a.Z)(e,[{key:"solarize",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),r=this.change(n);return t.putImageData(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"change",value:function(e){return c.Z.Solarize(e)}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height),a=this.change(r);n.putImageData(a,0,0)}}]),e}()},5253:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(896),u=n(291),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"tilt_shift",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Tilt Shift",preview:!0,effects:!0,params:[{name:"param7",title:"Saturation:",value:"3",range:[0,20]},{name:"param8",title:"Sharpen:",value:"1",range:[0,5]},{name:"param1",title:"Blur Radius:",value:10,range:[0,30]},{name:"param2",title:"Gradient Radius:",value:70,range:[40,100]},{name:"param3",title:"X start:",value:0,range:[0,100]},{name:"param4",title:"Y start:",value:50,range:[0,100]},{name:"param5",title:"X end:",value:100,range:[0,100]},{name:"param6",title:"Y end:",value:50,range:[0,100]}],on_change:function(t,n,r,a,i){e.change(i,t),t.param3=i.width*t.param3/100,t.param4=i.height*t.param4/100,t.param5=i.width*t.param5/100,t.param6=i.height*t.param6/100,n.beginPath(),n.strokeStyle="#ff0000",n.lineWidth=1,n.moveTo(t.param3+.5,t.param4+.5),n.lineTo(t.param5+.5,t.param6+.5),n.stroke()},on_finish:function(t){e.save(t)}};this.POP.show(t)}else h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0);return t.getContext("2d"),this.change(t,e),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=u.Z.canvas());var n=parseInt(t.param1),r=parseInt(t.param2),a=parseInt(t.param3),i=parseInt(t.param4),o=parseInt(t.param5),s=parseInt(t.param6),l=parseInt(t.param7),d=parseInt(t.param8);n=e.height*n/100,r=e.height*r/100,a=e.width*a/100,i=e.height*i/100,o=e.width*o/100,s=e.height*s/100;var h=e.getContext("2d"),p=this.fx_filter.texture(e);this.fx_filter.draw(p).tiltShift(a,i,o,s,n,r).update(),h.clearRect(0,0,e.width,e.height),h.drawImage(this.fx_filter,0,0);var f=h.getImageData(0,0,e.width,e.height);f=c.Z.HSLAdjustment(f,0,l,0),h.putImageData(f,0,0),f=h.getImageData(0,0,e.width,e.height),f=c.Z.Sharpen(f,d),h.putImageData(f,0,0)}},{key:"demo",value:function(e,t){var n=document.getElementById(e);n.getContext("2d").drawImage(t,0,0),this.change(n,{param7:3,param8:1,param1:10,param2:70,param3:0,param4:50,param5:100,param6:50})}}]),e}()},1391:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"vibrance",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Vibrance",preview:!0,effects:!0,params:[{name:"level",title:"Level:",value:"0.5",range:[-1,1],step:.01}],on_change:function(t,n,r,a,i){var o=e.change(i,t);n.clearRect(0,0,i.width,i.height),n.drawImage(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=this.change(t,e);return n.clearRect(0,0,t.width,t.height),n.drawImage(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var n=parseFloat(t.level),r=this.fx_filter.texture(e);return this.fx_filter.draw(r).vibrance(n).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,{level:.5});n.drawImage(r,0,0)}}]),e}()},1264:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"vignette",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Vignette",preview:!0,effects:!0,params:[{name:"param1",title:"Level:",value:"0.5",range:[0,1],step:.01},{name:"param2",title:"Size:",value:"0.5",range:[0,1],step:.01}],on_change:function(t,n,r,a,i){var o=e.change(i,t);n.clearRect(0,0,i.width,i.height),n.drawImage(o,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=this.change(t,e);return n.clearRect(0,0,t.width,t.height),n.drawImage(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var n=parseFloat(t.param1),r=parseFloat(t.param2),a=this.fx_filter.texture(e);return this.fx_filter.draw(a).vignette(n,r).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r=this.change(t,{param1:.5,param2:.5});n.drawImage(r,0,0)}}]),e}()},2421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(896);const d=function(){function e(t,n){(0,r.Z)(this,e),this.fx_filter=!1,this.exposure_rand=null,this.lightLeakX=null,this.lightLeakY=null,this.reset_random_values(t,n)}return(0,a.Z)(e,[{key:"apply_all",value:function(e,t){var n=1*t,r=t/2,a=1.5*t,i=1*t,o=1.5*t,s=t/2,l=t/5,c=t/200,u=t/142,d=1*t;this.adjust_color(e,n),this.lower_contrast(e,r),this.light_leak(e,a),this.chemicals(e,i),this.exposure(e,o),this.grains(e,s),this.grains_big(e,l),this.optics(e,c,u),this.dusts(e,d)}},{key:"reset_random_values",value:function(e,t){this.exposure_rand=this.getRandomInt(1,10),this.lightLeakX=this.getRandomInt(0,e),this.lightLeakY=this.getRandomInt(0,t)}},{key:"adjust_color",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height,i=n.getImageData(0,0,r,a),o=u.Z.ColorTransformFilter(i,1,1,1,1,t,0,0,1);n.putImageData(o,0,0)}},{key:"lower_contrast",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height,i=n.getImageData(0,0,r,a),o=u.Z.BrightnessContrastPhotoshop(i,0,-t);n.putImageData(o,0,0)}},{key:"blur",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height;if(t<1)return n;var i=n.getImageData(0,0,r,a),o=u.Z.GaussianBlur(i,t);n.putImageData(o,0,0)}},{key:"light_leak",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height,i=this.lightLeakX,o=this.lightLeakY,s=.6*Math.min(r,a),l=n.createRadialGradient(i,o,s*t/255,i,o,s);l.addColorStop(0,"rgba(255, 165, 0, "+t/255+")"),l.addColorStop(1,"rgba(255, 255, 255, 0)"),n.fillStyle=l,n.fillRect(0,0,r,a)}},{key:"chemicals",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height,i=n.getImageData(0,0,r,a),o=u.Z.HSLAdjustment(i,0,-t,0);n.putImageData(o,0,0)}},{key:"exposure",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height;n.rect(0,0,r,a);var i=n.createLinearGradient(0,0,0,a);this.exposure_rand<5?(i.addColorStop(0,"rgba(0, 0, 0, "+t/255+")"),i.addColorStop(1,"rgba(255, 255, 255, "+t/255+")")):(i.addColorStop(0,"rgba(255, 255, 255, "+t/255+")"),i.addColorStop(1,"rgba(0, 0, 0, "+t/255+")")),n.fillStyle=i,n.fill()}},{key:"grains",value:function(e,t){var n=e.getContext("2d"),r=e.width,a=e.height;if(0==t)return n;for(var i=n.getImageData(0,0,r,a),o=i.data,s=0;s{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(699),c=n(291),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new l.Z,this.fx_filter=!1}return(0,a.Z)(e,[{key:"zoom_blur",value:function(){var e=this;if("image"==o.Z.layer.type){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n={title:"Zoom blur",preview:!0,effects:!0,params:[{name:"param1",title:"Strength:",value:"0.3",range:[0,1],step:.01},{name:"param2",title:"Center x:",value:Math.round(t.width/2),range:[0,t.width]},{name:"param3",title:"Center y:",value:Math.round(t.height/2),range:[0,t.height]}],on_change:function(n,r,a,i,o){n.param2=n.param2/t.width*a,n.param3=n.param3/t.height*i;var s=e.change(o,n);r.clearRect(0,0,o.width,o.height),r.drawImage(s,0,0)},on_finish:function(t){e.save(t)}};this.POP.show(n)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=this.change(t,e);return n.clearRect(0,0,t.width,t.height),n.drawImage(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){0==this.fx_filter&&(this.fx_filter=c.Z.canvas());var n=parseFloat(t.param1),r=parseInt(t.param2),a=parseInt(t.param3),i=this.fx_filter.texture(e);return this.fx_filter.draw(i).zoomBlur(r,a,n).update(),this.fx_filter}},{key:"demo",value:function(e,t){var n=document.getElementById(e).getContext("2d"),r={param1:.3,param2:Math.round(t.width/2),param3:Math.round(t.height/2)},a=this.change(t,r);n.drawImage(a,0,0)}}]),e}()},461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(5861),a=n(5671),i=n(3144),o=n(4687),s=n.n(o),l=n(8562),c=n(9314),u=n(1125),d=n(699),h=n(1748),p=n(7477),f=n(440);const m=function(){function e(){(0,a.Z)(this,e),this.Base_gui=new u.Z,this.Base_layers=new d.Z,this.POP=new p.Z,this.Helper=new h.Z,this.Tools_settings=new f.default}var t;return(0,i.Z)(e,[{key:"new",value:function(){var e=this,t=c.Z.WIDTH,n=c.Z.HEIGHT,r=this.Base_gui.common_dimensions,a=["Custom"],i=this.Tools_settings.get_setting("default_units"),o=this.Tools_settings.get_setting("resolution");for(var s in r){var l=r[s];a.push(l[0]+"x"+l[1]+" - "+l[2])}var u=this.Helper.getCookie("transparency");if(null===u&&(u=!1),u)var d=!0;else d=!1;var h={title:"New file",params:[{name:"width",title:"Width:",value:t=this.Helper.get_user_unit(t,i,o),comment:i},{name:"height",title:"Height:",value:n=this.Helper.get_user_unit(n,i,o),comment:i},{name:"resolution_type",title:"Resolution:",values:a},{name:"layout",title:"Layout:",value:"Custom",values:["Custom","Landscape","Portrait"]},{name:"transparency",title:"Transparent:",value:d}],on_finish:function(t){e.new_handler(t)}};this.POP.show(h)}},{key:"new_handler",value:(t=(0,r.Z)(s().mark((function e(t){var n,r,a,i,o,c,u,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=parseFloat(t.width),r=parseFloat(t.height),a=t.resolution_type,i=t.transparency,o=this.Tools_settings.get_setting("default_units"),c=this.Tools_settings.get_setting("resolution"),"Custom"!=a?(u=(u=a.split(" "))[0].split("x"),n=parseInt(u[0]),r=parseInt(u[1]),"Portrait"==t.layout&&(d=n,n=r,r=d)):(n=this.Helper.get_internal_unit(n,o,c),r=this.Helper.get_internal_unit(r,o,c)),l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_file","New File",[new l.Z.Actions.Refresh_action_attributes_action("undo"),new l.Z.Actions.Prepare_canvas_action("undo"),new l.Z.Actions.Update_config_action({TRANSPARENCY:!!i,WIDTH:parseInt(n),HEIGHT:parseInt(r),ALPHA:255,COLOR:"#008000",mouse:{},visible_width:null,visible_height:null,user_fonts:{}}),new l.Z.Actions.Prepare_canvas_action("do"),new l.Z.Actions.Refresh_action_attributes_action("do"),new l.Z.Actions.Reset_layers_action,new l.Z.Actions.Init_canvas_zoom_action,new l.Z.Actions.Insert_layer_action({})])),e.next=10,new Promise((function(e){return setTimeout(e,10)}));case 10:this.Base_gui.GUI_preview.zoom_auto(!0),i?this.Helper.setCookie("transparency",1):this.Helper.setCookie("transparency",0);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}()},1728:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var r=n(1002),a=n(5861),i=n(5671),o=n(3144),s=n(4687),l=n.n(s),c=n(8562),u=n(9314),d=n(699),h=n(1125),p=n(7477),f=n(1748);const m=function(){function e(t){(0,i.Z)(this,e);var n=this;this.Helper=new f.Z,this.on_paste=t,this.ctrl_pressed=!1,this.command_pressed=!1,this.pasteCatcher,this.paste_mode,document.addEventListener("keydown",(function(e){n.on_keyboard_action(e)}),!1),document.addEventListener("keyup",(function(e){n.on_keyboardup_action(e)}),!1),document.addEventListener("paste",(function(e){n.paste_auto(e)}),!1),this.init()}return(0,o.Z)(e,[{key:"init",value:function(){var e=this;if(window.Clipboard)return!0;this.pasteCatcher=document.createElement("div"),this.pasteCatcher.setAttribute("id","paste_ff"),this.pasteCatcher.setAttribute("contenteditable",""),this.pasteCatcher.style.cssText="opacity:0;position:fixed;top:0px;left:0px;",this.pasteCatcher.style.marginLeft="-20px",this.pasteCatcher.style.width="10px",document.body.appendChild(this.pasteCatcher);var t=new MutationObserver((function(t){t.forEach((function(t){if("auto"==this.paste_mode||0==this.ctrl_pressed||"childList"!=t.type)return!0;1==t.addedNodes.length&&(null!=t.addedNodes[0].src&&e.paste_createImage(t.addedNodes[0].src),setTimeout((function(){this.pasteCatcher.innerHTML=""}),20))}))})),n=document.getElementById("paste_ff");t.observe(n,{attributes:!0,childList:!0,characterData:!0})}},{key:"paste_auto",value:function(e){if(!this.Helper.is_input(e.target)&&(this.paste_mode="",window.Clipboard||(this.pasteCatcher.innerHTML=""),e.clipboardData)){var t=e.clipboardData.items;if(t){this.paste_mode="auto";for(var n=0;n'}],on_load:function(e){document.getElementById("webcam_container").appendChild(t)},on_finish:function(r){var a=t.videoWidth,i=t.videoHeight,o=document.createElement("canvas"),s=o.getContext("2d");o.width=a,o.height=i,s.drawImage(t,0,0);var l={name:"Webcam #"+e.Base_layers.auto_increment,type:"image",data:o.toDataURL("image/png"),width:a,height:i,width_original:a,height_original:i};c.Z.State.do_action(new c.Z.Actions.Bundle_action("open_file_webcam","Open File Webcam",[new c.Z.Actions.Insert_layer_action(l),new c.Z.Actions.Autoresize_canvas_action(a,i,null,!0,!0)])),null!=n&&n.stop(),t.pause(),t.src="",t.load()},on_cancel:function(e){null!=n&&n.stop(),t.pause(),t.src="",t.load()}};this.POP.show(r),navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then((function(e){n=e.getTracks()[0],t.srcObject=e})).catch((function(e){A().error("Sorry, cold not load getUserMedia() data: "+e)}))}},{key:"open_dir",value:function(){var e=this;document.getElementById("tmp").innerHTML="";var t=document.createElement("input");t.setAttribute("id","file_open_dir"),t.type="file",t.webkitdirectory="webkitdirectory",document.getElementById("tmp").appendChild(t),document.getElementById("file_open_dir").addEventListener("change",(function(t){e.open_handler(t)}),!1),document.querySelector("#file_open_dir").click()}},{key:"open_data_url",value:function(){var e=this,t={title:"Open data URL",params:[{name:"data",title:"Data URL:",type:"textarea",value:""}],on_finish:function(t){e.file_open_data_url_handler(t.data)}};this.POP.show(t)}},{key:"file_open_data_url_handler",value:function(e){if(""!=e){var t=new Image;t.crossOrigin="Anonymous",t.onload=function(){var e={name:"Data URL",type:"image",link:t,width:t.width,height:t.height,width_original:t.width,height_original:t.height};c.Z.State.do_action(new c.Z.Actions.Bundle_action("open_file_data_url","Open File Data URL",[new c.Z.Actions.Insert_layer_action(e),new c.Z.Actions.Autoresize_canvas_action(t.width,t.height,null,!0,!0)])),t.onload=function(){u.Z.need_render=!0}},t.onerror=function(e){A().error("Sorry, image could not be loaded. Try copy image and paste it.")},t.src=e}}},{key:"open_url",value:function(){var e=this,t={title:"Open URL",params:[{name:"url",title:"URL:",value:""}],on_finish:function(t){e.file_open_url_handler(t)}};this.POP.show(t)}},{key:"open_handler",value:(n=(0,a.Z)(l().mark((function e(t){var n,r,a,i,o,s,u,d,h,p,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=this,r=t.target.files,a=this.Base_layers.auto_increment,null==r&&(r=t.dataTransfer.files),i=[],o=0;oh&&(h=p.id),null!=(0,r.Z)(p.order)&&p.order>h&&(h=p.order),"image"==p.type)for(o in p.link=null,n.data)n.data[o].id==p.id&&(p.data=n.data[o].data);d.push(new c.Z.Actions.Insert_layer_action(p,!1))}return null!=n.info.layer_active&&d.push(new c.Z.Actions.Select_layer_action(n.info.layer_active,!0)),null!=n.info.guides&&(u.Z.guides=n.info.guides),d.push(new c.Z.Actions.Set_object_property_action(this.Base_layers,"auto_increment",h+1),new c.Z.Actions.Update_config_action({WIDTH:parseInt(n.info.width),HEIGHT:parseInt(n.info.height)}),new c.Z.Actions.Prepare_canvas_action("do")),e.next=29,c.Z.State.do_action(new c.Z.Actions.Bundle_action("open_json_file","Open JSON File",d));case 29:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"extract_exif",value:function(e){var t={general:[],exif:[]};return y().getData(e,(function(){t.exif=this.exifdata,delete this.exifdata.thumbnail})),null!=e.name&&(t.general.Name=e.name),null!=e.size&&(t.general.Size=this.Helper.number_format(e.size/1e3,2)+" KB"),null!=e.type&&(t.general.Type=e.type),null!=e.lastModified&&(t.general["Last modified"]=this.Helper.format_time(e.lastModified)),t}},{key:"search",value:function(){this.GUI_tools.activate_tool("media")}}]),e}()},1689:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(5671),a=n(3144);const i=function(){function e(){(0,r.Z)(this,e)}return(0,a.Z)(e,[{key:"print",value:function(){window.print()}}]),e}()},2735:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5671),a=n(3144),i=(n(9314),n(699)),o=n(1728);const s=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new i.Z,this.File_open=new o.default,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){121==t.keyCode&&(e.quickload(),t.preventDefault())}),!1)}},{key:"quickload",value:function(){var e=localStorage.getItem("quicksave_data");if(""==e||null==e)return!1;this.File_open.load_json(e)}}]),e}()},4821:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=(n(9314),n(8496)),o=n(7477),s=n(1606),l=n.n(s);const c=function(){function e(){(0,r.Z)(this,e),this.POP=new o.Z,this.File_save=new i.default,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){120==t.keyCode&&e.quicksave()}),!1)}},{key:"quicksave",value:function(){var e=this.File_save.export_as_json();if(e.length>5e6)return l().error("Sorry, image is too big, max 5 MB."),!1;localStorage.setItem("quicksave_data",e)}}]),e}()},8496:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(1748),c=n(7477),u=n(1606),d=n.n(u),h=(n(7101),n(3162)),p=n.n(h),f=n(6866),m=n.n(f);const g={_dly:9,_error:null,setErrorHandler:function(e){this._error=e},toArrayBuffer:function(e,t,n){n=n||{};var r,a=this;try{var i,o,s=e.width,l=e.height,c=0,u=0,d=[],h="canvas-to-tiff 0.4\0",p=!!n.littleEndian,f=0|+(n.dpiX||n.dpi||96),m=0|+(n.dpiY||n.dpi||96),g=e.getContext("2d").getImageData(0,0,s,l),A=g.data.length,v=new ArrayBuffer(258+A),y=new Uint8Array(v),_=new DataView(v),b=0,C=new Date;x(p?18761:19789),x(42),k(8),i=b,b+=2,S(254,4,1,0),S(256,4,1,s),S(257,4,1,l),S(258,3,4,c,8),S(259,3,1,1),S(262,3,1,2),S(273,4,1,258,0),S(277,3,1,4),S(279,4,1,A),S(282,5,1,c,8),S(283,5,1,c,8),S(296,3,1,2),S(305,2,h.length,c,1&(r=h.length)?r+1:r),S(306,2,20,c,20),S(338,3,1,2),function(){_.setUint16(i,u,p),k(0);for(var e,t,n=14+12*u,r=0;r0;)o+=String.fromCharCode(n[l++]);l1&&(u=d[d.length-2]),u=u.replace(/ /g,"-");var h=[];for(var s in e)h.push(s+" - "+e[s]);var p={title:t,params:[{name:"name",title:"File name:",value:u},{name:"type",title:"Save as type:",values:h,value:r},{name:"quality",title:"Quality:",value:90,range:[1,100]},{title:"File size:",html:'-'},{name:"calc_size",title:"Show file size:",value:l},{name:"layers",title:"Save layers:",values:["All","Selected","Separated","Separated (original types)"]},{name:"delay",title:"Gif delay:",value:400}],on_change:function(e,t,r,a){n.save_dialog_onchange(!0)},on_finish:function(e){if("Separated"==e.layers||"Separated (original types)"==e.layers){var t=o.Z.layer.id,r=e.layers;for(var a in e.layers="Selected",o.Z.layers)if(0!=o.Z.layers[a].visible){if("Separated (original types)"==r)for(var s in e.type=n.SAVE_TYPES[n.default_extension],n.SAVE_TYPES)if(!1!==n.Helper.strpos(o.Z.layers[a].name.toLowerCase(),"."+s.toLowerCase())){e.type=s;break}new i.Z.Actions.Select_layer_action(o.Z.layers[a].id,!0).do(),n.save_action(e,!0)}new i.Z.Actions.Select_layer_action(t,!0).do()}else n.save_action(e)}};this.POP.show(p),document.getElementById("pop_data_name").select(),1==c?this.save_dialog_onchange(!0):this.save_dialog_onchange(!1)}},{key:"save_data_url",value:function(){var e=1e7;if(o.Z.WIDTH*o.Z.WIDTH>1e7)d().error("Size is too big, max "+this.Helper.number_format(e,0)+" pixels.");else{var t=document.createElement("canvas"),n=t.getContext("2d");t.width=o.Z.WIDTH,t.height=o.Z.HEIGHT,this.disable_canvas_smooth(n),this.Base_layers.convert_layers_to_canvas(n,null,!1);var r=t.toDataURL();if(e=1e6,r.length>e)d().error("Size is too big, max "+this.Helper.number_format(e,0)+" bytes.");else{var a={title:"Data URL",params:[{name:"url",title:"URL:",type:"textarea",value:r}]};this.POP.show(a)}}}},{key:"update_file_size",value:function(e){"string"!=typeof e?(e>1048576?e=this.Helper.number_format(e/1024/1024,2)+" MB":e>1024?e=this.Helper.number_format(e/1024,2)+" KB":e+=" B",document.getElementById("file_size").innerHTML=e):document.getElementById("file_size").innerHTML=e}},{key:"save_dialog_onchange",value:function(e){var t=this,n=this.POP.get_params(),r=parseInt(n.quality);(r>100||r<1||1==isNaN(r))&&(r=90),r/=100;var a=n.type,i=a.split(" ");if(a=i[0],document.getElementById("popup-tr-quality").style.display="JPG"==a||"WEBP"==a?"":"none",document.getElementById("popup-tr-delay").style.display="GIF"==a?"":"none",document.getElementById("popup-tr-layers").style.display="JSON"==a||"GIF"==a?"none":"","Separated"==n.layers?document.getElementById("pop_data_name").disabled=!0:document.getElementById("pop_data_name").disabled=!1,"Separated (original types)"==n.layers?(document.getElementById("popup-group-type")&&(document.getElementById("popup-group-type").style.opacity="0.5"),document.getElementById("popup-tr-quality").style.display=""):document.getElementById("popup-group-type")&&(document.getElementById("popup-group-type").style.opacity="1"),0!=e)if(this.update_file_size("..."),0!=n.calc_size&&"Separated"!=n.layers&&"Separated (original types)"!=n.layers){if("JSON"!=a){var s=document.createElement("canvas"),l=s.getContext("2d");if(s.width=o.Z.WIDTH,s.height=o.Z.HEIGHT,this.disable_canvas_smooth(l),"Selected"==n.layers&&"GIF"!=a&&null!=o.Z.layer.type){var c=o.Z.layer,u=null,d=null;null!=c.x&&null!=c.y&&null!=c.width&&null!=c.height&&(u=c.x,d=c.y,c.x=0,c.y=0,s.width=c.width,s.height=c.height),this.Base_layers.convert_layers_to_canvas(l,c.id,!1),null!=u&&(c.x=u,c.y=d)}else this.Base_layers.convert_layers_to_canvas(l,null,!1)}if("JSON"==a||"JPG"!=a&&0!=o.Z.TRANSPARENCY||(l.globalCompositeOperation="destination-over",this.fillCanvasBackground(l,"#ffffff"),l.globalCompositeOperation="source-over"),"PNG"==a)s.toBlob((function(e){t.update_file_size(e.size)}));else if("JPG"==a)s.toBlob((function(e){t.update_file_size(e.size)}),"image/jpeg",r);else if("WEBP"==a){var h="image/webp";if(0==this.check_format_support(s,h,!1))return void this.update_file_size("-");s.toBlob((function(e){t.update_file_size(e.size)}),h,r)}else if("AVIF"==a){if(h="image/avif",0==this.check_format_support(s,h,!1))return void this.update_file_size("-");s.toBlob((function(e){t.update_file_size(e.size)}),h,r)}else if("BMP"==a){if(h="image/bmp",0==this.check_format_support(s,h,!1))return void this.update_file_size("-");s.toBlob((function(e){t.update_file_size(e.size)}),h)}else if("TIFF"==a)h="image/tiff",g.toBlob(s,(function(e){t.update_file_size(e.size)}),h);else if("JSON"==a){var p=this.export_as_json(),f=new Blob([p],{type:"text/plain"});this.update_file_size(f.size)}else"GIF"==a&&this.update_file_size("-")}else document.getElementById("file_size").innerHTML="-"}},{key:"save_action",value:function(e,t){var n=e.name;!0===t&&"Selected"==e.layers&&(n=o.Z.layer.name);var r=parseInt(e.quality);(r>100||r<1||1==isNaN(r))&&(r=90),r/=100;var a=parseInt(e.delay);(a<0||1==isNaN(a))&&(a=400);var i,s,l=e.type,c=l.split(" ");for(var u in l=c[0],this.SAVE_TYPES)!1!==this.Helper.strpos(n,"."+u.toLowerCase())&&(l=u);if(""!=this.Helper.getCookie("save_default")&&this.Helper.getCookie("save_default")==l||this.Helper.setCookie("save_default",l),"JSON"!=l&&("Selected"==e.layers&&"GIF"!=l?s=(i=this.Base_layers.convert_layer_to_canvas()).getContext("2d"):(s=(i=document.createElement("canvas")).getContext("2d"),i.width=o.Z.WIDTH,i.height=o.Z.HEIGHT,this.disable_canvas_smooth(s),this.Base_layers.convert_layers_to_canvas(s,null,!1))),"JSON"==l||"JPG"!=l&&0!=o.Z.TRANSPARENCY||(s.globalCompositeOperation="destination-over",this.fillCanvasBackground(s,"#ffffff"),s.globalCompositeOperation="source-over"),"PNG"==l)0==this.Helper.strpos(n,".png")&&(n+=".png"),i.toBlob((function(e){p().saveAs(e,n)}));else if("JPG"==l)0==this.Helper.strpos(n,".jpg")&&(n+=".jpg"),i.toBlob((function(e){p().saveAs(e,n)}),"image/jpeg",r);else if("WEBP"==l){0==this.Helper.strpos(n,".webp")&&(n+=".webp");var d="image/webp";if(0==this.check_format_support(i,d))return!1;i.toBlob((function(e){p().saveAs(e,n)}),d,r)}else if("AVIF"==l){if(0==this.Helper.strpos(n,".avif")&&(n+=".avif"),d="image/avif",0==this.check_format_support(i,d))return!1;i.toBlob((function(e){p().saveAs(e,n)}),d,r)}else if("BMP"==l){if(0==this.Helper.strpos(n,".bmp")&&(n+=".bmp"),d="image/bmp",0==this.check_format_support(i,d))return!1;i.toBlob((function(e){p().saveAs(e,n)}),d)}else if("TIFF"==l)0==this.Helper.strpos(n,".tiff")&&(n+=".tiff"),d="image/tiff",g.toBlob(i,(function(e){p().saveAs(e,n)}),d);else if("JSON"==l){0==this.Helper.strpos(n,".json")&&(n+=".json");var h=this.export_as_json(),f=new Blob([h],{type:"text/plain"});p().saveAs(f,n)}else if("GIF"==l){var A={workers:navigator.hardwareConcurrency||4,quality:10,repeat:0,width:o.Z.WIDTH,height:o.Z.HEIGHT,dither:"FloydSteinberg-serpentine",workerScript:"./src/js/libs/gifjs/gif.worker.js"};1==o.Z.TRANSPARENCY&&(A.transparent="rgba(0,0,0,0)");var v=new(m())(A);for(u=0;u2&&void 0!==arguments[2]?arguments[2]:o.Z.WIDTH,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.Z.HEIGHT;e.beginPath(),e.rect(0,0,n,r),e.fillStyle=t,e.fill()}},{key:"check_format_support",value:function(e,t,n){return t==e.toDataURL(t).replace(/^data:([^;]*).*/,"$1")||"text/plain"==t||(null!=n&&1!=n||d().error("Your browser does not support this format."),!1)}},{key:"export_as_json",value:function(){var e=(r=new Date).getFullYear(),t=r.getMonth()+1,n=r.getDate();n<10&&(n="0"+n),t<10&&(t="0"+t);var r=e+"-"+t+"-"+n,a={};for(var i in a.info={width:o.Z.WIDTH,height:o.Z.HEIGHT,about:"Image data with multi-layers. Can be opened using miniPaint - https://github.com/viliusle/miniPaint",date:r,version:"4.11.0",layer_active:o.Z.layer.id,guides:o.Z.guides},a.user_fonts=o.Z.user_fonts,a.layers=[],o.Z.layers){var s={};for(var l in o.Z.layers[i])"_"!=l[0]&&"link_canvas"!=l&&(s[l]=o.Z.layers[i][l]);a.layers.push(s)}for(var i in a.data=[],o.Z.layers)if("image"==o.Z.layers[i].type){var c=document.createElement("canvas");c.width=o.Z.layers[i].width_original,c.height=o.Z.layers[i].height_original,this.disable_canvas_smooth(c.getContext("2d")),c.getContext("2d").drawImage(o.Z.layers[i].link,0,0);var u=c.toDataURL("image/png");a.data.push({id:o.Z.layers[i].id,data:u}),c.width=1,c.height=1}return JSON.stringify(a,null,"\t")}},{key:"disable_canvas_smooth",value:function(e){e.webkitImageSmoothingEnabled=!1,e.oImageSmoothingEnabled=!1,e.msImageSmoothingEnabled=!1,e.imageSmoothingEnabled=!1}}]),e}()},884:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5671),a=n(3144),i=(n(9314),n(7477));const o=function(){function e(){(0,r.Z)(this,e),this.POP=new i.Z}return(0,a.Z)(e,[{key:"about",value:function(){var e="www.viliusl@gmail.com",t={title:"About",params:[{title:"",html:''},{title:"Name:",html:'miniPaint'},{title:"Version:",value:"4.11.0"},{title:"Description:",value:"Online image editor."},{title:"Author:",value:"ViliusL"},{title:"Email:",html:''+e+""},{title:"GitHub:",html:'https://github.com/viliusle/miniPaint'},{title:"Website:",html:'https://viliusle.github.io/miniPaint/'}]};this.POP.show(t)}}]),e}()},1054:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5671),a=n(3144),i=n(7477);const o=function(){function e(){(0,r.Z)(this,e),this.POP=new i.Z}return(0,a.Z)(e,[{key:"shortcuts",value:function(){this.POP.show({title:"Keyboard Shortcuts",className:"shortcuts",params:[{title:"F",value:"Auto Adjust Colors"},{title:"F3 / ⌘ + F",value:"Search"},{title:"Ctrl + C",value:"Copy to Clipboard"},{title:"D",value:"Duplicate"},{title:"S",value:"Export"},{title:"G",value:"Grid on/off"},{title:"I",value:"Information"},{title:"N",value:"New layer"},{title:"O",value:"Open"},{title:"CTRL + V",value:"Paste"},{title:"F10",value:"Quick Load"},{title:"F9",value:"Quick Save"},{title:"R",value:"Resize"},{title:"L",value:"Rotate left"},{title:"U",value:"Ruler"},{title:"Shift + S",value:"Save As"},{title:"CTRL + A",value:"Select All"},{title:"H",value:"Shapes"},{title:"T",value:"Trim"},{title:"CTRL + Z",value:"Undo"},{title:"Scroll up",value:"Zoom in"},{title:"Scroll down",value:"Zoom out"}]})}}]),e}()},7740:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1748),u=n(1606),d=n.n(u),h=null;const p=function(){function e(){if((0,r.Z)(this,e),h)return h;h=this,this.POP=new l.Z,this.Base_layers=new s.Z,this.Helper=new c.Z,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||70==n&&1!=t.ctrlKey&&1!=t.metaKey&&(e.auto_adjust(),t.preventDefault())}),!1)}},{key:"auto_adjust",value:function(){if("image"==o.Z.layer.type){var e=this.Base_layers.convert_layer_to_canvas(null,!0),t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),r=this.get_adjust_data(n);return t.putImageData(r,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(e))}d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"get_adjust_data",value:function(e){for(var t=e.data,n=(e.width,e.height,0),r=0,a=0;a240&&r++,n++);for(var i=1,o=!1,s=0;s<10&&(100*r/n>=i&&(o=!0),1!=o);s++){for(a=0;a255&&(t[c]=255));for(r=0,a=0;a240&&r++}for(r=0,a=0;a=i&&(o=!0),1!=o);s++){for(a=0;a240||(t[c]-=1.1*(255-t[c])-(255-t[c]),t[c]=Math.round(t[c]))}for(r=0,a=0;a{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1748),u=n(896),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Helper=new c.Z,this.ImageFilters=u.Z}return(0,a.Z)(e,[{key:"color_corrections",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Color Corrections",preview:!0,on_change:function(t,n,r,a,i){var o=this.layer_active_small_ctx.getImageData(0,0,r,a),s=e.do_corrections(o,t,!1);n.putImageData(s,0,0),n.filter="brightness("+(1+t.param_b/100)+")",n.filter+=" contrast("+(1+t.param_c/100)+")",n.filter+=" saturate("+(1+t.param_s/100)+")",n.filter+=" hue-rotate("+t.param_h+"deg)",n.drawImage(i,0,0)},params:[{name:"param_b",title:"Brightness:",value:"0",range:[-100,100]},{name:"param_c",title:"Contrast:",value:"0",range:[-100,100]},{name:"param_s",title:"Saturation:",value:"0",range:[-100,100]},{name:"param_h",title:"Hue:",value:"0",range:[-180,180]},{},{name:"param_l",title:"Luminance:",value:"0",range:[-100,100]},{},{name:"param_red",title:"Red channel:",value:"0",range:[-255,255]},{name:"param_green",title:"Green channel:",value:"0",range:[-255,255]},{name:"param_blue",title:"Blue channel:",value:"0",range:[-255,255]}],on_finish:function(t){e.save_changes(t)}};this.POP.show(t)}else h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save_changes",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.do_corrections(r,e);if(n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t)),0!=e.param_b){var o={value:e.param_b},s=null;i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(null,"brightness",o,s))}0!=e.param_c&&(o={value:e.param_c},s=null,i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(null,"contrast",o,s))),0!=e.param_s&&(o={value:e.param_s},s=null,i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(null,"saturate",o,s))),0!=e.param_h&&(o={value:e.param_h},s=null,i.Z.State.do_action(new i.Z.Actions.Add_layer_filter_action(null,"hue-rotate",o,s)))}},{key:"do_corrections",value:function(e,t){return 0!=t.param_l&&(e=this.ImageFilters.HSLAdjustment(e,0,0,t.param_l)),0==t.param_red&&0==t.param_green&&0==t.param_blue||(e=this.ImageFilters.ColorTransformFilter(e,1,1,1,1,t.param_red,t.param_green,t.param_blue,1)),e}}]),e}()},1349:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1748),u=n(896),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Helper=new c.Z,this.ImageFilters=u.Z}return(0,a.Z)(e,[{key:"decrease_colors",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Decrease Color Depth",preview:!0,on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.get_decreased_data(i,t.colors,t.greyscale);n.putImageData(o,0,0)},params:[{name:"colors",title:"Colors:",value:10,range:[1,256]},{name:"greyscale",title:"Greyscale:",value:!1}],on_finish:function(t){e.execute(t)}};this.POP.show(t)}else h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"execute",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.get_decreased_data(r,e.colors,e.greyscale);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"get_decreased_data",value:function(e,t,n){e.data;var r=e.data,a=e.width,i=e.height,s=[],l=document.createElement("canvas"),c=l.getContext("2d");l.width=a,l.height=i,c.drawImage(o.Z.layer.link,0,0,Math.ceil(a/10),Math.ceil(i/10));var u=c.getImageData(0,0,Math.ceil(a/10),Math.ceil(i/10)).data;c.clearRect(0,0,a,i);for(var d=0;dp[s[g][3]])){m=!1;break}s.splice(g,1),g--}0==m&&(s.splice(d,1),d--)}var A=(s=s.slice(0,t)).length;for(g=0;g{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(1606),c=n.n(l);const u=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"vertical",value:function(){this.flip("vertical")}},{key:"horizontal",value:function(){this.flip("horizontal")}},{key:"flip",value:function(e){if("image"==o.Z.layer.type){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=(t.getContext("2d"),document.createElement("canvas"));n.width=t.width,n.height=t.height;var r=n.getContext("2d");return n.dataset.x=t.dataset.x,n.dataset.y=t.dataset.y,"vertical"==e?(r.scale(1,-1),r.drawImage(t,0,-1*n.height)):"horizontal"==e&&(r.scale(-1,1),r.drawImage(t,-1*n.width,0)),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(n))}c().error("This layer must contain an image. Please convert it to raster to apply this tool.")}}]),e}()},2188:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(9314),o=n(699),s=n(7477),l=n(1748);const c=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_layers=new o.Z,this.Helper=new l.Z}return(0,a.Z)(e,[{key:"histogram",value:function(){var e=this,t={title:"Histogram",on_change:function(t){e.histogram_onload(t)},params:[{name:"channel",title:"Channel:",values:["Gray","Red","Green","Blue"]},{title:"Histogram:",function:function(){return''}},{title:"Total pixels:",value:""},{title:"Average:",value:""}]};this.POP.show(t),this.histogram_onload({})}},{key:"histogram_onload",value:function(e){var t,n=this.Base_layers.convert_layer_to_canvas(i.Z.layer.id),r=n.getContext("2d").getImageData(0,0,n.width,n.height).data,a=0;"Red"==e.channel?a=1:"Green"==e.channel?a=2:"Blue"==e.channel&&(a=3);for(var o,s=[[],[],[],[]],l=r.length/4,c=0,u=0;u0?Math.round(10*c/l/3)/10:"-",document.getElementById("pop_data_average").innerHTML=t,n.width=1,n.height=1}}]),e}()},3783:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(9314),o=n(7477),s=n(1748),l=n(699),c=n(440),u=null;const d=function(){function e(){if((0,r.Z)(this,e),u)return u;u=this,this.Base_layers=new l.Z,this.POP=new o.Z,this.Helper=new s.Z,this.Tools_settings=new c.default,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.key.toLowerCase();e.Helper.is_input(t.target)||"i"==n&&(e.information(),t.preventDefault())}),!1)}},{key:"information",value:function(){var e=this,t=i.Z.WIDTH*i.Z.HEIGHT;t=this.Helper.number_format(t,0);var n=this.Tools_settings.get_setting("default_units"),r=this.Tools_settings.get_setting("resolution"),a={title:"Information",params:[{title:"Width:",value:this.Helper.get_user_unit(i.Z.WIDTH,n,r)+" "+n},{title:"Height:",value:this.Helper.get_user_unit(i.Z.HEIGHT,n,r)+" "+n},{title:"Pixels:",value:t},{title:"Layers:",value:i.Z.layers.length},{title:"Unique colors:",value:"..."}]};if("pixels"!=n&&(a.params[0].value+=" ("+i.Z.WIDTH+" pixels)",a.params[1].value+=" ("+i.Z.HEIGHT+" pixels)"),null!=i.Z.layer._exif){var o=i.Z.layer._exif;for(var s in o.general)a.params.push({title:s+":",value:o.general[s]});var l=0;for(var s in o.exif)"undefined"!=s&&(0==l&&a.params.push({title:"==== EXIF ====",value:""}),a.params.push({title:s+":",value:o.exif[s]}),l++)}this.POP.show(a),setTimeout((function(){var t=e.unique_colors_count();t=e.Helper.number_format(t,0),document.getElementById("pop_data_uniquecolo").innerHTML=t}),50)}},{key:"unique_colors_count",value:function(){if(i.Z.WIDTH*i.Z.HEIGHT>2e7)return"-";for(var e=this.Base_layers.convert_layer_to_canvas(),t=e.getContext("2d").getImageData(0,0,e.width,e.height).data,n=new Uint32Array(t.buffer),r=n.length,a={},o=0,s=0;s{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477);const l=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z}return(0,a.Z)(e,[{key:"opacity",value:function(){var e=this,t=o.Z.layer.opacity,n={title:"Opacity",params:[{name:"opacity",title:"Alpha:",value:o.Z.layer.opacity,range:[0,100]}],on_change:function(t,n,r,a){e.opacity_handler(t,!1)},on_finish:function(n){o.Z.layer.opacity=t,e.opacity_handler(n)},on_cancel:function(e){o.Z.layer.opacity=t,o.Z.need_render=!0}};this.POP.show(n)}},{key:"opacity_handler",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=parseInt(e.opacity);n<0&&(n=0),n>100&&(n=100),t?i.Z.State.do_action(new i.Z.Actions.Bundle_action("change_opacity","Change Opacity",[new i.Z.Actions.Update_layer_action(o.Z.layer.id,{opacity:n})])):(o.Z.layer.opacity=n,o.Z.need_render=!0)}}]),e}()},4471:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5671),a=n(3144),i=n(9314),o=n(699),s=function(e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=e.width,this.height=this.canvas.height=e.height,this.context.drawImage(e,0,0,this.width,this.height)};s.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},s.prototype.update=function(e){this.context.putImageData(e,0,0)},s.prototype.getPixelCount=function(){return this.width*this.height},s.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},s.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var l=function(){};if(l.prototype.getColor=function(e,t){return this.getPalette(e,5,t)[0]},l.prototype.getPalette=function(e,t,n){(void 0===t||t<2||t>256)&&(t=10),(void 0===n||n<1)&&(n=10);for(var r,a,i,o,l=new s(e),c=l.getImageData().data,d=l.getPixelCount(),h=[],p=0;p=125&&(a>250&&i>250&&o>250||h.push([a,i,o]));var f=u.quantize(h,t),m=f?f.palette():null;return l.removeCanvas(),m},l.prototype.getColorFromUrl=function(e,t,n){sourceImage=document.createElement("img");var r=this;sourceImage.addEventListener("load",(function(){var a=r.getPalette(sourceImage,5,n)[0];t(a,e)})),sourceImage.src=e},l.prototype.getImageData=function(e,t){xhr=new XMLHttpRequest,xhr.open("GET",e,!0),xhr.responseType="arraybuffer",xhr.onload=function(e){if(200==this.status){uInt8Array=new Uint8Array(this.response),n=uInt8Array.length,binaryString=new Array(n);for(var n=0;nt?1:0},sum:function(e,t){var n={};return e.reduce(t?function(e,r,a){return n.index=a,e+t.call(n,r)}:function(e,t){return e+t},0)},max:function(e,t){return Math.max.apply(null,t?c.map(e,t):e)}};var u=function(){function e(e,t,n){return(e<<10)+(t<<5)+n}function t(e){var t=[],n=!1;function r(){t.sort(e),n=!0}return{push:function(e){t.push(e),n=!1},peek:function(e){return n||r(),void 0===e&&(e=t.length-1),t[e]},pop:function(){return n||r(),t.pop()},size:function(){return t.length},map:function(e){return t.map(e)},debug:function(){return n||r(),t}}}function n(e,t,n,r,a,i,o){var s=this;s.r1=e,s.r2=t,s.g1=n,s.g2=r,s.b1=a,s.b2=i,s.histo=o}function r(){this.vboxes=new t((function(e,t){return c.naturalOrder(e.vbox.count()*e.vbox.volume(),t.vbox.count()*t.vbox.volume())}))}function a(t,n){if(n.count()){var r=n.r2-n.r1+1,a=n.g2-n.g1+1,i=n.b2-n.b1+1,o=c.max([r,a,i]);if(1==n.count())return[n.copy()];var s,l,u,d,h=0,p=[],f=[];if(o==r)for(s=n.r1;s<=n.r2;s++){for(d=0,l=n.g1;l<=n.g2;l++)for(u=n.b1;u<=n.b2;u++)d+=t[e(s,l,u)]||0;h+=d,p[s]=h}else if(o==a)for(s=n.g1;s<=n.g2;s++){for(d=0,l=n.r1;l<=n.r2;l++)for(u=n.b1;u<=n.b2;u++)d+=t[e(l,s,u)]||0;h+=d,p[s]=h}else for(s=n.b1;s<=n.b2;s++){for(d=0,l=n.r1;l<=n.r2;l++)for(u=n.g1;u<=n.g2;u++)d+=t[e(l,u,s)]||0;h+=d,p[s]=h}return p.forEach((function(e,t){f[t]=h-e})),function(e){var t,r,a,i,o,l=e+"1",c=e+"2",u=0;for(s=n[l];s<=n[c];s++)if(p[s]>h/2){for(a=n.copy(),i=n.copy(),o=(t=s-n[l])<=(r=n[c]-s)?Math.min(n[c]-1,~~(s+r/2)):Math.max(n[l],~~(s-1-t/2));!p[o];)o++;for(u=f[o];!u&&p[o-1];)u=f[--o];return a[c]=o,i[l]=a[c]+1,[a,i]}}(o==r?"r":o==a?"g":"b")}}return n.prototype={volume:function(e){var t=this;return t._volume&&!e||(t._volume=(t.r2-t.r1+1)*(t.g2-t.g1+1)*(t.b2-t.b1+1)),t._volume},count:function(t){var n=this,r=n.histo;if(!n._count_set||t){var a,i,o,s=0;for(a=n.r1;a<=n.r2;a++)for(i=n.g1;i<=n.g2;i++)for(o=n.b1;o<=n.b2;o++)s+=r[e(a,i,o)]||0;n._count=s,n._count_set=!0}return n._count},copy:function(){var e=this;return new n(e.r1,e.r2,e.g1,e.g2,e.b1,e.b2,e.histo)},avg:function(t){var n=this,r=n.histo;if(!n._avg||t){var a,i,o,s,l=0,c=0,u=0,d=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)l+=a=r[e(i,o,s)]||0,c+=a*(i+.5)*8,u+=a*(o+.5)*8,d+=a*(s+.5)*8;n._avg=l?[~~(c/l),~~(u/l),~~(d/l)]:[~~(8*(n.r1+n.r2+1)/2),~~(8*(n.g1+n.g2+1)/2),~~(8*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(e){var t=this,n=e[0]>>3;return gval=e[1]>>3,bval=e[2]>>3,n>=t.r1&&n<=t.r2&&gval>=t.g1&&gval<=t.g2&&bval>=t.b1&&bval<=t.b2}},r.prototype={push:function(e){this.vboxes.push({vbox:e,color:e.avg()})},palette:function(){return this.vboxes.map((function(e){return e.color}))},size:function(){return this.vboxes.size()},map:function(e){for(var t=this.vboxes,n=0;n251&&r[1]>251&&r[2]>251&&(e[n].color=[255,255,255])}},{quantize:function(i,o){if(!i.length||o<2||o>256)return!1;var s=function(t){var n,r,a,i,o=new Array(32768);return t.forEach((function(t){r=t[0]>>3,a=t[1]>>3,i=t[2]>>3,n=e(r,a,i),o[n]=(o[n]||0)+1})),o}(i);s.forEach((function(){}));var l=function(e,t){var r,a,i,o=1e6,s=0,l=1e6,c=0,u=1e6,d=0;return e.forEach((function(e){r=e[0]>>3,a=e[1]>>3,i=e[2]>>3,rs&&(s=r),ac&&(c=a),id&&(d=i)})),new n(o,s,l,c,u,d,t)}(i,s),u=new t((function(e,t){return c.naturalOrder(e.count(),t.count())}));function d(e,t){for(var n,r=1,i=0;i<1e3;)if((n=e.pop()).count()){var o=a(s,n),l=o[0],c=o[1];if(!l)return;if(e.push(l),c&&(e.push(c),r++),r>=t)return;if(i++>1e3)return}else e.push(n),i++}u.push(l),d(u,.75*o);for(var h=new t((function(e,t){return c.naturalOrder(e.count()*e.volume(),t.count()*t.volume())}));u.size();)h.push(u.pop());d(h,o-h.size());for(var p=new r;h.size();)p.push(h.pop());return p}}}();const d=l;var h=n(1606),p=n.n(h),f=n(7477),m=n(1748),g=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new o.Z,this.alertify=new d,this.POP=new f.Z,this.Helper=new m.Z}return(0,a.Z)(e,[{key:"palette",value:function(){if("image"==i.Z.layer.type){var e=this.alertify.getPalette(i.Z.layer.link),t=this.alertify.getColor(i.Z.layer.link);t=this.Helper.rgbToHex(t[0],t[1],t[2]);var n={title:"Palette",params:[{title:"Dominant color:",html:this.generate_color_box(t,200)}]};for(var r in e){var a=this.Helper.rgbToHex(e[r][0],e[r][1],e[r][2]);r=parseInt(r),n.params.push({title:"Color #"+(r+1)+":",html:this.generate_color_box(a,100)})}this.POP.show(n)}else p().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"generate_color_box",value:function(e,t){var n="";return(n+='')+''}}]),e}();const A=g},8251:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>B});var r=n(5861),a=n(5671),i=n(3144),o=n(4687),s=n.n(o),l=n(8562),c=n(9314),u=n(699),d=n(1125),h=n(7477),p=n(896),f=n(5177),m=n.n(f),g=n(1606),A=n.n(g),v=n(6373),y=n.n(v),_=n(1748),b=n(440),C=n(312);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&A().error(r+" layer(s) were skipped."),n=n.concat(this.resize_gui(t)),e.next=31;break;case 26:return e.t5=n,e.next=29,this.resize_layer(c.Z.layer,t);case 29:e.t6=e.sent,n=e.t5.concat.call(e.t5,e.t6);case 31:return e.abrupt("return",l.Z.State.do_action(new l.Z.Actions.Bundle_action("resize_layers","Resize Layers",n)));case 32:case"end":return e.stop()}}),e,this,[[9,17]])}))),function(e){return n.apply(this,arguments)})},{key:"resize_layer",value:(t=(0,r.Z)(s().mark((function e(t,n){var r,a,i,o,u,d,h,p,f,m,g,v,y,_,b,x,k,B,S,Z,I,E,T,R,P,D,L,M,O;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.Tools_settings.get_setting("default_units"),a=this.Tools_settings.get_setting("resolution"),i=n.mode,o=parseFloat(n.width),u=parseFloat(n.height),d=parseInt(n.width_percent),h=parseInt(n.height_percent),p=t.width,f=t.height,m=n.sharpen,g=this,0==isNaN(o)&&(o=this.Helper.get_internal_unit(o,r,a)),0==isNaN(u)&&(u=this.Helper.get_internal_unit(u,r,a)),isNaN(o)&&isNaN(u)&&(0==isNaN(d)&&(o=Math.round(c.Z.WIDTH*d/100),p=Math.round(c.Z.WIDTH*d/100)),0==isNaN(h)&&(u=Math.round(c.Z.HEIGHT*h/100),f=Math.round(c.Z.HEIGHT*h/100))),(isNaN(o)||isNaN(u))&&(v=t.width/t.height,y=c.Z.WIDTH/c.Z.HEIGHT,isNaN(o)&&(o=Math.round(u*v)),p=Math.round(f*y),isNaN(u)&&(u=Math.round(o/v)),f=Math.round(p/y)),_="All"==n.layers?Math.round(t.x*o/c.Z.WIDTH):t.x,b="All"==n.layers?Math.round(t.y*u/c.Z.HEIGHT):t.y,x=o/c.Z.WIDTH,k=u/c.Z.HEIGHT,"text"!=t.type){e.next=26;break}B=JSON.parse(JSON.stringify(t.data)),S=w(B);try{for(S.s();!(Z=S.n()).done;){I=Z.value,E=w(I);try{for(E.s();!(T=E.n()).done;)(R=T.value).meta.size=Math.ceil((R.meta.size||C.metaDefaults.size)*x),R.meta.stroke_size=parseFloat((.1*Math.round((null!=R.meta.stroke_size?R.meta.stroke_size:C.metaDefaults.stroke_size)*x/.1)).toFixed(1)),R.meta.kerning=Math.ceil((R.meta.kerning||C.metaDefaults.kerning)*x)}catch(e){E.e(e)}finally{E.f()}}}catch(e){S.e(e)}finally{S.f()}return e.abrupt("return",[new l.Z.Actions.Update_layer_action(t.id,{x:_,y:b,data:B,width:t.width*x,height:t.height*k})]);case 26:if(1!=t.is_vector||null==t.width||null==t.height){e.next=30;break}return e.abrupt("return",[new l.Z.Actions.Update_layer_action(t.id,{x:_,y:b,width:t.width*x,height:t.height*k})]);case 30:if("image"==t.type){e.next=33;break}throw A().error("Layer must be vector or image (convert it to raster)."),new Error("Layer is not compatible with resize");case 33:if(P=this.Base_layers.convert_layer_to_canvas(t.id,!0,!1),D=P.getContext("2d"),"Hermite"==i&&(o>P.width||u>P.height)&&(A().warning("Scaling up is not supported in Hermite, using Lanczos."),i="Lanczos"),"Lanczos"!=i){e.next=44;break}return(L=document.createElement("canvas")).width=o,L.height=u,e.next=42,this.pica.resize(P,L,{alpha:!0}).then((function(e){D.clearRect(0,0,P.width,P.height),P.width=o,P.height=u,D.drawImage(L,0,0,o,u)}));case 42:e.next=45;break;case 44:"Hermite"==i?this.Hermite.resample_single(P,o,u,!0):((L=document.createElement("canvas")).width=P.width,L.height=P.height,L.getContext("2d").drawImage(P,0,0),D.clearRect(0,0,P.width,P.height),P.width=o,P.height=u,D.drawImage(L,0,0,o,u));case 45:return 1==m&&(M=D.getImageData(0,0,P.width,P.height),O=g.ImageFilters.Sharpen(M,1),D.putImageData(O,0,0)),e.abrupt("return",[new l.Z.Actions.Update_layer_image_action(P,t.id),new l.Z.Actions.Update_layer_action(t.id,{x:_,y:b,width:P.width,height:P.height,width_original:P.width,height_original:P.height})]);case 47:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"resize_gui",value:function(e){var t=this.Tools_settings.get_setting("default_units"),n=this.Tools_settings.get_setting("resolution"),r=parseFloat(e.width),a=parseFloat(e.height),i=parseInt(e.width_percent),o=parseInt(e.height_percent);if(0==isNaN(r)&&(r=this.Helper.get_internal_unit(r,t,n)),0==isNaN(a)&&(a=this.Helper.get_internal_unit(a,t,n)),isNaN(r)&&isNaN(a)&&(0==isNaN(i)&&(r=Math.round(c.Z.WIDTH*i/100)),0==isNaN(o)&&(a=Math.round(c.Z.HEIGHT*o/100))),isNaN(r)||isNaN(a)){var s=c.Z.WIDTH/c.Z.HEIGHT;isNaN(r)&&(r=Math.round(a*s)),isNaN(a)&&(a=Math.round(r/s))}return[new l.Z.Actions.Prepare_canvas_action("undo"),new l.Z.Actions.Update_config_action({WIDTH:parseInt(r),HEIGHT:parseInt(a)}),new l.Z.Actions.Prepare_canvas_action("do")]}}]),e}()},5474:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(2982),a=n(5671),i=n(3144),o=n(9314),s=n(7477),l=n(699),c=n(1125),u=n(1748),d=n(1606),h=n.n(d),p=n(8562),f=null;const m=function(){function e(){if((0,a.Z)(this,e),f)return f;f=this,this.Base_layers=new l.Z,this.Base_gui=new c.Z,this.Helper=new u.Z,this.Dialog=new s.Z,this.set_events()}return(0,i.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||76==n&&(e.left(),t.preventDefault())}),!1)}},{key:"rotate",value:function(){var e=this;if(null!==o.Z.layer.rotate){var t=o.Z.layer.rotate,n={title:"Rotate",params:[{name:"rotate",title:"Rotate:",value:o.Z.layer.rotate,range:[0,360]},{name:"right_angle",title:"Right angle:",values:["Custom","0","90","180","270"]}],on_change:function(t,n,r,a){e.rotate_handler(t,!1)},on_finish:function(n){o.Z.layer.rotate=t,e.rotate_handler(n)},on_cancel:function(e){o.Z.layer.rotate=t,o.Z.need_render=!0}};this.Dialog.show(n)}else h().error("Rotate is not supported on this type of object. Convert to raster?")}},{key:"rotate_handler",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=parseInt(e.rotate);"Custom"!=e.right_angle&&(n=parseInt(e.right_angle)),n<0&&(n=360+n),n>=360&&(n-=360);var a=n;1==t?p.Z.State.do_action(new p.Z.Actions.Bundle_action("rotate_layer","Rotate Layer",[new p.Z.Actions.Update_layer_action(o.Z.layer.id,{rotate:a})].concat((0,r.Z)(this.check_sizes(a))))):(o.Z.layer.rotate=a,o.Z.need_render=!0)}},{key:"left",value:function(){var e=o.Z.layer.rotate;(e-=90)<0&&(e=360+e),p.Z.State.do_action(new p.Z.Actions.Bundle_action("rotate_layer","Rotate Layer",[new p.Z.Actions.Update_layer_action(o.Z.layer.id,{rotate:e})].concat((0,r.Z)(this.check_sizes(e)))))}},{key:"right",value:function(){var e=o.Z.layer.rotate;(e+=90)>=360&&(e-=360),p.Z.State.do_action(new p.Z.Actions.Bundle_action("rotate_layer","Rotate Layer",[new p.Z.Actions.Update_layer_action(o.Z.layer.id,{rotate:e})].concat((0,r.Z)(this.check_sizes(e)))))}},{key:"check_sizes",value:function(e){var t=[],n=o.Z.layer.width,r=o.Z.layer.height,a=e*Math.PI/180,i=n*Math.abs(Math.cos(a))+r*Math.abs(Math.sin(a)),s=n*Math.abs(Math.sin(a))+r*Math.abs(Math.cos(a));if(i=Math.ceil(Math.round(1e3*i)/1e3),s=Math.ceil(Math.round(1e3*s)/1e3),i>o.Z.WIDTH||s>o.Z.HEIGHT){var l=0,c=0,u=o.Z.WIDTH,d=o.Z.HEIGHT;i>o.Z.WIDTH&&(l=Math.ceil(i-u)/2,u=i),s>o.Z.HEIGHT&&(c=Math.ceil(s-d)/2,d=s),t.push(new p.Z.Actions.Prepare_canvas_action("undo"),new p.Z.Actions.Update_layer_action(o.Z.layer.id,{x:o.Z.layer.x+l,y:o.Z.layer.y+c}),new p.Z.Actions.Update_config_action({WIDTH:u,HEIGHT:d}),new p.Z.Actions.Prepare_canvas_action("do"))}return t}}]),e}()},5489:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(1125),l=n(7477),c=n(1606),u=n.n(c),d=n(440),h=n(1748);const p=function(){function e(){(0,r.Z)(this,e),this.Base_gui=new s.Z,this.POP=new l.Z,this.Tools_settings=new d.default,this.Helper=new h.Z}return(0,a.Z)(e,[{key:"size",value:function(){var e=this,t=this.Base_gui.common_dimensions,n=this.Tools_settings.get_setting("default_units"),r=this.Tools_settings.get_setting("resolution"),a=["Custom"];for(var i in t){var s=t[i];a.push(s[0]+"x"+s[1]+" - "+s[2])}var l=this.Helper.get_user_unit(o.Z.WIDTH,n,r),c=this.Helper.get_user_unit(o.Z.HEIGHT,n,r),u={title:"Canvas size",params:[{name:"w",title:"Width:",value:l,placeholder:l,comment:n},{name:"h",title:"Height:",value:c,placeholder:c,comment:n},{name:"resolution",title:"Resolution:",values:a},{name:"layout",title:"Layout:",value:"Custom",values:["Custom","Landscape","Portrait"]}],on_finish:function(t){e.size_handler(t)}};this.POP.show(u)}},{key:"size_handler",value:function(e){var t=parseFloat(e.w),n=parseFloat(e.h),r=o.Z.WIDTH/o.Z.HEIGHT,a=this.Tools_settings.get_setting("default_units"),s=this.Tools_settings.get_setting("resolution");if(t<1&&(t=1),n<1&&(n=1),isNaN(t)&&isNaN(n))u().error("Wrong dimensions");else{if(isNaN(t)&&(t=n*r),isNaN(n)&&(n=t/r),"Custom"!=e.resolution){var l=e.resolution.split(" ");if(l=l[0].split("x"),t=parseInt(l[0]),n=parseInt(l[1]),"Portrait"==e.layout){var c=t;t=n,n=c}}else t=this.Helper.get_internal_unit(t,a,s),n=this.Helper.get_internal_unit(n,a,s);i.Z.State.do_action(new i.Z.Actions.Bundle_action("set_image_size","Set Image Size",[new i.Z.Actions.Prepare_canvas_action("undo"),new i.Z.Actions.Update_config_action({WIDTH:parseInt(t),HEIGHT:parseInt(n)}),new i.Z.Actions.Prepare_canvas_action("do")]))}}}]),e}()},1593:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(440),c=n(1748);const u=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Tools_settings=new l.default,this.Helper=new c.Z}return(0,a.Z)(e,[{key:"translate",value:function(){var e=this,t=this.Tools_settings.get_setting("default_units"),n=this.Tools_settings.get_setting("resolution"),r={title:"Translate",params:[{name:"x",title:"X position:",value:this.Helper.get_user_unit(o.Z.layer.x,t,n)},{name:"y",title:"Y position:",value:this.Helper.get_user_unit(o.Z.layer.y,t,n)}],on_finish:function(r){var a=e.Helper.get_internal_unit(r.x,t,n),s=e.Helper.get_internal_unit(r.y,t,n);i.Z.State.do_action(new i.Z.Actions.Bundle_action("translate_layer","Translate Layer",[new i.Z.Actions.Update_layer_action(o.Z.layer.id,{x:a,y:s})]))}};this.POP.show(r)}}]),e}()},2998:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5861),a=n(5671),i=n(3144),o=n(4687),s=n.n(o),l=n(8562),c=n(9314),u=n(1125),d=n(699),h=n(7477),p=n(1748),f=n(1606),m=n.n(f),g=null;const A=function(){function e(){if((0,a.Z)(this,e),g)return g;g=this,this.Base_layers=new d.Z,this.Base_gui=new u.Z,this.Helper=new p.Z,this.Dialog=new h.Z,this.set_events()}return(0,i.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||84==n&&(e.trim(),t.preventDefault())}),!1)}},{key:"trim",value:function(){var e=this,t=this,n=!1;0==c.Z.TRANSPARENCY&&(n=!0);var a,i={title:"Trim",params:[{name:"trim_layer",title:"Trim layer:",value:!0},{name:"trim_all",title:"Trim borders:",value:!0},{name:"power",title:"Power:",value:0,max:255},{name:"remove_white",title:"Trim white color?",value:n}],on_finish:(a=(0,r.Z)(s().mark((function n(r){var a,i;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(1!=r.trim_layer){n.next=5;break}return a=(a=[]).concat(e.trim_layer(c.Z.layer.id,r.remove_white,r.power)),n.next=5,l.Z.State.do_action(new l.Z.Actions.Bundle_action("trim_layers","Trim Layers",a));case 5:1==r.trim_all&&(i=(i=[]).concat(t.trim_all(r.remove_white,r.power)),l.Z.State.do_action(new l.Z.Actions.Bundle_action("trim_layers","Trim Layers",i)));case 6:case"end":return n.stop()}}),n)}))),function(e){return a.apply(this,arguments)})};this.Dialog.show(i)}},{key:"trim_layer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.Base_layers.get_layer(e);if("image"!=r.type)return m().error("Skip - layer must be image."),!1;var a=this.get_trim_info(e,t,n);a=a.relative;var i=r.width/r.width_original,o=r.height/r.height_original,s=document.createElement("canvas"),c=s.getContext("2d");return s.width=a.width/i,s.height=a.height/o,c.translate(-a.left/i,-a.top/o),s.getContext("2d").drawImage(r.link,0,0),c.translate(0,0),[new l.Z.Actions.Update_layer_image_action(s,r.id),new l.Z.Actions.Update_layer_action(r.id,{x:r.x+a.left,y:r.y+a.top,width:Math.ceil(s.width*i),height:Math.ceil(s.height*o),width_original:s.width,height_original:s.height})]}},{key:"trim_all",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=c.Z.HEIGHT,a=c.Z.WIDTH,i=c.Z.HEIGHT,o=c.Z.WIDTH;null==e&&(e=!1,0==c.Z.TRANSPARENCY&&(e=!0));for(var s=0;s=255-n&&o[f+1]>=255-n&&o[f+2]>=255-n))break e;s++}e:for(p=0;p=255-n&&o[f+1]>=255-n&&o[f+2]>=255-n))break e;l++}e:for(h=i.height-1;h>=0;h--){for(p=i.width-1;p>=0;p--)if(!(o[3+(f=h*(4*i.width)+4*p)]<=n||1==t&&o[f]>=255-n&&o[f+1]>=255-n&&o[f+2]>=255-n))break e;u++}e:for(p=i.width-1;p>=0;p--){for(h=i.height-1;h>=0;h--){var f;if(!(o[3+(f=h*(4*i.width)+4*p)]<=n||1==t&&o[f]>=255-n&&o[f+1]>=255-n&&o[f+2]>=255-n))break e}d++}var m=s-r.y,g=l-r.x,A=u-(c.Z.HEIGHT-r.y-r.height),v=d-(c.Z.WIDTH-r.x-r.width);return{top:s,left:l,bottom:u,right:d,width:a.width-l-d,height:a.height-s-u,relative:{top:m,left:g,bottom:A,right:v,width:a.width-l-d,height:a.height-s-u}}}}]),e}()},2429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"clear",value:function(){return i.Z.State.do_action(new i.Z.Actions.Clear_layer_action(o.Z.layer.id))}}]),e}()},414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(7477),l=n(1125);const c=function(){function e(){(0,r.Z)(this,e),this.POP=new s.Z,this.Base_gui_class=new l.Z}return(0,a.Z)(e,[{key:"composition",value:function(){var e=o.Z.layer.composition,t=this,n={title:"Composition",params:[{name:"composition",title:"Composition:",value:o.Z.layer.composition,values:["-- Default --","color","color-burn","color-dodge","copy","darken","darker","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"]}],on_change:function(e,n,r,a){"-- Default --"==e.composition&&(e.composition="source-over"),o.Z.layer.composition=e.composition,o.Z.need_render=!0,t.Base_gui_class.GUI_layers.render_layers()},on_finish:function(t){o.Z.layer.composition=e,"-- Default --"==t.composition&&(t.composition="source-over"),i.Z.State.do_action(new i.Z.Actions.Bundle_action("change_composition","Change Composition",[new i.Z.Actions.Update_layer_action(o.Z.layer.id,{composition:t.composition})]))},on_cancel:function(n){o.Z.layer.composition=e,o.Z.need_render=!0,t.Base_gui_class.GUI_layers.render_layers()}};this.POP.show(n)}}]),e}()},8344:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"delete",value:function(){i.Z.State.do_action(new i.Z.Actions.Delete_layer_action(o.Z.layer.id))}}]),e}()},4517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"differences",value:function(){var e=this;if(null==this.Base_layers.find_previous(o.Z.layer.id))return u().error("There are no layers behind."),!1;var t={title:"Differences",preview:!0,params:[{name:"sensitivity",title:"Sensitivity:",value:"0",range:[0,255]}],on_change:function(t,n,r,a){e.calc_differences(t.sensitivity,n,r,a)},on_finish:function(t){e.calc_differences(t.sensitivity)}};this.POP.show(t)}},{key:"calc_differences",value:function(e,t,n,r){var a=document.createElement("canvas");a.width=o.Z.WIDTH,a.height=o.Z.HEIGHT;var s=a.getContext("2d");this.Base_layers.render_object(s,o.Z.layer);var l=s.getImageData(0,0,o.Z.WIDTH,o.Z.HEIGHT).data;s.clearRect(0,0,a.width,a.height);var c=this.Base_layers.find_previous(o.Z.layer.id);this.Base_layers.render_object(s,c);var u=s.getImageData(0,0,o.Z.WIDTH,o.Z.HEIGHT).data;s.rect(0,0,o.Z.WIDTH,o.Z.HEIGHT),s.fillStyle="#ffffff",s.fill();for(var d=s.getImageData(0,0,o.Z.WIDTH,o.Z.HEIGHT),h=d.data,p=0;pe||Math.abs(l[m+1]-u[m+1])>e||Math.abs(l[m+2]-u[m+2])>e||Math.abs(l[m+3]-u[m+3])>e)&&(h[m]=255,h[m+1]=0,h[m+2]=0,h[m+3]=255)}if(s.putImageData(d,0,0),null==t){var g=[];g.type="image",g.name="Differences",g.data=a.toDataURL("image/png"),i.Z.State.do_action(new i.Z.Actions.Insert_layer_action(g))}else t.save(),t.scale(n/o.Z.WIDTH,r/o.Z.HEIGHT),t.drawImage(a,0,0),t.restore();a.width=1,a.height=1}}]),e}()},2414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(1748),c=null;const u=function(){function e(){if((0,r.Z)(this,e),c)return c;c=this,this.Base_layers=new s.Z,this.Helper=new l.Z,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||68==n&&(e.duplicate(),t.preventDefault())}),!1)}},{key:"duplicate",value:function(){var e=JSON.parse(JSON.stringify(o.Z.layer));delete e.id,delete e.order;var t=e.name.match(/^(.*) #([0-9]+)$/);for(var n in e.name=null==t?e.name+" #2":t[1]+" #"+(parseInt(t[2])+1),0==e.x&&0==e.y&&e.width==o.Z.WIDTH&&e.height==o.Z.HEIGHT||(e.x+=10,e.y+=10),e)"_"==n[0]&&delete e[n];"image"==e.type&&(e.link=o.Z.layer.link.cloneNode(!0)),i.Z.State.do_action(new i.Z.Actions.Bundle_action("duplicate_layer","Duplicate Layer",[new i.Z.Actions.Insert_layer_action(e)]))}}]),e}()},5983:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);n(1606);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"flatten",value:function(){var e=document.createElement("canvas");e.width=o.Z.WIDTH,e.height=o.Z.HEIGHT;for(var t=e.getContext("2d"),n=this.Base_layers.get_sorted_layers(),r=n.length-1;r>=0;r--){var a=n[r];t.globalAlpha=a.opacity/100,t.globalCompositeOperation=a.composition,this.Base_layers.render_object(t,a)}var s=[];s.type="image",s.name="Merged",s.data=e.toDataURL("image/png");var l=[];for(r=o.Z.layers.length-1;r>=0;r--)l.push(new i.Z.Actions.Delete_layer_action(o.Z.layers[r].id));i.Z.State.do_action(new i.Z.Actions.Bundle_action("flatten_image","Flatten Image",[new i.Z.Actions.Insert_layer_action(s)].concat(l))),e.width=1,e.height=1}}]),e}()},9051:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(1606),l=n.n(s),c=n(699);const u=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new c.Z}return(0,a.Z)(e,[{key:"merge",value:function(){if(null==this.Base_layers.find_previous(o.Z.layer.id))return l().error("There are no layers behind."),!1;var e=document.createElement("canvas");e.width=o.Z.WIDTH,e.height=o.Z.HEIGHT;var t=e.getContext("2d"),n=this.Base_layers.find_previous(o.Z.layer.id),r=n.id;t.globalAlpha=n.opacity/100,t.globalCompositeOperation=n.composition,this.Base_layers.render_object(t,n);var a=o.Z.layer.id,s=o.Z.layer.order;t.globalAlpha=o.Z.layer.opacity/100,t.globalCompositeOperation=o.Z.layer.composition,this.Base_layers.render_object(t,o.Z.layer);var c=[];c.type="image",c.name=o.Z.layer.name+" + merged",c.order=s,c.data=e.toDataURL("image/png"),i.Z.State.do_action(new i.Z.Actions.Bundle_action("merge_layers","Merge Layers",[new i.Z.Actions.Insert_layer_action(c),new i.Z.Actions.Delete_layer_action(a),new i.Z.Actions.Delete_layer_action(r)])),e.width=1,e.height=1}}]),e}()},7530:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"up",value:function(){i.Z.State.do_action(new i.Z.Actions.Reorder_layer_action(o.Z.layer.id,1))}},{key:"down",value:function(){i.Z.State.do_action(new i.Z.Actions.Reorder_layer_action(o.Z.layer.id,-1))}}]),e}()},9284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(2982),a=n(5671),i=n(3144),o=n(8562),s=n(9314),l=n(699),c=n(4182),u=n(3991),d=n(3684),h=n(1748),p=n(1606),f=n.n(p);const m=function(){function e(){(0,a.Z)(this,e),this.Base_layers=new l.Z,this.Selection=new d.default,this.Base_selection=new u.Z(this.Base_layers.ctx),this.GUI_tools=new c.Z,this.Helper=new h.Z,this.set_events()}return(0,i.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||78==n&&1!=t.ctrlKey&&1!=t.metaKey&&e.new()}),!1)}},{key:"new",value:function(){o.Z.State.do_action(new o.Z.Actions.Insert_layer_action)}},{key:"new_selection",value:function(){var e=this.Base_selection.get_selection(),t=s.Z.layer;if(null!==e.width&&"image"==s.Z.layer.type)if("selection"==s.Z.TOOL.name){var n=t.width/t.width_original,a=t.height/t.height_original,i=e.x-t.x,l=e.y-t.y;e.width=e.width/n,e.height=e.height/a;var c=document.createElement("canvas"),u=c.getContext("2d");c.width=Math.round(e.width),c.height=Math.round(e.height),u.translate(-i/n,-l/a),u.drawImage(s.Z.layer.link,0,0),u.translate(0,0);var d={x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width*n),height:Math.round(e.height*a),width_original:Math.round(e.width),height_original:Math.round(e.height),type:"image",data:c.toDataURL("image/png")};o.Z.State.do_action(new o.Z.Actions.Bundle_action("new_layer","New Layer",[new o.Z.Actions.Insert_layer_action(d,!1)].concat((0,r.Z)(this.Selection.on_leave()),[new o.Z.Actions.Activate_tool_action("select")])))}else f().error("Empty selection or type not image.");else f().error("Empty selection or type not image.")}}]),e}()},9250:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);n(1606);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"raster",value:function(){var e=this.Base_layers.convert_layer_to_canvas(),t=o.Z.layer,n=t.id,r={type:"image",name:o.Z.layer.name+" + raster",data:e.toDataURL("image/png"),x:parseInt(e.dataset.x),y:parseInt(e.dataset.y),width:e.width,height:e.height,opacity:t.opacity};i.Z.State.do_action(new i.Z.Actions.Bundle_action("convert_to_raster","Convert to Raster",[new i.Z.Actions.Insert_layer_action(r,!1),new i.Z.Actions.Delete_layer_action(n)]))}}]),e}()},6031:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477);const c=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z,this.POP=new l.Z}return(0,a.Z)(e,[{key:"rename",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t={title:"Rename",params:[{name:"name",title:"Name:",value:o.Z.layer.name}],on_load:function(){document.querySelector("#pop_data_name").select()},on_finish:function(t){i.Z.State.do_action(new i.Z.Actions.Bundle_action("rename_layer","Rename Layer",[new i.Z.Actions.Refresh_layers_gui_action("undo"),new i.Z.Actions.Update_layer_action(e||o.Z.layer.id,{name:t.name}),new i.Z.Actions.Refresh_layers_gui_action("do")]))}};this.POP.show(t)}}]),e}()},9614:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699);const l=function(){function e(){(0,r.Z)(this,e),this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"toggle",value:function(){i.Z.State.do_action(new i.Z.Actions.Toggle_layer_visibility_action(o.Z.layer.id))}}]),e}()},9870:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1748),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Helper=new c.Z}return(0,a.Z)(e,[{key:"color_to_alpha",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Color to Alpha",preview:!0,on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t.color);n.putImageData(o,0,0)},params:[{name:"color",title:"Color:",value:o.Z.COLOR,type:"color"}],on_finish:function(t){e.apply_affect(t.color)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"apply_affect",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.change(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"change",value:function(e,t){for(var n=e.data,r=this.Helper.hexToRgb(t),a=0;a{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"color_zoom",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Color zoom",preview:!0,params:[{name:"zoom",title:"Zoom:",value:"2",range:[2,20]},{name:"center",title:"Center:",value:"128",range:[0,255]}],on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.change(i,t.zoom,t.center);n.putImageData(o,0,0)},on_finish:function(t){e.save_zoom(t.zoom,t.center)}};this.POP.show(t)}else u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save_zoom",value:function(e,t){var n=this.Base_layers.convert_layer_to_canvas(null,!0),r=n.getContext("2d"),a=r.getImageData(0,0,n.width,n.height),o=this.change(a,e,t);return r.putImageData(o,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(n))}},{key:"change",value:function(e,t,n){for(var r,a=e.data,i=0;in?a[s]+=(a[s]-n)*t:r255&&(a[s]=255)}}return e}}]),e}()},731:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(896),u=n(2998),d=n(1606),h=n.n(d);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Image_trim=new u.default}return(0,a.Z)(e,[{key:"content_fill",value:function(){var e=this;if("image"==o.Z.layer.type)if(0!=o.Z.layer.x||0!=o.Z.layer.y||o.Z.layer.width!=o.Z.WIDTH||o.Z.layer.height!=o.Z.HEIGHT){var t={title:"Content Fill",preview:!0,on_change:function(t,n,r,a,i){n.clearRect(0,0,r,a);var s=document.createElement("canvas");s.width=o.Z.WIDTH,s.height=o.Z.HEIGHT,e.change(s,t),n.drawImage(s,0,0,r,a)},params:[{name:"mode",title:"Mode:",values:["Expand edges","Cloned edges","Resized as background"]},{name:"blur_power",title:"Blur power:",value:5,range:[1,20]},{name:"blur_h",title:"Horizontal blur:",value:5,range:[0,30]},{name:"blur_v",title:"Vertical blur:",value:5,range:[0,30]},{name:"clone_count",title:"Clone count:",value:15,range:[10,50]}],on_finish:function(t){e.apply_affect(t)}};this.POP.show(t)}else h().error("Can not use this tool on current layer: image already takes all area.");else h().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"apply_affect",value:function(e){var t=document.createElement("canvas");return t.width=o.Z.WIDTH,t.height=o.Z.HEIGHT,this.change(t,e),i.Z.State.do_action(new i.Z.Actions.Bundle_action("content_fill","Content Fill",[new i.Z.Actions.Update_layer_action(o.Z.layer.id,{x:0,y:0,width:o.Z.WIDTH,height:o.Z.HEIGHT}),new i.Z.Actions.Update_layer_image_action(t)]))}},{key:"change",value:function(e,t){var n=e.getContext("2d"),r=t.mode;"Expand edges"==r?this.add_edge_background(e,t):"Resized as background"==r?this.add_resized_background(e,t):"Cloned edges"==r&&this.add_cloned_background(e,t),this.Base_layers.render_object(n,o.Z.layer)}},{key:"add_edge_background",value:function(e,t){var n=e.getContext("2d"),r=this.Image_trim.get_trim_info(o.Z.layer.id),a=this.Base_layers.convert_layer_to_canvas();n.clearRect(0,0,e.width,e.height),n.drawImage(a,r.left,r.top),n.drawImage(a,0,0,a.width,1,r.left,0,a.width,r.top),n.drawImage(a,0,a.height-1,a.width,1,r.left,r.top+a.height,a.width,e.height),n.drawImage(a,0,0,1,a.height,0,r.top,r.left,a.height),n.drawImage(a,a.width-1,0,1,a.height,r.left+a.width,r.top,e.width,a.height),n.drawImage(a,0,0,1,1,0,0,r.left,r.top),n.drawImage(a,a.width-1,0,1,1,r.left+a.width,0,e.width,r.top),n.drawImage(a,0,a.height-1,1,1,0,r.top+a.height,r.left,r.bottom),n.drawImage(a,a.width-1,a.height-1,1,1,r.left+a.width,r.top+a.height,r.right,r.bottom);var i=n.getImageData(0,0,e.width,e.height),s=c.Z.BoxBlur(i,t.blur_h,t.blur_v,t.blur_power);n.putImageData(s,0,0)}},{key:"add_resized_background",value:function(e,t){var n=e.getContext("2d"),r=this.Base_layers.convert_layer_to_canvas();n.drawImage(r,0,0,e.width,e.height);var a=n.getImageData(0,0,e.width,e.height),i=c.Z.BoxBlur(a,t.blur_h,t.blur_v,t.blur_power);n.putImageData(i,0,0)}},{key:"add_cloned_background",value:function(e,t){var n=t.clone_count,r=e.getContext("2d"),a=this.Image_trim.get_trim_info(o.Z.layer.id),i=this.Base_layers.convert_layer_to_canvas();r.clearRect(0,0,e.width,e.height),r.drawImage(i,a.left,a.top);for(var s=Math.ceil(i.width/n),l=0;l{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(1748),c=n(896),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.Helper=new l.Z,this.Base_layers=new s.Z,this.ImageFilters=c.Z,this.avg_offset=50,this.avg_step=4}return(0,a.Z)(e,[{key:"keypoints",value:function(e){var t=o.Z.WIDTH,n=o.Z.HEIGHT,r=this.Base_layers.convert_layer_to_canvas(),a=r.getContext("2d");this.Base_layers.render_object(a,o.Z.layer);var s=a.getImageData(0,0,t,n),l=this.convert_to_grayscale(s);a.putImageData(l,0,0);for(var c=[],u=0;u<5;u++){var h=document.createElement("canvas");h.width=t,h.height=n;var p=h.getContext("2d");p.drawImage(r,0,0),s=p.getImageData(0,0,t,n);var f=this.ImageFilters.GaussianBlur(s,u+.5);p.putImageData(f,0,0),c.push(h)}for(var m=[],g=2*this.avg_step+1,A=1;As[b-4]||s[b]>s[b+4])){for(var C=4*(u+(_-1)*t),w=4*(u+(_+1)*t),x=0,k=-this.avg_step;k<=this.avg_step;k++)for(var B=4*(u+(_-k)*t),S=-this.avg_step;S<=this.avg_step;S++)x+=s[B+4*S];if(x/=g*g,s[b]+this.avg_offsetx){var T=Math.max(s[C-4],s[C],s[C+4],s[b-4],s[b+4],s[w-4],s[w],s[w+4]);if(s[b]>=T){var R=Math.max(v[C-4],v[C],v[C+4],v[b-4],v[b+4],v[w-4],v[w],v[w+4]);if(s[b]>=R){var P=Math.max(y[C-4],y[C],y[C+4],y[b-4],y[b+4],y[w-4],y[w],y[w+4]);s[b]>=P&&m.push({x:u,y:_,w:Math.round(s[b]-x-this.avg_offset)})}}}}}}for(u=0;u{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1748),u=n(1606),d=n.n(u);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Helper=new c.Z}return(0,a.Z)(e,[{key:"replace_color",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Replace color",preview:!0,on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.do_replace(i,t);n.putImageData(o,0,0)},params:[{name:"target",title:"Target:",value:o.Z.COLOR,type:"color"},{name:"replacement",title:"Replacement:",value:"#ff0000",type:"color"},{name:"power",title:"Power:",value:"20",range:[0,255]},{name:"alpha",title:"Alpha:",value:"255",range:[0,255]},{name:"mode",title:"Mode:",values:["Advanced","Simple"]}],on_finish:function(t){e.save_alpha(t)}};this.POP.show(t)}else d().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save_alpha",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.do_replace(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"do_replace",value:function(e,t){for(var n=t.target,r=t.replacement,a=t.power,i=t.alpha,o=t.mode,s=e.data,l=this.Helper.hexToRgb(n),c=this.Helper.rgbToHsl(l.r,l.g,l.b),u=this.Helper.hslToRgb(c.h,c.s,.5),d=this.Helper.hexToRgb(r),h=this.Helper.rgbToHsl(d.r,d.g,d.b),p=0;pa)continue;s[p]=d.r,s[p+1]=d.g,s[p+2]=d.b,i<255&&(s[p+3]=i)}else{var f=this.Helper.rgbToHsl(s[p],s[p+1],s[p+2]),m=this.Helper.hslToRgb(f.h,f.s,.5);if((Math.abs(m.r-u.r)+Math.abs(m.g-u.g)+Math.abs(m.b-u.b))/3>a)continue;var g=this.Helper.hslToRgb(h.h,h.s,f.l*h.l);s[p]=g.r,s[p+1]=g.g,s[p+2]=g.b,i<255&&(s[p+3]=i)}return e}}]),e}()},1148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1606),u=n.n(c);const d=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z}return(0,a.Z)(e,[{key:"restore_alpha",value:function(){var e=this;if("image"==o.Z.layer.type){var t={title:"Restore Alpha",preview:!0,on_change:function(t,n,r,a){var i=n.getImageData(0,0,r,a),o=e.recover_alpha(i,t.level);n.putImageData(o,0,0)},params:[{name:"level",title:"Level:",value:"128",range:[0,255]}],on_finish:function(t){e.save_alpha(t.level)}};this.POP.show(t)}else u().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"save_alpha",value:function(e){var t=this.Base_layers.convert_layer_to_canvas(null,!0),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height),a=this.recover_alpha(r,e);return n.putImageData(a,0,0),i.Z.State.do_action(new i.Z.Actions.Update_layer_image_action(t))}},{key:"recover_alpha",value:function(e,t){var n,r=e.data;t=parseInt(t);for(var a=0;a255&&(n=255),r[a+3]=n;return e}}]),e}()},9348:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5671),a=n(3144),i=n(2610);const o=function(){function e(){(0,r.Z)(this,e),this.Base_search=new i.Z}return(0,a.Z)(e,[{key:"search",value:function(){this.Base_search.search()}}]),e}()},440:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(9314),o=n(7477),s=n(1748),l=n(1125);const c=function(){function e(){(0,r.Z)(this,e),this.Base_gui=new l.Z,this.POP=new o.Z,this.Helper=new s.Z}return(0,a.Z)(e,[{key:"settings",value:function(){var e=this,t=this.get_setting("transparency"),n=this.get_setting("theme"),r=this.get_setting("snap"),a=this.get_setting("guides"),o=this.get_setting("safe_search"),s=this.get_setting("exit_confirm"),l=this.get_setting("default_units"),c=this.get_setting("resolution"),u=this.get_setting("thick_guides"),d={title:"Settings",params:[{name:"transparency",title:"Transparent:",value:t},{name:"transparency_type",title:"Transparency background:",type:"select",value:i.Z.TRANSPARENCY_TYPE,values:["squares","green","grey"]},{name:"theme",title:"Theme",values:i.Z.themes,value:n,type:"select"},{name:"default_units",title:"Units",values:["pixels","inches","centimeters","millimetres"],value:l,type:"select"},{name:"resolution",title:"Resolution:",type:"select",value:c,values:[72,150,300,600]},{name:"snap",title:"Enable snap:",value:r},{name:"guides",title:"Enable guides:",value:a},{name:"safe_search",title:"Safe search:",value:o},{name:"exit_confirm",title:"Exit confirmation:",value:s},{name:"thick_guides",title:"Thick guides:",value:u}],on_change:function(e){this.Base_gui.change_theme(e.theme)},on_cancel:function(e){this.Base_gui.change_theme(n)},on_finish:function(t){e.save_values(t)}};this.POP.show(d)}},{key:"save_values",value:function(e){this.save_setting("theme",e.theme),this.save_setting("transparency",e.transparency),this.save_setting("transparency_type",e.transparency_type),this.save_setting("snap",e.snap),this.save_setting("guides",e.guides),this.save_setting("safe_search",e.safe_search),this.save_setting("exit_confirm",e.exit_confirm),this.save_setting("default_units",e.default_units),this.save_setting("resolution",e.resolution),this.save_setting("thick_guides",e.thick_guides),i.Z.TRANSPARENCY=this.get_setting("transparency"),i.Z.TRANSPARENCY_TYPE=this.get_setting("transparency_type"),i.Z.SNAP=this.get_setting("snap"),i.Z.guides_enabled=this.get_setting("guides"),this.Base_gui.change_theme(this.get_setting("theme")),this.Base_gui.GUI_information.update_units(),this.Base_gui.prepare_canvas(),i.Z.need_render=!0}},{key:"save_setting",value:function(e,t){!0===t&&(t=1),!1===t&&(t=0),this.Helper.setCookie(e,t)}},{key:"get_setting",value:function(e){var t={theme:null,transparency:!1,snap:!0,guides:!0,safe_search:!0,exit_confirm:!0,default_units:"pixels",resolution:72,thick_guides:!1},n=this.Helper.getCookie(e);return null==n&&null!=t[e]&&(n=t[e]),"safe_search"==e&&!1===i.Z.safe_search_can_be_disabled&&(n=1),"theme"==e&&null==n&&(n=i.Z.themes[0]),1===n&&(n=!0),0===n&&(n=!1),n}}]),e}()},7943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(8562),o=n(9314),s=n(699),l=n(7477),c=n(1606),u=n.n(c),d=n(2998),h=n(1125);const p=function(){function e(){(0,r.Z)(this,e),this.POP=new l.Z,this.Base_layers=new s.Z,this.Image_trim=new d.default,this.Base_gui=new h.Z}return(0,a.Z)(e,[{key:"sprites",value:function(){var e=this,t={title:"Sprites",params:[{name:"gap",title:"Gap:",value:"50",values:["0","10","50","100"]}],on_finish:function(t){e.generate_sprites(t.gap)}};this.POP.show(t)}},{key:"generate_sprites",value:function(e,t){if(e=parseInt(e),1==o.Z.layers.length)return u().error("There is only 1 layer."),!1;for(var n=0,r=0,a=0,s=[],l=o.Z.HEIGHT,c=o.Z.WIDTH,d=[],h=0;hc&&(n=0,r+=a,a=0),r%e>0&&e>0&&(r=r-r%e+e),r+g>l&&(l=parseInt(r+g),this.Base_gui.prepare_canvas()),s.push(new i.Z.Actions.Update_layer_action(p.id,{x:p.x+n-f.left,y:p.y+r-f.top})),n+=m,e>0&&(n=n-n%e+e),g>a&&(a=g),n>c&&(n=0,r+=a,a=0)}}}s.push(new i.Z.Actions.Prepare_canvas_action("undo"),new i.Z.Actions.Update_config_action({WIDTH:c,HEIGHT:l}),new i.Z.Actions.Prepare_canvas_action("do")),i.Z.State.do_action(new i.Z.Actions.Bundle_action("sprites","Sprites",s))}}]),e}()},5405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(9314),o=n(1748),s=(n(7183),n(1606)),l=n.n(s),c=n(9755),u=null;const d=function(){function e(){if((0,r.Z)(this,e),u)return u;u=this,this.Helper=new o.Z,this.translations={},this.trans_lang_codes=[],this.load_translations()}return(0,a.Z)(e,[{key:"translate",value:function(e,t){(null!=e||(e=this.Helper.getCookie("language")))&&(null!=e&&e!=i.Z.LANG&&this.Helper.setCookie("language",e),this.trans_lang_codes.includes(e)||"en"==e?(c(t||"body").translate({lang:e,t:this.translations}),i.Z.LANG=e):l().error("Translate error, can not find dictionary: "+e))}},{key:"load_translations",value:function(){var e=this,t=n(6053);t.keys().forEach((function(n){if(n.indexOf("Base/")<0&&n.indexOf("empty")<0){var r=n.replace("./","").replace(".json",""),a=t(n);for(var i in a)null==e.translations[i]&&(e.translations[i]={en:i}),e.translations[i][r]=a[i];e.trans_lang_codes.push(r)}}))}}]),e}()},8346:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(5671),a=n(3144);const i=function(){function e(){(0,r.Z)(this,e)}return(0,a.Z)(e,[{key:"fs",value:function(){document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.documentElement.requestFullscreen()}}]),e}()},7658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(5671),a=n(3144),i=n(9314),o=n(1748),s=n(1125),l=null;const c=function(){function e(){if((0,r.Z)(this,e),l)return l;l=this,this.GUI=new s.Z,this.Helper=new o.Z,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||71==n&&1!=t.ctrlKey&&1!=t.metaKey&&(e.grid({visible:!e.GUI.grid}),t.preventDefault())}),!1)}},{key:"grid",value:function(){0==this.GUI.grid?this.GUI.grid=!0:this.GUI.grid=!1,i.Z.need_render=!0}}]),e}()},1056:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(9314),o=n(7477),s=n(1748),l=n(699),c=n(1606),u=n.n(c),d=n(440);n(8562);const h=function(){function e(){(0,r.Z)(this,e),this.POP=new o.Z,this.Base_layers=new l.Z,this.Tools_settings=new d.default,this.Helper=new s.Z}return(0,a.Z)(e,[{key:"insert",value:function(){var e=this,t=this.Tools_settings.get_setting("default_units"),n=this.Tools_settings.get_setting("resolution"),r=20,a={title:"Insert guides",params:[{name:"type",title:"Type:",values:["Vertical","Horizontal"],value:"Vertical"},{name:"position",title:"Position:",value:r=this.Helper.get_user_unit(r,t,n)}],on_finish:function(t){e.insert_handler(t)}};this.POP.show(a)}},{key:"insert_handler",value:function(e){var t=e.type,n=parseFloat(e.position),r=this.Tools_settings.get_setting("default_units"),a=this.Tools_settings.get_setting("resolution");n=this.Helper.get_internal_unit(n,r,a);var o=null,s=null;"Vertical"==t&&(o=n),"Horizontal"==t&&(s=n),i.Z.guides.push({x:o,y:s}),0==i.Z.guides_enabled&&(i.Z.guides_enabled=!0,this.Helper.setCookie("guides",1),u().warning("Guides enabled.")),i.Z.need_render=!0}},{key:"update",value:function(){var e=this,t=this.Tools_settings.get_setting("default_units"),n=this.Tools_settings.get_setting("resolution"),r=[];for(var a in i.Z.guides){var o=(s=i.Z.guides[a]).x;o=this.Helper.get_user_unit(o,t,n),null===s.y&&r.push({name:a,title:"Vertical:",value:o})}for(var a in i.Z.guides){var s;o=(s=i.Z.guides[a]).y,o=this.Helper.get_user_unit(o,t,n),null===s.x&&r.push({name:a,title:"Horizontal:",value:o})}var l={title:"Update guides",params:r,on_finish:function(t){e.update_handler(t)}};this.POP.show(l)}},{key:"update_handler",value:function(e){var t=this.Tools_settings.get_setting("default_units"),n=this.Tools_settings.get_setting("resolution");for(var r in e){var a=parseInt(r),o=parseFloat(e[r]);o=this.Helper.get_internal_unit(o,t,n),null===i.Z.guides[a].x?i.Z.guides[a].y=o:i.Z.guides[a].x=o}for(r=0;r{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(9314),o=n(1748),s=n(1125),l=n(699),c=n(440),u=null;const d=function(){function e(){if((0,r.Z)(this,e),u)return u;u=this,this.GUI=new s.Z,this.Base_layers=new l.Z,this.Tools_settings=new c.default,this.Helper=new o.Z,this.set_events()}return(0,a.Z)(e,[{key:"set_events",value:function(){var e=this,t=this;window.addEventListener("resize",(function(e){t.prepare_ruler(),t.render_ruler()}),!1),document.addEventListener("keydown",(function(n){n.code,e.Helper.is_input(n.target)||"KeyU"==n.code&&1!=n.ctrlKey&&1!=n.metaKey&&(t.ruler(),n.preventDefault())}),!1)}},{key:"ruler",value:function(){var e=document.getElementById("ruler_left"),t=document.getElementById("ruler_top");document.getElementById("middle_area"),0==i.Z.ruler_active?(i.Z.ruler_active=!0,document.getElementById("middle_area").classList.add("has-ruler"),e.style.display="block",t.style.display="block",this.prepare_ruler(),this.render_ruler()):(i.Z.ruler_active=!1,document.getElementById("middle_area").classList.remove("has-ruler"),e.style.display="none",t.style.display="none"),this.GUI.prepare_canvas(),i.Z.need_render=!0}},{key:"prepare_ruler",value:function(){if(0!=i.Z.ruler_active){var e=document.getElementById("ruler_left"),t=document.getElementById("ruler_top"),n=document.getElementById("middle_area"),r=n.clientWidth,a=n.clientHeight;e.width=15,e.height=a-20,t.width=r-20,t.height=15}}},{key:"render_ruler",value:function(){if(0!=i.Z.ruler_active){for(var e=this.Tools_settings.get_setting("default_units"),t=this.Tools_settings.get_setting("resolution"),n=document.getElementById("ruler_left"),r=document.getElementById("ruler_top"),a=n.getContext("2d"),o=r.getContext("2d"),s="#111",l=Math.ceil(10*i.Z.ZOOM);l<5;)l*=2;for(;l>10;)l=Math.ceil(l/2);var c=10*l,u=Math.max(0,r.width/2-i.Z.WIDTH*i.Z.ZOOM/2),d=Math.max(0,n.height/2-i.Z.HEIGHT*i.Z.ZOOM/2),h=Math.min(r.width,r.width/2+i.Z.WIDTH*i.Z.ZOOM/2),p=Math.min(n.height,n.height/2+i.Z.HEIGHT*i.Z.ZOOM/2);a.strokeStyle=s,a.lineWidth=1,a.font="11px Arial",a.clearRect(0,0,n.width,n.height),a.beginPath();for(var f=d;f{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5671),a=n(3144),i=n(8476);const o=function(){function e(){(0,r.Z)(this,e),this.GUI_preview=new i.Z}return(0,a.Z)(e,[{key:"in",value:function(){this.GUI_preview.zoom(1)}},{key:"out",value:function(){this.GUI_preview.zoom(-1)}},{key:"original",value:function(){this.GUI_preview.zoom(100)}},{key:"auto",value:function(){this.GUI_preview.zoom_auto()}}]),e}()},1695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(4182),p=n(1125),f=n(3991),m=n(1606),g=n.n(m);const A=function(e){(0,i.Z)(m,e);var t,n,u=(t=m,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function m(e){var t;return(0,r.Z)(this,m),(t=u.call(this)).Base_layers=new d.Z,t.GUI_tools=new h.Z,t.Base_gui=new p.Z,t.name="animation",t.intervalID=null,t.index=0,t.toggle_layer_visibility_action=new l.Z.Actions.Toggle_layer_visibility_action,t.disable_selection(e),t}return(0,a.Z)(m,[{key:"load",value:function(){}},{key:"render",value:function(e,t){}},{key:"disable_selection",value:function(e){this.Base_selection=new f.Z(e,{enable_background:!1,enable_borders:!1,enable_controls:!1,enable_rotation:!1,enable_move:!1,data_function:function(){return null}},this.name)}},{key:"on_params_update",value:function(e){if("play"==e.key){var t=this.getParams();1!=c.Z.layers.length?(this.stop(),1==t.play&&this.start(t.delay)):g().error("Can not animate 1 layer.")}}},{key:"on_activate",value:function(){return[new l.Z.Actions.Stop_animation_action(!1)]}},{key:"on_leave",value:function(){return[new l.Z.Actions.Stop_animation_action(!0)]}},{key:"start",value:function(e){var t=this;(e=parseInt(e))<0&&(e=50),this.intervalID=window.setInterval((function(){t.play(t)}),e)}},{key:"stop",value:function(){new l.Z.Actions.Stop_animation_action(!0).do()}},{key:"play",value:function(e){for(var t in c.Z.layers)c.Z.layers[t].visible=!1;null!=c.Z.layers[this.index]&&(this.toggle_layer_visibility_action.layer_id=c.Z.layers[this.index].id,this.toggle_layer_visibility_action.do()),null!=c.Z.layers[this.index+1]?this.index++:this.index=0}}]),m}(u.Z)},689:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1606),p=n.n(h),f=n(896),m=n(1748);const g=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new m.Z,t.ctx=e,t.name="blur",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"default_dragMove",value:function(e){if(c.Z.TOOL.name==this.name){this.mousemove(e);var t=this.get_mouse_info(e),n=this.getParams();this.show_mouse_cursor(t.x,t.y,n.size,"circle")}}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams();0!=t.click_valid&&("image"==c.Z.layer.type?c.Z.layer.rotate?p().error("Erase on rotate object is disabled. Sorry."):(this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.blur_general("click",t,n.size,n.strength),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0):p().error("This layer must contain an image. Please convert it to raster to apply this tool."))}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();0!=t.is_drag&&0!=t.click_valid&&0!=this.started&&(this.blur_general("move",t,n.size,n.strength),c.Z.need_render=!0)}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("blur_tool","Blur Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"blur_general",value:function(e,t,n,r){var a=this.tmpCanvasCtx,i=Math.round(t.x)-c.Z.layer.x,o=Math.round(t.y)-c.Z.layer.y;i=this.adaptSize(i,"width"),o=this.adaptSize(o,"height");var s=this.adaptSize(n,"width"),l=this.adaptSize(n,"height"),u=i-Math.round(s/2),d=o-Math.round(l/2);u=Math.round(u),d=Math.round(d),i=Math.round(i),o=Math.round(o),"move"==e&&(r/=2)<1&&(r=1);var h=a.getImageData(u,d,s,l),p=f.Z.StackBlur(h,r);this.Helper.image_round(this.tmpCanvasCtx,i,o,s,l,p)}}]),h}(u.Z)},4594:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.name="brush",t.layer={},t.params_hash=!1,t.pressure_supported=!1,t.pointer_pressure=0,t.max_speed=20,t.power=2,t.event_links=[],t.data_index=0,t}return(0,a.Z)(h,[{key:"load",value:function(){var e=this,t=!1;document.addEventListener("pointerdown",(function(t){e.pointerdown(t)})),document.addEventListener("pointermove",(function(t){e.pointermove(t)})),document.addEventListener("mousedown",(function(n){t||e.dragStart(n)})),document.addEventListener("mousemove",(function(n){t||e.dragMove(n)})),document.addEventListener("mouseup",(function(n){t||e.dragEnd(n)})),document.addEventListener("touchstart",(function(n){t=!0,e.dragStart(n)})),document.addEventListener("touchmove",(function(t){e.dragMove(t)})),document.addEventListener("touchend",(function(t){e.dragEnd(t)}))}},{key:"pointerdown",value:function(e){e.pressure&&0!==e.pressure&&.5!==e.pressure&&e.pressure<=1?(this.pressure_supported=!0,this.pointer_pressure=e.pressure):this.pressure_supported=!1}},{key:"pointermove",value:function(e){this.pressure_supported&&e.pressure<1&&(this.pointer_pressure=e.pressure)}},{key:"dragStart",value:function(e){if(c.Z.TOOL.name==this.name){this.click_counter++;var t=this.get_mouse_info(e);if(0!=t.is_drag&&0!=t.click_valid){var n=[];e.changedTouches?n=e.changedTouches:n.push(e);for(var r=0;r=0&&void 0===c.Z.layer.data[t];o++)t--;var s=c.Z.layer.data[t],u=this.getParams(),d=u.size,h=d;1==u.pressure&&(this.pressure_supported?h=d*this.pointer_pressure*2:(h=d+d/this.max_speed*r.speed_average*this.power,h=Math.max(h,d/4),h=Math.round(h)));var p=this.get_mouse_coordinates_from_event(e),f=p.x,m=p.y;s.push([f-c.Z.layer.x,m-c.Z.layer.y,h]),this.Base_layers.render()}}},{key:"mousemove_action",value:function(e,t){var n=this.get_mouse_info(e);if(0!=n.is_drag&&0!=n.click_valid){for(var r=t;r>=0&&void 0===c.Z.layer.data[t];r++)t--;var a=this.getParams(),i=c.Z.layer.data[t],o=a.size,s=o;1==a.pressure&&(this.pressure_supported?s=o*this.pointer_pressure*2:(s=o+o/this.max_speed*n.speed_average*this.power,s=Math.max(s,o/4),s=Math.round(s)));var l=this.get_mouse_coordinates_from_event(e),u=l.x,d=l.y;i.push([u-c.Z.layer.x,d-c.Z.layer.y,s]),c.Z.layer.status="draft",this.Base_layers.render()}}},{key:"mouseup_action",value:function(e,t){0!=this.get_mouse_info(e).click_valid?(c.Z.layer.status=null,this.check_dimensions(),this.Base_layers.render()):c.Z.layer.status=null}},{key:"render",value:function(e,t){if(0!=t.data.length){var n=t.params,r=n.size;e.save(),e.fillStyle=t.color,e.strokeStyle=t.color,e.lineWidth=n.size,e.lineCap="round",e.lineJoin="round",e.translate(t.x,t.y);for(var a=t.data,i=(a=this.check_legacy_format(a)).length,o=0;o0&&"number"==typeof e[0][0]){var t=JSON.parse(JSON.stringify(e));(e=[]).push([]);var n=0;for(var r in t)null===t[r]?(e.push([]),n++):e[n].push([t[r][0],t[r][1],t[r][2]])}return e}},{key:"check_dimensions",value:function(){var e=JSON.parse(JSON.stringify(c.Z.layer.data));if(this.check_legacy_format(e),0!=c.Z.layer.data.length&&0!=e[0].length){for(var t=e[0][0][0],n=e[0][0][1],r=e[0][0][0],a=e[0][0][1],i=e.length,o=0;o{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1606),p=n.n(h),f=n(291),m=n(1748);const g=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.fx_filter=!1,t.Helper=new m.Z,t.ctx=e,t.name="bulge_pinch",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"default_dragMove",value:function(e){if(c.Z.TOOL.name==this.name){var t=this.get_mouse_info(e),n=this.getParams();this.show_mouse_cursor(t.x,t.y,n.radius,"circle")}}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams();0!=t.click_valid&&("image"==c.Z.layer.type?(this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.bulgePinch_general(t,n.power,n.radius,n.bulge),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0):p().error("This layer must contain an image. Please convert it to raster to apply this tool."))}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("bulge_pinch_tool","Bulge/Pinch Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"bulgePinch_general",value:function(e,t,n,r){0==this.fx_filter&&(this.fx_filter=f.Z.canvas()),this.tmpCanvasCtx;var a=Math.round(e.x)-c.Z.layer.x,i=Math.round(e.y)-c.Z.layer.y;a=this.adaptSize(a,"width"),i=this.adaptSize(i,"height"),a=Math.round(a),i=Math.round(i),(t/=100)>1&&(t=1),0==r&&(t*=-1);var o=this.fx_filter.texture(this.tmpCanvas);this.fx_filter.draw(o).bulgePinch(a,i,n,t).update(),this.tmpCanvasCtx.clearRect(0,0,this.tmpCanvas.width,this.tmpCanvas.height),this.tmpCanvasCtx.drawImage(this.fx_filter,0,0)}}]),h}(u.Z)},5605:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(9250),p=n(1606),f=n.n(p);const m=function(e){(0,i.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=u.call(this)).Base_layers=new d.Z,t.Layer_raster=new h.default,t.ctx=e,t.name="clone",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t.clone_coords=null,t.pressTimer=null,t}return(0,a.Z)(p,[{key:"load",value:function(){var e=this,t=!1;document.addEventListener("mousedown",(function(n){t||e.dragStart(n)})),document.addEventListener("mousemove",(function(n){t||e.dragMove(n)})),document.addEventListener("mouseup",(function(n){t||e.dragEnd(n)})),document.addEventListener("touchstart",(function(n){t=!0,e.dragStart(n)})),document.addEventListener("touchmove",(function(t){e.dragMove(t)})),document.addEventListener("touchend",(function(t){e.dragEnd(t)})),document.addEventListener("contextmenu",(function(t){e.mouseRightClick(t)}))}},{key:"dragStart",value:function(e){var t=this;c.Z.TOOL.name==t.name&&(t.mousedown(e),1==this.get_mouse_info(e).click_valid&&(this.pressTimer=window.setTimeout((function(){t.mouseLongClick()}),2e3)))}},{key:"dragMove",value:function(e){var t=this;if(c.Z.TOOL.name==t.name){t.mousemove(e);var n=t.get_mouse_info(e),r=t.getParams();t.show_mouse_cursor(n.x,n.y,r.size,"circle"),clearTimeout(this.pressTimer)}}},{key:"dragEnd",value:function(e){c.Z.TOOL.name==this.name&&(this.mouseup(e),clearTimeout(this.pressTimer))}},{key:"on_params_update",value:function(){var e=this.getParams(),t=document.getElementById("strict");0==e.circle?t.style.display="none":t.style.display="block"}},{key:"mouseRightClick",value:function(e){if(c.Z.TOOL.name==this.name){var t=this.get_mouse_info(e),n=this.getParams();if(3==e.which&&1==t.valid&&e.preventDefault(),"Previous"==n.source_layer.value&&null===c.Z.layer.type&&this.Layer_raster.raster(),"image"==c.Z.layer.type){if(c.Z.layer.rotate)f().error("Erase on rotate object is disabled. Sorry.");else if(3==e.which&&1==t.valid){var r=this.adaptSize(t.x,"width"),a=this.adaptSize(t.y,"height");this.clone_coords={x:r,y:a},f().success("Source coordinates saved.")}}else f().error("This layer must contain an image. Please convert it to raster to apply this tool.")}}},{key:"mouseLongClick",value:function(){var e=this.getParams(),t=this.get_mouse_info();if("Previous"==e.source_layer.value&&null===c.Z.layer.type&&this.Layer_raster.raster(),"image"==c.Z.layer.type)if(c.Z.layer.rotate)f().error("Erase on rotate object is disabled. Sorry.");else{var n=this.adaptSize(t.x,"width"),r=this.adaptSize(t.y,"height");this.clone_coords={x:n,y:r},f().success("Source coordinates saved.")}else f().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams(),r=c.Z.layer,a=this.Base_layers.find_previous(c.Z.layer.id);if(0!=t.click_valid)if("Previous"==n.source_layer.value&&null===c.Z.layer.type&&this.Layer_raster.raster(),"image"==c.Z.layer.type)if(c.Z.layer.rotate)f().error("Erase on rotate object is disabled. Sorry.");else if(null!==this.clone_coords)if(r.width==r.width_original&&r.height==r.height_original)if("Previous"!=n.source_layer.value||a.width==a.width_original&&a.height==a.height_original){if("Previous"==n.source_layer.value){if(null==a)return void f().error("Can not find previous layer.");if("image"!=a.type)return void f().error("Previous layer must be image, convert it to raster to apply this tool.")}this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.clone_general(this.tmpCanvas,this.tmpCanvas,"click",t),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0}else f().error("Clone tool disabled for resized image. Sorry.");else f().error("Clone tool disabled for resized image. Sorry.");else f().error("Source is empty, right click on image or use long press to save source position.");else f().error("This layer must contain an image. Please convert it to raster to apply this tool.")}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);this.getParams(),0!=t.is_drag&&0!=t.click_valid&&0!=this.started&&(this.clone_general(this.tmpCanvas,this.tmpCanvas,"move",t),c.Z.need_render=!0)}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("clone_tool","Clone Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"clone_general",value:function(e,t,n,r){var a=this.getParams(),i=Math.round(r.x)-c.Z.layer.x,o=Math.round(r.y)-c.Z.layer.y,s=Math.round(a.size/2);i=this.adaptSize(i,"width"),o=this.adaptSize(o,"height"),i=Math.round(i),o=Math.round(o);var l=document.createElement("canvas"),u=l.getContext("2d"),d=Math.ceil(a.size),h=Math.ceil(a.size);l.width=d,l.height=h;var p=Math.round(this.clone_coords.x-(r.click_x-i)),f=Math.round(this.clone_coords.y-(r.click_y-o));if(0==a.anti_aliasing&&(u.arc(s,s,s,0,2*Math.PI,!1),u.clip()),"Previous"==a.source_layer.value){var m=this.Base_layers.find_previous(c.Z.layer.id);p=Math.round(this.clone_coords.x-(r.click_x-i))-m.x+c.Z.layer.x,f=Math.round(this.clone_coords.y-(r.click_y-o))-m.y+c.Z.layer.y,u.drawImage(m.link,p-s,f-s,d,h,0,0,d,h)}else u.drawImage(e,p-s,f-s,d,h,0,0,d,h);if(1==a.anti_aliasing){var g=u.createRadialGradient(s,s,0,s,s,s+1);g.addColorStop(0,"white"),g.addColorStop(.3,"white"),g.addColorStop(1,"transparent"),u.fillStyle=g,u.globalCompositeOperation="destination-in",u.fillRect(0,0,a.size,a.size),u.globalCompositeOperation="source-over"}t.getContext("2d").drawImage(l,i-s,o-s)}}]),p}(u.Z)},718:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>b});var r=n(5861),a=n(5671),i=n(3144),o=n(7326),s=n(136),l=n(2963),c=n(1120),u=n(4687),d=n.n(u),h=n(8562),p=n(9314),f=n(5071),m=n(699),g=n(4182),A=n(1125),v=n(3991),y=n(1606),_=n.n(y);const b=function(e){(0,s.Z)(y,e);var t,n,u,f=(n=y,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.Z)(n);if(u){var r=(0,c.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.Z)(this,e)});function y(e){var t;(0,a.Z)(this,y),t=f.call(this);var n=(0,o.Z)(t);t.Base_layers=new m.Z,t.Base_gui=new A.Z,t.GUI_tools=new g.Z,t.ctx=e,t.name="crop",t.selection={x:null,y:null,width:null,height:null};var r={enable_background:!0,enable_borders:!0,enable_controls:!0,crop_lines:!0,enable_rotation:!1,enable_move:!1,data_function:function(){return n.selection}};return t.mousedown_selection=null,t.Base_selection=new v.Z(e,r,t.name),t}return(0,i.Z)(y,[{key:"load",value:function(){this.default_events()}},{key:"default_dragStart",value:function(e){this.is_mousedown_canvas=!1,p.Z.TOOL.name==this.name&&e.target.closest("#main_wrapper")&&(this.is_mousedown_canvas=!0,this.mousedown(e))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);0!=this.Base_selection.is_drag&&0!=t.click_valid&&(this.mousedown_selection=JSON.parse(JSON.stringify(this.selection)),null===this.Base_selection.mouse_lock&&this.Base_selection.set_selection(t.x,t.y,0,0))}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);if(0!=this.Base_selection.is_drag&&0!=t.is_drag&&("mousedown"!=e.type||0!=t.click_valid)&&null===this.Base_selection.mouse_lock){var n=t.x-t.click_x,r=t.y-t.click_y;if(1==e.ctrlKey||e.metaKey){var a=p.Z.WIDTH/p.Z.HEIGHT,i=Math.round(r*a),o=Math.round(n/a);Math.abs(100*n/i)>Math.abs(100*r/o)?r=100*n/i>0?o:-o:n=100*r/o>0?i:-i}this.Base_selection.set_selection(null,null,n,r)}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e);if(this.Base_selection.is_drag&&("mousedown"!=e.type||0!=t.click_valid)){var n=t.x-this.selection.x,r=t.y-this.selection.y;if(0==n||0==r)return this.Base_selection.reset_selection(),void(p.Z.need_render=!0);if(null!=this.selection.width){var a=this.selection,i=a.x,o=a.y;a.width<0&&(i+=a.width),a.height<0&&(o+=a.height),this.selection={x:i,y:o,width:Math.abs(a.width),height:Math.abs(a.height)}}this.selection.x<0&&(this.selection.width+=this.selection.x,this.selection.x=0),this.selection.y<0&&(this.selection.height+=this.selection.y,this.selection.y=0),this.selection.x+this.selection.width>p.Z.WIDTH&&(this.selection.width=p.Z.WIDTH-this.selection.x),this.selection.y+this.selection.height>p.Z.HEIGHT&&(this.selection.height=p.Z.HEIGHT-this.selection.y),h.Z.State.do_action(new h.Z.Actions.Set_selection_action(this.selection.x,this.selection.y,this.selection.width,this.selection.height,this.mousedown_selection))}}},{key:"render",value:function(e,t){}},{key:"on_params_update",value:(t=(0,r.Z)(d().mark((function e(){var t,n,r,a,i,o,s,l,c,u,f,m,g,A,v,y,b,C,w,x,k,B;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getParams(),n=this.selection,t.crop=!0,this.GUI_tools.show_action_attributes(),null!=n.width&&0!=n.width&&0!=n.height){e.next=7;break}return _().error("Empty selection"),e.abrupt("return");case 7:r=!1,e.t0=d().keys(p.Z.layers);case 9:if((e.t1=e.t0()).done){e.next=19;break}if(a=e.t1.value,null!=(i=p.Z.layers[a]).type){e.next=14;break}return e.abrupt("continue",9);case 14:if(!(i.rotate>0)){e.next=17;break}return r=i.name,e.abrupt("break",19);case 17:e.next=9;break;case 19:if(!1===r){e.next=22;break}return _().error("Crop on rotated layer is not supported. Convert it to raster to continue.("+r+")"),e.abrupt("return");case 22:n.x=Math.max(n.x,0),n.y=Math.max(n.y,0),n.width=Math.min(n.width,p.Z.WIDTH),n.height=Math.min(n.height,p.Z.HEIGHT),o=[],e.t2=d().keys(p.Z.layers);case 28:if((e.t3=e.t2()).done){e.next=45;break}if(a=e.t3.value,null!=(i=p.Z.layers[a]).type){e.next=33;break}return e.abrupt("continue",28);case 33:s=i.x,l=i.y,c=i.width,u=i.height,f=i.width_original,m=i.height_original,s-=parseInt(n.x),l-=parseInt(n.y),"image"==i.type&&(g=0,s<0&&(g=-s),A=0,l<0&&(A=-l),v=0,s+c>n.width&&(v=s+c-n.width),y=0,l+u>n.height&&(y=l+u-n.height),b=c-g-v,C=u-A-y,w=c/f,x=u/m,k=document.createElement("canvas"),B=k.getContext("2d"),k.width=b/w,k.height=C/x,B.translate(-g/w,-A/x),k.getContext("2d").drawImage(i.link,0,0),B.translate(0,0),o.push(new h.Z.Actions.Update_layer_image_action(k,i.id)),c=Math.ceil(k.width*w),u=Math.ceil(k.height*x),s+=g,l+=A,f=k.width,m=k.height),o.push(new h.Z.Actions.Update_layer_action(i.id,{x:s,y:l,width:c,height:u,width_original:f,height_original:m})),e.next=28;break;case 45:return o.push(new h.Z.Actions.Prepare_canvas_action("undo"),new h.Z.Actions.Update_config_action({WIDTH:parseInt(n.width),HEIGHT:parseInt(n.height)}),new h.Z.Actions.Prepare_canvas_action("do"),new h.Z.Actions.Reset_selection_action(this.selection)),e.next=48,h.Z.State.do_action(new h.Z.Actions.Bundle_action("crop_tool","Crop Tool",o));case 48:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"on_leave",value:function(){return[new h.Z.Actions.Reset_selection_action]}}]),y}(f.Z)},25:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1606),p=n.n(h),f=n(896),m=n(1748);const g=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new m.Z,t.ctx=e,t.name="desaturate",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"default_dragMove",value:function(e){if(c.Z.TOOL.name==this.name){this.mousemove(e);var t=this.get_mouse_info(e),n=this.getParams();this.show_mouse_cursor(t.x,t.y,n.size,"circle")}}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams();0!=t.click_valid&&("image"==c.Z.layer.type?c.Z.layer.rotate?p().error("Erase on rotate object is disabled. Sorry."):(this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.desaturate_general("click",t,n.size,n.anti_aliasing),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0):p().error("This layer must contain an image. Please convert it to raster to apply this tool."))}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();0!=t.is_drag&&0!=t.click_valid&&0!=this.started&&(this.desaturate_general("move",t,n.size,n.anti_aliasing),c.Z.need_render=!0)}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("desaturate_tool","Desaturate Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"desaturate_general",value:function(e,t,n,r){var a=this.tmpCanvasCtx,i=Math.round(t.x)-c.Z.layer.x,o=Math.round(t.y)-c.Z.layer.y;i=this.adaptSize(i,"width"),o=this.adaptSize(o,"height");var s=this.adaptSize(n,"width"),l=this.adaptSize(n,"height"),u=i-Math.round(s/2),d=o-Math.round(l/2);u=Math.round(u),d=Math.round(d),i=Math.round(i),o=Math.round(o);var h=a.getImageData(u,d,s,l),p=f.Z.GrayScale(h);this.Helper.image_round(this.tmpCanvasCtx,i,o,s,l,p,r)}}]),h}(u.Z)},4238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1606),p=n.n(h);const f=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.ctx=e,t.name="erase",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"default_dragMove",value:function(e,t){if(c.Z.TOOL.name==this.name){this.mousemove(e,t);var n=this.get_mouse_info(e),r=this.getParams();1==r.circle?this.show_mouse_cursor(n.x,n.y,r.size,"circle"):this.show_mouse_cursor(n.x,n.y,r.size,"rect")}}},{key:"on_params_update",value:function(){var e=this.getParams(),t=document.querySelector(".attributes #strict");0==e.circle?t.style.display="none":t.style.display="block"}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams();0!=t.click_valid&&("image"==c.Z.layer.type?1!=c.Z.layer.is_vector?c.Z.layer.rotate?p().error("Erase on rotate object is disabled. Sorry."):(this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.tmpCanvasCtx.scale(c.Z.layer.width_original/c.Z.layer.width,c.Z.layer.height_original/c.Z.layer.height),this.erase_general(this.tmpCanvasCtx,"click",t,n.size,n.strict,n.circle),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0):p().error("Layer is vector, convert it to raster to apply this tool."):p().error("This layer must contain an image. Please convert it to raster to apply this tool."))}},{key:"mousemove",value:function(e,t){var n=this.get_mouse_info(e),r=this.getParams();0!=n.is_drag&&0!=n.click_valid&&0!=this.started&&(n.click_x==n.x&&n.click_y==n.y||(this.erase_general(this.tmpCanvasCtx,"move",n,r.size,r.strict,r.circle,t),c.Z.need_render=!0))}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("erase_tool","Erase Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"erase_general",value:function(e,t,n,r,a,i,o){var s=Math.round(n.x)-c.Z.layer.x,l=Math.round(n.y)-c.Z.layer.y,u=c.Z.ALPHA,d=parseInt(n.last_x)-c.Z.layer.x,h=parseInt(n.last_y)-c.Z.layer.y;if(e.beginPath(),e.lineWidth=r,e.lineCap="round",e.lineJoin="round",e.strokeStyle=u<255?"rgba(255, 255, 255, "+u/255/10+")":"rgba(255, 255, 255, 1)",0==i){var p=Math.ceil(r/2);1==r&&(s=Math.floor(n.x)-c.Z.layer.x,l=Math.floor(n.y)-c.Z.layer.y,p=0),e.save(),e.globalCompositeOperation="destination-out",e.fillStyle="rgba(255, 255, 255, "+u/255+")",e.fillRect(s-p,l-p,r,r),e.restore()}else{if(e.save(),0==a){var f=e.createRadialGradient(s,l,r/8,s,l,r/2);"click"==t?f.addColorStop(0,"rgba(255, 255, 255, "+u/255+")"):"move"==t&&f.addColorStop(0,"rgba(255, 255, 255, "+u/255/2+")"),f.addColorStop(1,"rgba(255, 255, 255, 0)")}e.globalCompositeOperation="destination-out",e.fillStyle=1==a?"rgba(255, 255, 255, "+u/255+")":f,e.beginPath(),e.arc(s,l,r/2,0,2*Math.PI,!0),e.fill(),e.restore()}"move"==t&&1==i&&0!=d&&0!=h&&!0!==o&&(e.save(),e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(d,h),e.lineTo(s,l),e.stroke(),e.restore())}}]),h}(u.Z)},975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(5861),a=n(5671),i=n(3144),o=n(136),s=n(2963),l=n(1120),c=n(4687),u=n.n(c),d=n(8562),h=n(9314),p=n(5071),f=n(699),m=n(1748),g=n(1606),A=n.n(g);const v=function(e){(0,o.Z)(g,e);var t,n,c,p=(n=g,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(n);if(c){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,s.Z)(this,e)});function g(e){var t;return(0,a.Z)(this,g),(t=p.call(this)).Base_layers=new f.Z,t.Helper=new m.Z,t.ctx=e,t.name="fill",t.working=!1,t}return(0,i.Z)(g,[{key:"dragStart",value:function(e){h.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"load",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.dragStart(t)})),document.addEventListener("touchstart",(function(t){e.dragStart(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);0!=t.click_valid&&(h.Z.layer.rotate?A().error("Erase on rotate object is disabled. Sorry."):this.fill(t))}},{key:"fill",value:(t=(0,r.Z)(u().mark((function e(t){var n,r,a,i,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.getParams(),1!=this.working){e.next=3;break}return e.abrupt("return");case 3:if("image"==h.Z.layer.type||null===h.Z.layer.type){e.next=6;break}return A().error("This layer must contain an image. Please convert it to raster to apply this tool."),e.abrupt("return");case 6:if(1!=h.Z.layer.is_vector){e.next=9;break}return A().error("Layer is vector, convert it to raster to apply this tool."),e.abrupt("return");case 9:if(0!=h.Z.ALPHA){e.next=12;break}return A().error("Color alpha value can not be zero."),e.abrupt("return");case 12:return r=document.createElement("canvas"),a=r.getContext("2d"),null!==h.Z.layer.type?(r.width=h.Z.layer.width_original,r.height=h.Z.layer.height_original,a.drawImage(h.Z.layer.link,0,0)):(r.width=h.Z.WIDTH,r.height=h.Z.HEIGHT),i=Math.round(t.x)-h.Z.layer.x,o=Math.round(t.y)-h.Z.layer.y,i=this.adaptSize(i,"width"),o=this.adaptSize(o,"height"),i=Math.round(i),o=Math.round(o),(s=this.Helper.hexToRgb(h.Z.COLOR)).a=h.Z.ALPHA,this.working=!0,this.fill_general(a,h.Z.WIDTH,h.Z.HEIGHT,i,o,s,n.power,n.anti_aliasing,n.contiguous),null!=h.Z.layer.type?d.Z.State.do_action(new d.Z.Actions.Bundle_action("fill_tool","Fill Tool",[new d.Z.Actions.Update_layer_image_action(r)])):((n=[]).type="image",n.name="Fill",n.data=r.toDataURL("image/png"),n.x=parseInt(r.dataset.x)||0,n.y=parseInt(r.dataset.y)||0,n.width=r.width,n.height=r.height,d.Z.State.do_action(new d.Z.Actions.Bundle_action("fill_tool","Fill Tool",[new d.Z.Actions.Insert_layer_action(n)]))),e.next=28,new Promise((function(e){return setTimeout(e,10)}));case 28:this.working=!1;case 29:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"fill_general",value:function(e,t,n,r,a,i,o,s){var l=arguments.length>8&&void 0!==arguments[8]&&arguments[8];o=255*o/100,r=parseInt(r),a=parseInt(a);var c=document.createElement("canvas");c.width=t,c.height=n;var u=c.getContext("2d");u.rect(0,0,t,n),u.fillStyle="rgba(255, 255, 255, 0)",u.fill();var d=u.getImageData(0,0,t,n),h=d.data,p=e.getImageData(0,0,t,n),f=p.data,m=[0,-1,1,0],g=[-1,0,0,1],A={r:f[0+(x=a*(4*p.width)+4*r)],g:f[x+1],b:f[x+2],a:f[x+3]};if(A.r==i.r&&A.g==i.g&&A.b==i.b&&A.a==i.a)return!1;if(0==l){var v=[];for(v.push([r,a]);v.length>0;)for(var y=v.pop(),_=0;_<4;_++){var b=y[0]+m[_],C=y[1]+g[_];b<0||C<0||b>=t||C>=n||0==h[3+(x=4*(C*t+b))]&&Math.abs(f[x+0]-A.r)<=o&&Math.abs(f[x+1]-A.g)<=o&&Math.abs(f[x+2]-A.b)<=o&&Math.abs(f[x+3]-A.a)<=o&&(h[x]=i.r,h[x+1]=i.g,h[x+2]=i.b,h[x+3]=i.a,v.push([b,C]))}}else for(_=0;_{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1748);const p=function(e){(0,i.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new h.Z,t.ctx=e,t.name="gradient",t.layer={},t}return(0,a.Z)(p,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.click_valid){var r=this.name,a=!1;1==n.radial&&(r="Radial gradient",a=!0),this.layer={type:this.name,name:this.Helper.ucfirst(r)+" #"+this.Base_layers.auto_increment,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:t.x,y:t.y,rotate:null,is_vector:a,color:n.color_1,data:{center_x:t.x,center_y:t.y}},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_gradient_layer","New Gradient Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.is_drag&&0!=t.click_valid){var r=t.x-this.layer.x,a=t.y-this.layer.y;1==n.radial?(c.Z.layer.x=this.layer.data.center_x-r,c.Z.layer.y=this.layer.data.center_y-a,c.Z.layer.width=2*r,c.Z.layer.height=2*a):(c.Z.layer.width=r,c.Z.layer.height=a),this.Base_layers.render()}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.click_valid){var r=t.x-this.layer.x,a=t.y-this.layer.y;if(0!=r||0!=a){var i={};(i=1==n.radial?{x:this.layer.data.center_x-r,y:this.layer.data.center_y-a,width:2*r,height:2*a}:{width:r,height:a}).status=null,l.Z.State.do_action(new l.Z.Actions.Update_layer_action(c.Z.layer.id,i),{merge_with_history:"new_gradient_layer"}),this.Base_layers.render()}else l.Z.State.scrap_last_action()}else c.Z.layer.status=null}},{key:"render",value:function(e,t){if(0!=t.width||0!=t.height){var n=t.params,r=n.radial_power;r>99&&(r=99);var a=n.alpha/100*255;r>255&&(r=255);var i=t.color,o=n.color_2,s=n.radial,l=this.Helper.hexToRgb(o),u=t.x+t.width-1,d=t.y+t.height-1;if(0==s){e.beginPath(),e.rect(0,0,c.Z.WIDTH,c.Z.HEIGHT);var h=e.createLinearGradient(t.x,t.y,u,d);h.addColorStop(0,i),h.addColorStop(1,"rgba("+l.r+", "+l.g+", "+l.b+", "+a/255+")"),e.fillStyle=h,e.fill()}else{var p=t.width,f=t.height,m=t.x+Math.round(t.width/2),g=t.y+Math.round(t.height/2),A=Math.sqrt(p*p+f*f),v=e.createRadialGradient(m,g,A*r/100,m,g,A);v.addColorStop(0,i),v.addColorStop(1,"rgba("+l.r+", "+l.g+", "+l.b+", "+a/255+")"),e.fillStyle=v,e.fillRect(0,0,c.Z.WIDTH,c.Z.HEIGHT)}}}}]),p}(u.Z)},1807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5861),a=n(5671),i=n(3144),o=n(136),s=n(2963),l=n(1120),c=n(4687),u=n.n(c),d=n(8562),h=n(9314),p=n(5071),f=n(699),m=n(1606),g=n.n(m);const A=function(e){(0,o.Z)(m,e);var t,n,c,p=(n=m,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(n);if(c){var r=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,s.Z)(this,e)});function m(e){var t;return(0,a.Z)(this,m),(t=p.call(this)).Base_layers=new f.Z,t.ctx=e,t.name="magic_erase",t.working=!1,t}return(0,i.Z)(m,[{key:"dragStart",value:function(e){h.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"load",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.dragStart(t)})),document.addEventListener("touchstart",(function(t){e.dragStart(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);0!=t.click_valid&&(h.Z.layer.rotate?g().error("Erase on rotate object is disabled. Sorry."):this.magic_erase(t))}},{key:"magic_erase",value:(t=(0,r.Z)(u().mark((function e(t){var n,r,a,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.getParams(),1!=this.working){e.next=3;break}return e.abrupt("return");case 3:if("image"==h.Z.layer.type){e.next=6;break}return g().error("This layer must contain an image. Please convert it to raster to apply this tool."),e.abrupt("return");case 6:if(1!=h.Z.layer.is_vector){e.next=9;break}return g().error("Layer is vector, convert it to raster to apply this tool."),e.abrupt("return");case 9:return r=document.createElement("canvas"),a=r.getContext("2d"),r.width=h.Z.layer.width_original,r.height=h.Z.layer.height_original,a.drawImage(h.Z.layer.link,0,0),i=Math.round(t.x)-h.Z.layer.x,o=Math.round(t.y)-h.Z.layer.y,i=this.adaptSize(i,"width"),o=this.adaptSize(o,"height"),i=Math.round(i),o=Math.round(o),this.working=!0,this.magic_erase_general(a,h.Z.WIDTH,h.Z.HEIGHT,i,o,n.power,n.anti_aliasing,n.contiguous),d.Z.State.do_action(new d.Z.Actions.Bundle_action("magic_erase_tool","Magic Eraser Tool",[new d.Z.Actions.Update_layer_image_action(r)])),e.next=25,new Promise((function(e){return setTimeout(e,10)}));case 25:this.working=!1;case 26:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"magic_erase_general",value:function(e,t,n,r,a,i,o){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];i=255*i/100,r=parseInt(r),a=parseInt(a);var l=document.createElement("canvas");l.width=t,l.height=n;var c=l.getContext("2d");c.rect(0,0,t,n),c.fillStyle="rgba(255, 255, 255, 0)",c.fill();var u=c.getImageData(0,0,t,n),d=u.data,h=e.getImageData(0,0,t,n),p=h.data,f=[0,-1,1,0],m=[-1,0,0,1],g={r:255,g:255,b:255,a:255},A={r:p[0+(x=a*(4*h.width)+4*r)],g:p[x+1],b:p[x+2],a:p[x+3]};if(A.r==g.r&&A.g==g.g&&A.b==g.b&&0==A.a)return!1;if(0==s){var v=[];for(v.push([r,a]);v.length>0;)for(var y=v.pop(),_=0;_<4;_++){var b=y[0]+f[_],C=y[1]+m[_];b<0||C<0||b>=t||C>=n||0==d[3+(x=4*(C*t+b))]&&Math.abs(p[x]-A.r)<=i&&Math.abs(p[x+1]-A.g)<=i&&Math.abs(p[x+2]-A.b)<=i&&Math.abs(p[x+3]-A.a)<=i&&(d[x]=g.r,d[x+1]=g.g,d[x+2]=g.b,d[x+3]=g.a,v.push([b,C]))}}else for(_=0;_{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(9314),c=n(5071),u=n(1728),d=n(440),h=n(7477),p=n(1606),f=n.n(p),m=n(9755);const g=function(e){(0,i.Z)(p,e);var t,n,c=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=c.call(this)).File_open=new u.default,t.Tools_settings=new d.default,t.POP=new h.Z,t.name="media",t.cache=[],t.page=1,t.per_page=50,t}return(0,a.Z)(p,[{key:"load",value:function(){}},{key:"render",value:function(e,t){}},{key:"on_activate",value:function(){this.search()}},{key:"search",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this,a="",i="",o=l.Z.pixabay_key;o=o.split("").reverse().join("");var s=this.Tools_settings.get_setting("safe_search");if(t.length>0){for(var c in t)a+='
    ',a+='\t',a+="
    ";for(a+='
    ',a+='
    ',a+='
    ',a+='
    ',i+='
    ',i+=' ',c=1;c<=Math.min(10,n);c++){var u="";this.page==c&&(u="selected"),i+=' "}i+=' ',i+="
    "}else this.page=1;var d={title:"Search",className:"wide",params:[{name:"query",title:"Keyword:",value:e}],on_load:function(e,t){var n=document.createElement("div");n.classList.add("flex-container"),n.innerHTML=a+i,t.el.querySelector(".dialog_content").appendChild(n);for(var o=t.el.querySelectorAll(".item img"),s=0;s{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.name="pencil",t.layer={},t.params_hash=!1,t.pressure_supported=!1,t.pointer_pressure=0,t}return(0,a.Z)(h,[{key:"load",value:function(){var e=this;document.addEventListener("pointerdown",(function(t){e.pointerdown(t)})),document.addEventListener("pointermove",(function(t){e.pointermove(t)})),this.default_events()}},{key:"dragMove",value:function(e){c.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"pointerdown",value:function(e){e.pressure&&0!==e.pressure&&.5!==e.pressure&&e.pressure<=1?(this.pressure_supported=!0,this.pointer_pressure=e.pressure):this.pressure_supported=!1}},{key:"pointermove",value:function(e){this.pressure_supported&&e.pressure<1&&(this.pointer_pressure=e.pressure)}},{key:"mousedown",value:function(e){if(0!=this.get_mouse_info(e).click_valid){var t=this.get_params_hash(),n=Math.round(c.Z.ALPHA/255*100);if(c.Z.layer.type!=this.name||t!=this.params_hash)this.layer={type:this.name,data:[],opacity:n,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:0,y:0,width:c.Z.WIDTH,height:c.Z.HEIGHT,hide_selection_if_active:!0,rotate:null,is_vector:!0,color:c.Z.COLOR},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_pencil_layer","New Pencil Layer",[new l.Z.Actions.Insert_layer_action(this.layer)])),this.params_hash=t;else{var r=JSON.parse(JSON.stringify(c.Z.layer.data));r.push(null),l.Z.State.do_action(new l.Z.Actions.Bundle_action("update_pencil_layer","Update Pencil Layer",[new l.Z.Actions.Update_layer_action(c.Z.layer.id,{data:r})]))}}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.is_drag&&0!=t.click_valid){var r=n.size,a=r;1==n.pressure&&this.pressure_supported&&(a=r*this.pointer_pressure*2),c.Z.layer.data.push([Math.ceil(t.x-c.Z.layer.x),Math.ceil(t.y-c.Z.layer.y),a]),this.Base_layers.render()}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.click_valid){var r=n.size,a=r;1==n.pressure&&this.pressure_supported&&(a=r*this.pointer_pressure*2),c.Z.layer.data.push([Math.ceil(t.x-c.Z.layer.x),Math.ceil(t.y-c.Z.layer.y),a]),this.check_dimensions(),c.Z.layer.status=null,this.Base_layers.render()}else c.Z.layer.status=null}},{key:"render",value:function(e,t){this.render_aliased(e,t)}},{key:"render_aliased",value:function(e,t){if(0!=t.data.length){var n=t.params,r=t.data,a=r.length,i=n.size;e.fillStyle=t.color,e.strokeStyle=t.color,e.translate(t.x,t.y),e.beginPath(),e.moveTo(r[0][0],r[0][1]);for(var o=1;o{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(9314),c=n(5071),u=n(699),d=n(1748),h=n(1125);const p=function(e){(0,i.Z)(p,e);var t,n,c=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=c.call(this)).Base_layers=new u.Z,t.Helper=new d.Z,t.Base_gui=new h.Z,t.ctx=e,t.name="pick_color",t}return(0,a.Z)(p,[{key:"dragStart",value:function(e){l.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"dragMove",value:function(e){l.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"load",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.dragStart(t)})),document.addEventListener("mousemove",(function(t){e.dragMove(t)})),document.addEventListener("mouseup",(function(t){var n=e.get_mouse_info(t);l.Z.TOOL.name==e.name&&0!=n.click_valid&&e.copy_color_to_clipboard()})),document.addEventListener("touchstart",(function(t){e.dragStart(t)})),document.addEventListener("touchmove",(function(t){e.dragMove(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);0!=t.click_valid&&this.pick_color(t)}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);0!=t.is_drag&&0!=t.click_valid&&this.pick_color(t)}},{key:"pick_color",value:function(e){var t;if(0==this.getParams().global)var n=(t=this.Base_layers.convert_layer_to_canvas(l.Z.layer.id,null,!1)).getContext("2d");else n=(t=document.createElement("canvas")).getContext("2d"),t.width=l.Z.WIDTH,t.height=l.Z.HEIGHT,this.Base_layers.convert_layers_to_canvas(n,null,!1);var r=n.getImageData(e.x,e.y,1,1).data,a={hex:this.Helper.rgbToHex(r[0],r[1],r[2])};r[3]>0&&(a.a=r[3]),this.Base_gui.GUI_colors.set_color(a)}},{key:"copy_color_to_clipboard",value:function(){navigator.clipboard.writeText(l.Z.COLOR)}}]),p}(c.Z)},4141:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(5861),a=n(5671),i=n(3144),o=n(136),s=n(2963),l=n(1120),c=n(4687),u=n.n(c),d=n(8562),h=n(9314),p=n(5071),f=n(699),m=n(3991),g=n(1748),A=n(7477);const v=function(e){(0,o.Z)(y,e);var t,n,c,p,v=(c=y,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,l.Z)(c);if(p){var n=(0,l.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,s.Z)(this,e)});function y(e){var t;(0,a.Z)(this,y),(t=v.call(this)).Base_layers=new f.Z,t.POP=new A.Z,t.Helper=new g.Z,t.ctx=e,t.name="select",t.saved=!1,t.mousedown_dimensions={x:null,y:null,width:null,height:null},t.keyboard_move_start_position=null,t.moving=!1,t.resizing=!1,t.snap_line_info={x:null,y:null},t.rotate_initial=null;var n={enable_background:!1,enable_borders:!0,enable_controls:!0,keep_ratio:!0,enable_rotation:!0,enable_move:!0,data_function:function(){return h.Z.layer}};return t.Base_selection=new m.Z(e,n,t.name),t}return(0,i.Z)(y,[{key:"load",value:function(){var e=this,t=this;document.addEventListener("mousedown",(function(e){t.dragStart(e)})),document.addEventListener("mousemove",(function(e){t.dragMove(e)})),document.addEventListener("mouseup",(function(e){t.dragEnd(e)})),document.addEventListener("touchstart",(function(e){t.dragStart(e)})),document.addEventListener("touchmove",(function(e){t.dragMove(e)})),document.addEventListener("touchend",(function(e){t.dragEnd(e)})),document.addEventListener("keydown",(function(t){if(h.Z.TOOL.name==e.name&&!(e.POP.get_active_instances()>0||e.Helper.is_input(t.target))){var n=t.key;"ArrowUp"==n?e.move(0,-1,t):"ArrowDown"==n?e.move(0,1,t):"ArrowRight"==n?e.move(1,0,t):"ArrowLeft"==n&&e.move(-1,0,t),"Delete"==n&&h.Z.TOOL.name==e.name&&d.Z.State.do_action(new d.Z.Actions.Delete_layer_action(h.Z.layer.id))}})),document.addEventListener("keyup",(function(t){if(h.Z.TOOL.name==e.name&&1!=e.POP.active&&!e.Helper.is_input(t.target)){var n=t.key;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n)&&e.keyboard_move_start_position){var r=h.Z.layer.x,a=h.Z.layer.y;h.Z.layer.x=e.keyboard_move_start_position.x,h.Z.layer.y=e.keyboard_move_start_position.y,d.Z.State.do_action(new d.Z.Actions.Update_layer_action(h.Z.layer.id,{x:r,y:a})),e.keyboard_move_start_position=null}}}))}},{key:"dragStart",value:function(e){h.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"dragMove",value:function(e){h.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"dragEnd",value:function(e){h.Z.TOOL.name==this.name&&(this.mouseup(e),this.Base_layers.render())}},{key:"mousedown",value:(n=(0,r.Z)(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=this.get_mouse_info(t).click_valid&&!0!==h.Z.mouse_lock){e.next=3;break}return e.abrupt("return");case 3:if(this.rotate_initial=h.Z.layer.rotate,null==this.Base_selection.mouse_lock){e.next=10;break}this.resizing=!0,this.Base_selection.find_settings().keep_ratio="image"===h.Z.layer.type,"text"===h.Z.layer.type&&h.Z.layer.params&&"dynamic"===h.Z.layer.params.boundary&&(h.Z.layer.params.boundary="box"),e.next=15;break;case 10:return this.moving=!0,e.next=13,this.auto_select_object(t);case 13:this.Base_selection.find_settings().keep_ratio="image"===h.Z.layer.type,this.saved=!1;case 15:this.mousedown_dimensions={x:Math.round(h.Z.layer.x),y:Math.round(h.Z.layer.y),width:Math.round(h.Z.layer.width),height:Math.round(h.Z.layer.height)};case 16:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);if(0!=t.is_drag&&0!=t.click_valid&&!0!==h.Z.mouse_lock)if(this.resizing){var n=this.Base_selection.current_angle;h.Z.layer.rotate!=n&&null!==n&&(h.Z.layer.rotate=n)}else if(this.moving){h.Z.layer.x=Math.round(t.x-t.click_x+this.mousedown_dimensions.x),h.Z.layer.y=Math.round(t.y-t.click_y+this.mousedown_dimensions.y);var r=this.calc_snap(e,h.Z.layer.x,h.Z.layer.y);null!=r&&(null!=r.x&&(h.Z.layer.x=r.x),null!=r.y&&(h.Z.layer.y=r.y)),h.Z.need_render=!0}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid&&!0!==h.Z.mouse_lock){if(this.resizing){var n=h.Z.layer.x,r=h.Z.layer.y,a=h.Z.layer.width,i=h.Z.layer.height;h.Z.layer.x=this.mousedown_dimensions.x,h.Z.layer.y=this.mousedown_dimensions.y,h.Z.layer.width=this.mousedown_dimensions.width,h.Z.layer.height=this.mousedown_dimensions.height,this.mousedown_dimensions.x===n&&this.mousedown_dimensions.y===r&&this.mousedown_dimensions.width===a&&this.mousedown_dimensions.height===i||d.Z.State.do_action(new d.Z.Actions.Bundle_action("resize_layer","Resize Layer",[new d.Z.Actions.Update_layer_action(h.Z.layer.id,{x:n,y:r,width:a,height:i})]));var o=this.Base_selection.current_angle;this.rotate_initial!=o&&null!==o&&(h.Z.layer.rotate=this.rotate_initial,d.Z.State.do_action(new d.Z.Actions.Bundle_action("resize_layer","Resize Layer",[new d.Z.Actions.Update_layer_action(h.Z.layer.id,{rotate:o})])))}else if(this.moving){var s=Math.round(t.x-t.click_x+this.mousedown_dimensions.x),l=Math.round(t.y-t.click_y+this.mousedown_dimensions.y);if(h.Z.layer.x=this.mousedown_dimensions.x,h.Z.layer.y=this.mousedown_dimensions.y,t.x-t.click_x||t.y-t.click_y){var c=this.calc_snap(e,s,l);null!=c&&(null!=c.x&&(s=c.x),null!=c.y&&(l=c.y))}this.mousedown_dimensions.x===s&&this.mousedown_dimensions.y===l||d.Z.State.do_action(new d.Z.Actions.Bundle_action("move_layer","Move Layer",[new d.Z.Actions.Update_layer_action(h.Z.layer.id,{x:s,y:l})]))}this.moving=!1,this.resizing=!1}}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx;var t=this.get_mouse_info(event);if(null!=h.Z.layer.render_function){var n=h.Z.layer.render_function[0];void 0!==this.Base_gui.GUI_tools.tools_modules[n].object.select&&this.Base_gui.GUI_tools.tools_modules[n].object.select(this.ctx)}0!=t.is_drag&&this.render_overlay_parent(e)}},{key:"calc_snap",value:function(e,t,n){var r={x:null,y:null};if(this.getParams(),!1===h.Z.SNAP||1==e.shiftKey)return this.snap_line_info={x:null,y:null},null;var a=(h.Z.WIDTH+h.Z.HEIGHT)/2*.01/h.Z.ZOOM,i=this.get_snap_positions(h.Z.layer.id),o={x:{start:null,center:null,end:null},y:{start:null,center:null,end:null}},s={x:{start:null,center:null,end:null},y:{start:null,center:null,end:null}};for(var l in i.x)(c=Math.abs(t-i.x[l]))5)return r.x>n.x&&r.xn.y&&r.y{"use strict";n.r(t),n.d(t,{default:()=>y});var r=n(5671),a=n(3144),i=n(7326),o=n(136),s=n(2963),l=n(1120),c=n(8562),u=n(9314),d=n(5071),h=n(699),p=n(3991),f=n(4182),m=n(1748),g=n(1606),A=n.n(g);var v=null;const y=function(e){(0,o.Z)(g,e);var t,n,d=(t=g,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var a=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function g(e){var t;if((0,r.Z)(this,g),t=d.call(this),v)return(0,s.Z)(t,v);v=(0,i.Z)(t);var n=(0,i.Z)(t);t.Base_layers=new h.Z,t.Helper=new m.Z,t.ctx=e,t.name="selection",t.type=null,t.tmpCanvas=null,t.tmpCanvasCtx=null,t.selection_coords_from=null,t.selection={x:null,y:null,width:null,height:null};var a={enable_background:!0,enable_borders:!0,enable_controls:!1,enable_rotation:!1,enable_move:!1,data_function:function(){return n.selection}};return t.mousedown_selection=null,t.Base_selection=new p.Z(e,a,t.name),t.GUI_tools=new f.Z,t}return(0,a.Z)(g,[{key:"load",value:function(){var e=this,t=this;document.addEventListener("mousedown",(function(e){t.dragStart(e)})),document.addEventListener("mousemove",(function(e){t.dragMove(e)})),document.addEventListener("mouseup",(function(e){t.dragEnd(e)})),document.addEventListener("touchstart",(function(e){t.dragStart(e)})),document.addEventListener("touchmove",(function(e){t.dragMove(e)})),document.addEventListener("touchend",(function(e){t.dragEnd(e)})),document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||(27==n&&c.Z.State.do_action(new c.Z.Actions.Bundle_action("clear_selection","Clear Selection",e.on_leave())),46==n&&u.Z.TOOL.name==e.name&&e.delete_selection(),65!=n||1!=t.ctrlKey&&!t.metaKey||(t.preventDefault(),e.select_all()))}),!1)}},{key:"dragStart",value:function(e){u.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"dragMove",value:function(e){u.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"dragEnd",value:function(e){u.Z.TOOL.name==this.name&&this.mouseup(e)}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e),n=u.Z.layer;0!=this.Base_selection.is_drag&&0!=t.click_valid&&("image"==u.Z.layer.type?(this.mousedown_selection=JSON.parse(JSON.stringify(this.selection)),null!=this.selection.width&&null!=this.selection.height&&t.x>this.selection.x&&t.xthis.selection.y&&t.y{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5861),a=n(5671),i=n(3144),o=n(7326),s=n(136),l=n(2963),c=n(1120),u=n(4687),d=n.n(u),h=(n(8562),n(9314),n(5071)),p=n(699),f=n(7477),m=n(4182);var g=null;const A=function(e){(0,s.Z)(A,e);var t,n,u,h=(n=A,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=(0,c.Z)(n);if(u){var r=(0,c.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.Z)(this,e)});function A(e){var t;return(0,a.Z)(this,A),t=h.call(this),g?(0,l.Z)(t,g):(g=(0,o.Z)(t),t.Base_layers=new p.Z,t.GUI_tools=new m.Z,t.POP=new f.Z,t.ctx=e,t.name="shape",t.layer={},t.preview_width=150,t.preview_height=120,t.set_events(),t)}return(0,i.Z)(A,[{key:"set_events",value:function(){var e=this;document.addEventListener("keydown",(function(t){var n=t.keyCode;e.Helper.is_input(t.target)||72==n&&e.show_shapes()}),!1)}},{key:"load",value:function(){}},{key:"on_activate",value:function(){this.show_shapes()}},{key:"show_shapes",value:(t=(0,r.Z)(d().mark((function e(){var t,n,r,a,i,o,s,l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a in t=this,n="",r=this.get_shapes())n+='
    ',n+='\t',n+='
    '+r[a].title+"
    ",n+="
    ";for(a=0;a<4;a++)n+='
    ';return i={title:"Shapes",className:"wide",on_load:function(e,r){var a=document.createElement("div");a.classList.add("flex-container"),a.innerHTML=n,r.el.querySelector(".dialog_content").appendChild(a);for(var i=r.el.querySelectorAll(".item canvas"),o=0;or?1:0})),e}}]),A}(h.Z)},6121:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.ctx=e,t.name="arrow",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.mouse_click={x:null,y:null},t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=t.x,r=t.y,a=this.calc_snap_position(e,n,r);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),this.mouse_click.x=n,this.mouse_click.y=r,this.layer={type:this.name,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:Math.round(n),y:Math.round(r),rotate:null,is_vector:!0,color:c.Z.COLOR},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_line_layer","New Line Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);if(0!=t.is_drag&&0!=t.click_valid){var n=Math.round(t.x),r=Math.round(t.y),a=(Math.round(this.mouse_click.x),Math.round(this.mouse_click.y),this.calc_snap_position(e,n,r,c.Z.layer.id));null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y));var i=n-this.layer.x,o=r-this.layer.y;(1==e.ctrlKey||e.metaKey)&&(Math.abs(i){"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1748);const p=function(e){(0,i.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new h.Z,t.ctx=e,t.name="bezier_curve",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.params_hash=!1,t.selected_obj_positions={},t.mouse_lock=null,t.selected_object_drag_type=null,t.old_data=null,t.events(),t}return(0,a.Z)(p,[{key:"load",value:function(){var e=this;this.default_events(),document.addEventListener("keydown",(function(t){c.Z.TOOL.name==e.name&&t.code}))}},{key:"events",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.selected_object_actions(t)})),document.addEventListener("mousemove",(function(t){e.selected_object_actions(t)})),document.addEventListener("mouseup",(function(t){e.selected_object_actions(t)})),document.addEventListener("touchstart",(function(t){e.selected_object_actions(t)})),document.addEventListener("touchmove",(function(t){e.selected_object_actions(t)}),{passive:!1}),document.addEventListener("touchend",(function(t){e.selected_object_actions(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=this.get_params_hash(),r=t.x,a=t.y,i=this.calc_snap_position(e,r,a);null!=i&&(null!=i.x&&(r=i.x),null!=i.y&&(a=i.y));var o=JSON.parse(JSON.stringify(c.Z.layer.data));c.Z.layer.type!=this.name||n!=this.params_hash||null!=o&&null!==o.cp2.x?(this.layer={type:this.name,data:{start:{x:r,y:a},cp1:{x:null,y:null},cp2:{x:null,y:null},end:{x:null,y:null}},params:this.clone(this.getParams()),render_function:[this.name,"render"],x:0,y:0,width:null,height:null,hide_selection_if_active:!0,rotate:null,is_vector:!0,color:c.Z.COLOR,status:"draft"},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_bezier_layer","New Bezier Layer",[new l.Z.Actions.Insert_layer_action(this.layer)])),this.params_hash=n):(c.Z.layer.data.end.x=r,c.Z.layer.data.end.y=a),this.Base_layers.render()}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=Math.round(t.x),r=Math.round(t.y),a=Math.round(t.click_x),i=Math.round(t.click_y);if(0!=t.click_valid&&0!=t.is_drag){if(1==e.ctrlKey||e.metaKey){var o=n-a,s=r-i;Math.abs(o)>Math.abs(s)?r=i:n=a}var l=this.calc_snap_position(e,n,r,c.Z.layer.id);null!=l&&(null!=l.x&&(n=l.x),null!=l.y&&(r=l.y)),null===c.Z.layer.data.end.x?(c.Z.layer.data.cp1.x=n,c.Z.layer.data.cp1.y=r):(c.Z.layer.data.cp2.x=n,c.Z.layer.data.cp2.y=r),this.Base_layers.render()}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=Math.round(t.x),r=Math.round(t.y),a=Math.round(t.click_x),i=Math.round(t.click_y);if(1==e.ctrlKey||e.metaKey){var o=n-a,s=r-i;Math.abs(o)>Math.abs(s)?r=i:n=a}var l=this.calc_snap_position(e,n,r,c.Z.layer.id);null!=l&&(null!=l.x&&(n=l.x),null!=l.y&&(r=l.y)),this.snap_line_info={x:null,y:null},null===c.Z.layer.data.end.x?(c.Z.layer.data.cp1.x=n,c.Z.layer.data.cp1.y=r):(c.Z.layer.data.cp2.x=n,c.Z.layer.data.cp2.y=r,c.Z.layer.status=null),this.Base_layers.render()}}},{key:"render_overlay",value:function(e){if(e=this.Base_layers.ctx,this.render_overlay_parent(e),c.Z.layer.type==this.name){var t=c.Z.layer.data;this.selected_obj_positions={};var n=c.Z.layer.x,r=c.Z.layer.y;null!=t.start.x&&(this.Helper.draw_special_line(this.ctx,n+t.start.x,r+t.start.y,n+t.cp1.x,r+t.cp1.y),"select"==c.Z.TOOL.name&&(this.selected_obj_positions.cp1_start=this.Helper.draw_control_point(this.ctx,n+t.start.x,r+t.start.y),this.selected_obj_positions.cp1_end=this.Helper.draw_control_point(this.ctx,n+t.cp1.x,r+t.cp1.y))),null!=t.end.x&&null!=t.cp2.x&&(this.Helper.draw_special_line(this.ctx,n+t.end.x,r+t.end.y,n+t.cp2.x,r+t.cp2.y),"select"==c.Z.TOOL.name&&(this.selected_obj_positions.cp2_start=this.Helper.draw_control_point(this.ctx,n+t.end.x,r+t.end.y),this.selected_obj_positions.cp2_end=this.Helper.draw_control_point(this.ctx,n+t.cp2.x,r+t.cp2.y)))}}},{key:"select",value:function(e){this.render_overlay(e)}},{key:"demo",value:function(e,t,n,r,a){var i={start:{x:t,y:n},cp1:{x:t+r,y:n},cp2:{x:t,y:n+a},end:{x:t+r,y:n+a}};this.draw_bezier(e,0,0,i,2,"#555")}},{key:"render",value:function(e,t){var n=t.params;this.draw_bezier(e,t.x,t.y,t.data,n.size,t.color)}},{key:"draw_bezier",value:function(e,t,n,r,a,i){null!=r.end.x&&null!=r.cp2.x&&(e.fillStyle=i,e.strokeStyle=i,e.lineWidth=a,e.lineCap="round",e.beginPath(),e.moveTo(t+r.start.x,n+r.start.y),e.bezierCurveTo(t+r.cp1.x,n+r.cp1.y,t+r.cp2.x,n+r.cp2.y,t+r.end.x,n+r.end.y),e.stroke())}},{key:"selected_object_actions",value:function(e){if("select"==c.Z.TOOL.name&&c.Z.layer.type==this.name&&"draft"!=c.Z.layer.status){this.Base_layers.ctx;var t=this.get_mouse_info(e),n=Math.round(t.x),r=Math.round(t.y),a=(Math.round(t.click_x),Math.round(t.click_y),document.getElementById("main_wrapper")),i=e.type;if("touchstart"==i&&(i="mousedown"),"touchmove"==i&&(i="mousemove"),"touchend"==i&&(i="mouseup"),"mouseup"==i&&(c.Z.mouse_lock=null,"default"!=a.style.cursor&&(a.style.cursor="default")),"mousedown"!=i||0!=c.Z.mouse.valid)if("mousemove"==i&&"move_point"==this.mouse_lock&&t.is_drag){if(a.style.cursor="move",1==e.buttons||void 0===e.buttons){var o=this.selected_object_drag_type,s=c.Z.layer.data,u=Math.round(t.x-t.click_x)-c.Z.layer.x,d=Math.round(t.y-t.click_y)-c.Z.layer.y;if("cp1_start"==o){if(s.start.x=t.click_x+u,s.start.y=t.click_y+d,1==e.ctrlKey||e.metaKey){var h=n-s.cp1.x,p=r-s.cp1.y;Math.abs(h)>Math.abs(p)?s.start.y=s.cp1.y:s.start.x=s.cp1.x}}else"cp1_end"==o?(s.cp1.x=t.click_x+u,s.cp1.y=t.click_y+d,(1==e.ctrlKey||e.metaKey)&&(h=n-s.start.x,p=r-s.start.y,Math.abs(h)>Math.abs(p)?s.cp1.y=s.start.y:s.cp1.x=s.start.x)):"cp2_start"==o?(s.end.x=t.click_x+u,s.end.y=t.click_y+d,(1==e.ctrlKey||e.metaKey)&&(h=n-s.cp2.x,p=r-s.cp2.y,Math.abs(h)>Math.abs(p)?s.end.y=s.cp2.y:s.end.x=s.cp2.x)):"cp2_end"==o&&(s.cp2.x=t.click_x+u,s.cp2.y=t.click_y+d,1==e.ctrlKey||e.metaKey)&&(h=n-s.end.x,p=r-s.end.y,Math.abs(h)>Math.abs(p)?s.cp2.y=s.end.y:s.cp2.x=s.end.x);c.Z.need_render=!0}}else if("mouseup"==i&&"move_point"==this.mouse_lock&&(this.mouse_lock=null,o=this.selected_object_drag_type,s=c.Z.layer.data,c.Z.layer.data=this.old_data,l.Z.State.do_action(new l.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new l.Z.Actions.Update_layer_action(c.Z.layer.id,{data:s})])),c.Z.need_render=!0),(t.is_drag||!["mousedown","mouseup"].includes(i))&&!this.mouse_lock)for(var f in this.selected_obj_positions){var m=this.selected_obj_positions[f];m&&this.ctx.isPointInPath(m,t.x,t.y)&&("mousedown"==i&&(1!=e.buttons&&void 0!==e.buttons||(this.mouse_lock="move_point",this.selected_object_drag_type=f),c.Z.mouse_lock=!0,this.old_data=JSON.parse(JSON.stringify(c.Z.layer.data))),"mousemove"==i&&(a.style.cursor="move"))}}}}]),p}(u.Z)},7315:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(5071),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="callout",t.layer={},t.best_ratio=1.3,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a),e.restore()}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){e.lineJoin="round",e.beginPath(),e.moveTo(t,n),e.lineTo(t+r,n),e.lineTo(t+r,n+.6*a),e.lineTo(t+r/2+r/10,n+.6*a),e.lineTo(t+r/8,n+a),e.lineTo(t+r/2-r/10,n+.6*a),e.lineTo(t,n+.6*a),e.lineTo(t,n),e.closePath(),e.fill(),e.stroke()}}]),u}(l.Z)},685:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="cog",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#777",e.lineWidth=1,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a),e.restore()}},{key:"render",value:function(e,t){var n=t.params;e.save(),e.fillStyle=n.fill_color,e.lineWidth=1,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){e.lineJoin="round",e.beginPath(),e.scale(r/512,a/500),e.translate(-256,-252);var o=new Path2D("M190.883 502.932c-4.517 0-9.082-.991-13.368-3.055l-63.216-30.438c-13.348-6.426-20.255-21.479-16.422-35.794 3.684-13.757 8.609-29.81 14.376-46.879a195.425 195.425 0 0 1-15.733-19.711c-17.979 1.837-34.736 3.07-48.937 3.594-14.773.515-27.899-9.536-31.195-23.975L.776 278.273c-3.297-14.444 4.167-29.229 17.748-35.156 13.056-5.697 28.669-11.851 45.59-17.977a193.78 193.78 0 0 1 5.601-24.614c-12.655-12.922-24.061-25.246-33.297-35.989-9.643-11.217-9.939-27.761-.706-39.339l43.744-54.854c9.239-11.584 25.453-14.963 38.552-8.043 12.556 6.636 27.096 15.004 42.466 24.433a194.25 194.25 0 0 1 22.746-10.969c2.209-17.923 4.735-34.522 7.381-48.468 2.757-14.532 15.506-25.079 30.315-25.079h70.161c14.815 0 27.569 10.567 30.325 25.126 2.646 13.983 5.17 30.564 7.377 48.422a193.854 193.854 0 0 1 22.75 10.971c15.42-9.466 29.975-17.843 42.506-24.458 13.079-6.901 29.275-3.512 38.509 8.066l43.743 54.855c9.237 11.582 8.928 28.142-.738 39.374-9.254 10.756-20.646 23.066-33.263 35.957a193.79 193.79 0 0 1 5.601 24.62c16.986 6.145 32.615 12.304 45.634 17.992h.001c13.553 5.923 20.997 20.699 17.701 35.137l-15.615 68.4c-3.299 14.446-16.455 24.532-31.247 23.972-14.229-.531-30.97-1.762-48.889-3.588a195.251 195.251 0 0 1-15.728 19.703c5.791 17.122 10.723 33.189 14.394 46.921 3.819 14.291-3.093 29.324-16.436 35.748l-63.214 30.438c-13.351 6.428-29.426 2.438-38.224-9.484-8.455-11.455-17.931-25.313-27.679-40.466-8.425.548-16.745.548-25.176 0-9.772 15.201-19.257 29.075-27.702 40.508-5.964 8.075-15.283 12.499-24.824 12.5zm-61.851-61.915l61.516 29.619c15.437-20.988 29.097-42.937 36.43-54.579 26.665 3.104 31.829 3.053 58.035.001 6.932 10.997 20.8 33.291 36.445 54.576l61.515-29.619c-6.794-25.207-15.471-49.669-19.957-62.54 19.028-18.834 22.066-22.637 36.219-45.367 13.048 1.451 39.007 4.495 65.388 5.533l15.195-66.562c-24.034-10.441-48.695-18.946-61.337-23.387-2.824-26.58-3.888-31.341-12.882-56.619 9.27-9.299 27.886-27.753 45.083-47.657l-42.566-53.381c-22.622 12.001-44 25.528-56.513 33.37-22.495-14.328-26.889-16.481-52.31-25.228-1.474-12.904-4.292-38.972-9.156-64.958H221.86c-4.53 24.145-7.144 47.395-9.144 64.955-25.185 8.667-29.587 10.755-52.309 25.223-11.055-6.923-33.256-21.009-56.521-33.362l-42.568 53.379c16.896 19.57 35.133 37.669 45.088 47.647-8.943 25.131-10.043 29.878-12.885 56.613-12.366 4.348-37.104 12.879-61.339 23.397l15.192 66.562c25.642-.998 50.721-3.907 65.381-5.542 14.147 22.727 17.192 26.54 36.221 45.377-4.265 12.257-13.059 37.034-19.944 62.549zm351.667-168.554l.009.004-.009-.004zM256 347.486c-50.446 0-91.486-41.041-91.486-91.486s41.041-91.486 91.486-91.486c50.445 0 91.486 41.041 91.486 91.486S306.445 347.486 256 347.486zm0-150.972c-32.801 0-59.486 26.686-59.486 59.486S223.2 315.486 256 315.486 315.486 288.8 315.486 256 288.801 196.514 256 196.514z");e.closePath(),e.fill(o)}}]),u}(l.Z)},1332:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="cylinder",t.layer={},t.best_ratio=.7,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a),e.restore()}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){e.lineJoin="round",e.beginPath(),e.scale(1,1.2),e.translate(-r/2,-a/2);var o=a/3;e.moveTo(0,o),e.bezierCurveTo(0,o+o,r,o+o,r,o),e.bezierCurveTo(r,o-o,0,o-o,0,o),e.lineTo(0,a-o),e.bezierCurveTo(0,a-o+o,r,a-o+o,r,a-o),e.lineTo(r,o),e.fill(),e.stroke()}}]),u}(l.Z)},4930:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.ctx=e,t.name="ellipse",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.mouse_click={x:null,y:null},t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.click_valid){var r=t.x,a=t.y,i=this.calc_snap_position(e,r,a);null!=i&&(null!=i.x&&(r=i.x),null!=i.y&&(a=i.y)),this.mouse_click.x=r,this.mouse_click.y=a,this.layer={type:this.name,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:r,y:a,color:null,is_vector:!0},1==n.circle&&(this.layer.rotate=null),l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_ellipse_layer","New Ellipse Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.is_drag&&0!=t.click_valid){var r=Math.round(t.x),a=Math.round(t.y),i=Math.round(this.mouse_click.x),o=Math.round(this.mouse_click.y),s=this.calc_snap_position(e,r,a,c.Z.layer.id);null!=s&&(null!=s.x&&(r=s.x),null!=s.y&&(a=s.y));var l=Math.min(r,i),u=Math.min(a,o),d=Math.abs(r-i),h=Math.abs(a-o);(1==n.circle||1==e.ctrlKey||e.metaKey)&&(d{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="heart",t.layer={},t.best_ratio=1.2,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a),e.restore()}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){e.lineJoin="round",e.beginPath(),e.scale(1.071,1.1),e.translate(-r/2,-a/1.85),e.moveTo(r/2,a/5),e.bezierCurveTo(5*r/14,0,0,a/15,r/28,2*a/5),e.bezierCurveTo(r/14,2*a/3,3*r/7,5*a/6,r/2,a),e.bezierCurveTo(4*r/7,5*a/6,13*r/14,2*a/3,27*r/28,2*a/5),e.bezierCurveTo(r,a/15,9*r/14,0,r/2,a/5),e.closePath(),e.fill(),e.stroke()}}]),u}(l.Z)},9944:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="hexagon",t.layer={},t.best_ratio=1.1547005,t.snap_line_info={x:null,y:null},t.coords=[[75,6.698729810778069],[100,50],[75,93.30127018922192],[24.99999999999999,93.30127018922192],[0,50.00000000000001],[24.99999999999998,6.698729810778076],[75,6.698729810778069],[75,6.698729810778069]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,this.draw_shape(e,t,n-5,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){for(var o in e.lineJoin="round",e.beginPath(),e.scale(1,this.best_ratio),i)if(null!==i[o]){var s=t+i[o][0]*r/100,l=n+i[o][1]*a/100;"0"==o?e.moveTo(s,l):e.lineTo(s,l)}else e.closePath(),e.fill(),e.stroke(),e.beginPath();e.closePath(),e.fill(),e.stroke()}}]),u}(l.Z)},2981:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="human",t.layer={},t.best_ratio=.35,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a),e.restore()}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",e.strokeStyle=n.border_color,n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a){e.lineJoin="round",e.beginPath(),e.translate(-r/2,-a/2);var i=.28*Math.sqrt(r*a),o=.07*a,s=.3*a;2*i+o+s>a&&(i=(a-s-o)/2),e.arc(r/2,i,i,0,2*Math.PI),e.moveTo(r/2,2*i),e.lineTo(r/2,a-s),e.moveTo(0,2*i+o),e.lineTo(r,2*i+o),e.moveTo(r/2,a-s),e.lineTo(0,a),e.moveTo(r/2,a-s),e.lineTo(r,a),e.fill(),e.stroke()}}]),u}(l.Z)},5156:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.ctx=e,t.name="line",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.mouse_click={x:null,y:null},t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=t.x,r=t.y,a=this.calc_snap_position(e,n,r);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),this.mouse_click.x=n,this.mouse_click.y=r,this.layer={type:this.name,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:n,y:r,rotate:null,is_vector:!0,color:c.Z.COLOR},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_line_layer","New Line Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);if(0!=t.is_drag&&0!=t.click_valid){var n=Math.round(t.x),r=Math.round(t.y),a=(Math.round(this.mouse_click.x),Math.round(this.mouse_click.y),this.calc_snap_position(e,n,r,c.Z.layer.id));null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y));var i=n-this.layer.x,o=r-this.layer.y;(1==e.ctrlKey||e.metaKey)&&(Math.abs(i){"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(5071),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="moon",t.layer={},t.best_ratio=.8,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a,!0,!0),e.restore()}},{key:"render",value:function(e,t){var n=t.params;e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,n.fill,n.border),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i,o){var s=parseInt(t),l=parseInt(n);e.beginPath(),e.moveTo(s+.512*r,l+a/2),e.bezierCurveTo(s+51.2*r/100,l+28.4*a/100,s+71.5*r/100,l+10.1*a/100,s+100*r/100,l+3.1*a/100),e.bezierCurveTo(s+92*r/100,l+1.1*a/100,s+83.4*r/100,l+0*a/100,s+74.4*r/100,l+0*a/100),e.bezierCurveTo(s+33.3*r/100,l+0*a/100,s+0*r/100,l+22.4*a/100,s+0*r/100,l+50*a/100),e.bezierCurveTo(s+0*r/100,l+77.6*a/100,s+33.3*r/100,l+100*a/100,s+74.4*r/100,l+100*a/100),e.bezierCurveTo(s+83.4*r/100,l+100*a/100,s+92*r/100,l+98.9*a/100,s+100*r/100,l+96.9*a/100),e.bezierCurveTo(s+71.5*r/100,l+89.9*a/100,s+51.2*r/100,l+71.6*a/100,s+51.2*r/100,l+50*a/100),e.closePath(),i&&e.fill(),o&&e.stroke()}}]),u}(l.Z)},5207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="parallelogram",t.layer={},t.best_ratio=2,t.snap_line_info={x:null,y:null},t.coords=[[25,0],[100,0],[75,100],[0,100],[25,0]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),u}(l.Z)},3088:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="pentagon",t.layer={},t.best_ratio=1.051,t.snap_line_info={x:null,y:null},t.coords=[[100.40599536364314,38.90073974812779],[81.15261837150108,98.1565411518722],[18.84738162849893,98.1565411518722],[-.40599536364314304,38.90073974812779],[49.99999999999999,2.2786404499999975],[100.40599536364314,38.900739748127776],[100.40599536364314,38.90073974812779]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i){for(var o in e.lineJoin="round",e.beginPath(),e.scale(1,1.051),i)if(null!==i[o]){var s=t+i[o][0]*r/100,l=n+i[o][1]*a/100;"0"==o?e.moveTo(s,l):e.lineTo(s,l)}else e.closePath(),e.fill(),e.stroke(),e.beginPath();e.closePath(),e.fill(),e.stroke()}}]),u}(l.Z)},3417:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699),u=n(1748);const d=function(e){(0,i.Z)(d,e);var t,n,l=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function d(e){var t;return(0,r.Z)(this,d),(t=l.call(this)).Base_layers=new c.Z,t.Helper=new u.Z,t.ctx=e,t.name="plus",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.coords=[[35,0],[65,0],[65,35],[100,35],[100,65],[65,65],[65,100],[35,100],[35,65],[0,65],[0,35],[35,35],[35,0]],t}return(0,a.Z)(d,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),d}(l.Z)},5446:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1748);const p=function(e){(0,i.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function p(e){var t;return(0,r.Z)(this,p),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new h.Z,t.ctx=e,t.name="polygon",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.params_hash=!1,t.selected_obj_positions={},t.mouse_lock=null,t.selected_object_drag_type=null,t.old_data=null,t.events(),t}return(0,a.Z)(p,[{key:"load",value:function(){var e=this;this.default_events(),document.addEventListener("keydown",(function(t){var n=t.code;c.Z.TOOL.name==e.name&&"Escape"==n&&(c.Z.layer.status=null)}))}},{key:"events",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.selected_object_actions(t)})),document.addEventListener("mousemove",(function(t){e.selected_object_actions(t)})),document.addEventListener("mouseup",(function(t){e.selected_object_actions(t)})),document.addEventListener("touchstart",(function(t){e.selected_object_actions(t)})),document.addEventListener("touchmove",(function(t){e.selected_object_actions(t)}),{passive:!1}),document.addEventListener("touchend",(function(t){e.selected_object_actions(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=this.get_params_hash(),r=t.x,a=t.y,i=this.calc_snap_position(e,r,a);null!=i&&(null!=i.x&&(r=i.x),null!=i.y&&(a=i.y)),c.Z.layer.type!=this.name||n!=this.params_hash||null!=c.Z.layer.data&&"draft"!=c.Z.layer.status?(this.layer={type:this.name,data:[{x:r,y:a}],params:this.clone(this.getParams()),render_function:[this.name,"render"],x:0,y:0,width:null,height:null,hide_selection_if_active:!0,rotate:null,is_vector:!0,color:c.Z.COLOR,status:"draft"},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_polygon_layer","New Polygon Layer",[new l.Z.Actions.Insert_layer_action(this.layer)])),this.params_hash=n):c.Z.layer.data.push({x:r,y:a}),this.Base_layers.render()}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=Math.round(t.x),r=Math.round(t.y);if(0!=t.click_valid&&0!=t.is_drag){var a=this.calc_snap_position(e,n,r,c.Z.layer.id);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),c.Z.layer.data[c.Z.layer.data.length-1]={x:n,y:r},this.Base_layers.render()}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=Math.round(t.x),r=Math.round(t.y),a=this.calc_snap_position(e,n,r,c.Z.layer.id);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),this.snap_line_info={x:null,y:null},c.Z.layer.data[c.Z.layer.data.length-1]={x:n,y:r},this.Base_layers.render()}}},{key:"render_overlay",value:function(e){if(e=this.Base_layers.ctx,this.render_overlay_parent(e),"select"==c.Z.TOOL.name&&c.Z.layer.type==this.name){var t=c.Z.layer.data;for(var n in this.selected_obj_positions={},t){var r=t[n];this.selected_obj_positions[n]=this.Helper.draw_control_point(this.ctx,c.Z.layer.x+r.x,c.Z.layer.y+r.y)}}}},{key:"select",value:function(e){this.render_overlay(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2;var i=[{x:0,y:0},{x:r,y:0},{x:1.1*r,y:2*a/3},{x:r/2,y:a/3},{x:-1*r*.2,y:a}];e.save(),e.translate(t+r/2,n+a/2),this.draw_polygon(e,-r/2,-a/2,r,a,i),e.restore()}},{key:"render",value:function(e,t){var n=t.params;e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_polygon(e,-t.width/2,-t.height/2,t.width,t.height,t.data),e.restore()}},{key:"draw_polygon",value:function(e,t,n,r,a,i){if(0!=i.length){for(var o in e.beginPath(),i)0==o?e.moveTo(t+i[o].x,n+i[o].y):e.lineTo(t+i[o].x,n+i[o].y);e.closePath(),e.fill(),e.stroke()}}},{key:"selected_object_actions",value:function(e){if("select"==c.Z.TOOL.name&&c.Z.layer.type==this.name){this.Base_layers.ctx;var t=this.get_mouse_info(e),n=document.getElementById("main_wrapper"),r=e.type;if("touchstart"==r&&(r="mousedown"),"touchmove"==r&&(r="mousemove"),"touchend"==r&&(r="mouseup"),"mouseup"==r&&(c.Z.mouse_lock=null,"default"!=n.style.cursor&&(n.style.cursor="default")),"mousedown"!=r||0!=c.Z.mouse.valid)if("mousemove"==r&&"move_point"==this.mouse_lock&&t.is_drag){if(n.style.cursor="move",1==e.buttons||void 0===e.buttons){var a=this.selected_object_drag_type,i=c.Z.layer.data,o=Math.round(t.x-t.click_x)-c.Z.layer.x,s=Math.round(t.y-t.click_y)-c.Z.layer.y;c.Z.layer.data[a]={x:t.click_x+o,y:t.click_y+s},c.Z.need_render=!0}}else if("mouseup"==r&&"move_point"==this.mouse_lock&&(this.mouse_lock=null,i=c.Z.layer.data,c.Z.layer.data=this.old_data,l.Z.State.do_action(new l.Z.Actions.Bundle_action("change_layer_details","Change Layer Details",[new l.Z.Actions.Update_layer_action(c.Z.layer.id,{data:i})])),c.Z.need_render=!0),(t.is_drag||!["mousedown","mouseup"].includes(r))&&!this.mouse_lock)for(var u in this.selected_obj_positions){var d=this.selected_obj_positions[u];d&&this.ctx.isPointInPath(d,t.x,t.y)&&("mousedown"==r&&(1!=e.buttons&&void 0!==e.buttons||(this.mouse_lock="move_point",this.selected_object_drag_type=u),c.Z.mouse_lock=!0,this.old_data=JSON.parse(JSON.stringify(c.Z.layer.data))),"mousemove"==r&&(n.style.cursor="move"))}}}}]),p}(u.Z)},5824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699);const h=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.ctx=e,t.name="rectangle",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.mouse_click={x:null,y:null},t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=t.x,r=t.y,a=this.calc_snap_position(e,n,r);null!=a&&(null!=a.x&&(n=a.x),null!=a.y&&(r=a.y)),this.mouse_click.x=n,this.mouse_click.y=r,this.layer={type:this.name,params:this.clone(this.getParams()),status:"draft",render_function:[this.name,"render"],x:Math.round(n),y:Math.round(r),color:null,is_vector:!0},l.Z.State.do_action(new l.Z.Actions.Bundle_action("new_rectangle_layer","New Rectangle Layer",[new l.Z.Actions.Insert_layer_action(this.layer)]))}}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();if(0!=t.is_drag&&0!=t.click_valid){var r=Math.round(t.x),a=Math.round(t.y),i=Math.round(this.mouse_click.x),o=Math.round(this.mouse_click.y),s=this.calc_snap_position(e,r,a,c.Z.layer.id);null!=s&&(null!=s.x&&(r=s.x),null!=s.y&&(a=s.y));var l=Math.min(r,i),u=Math.min(a,o),d=Math.abs(r-i),h=Math.abs(a-o);(1==n.square||1==e.ctrlKey||e.metaKey)&&(d1&&a>1?.5:0;l<2&&(o=!0),i={tl:i,tr:i,br:i,bl:i},e.beginPath(),e.moveTo(t+i.tl+u,n+u),e.lineTo(t+r-i.tr-u,n+u),e.quadraticCurveTo(t+r-u,n+u,t+r-u,n+i.tr+u),e.lineTo(t+r-u,n+a-i.br-u),e.quadraticCurveTo(t+r-u,n+a-u,t+r-i.br-u,n+a-u),e.lineTo(t+i.bl+u,n+a-u),e.quadraticCurveTo(t+u,n+a-u,t+u,n+a-i.bl-u),e.lineTo(t+u,n+i.tl+u),e.quadraticCurveTo(t+u,n+u,t+i.tl+u,n+u),e.closePath(),o&&e.fill(),s&&e.stroke()}}]),h}(u.Z)},1814:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="right_triangle",t.layer={},t.best_ratio=1,t.snap_line_info={x:null,y:null},t.coords=[[0,0],[100,100],[0,100],[0,0]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),u}(l.Z)},3980:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="romb",t.layer={},t.best_ratio=.8,t.snap_line_info={x:null,y:null},t.coords_demo=[[50,0],[80,50],[50,100],[20,50],[50,0]],t.coords=[[50,0],[100,50],[50,100],[0,50],[50,0]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords_demo)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),u}(l.Z)},8585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="star",t.layer={},t.best_ratio=1,t.coords=[],t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"generate_coords",value:function(e,t){t=parseInt(t)/2,t=Math.min(Math.max(t,0),100),e=parseInt(e);var n=50;5==(e=Math.max(e,3))&&(n=53);var r=50;5==e&&(r=55);var a=Math.PI/2*3,i=50,o=r,s=Math.PI/e;this.coords=[],this.coords.push([50,r-n]);for(var l=0;l{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(5071),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="tear",t.layer={},t.best_ratio=.7,t.snap_line_info={x:null,y:null},t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){e.fillStyle="#aaa",e.strokeStyle="#555",e.lineWidth=2,t=(r+2*t-(r=a*this.best_ratio))/2,e.save(),e.translate(t+r/2,n+a/2),this.draw_shape(e,-r/2,-a/2,r,a,!0,!0),e.restore()}},{key:"render",value:function(e,t){var n=t.params;e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,n.fill,n.border),e.restore()}},{key:"draw_shape",value:function(e,t,n,r,a,i,o){var s=parseInt(t),l=parseInt(n);e.beginPath(),e.moveTo(s+.5*r,l),e.quadraticCurveTo(s+.5*r,l+13*a/100,s+.72*r,l+.29*a),e.bezierCurveTo(s+120*r/100,l+58*a/100,s+100*r/100,l+100*a/100,s+.5*r,l+a),e.bezierCurveTo(s+0*r/100,l+100*a/100,s+-20*r/100,l+58*a/100,s+.28*r,l+.29*a),e.quadraticCurveTo(s+.5*r,l+13*a/100,s+.5*r,l),e.closePath(),i&&e.fill(),o&&e.stroke()}}]),u}(l.Z)},464:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="trapezoid",t.layer={},t.best_ratio=2,t.snap_line_info={x:null,y:null},t.coords=[[20,0],[80,0],[100,100],[0,100],[20,0]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),u}(l.Z)},1902:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=(n(8562),n(9314),n(5071)),c=n(699);const u=function(e){(0,i.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function u(e){var t;return(0,r.Z)(this,u),(t=l.call(this)).Base_layers=new c.Z,t.ctx=e,t.name="triangle",t.layer={},t.best_ratio=2/Math.sqrt(3),t.snap_line_info={x:null,y:null},t.coords=[[50,0],[100,100],[0,100],[50,0]],t}return(0,a.Z)(u,[{key:"load",value:function(){this.default_events()}},{key:"mousedown",value:function(e){this.shape_mousedown(e)}},{key:"mousemove",value:function(e){this.shape_mousemove(e)}},{key:"mouseup",value:function(e){this.shape_mouseup(e)}},{key:"render_overlay",value:function(e){e=this.Base_layers.ctx,this.render_overlay_parent(e)}},{key:"demo",value:function(e,t,n,r,a){this.draw_shape(e,t,n,r,a,this.coords)}},{key:"render",value:function(e,t){var n=t.params;n.fill,e.save(),e.strokeStyle="transparent",e.fillStyle="transparent",n.border&&(e.strokeStyle=n.border_color),n.fill&&(e.fillStyle=n.fill_color),e.lineWidth=n.border_size,e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(t.rotate*Math.PI/180),this.draw_shape(e,-t.width/2,-t.height/2,t.width,t.height,this.coords,!1),e.restore()}}]),u}(l.Z)},3038:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5671),a=n(3144),i=n(136),o=n(2963),s=n(1120),l=n(8562),c=n(9314),u=n(5071),d=n(699),h=n(1606),p=n.n(h),f=n(896),m=n(1748);const g=function(e){(0,i.Z)(h,e);var t,n,u=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var a=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,o.Z)(this,e)});function h(e){var t;return(0,r.Z)(this,h),(t=u.call(this)).Base_layers=new d.Z,t.Helper=new m.Z,t.ctx=e,t.name="sharpen",t.tmpCanvas=null,t.tmpCanvasCtx=null,t.started=!1,t}return(0,a.Z)(h,[{key:"load",value:function(){this.default_events()}},{key:"default_dragMove",value:function(e){if(c.Z.TOOL.name==this.name){this.mousemove(e);var t=this.get_mouse_info(e),n=this.getParams();this.show_mouse_cursor(t.x,t.y,n.size,"circle")}}},{key:"mousedown",value:function(e){this.started=!1;var t=this.get_mouse_info(e),n=this.getParams();0!=t.click_valid&&("image"==c.Z.layer.type?c.Z.layer.rotate?p().error("Erase on rotate object is disabled. Sorry."):(this.started=!0,this.tmpCanvas=document.createElement("canvas"),this.tmpCanvasCtx=this.tmpCanvas.getContext("2d"),this.tmpCanvas.width=c.Z.layer.width_original,this.tmpCanvas.height=c.Z.layer.height_original,this.tmpCanvasCtx.drawImage(c.Z.layer.link,0,0),this.sharpen_general("click",t,n.size),c.Z.layer.link_canvas=this.tmpCanvas,c.Z.need_render=!0):p().error("This layer must contain an image. Please convert it to raster to apply this tool."))}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e),n=this.getParams();0!=t.is_drag&&0!=t.click_valid&&0!=this.started&&(this.sharpen_general("move",t,n.size),c.Z.need_render=!0)}},{key:"mouseup",value:function(e){0!=this.started&&(delete c.Z.layer.link_canvas,l.Z.State.do_action(new l.Z.Actions.Bundle_action("sharpen_tool","Sharpen Tool",[new l.Z.Actions.Update_layer_image_action(this.tmpCanvas)])),this.tmpCanvas.width=1,this.tmpCanvas.height=1,this.tmpCanvas=null,this.tmpCanvasCtx=null)}},{key:"sharpen_general",value:function(e,t,n){var r=this.tmpCanvasCtx,a=Math.round(t.x)-c.Z.layer.x,i=Math.round(t.y)-c.Z.layer.y;a=this.adaptSize(a,"width"),i=this.adaptSize(i,"height");var o=this.adaptSize(n,"width"),s=this.adaptSize(n,"height"),l=a-Math.round(o/2),u=i-Math.round(s/2);a=Math.round(a),i=Math.round(i),l=Math.round(l),u=Math.round(u);var d=.5;"move"==e&&(d/=10);var h=r.getImageData(l,u,o,s),p=f.Z.Sharpen(h,d);this.Helper.image_round(this.tmpCanvasCtx,a,i,o,s,p)}}]),h}(u.Z)},312:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>z,metaDefaults:()=>k});var r=n(136),a=n(2963),i=n(1120),o=n(2982),s=n(885),l=n(5671),c=n(3144),u=n(8562),d=n(9314),h=(n(1927),n(5071)),p=n(3991),f=n(699),m=n(4182),g=n(1748),A=n(7477),v=n(5933),y=n.n(v),_=n(1606),b=n.n(_),C=n(9755);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;s-=4)if(0!==n[s+3]){i=Math.floor(s/4/this.width);break}return T.width=10,T.height=10,{top:a,bottom:i,height:i-a}}},{key:"get_kerning_offset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.kerningMap.get(e);return null==n&&(R.font=" "+(t.italic?"italic":"")+" "+(t.bold?"bold":"")+" "+this.size+"px "+this.family,n=R.measureText(e).width-(R.measureText(e[0]).width+R.measureText(e[1]).width),this.kerningMap.set(e,n)),n}}]),e}(),D=function(){function e(){(0,l.Z)(this,e),this.lines=[],this.on_change=null,this.queuedMetaChanges=null}return(0,c.Z)(e,[{key:"get_line_count",value:function(){return this.lines.length}},{key:"get_line_character_count",value:function(e){return this.get_line_text(e).length}},{key:"get_line_text",value:function(e){for(var t="",n=0;n0){if(n)return{line:e,character:t};i=!0,r-=1}var o=this.get_line_text(r);i&&(t=o.length);var s=o.slice(0,t);if(n&&" "===s[s.length-1])return{line:e,character:t};for(var l=-1;l>=-s.length;l--)if(" "===s[l+s.length-1]){a=t+l;break}return a===t&&(a=0),{line:r,character:a}}},{key:"is_same_span_meta",value:function(e,t){var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var a=0;a=o&&t<=o+c.text.length){var u=c.text.slice(0,t-o),d=c.text.slice(t-o);u.length>0&&i.push({text:u,meta:JSON.parse(JSON.stringify(c.meta))});var h=JSON.parse(JSON.stringify(c.meta));for(var p in n)h[p]=n[p];a={text:"",meta:h},i.push(a),d.length>0&&i.push({text:d,meta:JSON.parse(JSON.stringify(c.meta))}),s=!0}else i.push(c);o+=c.text.length}}catch(e){l.e(e)}finally{l.f()}return this.lines[e]=i,a}},{key:"insert_text",value:function(e,t,n){this.queuedMetaChanges&&(this.insert_empty_span(t,n,this.queuedMetaChanges),this.queuedMetaChanges=null);for(var r=this.lines[t],a=e.includes("\n"),i=0,o=null,s=[],l=[],c=t,u=n,d=0;di||0===n)&&n<=i+p){var f=n-i;if((o=r[d+1]&&""===r[d+1].text?r[d+1]:h).text=o.text.slice(0,f)+e+o.text.slice(f),!a){u=i+f+e.length;break}}else a&&(o?l.push(h):s.push(h));i+=p}if(a&&o){for(var m=[],g=o.text.split("\n"),A=0;A0?this.lines.splice(t+v+1,0,l):this.lines.splice(t+v+1,0,[m[v]].concat(l)),c=t+v+1,u=e.length-1-e.lastIndexOf("\n")):this.lines.splice(t+v+1,0,[m[v]])}return this.on_change&&this.on_change(this.lines),{line:c,character:u}}},{key:"delete_range",value:function(e,t,n,r){e>=0||(e=0),t>=0||(t=0),ns||0===t)&&t<=s+h){l=d,c=Math.max(0,t-s);break}l||i.push(d),s+=h}s=0;for(var p=null,f=0,m=0;ms||0===r)&&r<=s+A?(p=g,f=Math.max(0,r-s)):p&&o.push(g),s+=A}if(this.lines[e]=[].concat(i),l===p||this.is_same_span_meta(l.meta,p.meta)){var v={meta:l.meta,text:l.text.slice(0,c)+p.text.slice(f)};(v.text||0===i.length&&0===o.length)&&this.lines[e].push(v)}else{var y=[],_=!1,b=!1;if(l&&(l.text=l.text.slice(0,c),l.text&&(y.push(l),_=!0)),p&&(p.text=p.text.slice(f),(p.text||0===y.length)&&(y.push(p),b=!0)),_&&!b){var C=o[0];C&&this.is_same_span_meta(l.meta,C.meta)&&(o.shift(),l.text+=C.text)}else if(b&&!_){var w=i[i.length-1];w&&this.is_same_span_meta(w.meta,p.meta)&&(i.pop(),w.text+=p.text)}else if(0===y.length){var x=i[i.length-1],k=o[0];x&&k&&this.is_same_span_meta(x.meta,k.meta)&&(o.shift(),x.text+=k.text)}this.lines[e]=this.lines[e].concat(y)}return this.lines[e]=this.lines[e].concat(o),this.lines.splice(e+1,n-e),this.on_change&&this.on_change(this.lines),{line:e,character:t}}},{key:"delete_character",value:function(e,t,n){var r=t,a=n;return e?n0?--n:t>0&&(--t,n=this.get_line_character_count(t)),this.delete_range(t,n,r,a)}},{key:"get_meta_range",value:function(e,t,n,r){e>=0||(e=0),t>=0||(t=0),n=d&&td&&t<=d+m.text.length||0===t&&0===d)&&(l=!0,h=m),c===n&&l&&(!i&&r<=d+m.text.length||i&&r=0||(e=0),t>=0||(t=0),nu&&tu&&r1&&(r.splice(a,1),a--)}}}}]),e}(),L=function(){function e(t){(0,l.Z)(this,e),this.editor=t,this.isVisible=!1,this.isCursorVisible=!1,this.isActiveSideEnd=!0,this.isBlinkVisible=!0,this.blinkInterval=500,this.start={line:0,character:0},this.end={line:0,character:0},this.set_position(0,0)}return(0,c.Z)(e,[{key:"is_empty",value:function(){return 0===this.compare_position(this.start.line,this.start.character,this.end.line,this.end.character)}},{key:"compare_position",value:function(e,t,n,r){return en?1:tr?1:0}},{key:"set_position",value:function(e,t,n){null==e&&(e=this.end.line),null==t&&(t=this.end.character),e>=0||(e=0),t>=0||(t=0);var r=this.editor.document.get_line_count();e0){this.isActiveSideEnd=!this.isActiveSideEnd;var i={line:this.start.line,character:this.start.character};this.start.line=this.end.line,this.start.character=this.end.character,this.end.line=i.line,this.end.character=i.character}}else this.isActiveSideEnd=!0,this.start.line=this.end.line=e,this.start.character=this.end.character=t;this.isBlinkVisible=!0,this.isVisible&&this.start_blinking()}},{key:"get_position",value:function(){return this.isActiveSideEnd?{character:this.end.character,line:this.end.line}:{character:this.start.character,line:this.start.line}}},{key:"get_text",value:function(){for(var e=this.compare_position(this.start.line,this.start.character,this.end.line,this.end.character),t=1===e?this.end.line:this.start.line,n=1===e?this.start.line:this.end.line,r=1===e?this.end.character:this.start.character,a=1===e?this.start.character:this.end.character,i=[],o=t;o<=n;o++)o===t&&o===n?i.push(this.editor.document.get_line_text(o).slice(r,a)):o===t?i.push(this.editor.document.get_line_text(o).slice(r)):o===n?i.push(this.editor.document.get_line_text(o).slice(0,a)):i.push(this.editor.document.get_line_text(o));return i.join("\n")}},{key:"set_visible",value:function(e){this.isVisible!=e&&(this.isVisible=e)}},{key:"set_cursor_visible",value:function(e){this.isCursorVisible!=e&&(this.isCursorVisible=e,this.isCursorVisible?(this.isBlinkVisible=!0,this.start_blinking()):this.stop_blinking())}},{key:"start_blinking",value:function(){clearInterval(this.blinkIntervalHandle),this.blinkIntervalHandle=setInterval(this.blink.bind(this),this.blinkInterval)}},{key:"stop_blinking",value:function(){clearInterval(this.blinkIntervalHandle)}},{key:"blink",value:function(){this.isBlinkVisible=!this.isBlinkVisible,Math.min(this.start.line,this.end.line),Math.max(this.start.line,this.end.line)}},{key:"move_line_previous",value:function(e,t){e=null==e?1:e;var n=this.get_position();this.set_position(n.line-e,null,t)}},{key:"move_line_next",value:function(e,t){e=null==e?1:e;var n=this.get_position();this.set_position(n.line+e,null,t)}},{key:"move_line_start",value:function(e){var t=this.get_position();this.set_position(t.line,0,e)}},{key:"move_line_end",value:function(e){var t=this.get_position();this.set_position(t.line,this.editor.document.get_line_character_count(t.line),e)}},{key:"move_character_previous",value:function(e,t){e=null==e?1:e;var n=this.get_position();n.character-e<0?n.line>0&&this.set_position(n.line-1,this.editor.document.get_line_character_count(n.line-1),t):this.set_position(n.line,n.character-e,t)}},{key:"move_character_next",value:function(e,t){e=null==e?1:e;var n=this.get_position(),r=this.editor.document.get_line_character_count(n.line);n.character+e>r?n.line+1-1)break}}catch(e){f.e(e)}finally{f.f()}-1===r&&(r=this.lineRenderInfo.lines.length-1,h=-1);var _=this.lineRenderInfo.lines[r].wraps;-1===h&&(h=_.length-1);for(var b=0,C=0;Cd&&![" ","-"].includes(b)){for(var P=-1,D=y;D>=0;D--){var L=v[D],M=D===y?L.text.substring(0,T):L.text;P=M.lastIndexOf(" ");var O=M.lastIndexOf("-");if(O>P&&(P=O),P>-1)break}var z=[],j=[];if(P>-1){z=v.slice(0,D),j=v.slice(D+1);var H=v[D].text.substring(0,P+1),N=v[D].text.substring(P+1);H.length>0&&z.push({text:H,meta:v[D].meta}),N.length>0&&j.unshift({text:N,meta:v[D].meta})}else{if("word"===t.params.wrap){g.push(m);break}0===y&&0===T&&(T++,g.push(m)),z=v.slice(0,y),j=v.slice(y+1);var G=v[y].text.substring(0,T),U=v[y].text.substring(T);G.length>0&&z.push({text:G,meta:v[y].meta}),U.length>0&&j.unshift({text:U,meta:v[y].meta})}var F=g[g.length-1];F>u&&(u=F);var W={characterOffsets:g,spans:z};W.characterOffsets=W.characterOffsets.slice(0,this.get_wrap_text(W).length+1),A.push(W),v=j,m=0,g=[0],y=-1;break}g.push(m)}}if(v.length>0){var V=g[g.length-1];V>u&&(u=V),A.push({characterOffsets:g,spans:v})}h.lines.push({firstWrapIndex:0,wraps:A})}}catch(e){p.e(e)}finally{p.f()}if(c&&"left"!==s||!c&&"top"!==l){var Y,q="dynamic"===a?u:c?t.width:t.height,Q=w(h.lines);try{for(Q.s();!(Y=Q.n()).done;){var K,X=w(Y.value.wraps);try{for(X.s();!(K=X.n()).done;){var J=K.value,$=c&&"center"==s||!c&&"middle"===l,ee=J.spans[J.spans.length-1],te=J.characterOffsets[J.characterOffsets.length-1-(" "===ee.text[ee.text.length-1]?1:0)],ne=($?q/2:q)-($?te/2:te);if(ne>0)for(var re=0;repe&&(pe=_e),be>fe&&(fe=be)}}catch(e){me.e(e)}finally{me.f()}var Ce=pe+fe;h.wrapSizes.push({size:Ce,offset:ie,baseline:pe}),ie+=Ce,oe++}}catch(e){ue.e(e)}finally{ue.f()}}}catch(e){se.e(e)}finally{se.f()}n=ie,this.lastCalculatedLayerWidth=t.width,this.lastCalculatedLayerHeight=t.height,this.textBoundaryWidth=Math.max(1,Math.round(c?u:n)),this.textBoundaryHeight=Math.max(1,Math.round(c?n:u)),this.lineRenderInfo=h}},{key:"render",value:function(e,t){var n=this;if(!d.Z.need_render_changed_params&&!this.hasValueChanged&&t.width==this.lastCalculatedLayerWidth&&t.height==this.lastCalculatedLayerHeight&&this.textBoundaryWidth&&this.textBoundaryHeight||this.calculate_text_placement(e,t),this.lineRenderInfo){try{var r=this.selection.is_empty();e.textAlign="left",e.textBaseline="alphabetic";var a=t.params.boundary,i=t.y+1,o=t.x+1,l=t.params.text_direction,c=(t.params.wrap_direction,["ltr","rtl"].includes(l)),u=(["rtl","btt"].includes(l),this.lineRenderInfo.wrapSizes),h=0,p=0,f=this.selection.isActiveSideEnd?this.selection.end.line:this.selection.start.line,m=this.selection.isActiveSideEnd?this.selection.end.character:this.selection.start.character;if(t.rotate){var g=t.rotate*Math.PI/180;e.save(),e.translate(t.x+t.width/2,t.y+t.height/2),e.rotate(g),e.translate(-t.x-t.width/2,-t.y-t.height/2)}var A,v=w(this.lineRenderInfo.lines);try{for(v.s();!(A=v.n()).done;){var y,_=A.value,b=0,C=w(_.wraps.entries());try{for(C.s();!(y=C.n()).done;){var x,B=(0,s.Z)(y.value,2),S=B[0],Z=B[1],T=null,R=null,P=null,D=0,L=Z.characterOffsets,M=w(Z.spans.entries());try{for(M.s();!(x=M.n()).done;){var O=(0,s.Z)(x.value,2),z=O[0],j=O[1],H=null!=j.meta.kerning?j.meta.kerning:k.kerning,N=null!=j.meta.bold?j.meta.bold:k.bold,G=null!=j.meta.italic?j.meta.italic:k.italic,U=null!=j.meta.underline?j.meta.underline:k.underline,F=null!=j.meta.strikethrough?j.meta.strikethrough:k.strikethrough,W=j.meta.family||k.family;!0!==I.get(W)&&E({family:W,variants:d.Z.user_fonts[W]?d.Z.user_fonts[W].variants:void 0},(function(){n.hasValueChanged=!0,n.Base_layers.render()}));var V=void 0;(U||F)&&(V=this.get_span_font_metrics(j,!I.get(W))),e.font=" "+(G?"italic":"")+" "+(N?"bold":"")+" "+Math.round(j.meta.size||k.size)+"px "+W;var Y=j.meta.fill_color||k.fill_color,q=void 0;Y.startsWith("#")&&(q=Y);var Q=null!=j.meta.stroke_size?j.meta.stroke_size:k.stroke_size,K=void 0;if(Q){var X=j.meta.stroke_color||k.stroke_color;X.startsWith("#")&&(K=X),e.lineWidth=Q}else e.lineWidth=0;for(var J=0;Jh||this.selection.end.character>b)||this.selection.end.line===h&&this.selection.end.character>b&&(this.selection.start.lineh),f===h&&(m===b?(T=(c?re:ee)-.5,R=(c?ee:re)-.5,P=c?ne:te):m===b+1&&S===_.wraps.length-1&&z===Z.spans.length-1&&J===j.text.length-1&&(T=(c?re+te:ee)-.5,R=(c?ee:re+ne)-.5,P=c?ne:te))),se&&this.editingCtx===e){var le=c?re:ee,ce=c?ee:re,ue=c?te:ne,de=c?ne:te;e.fillStyle=this.selectionBackgroundColor+"22",e.fillRect(le,ce,ue,de),e.strokeStyle=this.selectionBackgroundColor,e.lineWidth=.75,e.strokeRect(le,ce,ue,de),e.lineWidth=Q}e.fillStyle=q,e.strokeStyle=K,e.fillText($,ie,oe),Q&&(e.lineWidth=Q,e.strokeText($,ie,oe)),F&&(e.fillStyle=q,e.lineWidth=Math.max(1,V.height/20),e.fillRect(ie-.25-H,oe-.28*V.height,te+.5,e.lineWidth)),U&&(e.fillStyle=q,e.lineWidth=Math.max(1,V.height/20),e.fillRect(ie-.25-H,oe+e.lineWidth,te+.5,e.lineWidth)),D++,b++}if(0===j.text.length&&f===h&&m===b){var he=Math.round(i+u[p].offset),pe=o+L[0]+(0===h?"dynamic"===a?5:2:0),fe=Math.round(u[p].size);T=(c?pe:he)-.5,R=(c?he:pe)-.5,P=c?fe:3}}}catch(e){M.e(e)}finally{M.f()}this.selection.isCursorVisible&&T&&this.editingCtx==e&&(e.lineCap="butt",e.strokeStyle="#55555577",e.lineWidth=3,e.beginPath(),e.moveTo(T,R+1),e.lineTo(T,R+P-1),P>14&&(e.moveTo(T-3,R+2),e.lineTo(T+3,R+2),e.moveTo(T-3,R+P-2),e.lineTo(T+3,R+P-2)),e.stroke(),e.strokeStyle="#ffffffff",e.lineWidth=1,e.beginPath(),e.moveTo(T,R+2),e.lineTo(T,R+P-2),P>14&&(e.moveTo(T-2,R+2),e.lineTo(T+2,R+2),e.moveTo(T-2,R+P-2),e.lineTo(T+2,R+P-2)),e.stroke()),p++}}catch(e){C.e(e)}finally{C.f()}h++}}catch(e){v.e(e)}finally{v.f()}t.rotate&&e.restore()}catch(e){console.warn(e)}this.hasValueChanged=!1}}}]),e}(),O=function(){function e(){(0,l.Z)(this,e),this.POP=new A.Z,this.GUI_tools=new m.Z,this.popup=null,this.fontsPerPage=8,this.dialogContentNode=null,this.fontListNode=null,this.fontList=[],this.fontListFiltered=[],this.selectedFonts={},this.searchTimeoutHandle=null}return(0,c.Z)(e,[{key:"render_font_list",value:function(e){var t=this;e=e||1;for(var n=Math.ceil(this.fontListFiltered.length/8),r=(e-1)*this.fontsPerPage,a='
    ',i=r;i\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t")}if(a+='\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t"),this.fontListNode.innerHTML=a,this.fontsPerPage>3&&this.dialogContentNode.scrollHeight>this.dialogContentNode.clientHeight)return this.fontsPerPage--,void this.render_font_list(e);this.fontListNode.querySelectorAll('input[type="checkbox"]').forEach((function(e){e.addEventListener("change",(function(n){e.checked?t.selectedFonts[e.value]=t.fontListFiltered.slice(r,r+t.fontsPerPage).filter((function(t){return t.family===e.value}))[0]:delete t.selectedFonts[e.value]}))})),this.fontListNode.querySelector(".pagination").addEventListener("click",(function(e){var n=parseInt(e.target.getAttribute("data-page"),10);t.render_font_list(n)}))}},{key:"show",value:function(){var e=this;this.POP.show({title:"Search for Font",params:[{name:"query",title:"Search:",value:"",prevent_submission:!0}],on_load:function(t,n){e.popup=n;var r=document.createElement("div");e.dialogContentNode=n.el.querySelector(".dialog_content"),e.dialogContentNode.appendChild(r),e.fontListNode=r,n.el.querySelector("#pop_data_query").addEventListener("input",(function(t){var n=(t.target.value||"").toLowerCase();n?(clearTimeout(e.searchTimeoutHandle),e.searchTimeoutHandle=setTimeout((function(){e.fontListFiltered=[];for(var t=0;t0){var t=null;for(var n in e.selectedFonts)t||(t=n),d.Z.user_fonts[n]=e.selectedFonts[n];u.Z.GUI.GUI_tools.action_data().attributes.font.value=t,u.Z.GUI.GUI_tools.show_action_attributes();try{var r=new Event("change");document.querySelector("#action_attributes select#font").dispatchEvent(r)}catch(e){console.warn("Application markup may have changed, ",e)}}}})}}]),e}();const z=function(e){(0,r.Z)(s,e);var t,n,o=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,i.Z)(t);if(n){var o=(0,i.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,a.Z)(this,e)});function s(e){var t;if((0,l.Z)(this,s),(t=o.call(this)).Base_layers=new f.Z,t.GUI_tools=new m.Z,t.Helper=new g.Z,t.ctx=e,t.name="text",t.layer={},t.creating=!1,t.selecting=!1,t.resizing=!1,t.focused=!1,t.focusedValue=null,t.mousedownX=0,t.mousedownY=0,t.mousedownBounds={},t.is_fonts_loaded=!1,e){t.selection={x:null,y:null,width:null,height:null};var n={enable_background:!1,enable_borders:!0,enable_controls:!0,enable_rotation:!0,enable_move:!1,data_function:function(){return t.selection}};t.Base_selection=new p.Z(e,n,t.name),t.textarea=document.createElement("textarea"),t.textarea.id="text_tool_keyboard_input",t.textarea.setAttribute("autocorrect","off"),t.textarea.setAttribute("autocapitalize","off"),t.textarea.setAttribute("autocomplete","off"),t.textarea.setAttribute("spellcheck","false"),t.textarea.style="position: absolute; top: 0; left: 0; padding: 0; width: 1px; height: 1px; background: transparent; border: none; outline: none; color: transparent; opacity: 0.01; pointer-events: none;",document.body.appendChild(t.textarea),t.textarea.addEventListener("focus",(function(){t.focused=!0;var e=t.get_editor(t.layer);e&&(t.focusedValue=JSON.stringify(e.document.lines))}),!0),t.textarea.addEventListener("blur",(function(){t.focused=!1;var e=t.get_editor(t.layer);if(e){var n=JSON.stringify(e.document.lines);t.focusedValue!==n&&(t.layer.data=JSON.parse(t.focusedValue),u.Z.State.do_action(new u.Z.Actions.Update_layer_action(t.layer.id,{data:JSON.parse(n)})))}t.focusedValue=null,t.Base_layers.render()}),!0),t.textarea.addEventListener("input",(function(e){if(d.Z.layer){var n=t.get_editor(d.Z.layer);n.insert_text_at_current_position(e.target.value),e.target.value="",t.Base_layers.render(),t.extend_fixed_bounds(d.Z.layer,n)}}),!0),t.textarea.addEventListener("keydown",(function(e){if(d.Z.layer){var n=!0,r=t.get_editor(d.Z.layer);switch(e.key){case"Backspace":r.delete_character_at_current_position(!1);break;case"Delete":r.delete_character_at_current_position(!0);break;case"Home":r.selection.move_line_start(e.shiftKey);break;case"End":r.selection.move_line_end(e.shiftKey);break;case"Left":case"ArrowLeft":e.shiftKey||r.selection.is_empty()?e.ctrlKey?r.selection.move_word_previous(e.shiftKey):r.selection.move_character_previous(1,e.shiftKey):(r.selection.isActiveSideEnd=!1,r.selection.move_character_previous(0,!1));break;case"Right":case"ArrowRight":e.shiftKey||r.selection.is_empty()?e.ctrlKey?r.selection.move_word_next(e.shiftKey):r.selection.move_character_next(1,e.shiftKey):(r.selection.isActiveSideEnd=!0,r.selection.move_character_next(0,!1));break;case"Up":case"ArrowUp":r.selection.move_line_previous(1,e.shiftKey);break;case"Down":case"ArrowDown":r.selection.move_line_next(1,e.shiftKey);break;case"a":if(e.ctrlKey){r.selection.set_position(0,0);var a=r.document.lines.length-1;r.selection.set_position(a,r.document.get_line_character_count(a),!0);break}case"b":if(e.ctrlKey){e.preventDefault(),document.querySelector("#action_attributes #bold").click();break}case"c":if(e.ctrlKey){e.preventDefault(),t.textarea.value=r.selection.get_text(),t.textarea.select(),t.textarea.setSelectionRange(0,99999),document.execCommand("copy"),t.textarea.value="";break}case"i":if(e.ctrlKey){e.preventDefault(),document.querySelector("#action_attributes #italic").click();break}case"u":if(e.ctrlKey){e.preventDefault(),document.querySelector("#action_attributes #underline").click();break}case"x":if(e.ctrlKey){e.preventDefault(),t.textarea.value=r.selection.get_text(),t.textarea.select(),t.textarea.setSelectionRange(0,99999),document.execCommand("copy"),t.textarea.value="",r.delete_selection();break}default:n=!1}return n&&(t.update_tool_attributes(d.Z.layer,r),t.Base_layers.render()),t.extend_fixed_bounds(d.Z.layer,r),!n}}),!0)}return t}return(0,c.Z)(s,[{key:"dragStart",value:function(e){d.Z.TOOL.name==this.name&&this.mousedown(e)}},{key:"dragMove",value:function(e){d.Z.TOOL.name==this.name&&this.mousemove(e)}},{key:"dragEnd",value:function(e){d.Z.TOOL.name==this.name&&this.mouseup(e)}},{key:"load",value:function(){var e=this;document.addEventListener("mousedown",(function(t){e.dragStart(t)})),document.addEventListener("mousemove",(function(t){e.dragMove(t)})),document.addEventListener("mouseup",(function(t){e.dragEnd(t)})),document.addEventListener("dblclick",(function(t){e.doubleClick(t)})),document.addEventListener("touchstart",(function(t){e.dragStart(t)})),document.addEventListener("touchmove",(function(t){e.dragMove(t)})),document.addEventListener("touchend",(function(t){e.dragEnd(t)}))}},{key:"mousedown",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid)if(this.creating=!1,this.selecting=!1,this.resizing=!1,this.mousedownX=t.x,this.mousedownY=t.y,this.mousedownBounds={x:d.Z.layer.x,y:d.Z.layer.y,width:d.Z.layer.width,height:d.Z.layer.height,boundary:d.Z.layer.params.boundary},null===this.Base_selection.mouse_lock){var n=this.get_text_layer_at_mouse(e);if(n)this.selecting=!0,this.layer=n,this.get_editor(this.layer).trigger_cursor_start(this.layer,-1+t.x-this.layer.x,t.y-this.layer.y),u.Z.State.do_action(new u.Z.Actions.Bundle_action("select_text_layer","Select Text Layer",[new u.Z.Actions.Select_layer_action(n.id),new u.Z.Actions.Set_selection_action(this.layer.x,this.layer.y,this.layer.width,this.layer.height)]));else{this.creating=!0;var r={type:this.name,params:{boundary:"dynamic",kerning:"metrics",text_direction:"ltr",wrap_direction:"ttb",halign:"left",valign:"top",wrap:"letter"},render_function:[this.name,"render"],x:t.x,y:t.y,rotate:0,is_vector:!0};u.Z.State.do_action(new u.Z.Actions.Bundle_action("new_text_layer","New Text Layer",[new u.Z.Actions.Insert_layer_action(r),new u.Z.Actions.Set_selection_action(t.x,t.y,0,0)])),this.layer=d.Z.layer}}else this.resizing=!0}},{key:"mousemove",value:function(e){var t=this.get_mouse_info(e);if(0!=t.is_drag&&0!=t.click_valid){if(this.resizing)d.Z.layer.x=this.selection.x,d.Z.layer.y=this.selection.y,d.Z.layer.width=this.selection.width,d.Z.layer.height=this.selection.height,"dynamic"===d.Z.layer.params.boundary&&(d.Z.layer.params.boundary="box");else if(this.creating){var n=Math.abs(t.x-this.mousedownX),r=Math.abs(t.y-this.mousedownY);"dynamic"===d.Z.layer.params.boundary&&(d.Z.layer.params.boundary="box"),d.Z.layer.x=Math.min(t.x,this.mousedownX),d.Z.layer.y=Math.min(t.y,this.mousedownY),d.Z.layer.width=n,d.Z.layer.height=r}else this.get_editor(this.layer).trigger_cursor_move(this.layer,-1+t.x-this.layer.x,t.y-this.layer.y);this.Base_layers.render()}}},{key:"mouseup",value:function(e){var t=this.get_mouse_info(e);if(0!=t.click_valid){var n=this.get_editor(this.layer);if(this.resizing){d.Z.layer.x=this.mousedownBounds.x,d.Z.layer.y=this.mousedownBounds.y,d.Z.layer.width=this.mousedownBounds.width,d.Z.layer.height=this.mousedownBounds.height;var r=JSON.parse(JSON.stringify(d.Z.layer.params));r.boundary=d.Z.layer.params.boundary,d.Z.layer.params.boundary=this.mousedownBounds.boundary,u.Z.State.do_action(new u.Z.Actions.Bundle_action("resize_text_layer","Resize Text Layer",[new u.Z.Actions.Update_layer_action(d.Z.layer.id,{x:this.selection.x,y:this.selection.y,width:this.selection.width,height:this.selection.height,params:r}),new u.Z.Actions.Set_selection_action(this.selection.x,this.selection.y,this.selection.width,this.selection.height)]))}else if(this.creating){var a=Math.abs(t.x-this.mousedownX),i=Math.abs(t.y-this.mousedownY);0==a&&0==i&&(a=1,i=1),u.Z.State.do_action(new u.Z.Actions.Bundle_action("resize_text_layer","Resize Text Layer",[new u.Z.Actions.Update_layer_action(d.Z.layer.id,{x:Math.min(t.x,this.mousedownX),y:Math.min(t.y,this.mousedownY),width:a,height:i})]),{merge_with_history:"new_text_layer"}),this.textarea.focus()}else if(this.selecting)if(n.trigger_cursor_end(),this.textarea.focus(),n.selection.is_empty()&&n.document.queuedMetaChanges){var o={},s=n.document.get_meta_range(n.selection.start.line,n.selection.start.character,n.selection.end.line,n.selection.end.character);for(var l in s)o[l]=null!=n.document.queuedMetaChanges[l]?n.document.queuedMetaChanges[l]:s[l][0]}else n.document.queuedMetaChanges=null,this.update_tool_attributes(this.layer,n);this.extend_fixed_bounds(this.layer,n),this.Base_layers.render(),this.creating&&"dynamic"===d.Z.layer.params.boundary&&requestAnimationFrame((function(){u.Z.State.do_action(new u.Z.Actions.Update_layer_action(d.Z.layer.id,{x:d.Z.layer.x-d.Z.layer.width/2,y:d.Z.layer.y-d.Z.layer.height/2}),{merge_with_history:"new_text_layer"})})),this.resizing=!1,this.selecting=!1,this.creating=!1}}},{key:"doubleClick",value:function(e){if(document.activeElement===this.textarea){var t=this.get_editor(this.layer);if(t.selection.is_empty()){var n=t.selection.get_position(),r=t.document.get_word_start_position(n.line,n.character,!0),a=t.document.get_word_end_position(n.line,n.character,!0);t.selection.set_position(r.line,r.character),t.selection.set_position(a.line,a.character,!0),this.update_tool_attributes(this.layer,t)}}}},{key:"on_params_update",value:function(e){var t=this.get_editor(d.Z.layer),n=e.value,r={},a=void 0;switch(e.key){case"font":n.includes("...")?(a={new_values:{font:""}},(new O).show()):n&&(r.family=n);break;case"size":n&&(r.size=n);break;case"bold":r.bold=n;break;case"italic":r.italic=n;break;case"underline":r.underline=n;break;case"strikethrough":r.strikethrough=n;break;case"fill":n&&(r.fill_color=n);break;case"stroke":n&&(r.stroke_color=n);break;case"stroke_size":isNaN(n)||(r.stroke_size=n);break;case"kerning":isNaN(n)||(r.kerning=n);break;case"leading":isNaN(n)||(r.leading=n)}if(t.selection.is_empty())for(var i in t.document.queuedMetaChanges||(t.document.queuedMetaChanges={}),r)t.document.queuedMetaChanges[i]=r[i];else{t.document.queuedMetaChanges=null;var o=JSON.parse(JSON.stringify(t.document.lines));t.document.set_meta_range(t.selection.start.line,t.selection.start.character,t.selection.end.line,t.selection.end.character,r),t.hasValueChanged=!0,this.layer.data=o,u.Z.State.do_action(new u.Z.Actions.Update_layer_action(this.layer.id,{data:JSON.parse(JSON.stringify(t.document.lines))})),this.Base_layers.render()}return a}},{key:"update_tool_attributes",value:function(e,t){if(e&&e.params){var n=t.document.get_meta_range(t.selection.start.line,t.selection.start.character,t.selection.end.line,t.selection.end.character),r=this.GUI_tools.action_data().attributes;r.font.value=1===n.family.length?n.family[0]:"",r.size=1===n.size.length?n.size[0]:parseFloat(null),r.bold.value=!n.bold.includes(!1),r.italic.value=!n.italic.includes(!1),r.underline.value=!n.underline.includes(!1),r.strikethrough.value=!n.strikethrough.includes(!1),r.fill=1===n.fill_color.length?n.fill_color[0]:"#000000",r.stroke=1===n.stroke_color.length?n.stroke_color[0]:"#000000",r.stroke_size.value=1===n.stroke_size.length?n.stroke_size[0]:parseFloat(null),r.kerning.value=1===n.kerning.length?n.kerning[0]:parseFloat(null),r.leading.value=1===n.leading.length?n.leading[0]:parseFloat(null),this.GUI_tools.show_action_attributes()}}},{key:"resize_to_dynamic_bounds",value:function(e,t){if(e&&e.params&&"dynamic"===e.params.boundary){var n=Math.max(9,t.textBoundaryWidth+1),r=Math.max(9,t.textBoundaryHeight+1);d.Z.layer.width=n,d.Z.layer.height=r}}},{key:"extend_fixed_bounds",value:function(e,t){if(e&&e.params&&"dynamic"!==e.params.boundary){var n=["ltr","rtl"].includes(e.params.textDirection),r=e.width,a=e.height;n?r=Math.max(t.textBoundaryWidth+1,r):a=Math.max(t.textBoundaryHeight+1,a),d.Z.layer.width=r,d.Z.layer.height=a}}},{key:"render",value:function(e,t){if(0!=t.width||0!=t.height){t.params;var n=t===d.Z.layer&&"text"===d.Z.TOOL.name,r=this.get_editor(t);r.selection.set_visible(n),r.selection.set_cursor_visible(n&&(this.selecting||this.focused)),r.render(e,t),t===d.Z.layer&&this.resize_to_dynamic_bounds(t,r),!this.resizing&&n?(this.selection.x=t.x,this.selection.y=t.y,this.selection.width=t.width,this.selection.height=t.height,this.selection.rotate=t.rotate):"text"!==d.Z.layer.type&&(this.selection.x=-1e5,this.selection.y=-1e5,this.selection.width=0,this.selection.height=0)}}},{key:"get_editor",value:function(e){var t=S.get(e);if(!t){if(t=new M,e.params&&e.params.text){var n,r=e.params,a=[],i=e.params.text.split("\n"),o=r.family&&r.family.value?r.family.value:r.family,s=w(i);try{for(s.s();!(n=s.n()).done;){var l=n.value;a.push([{text:l,meta:{family:o,size:r.size,bold:r.bold,italic:r.italic,fill_color:r.stroke?"#ffffff00":e.color,stroke_color:r.stroke?e.color:"#ffffff00",stroke_size:r.stroke?r.stroke_size:0,leading:0}}])}}catch(e){s.e(e)}finally{s.f()}r.boundary="box",r.kerning="metrics",r.halign=r.align?(r.align.value?r.align.value:r.align).toLowerCase():"left",r.valign="top",r.text_direction="ltr",r.wrap_direction="ttb",r.wrap="word",delete r.text,delete r.family,delete r.size,delete r.bold,delete r.italic,delete r.stroke,delete r.stroke_size,delete r.align,e.data=a,e.x-=1,E({family:o},(function(){var n=e.data[0];if(n){var r=n[0];if(r){var a=t.get_span_font_metrics(r,!I.get(r.meta.family||k.family)),i=a.calculate_letter_bounds("M","top");r.meta.leading=(r.meta.size||k.size)-a.height,e.y+=Math.abs(r.meta.leading)-(a.baseline-i.bottom),t.hasValueChanged=!0,t.Base_layers.render()}}}))}if(!e.data){var c=this.getParams();e.data=[[{text:"",meta:{family:c.font.value!==k.family&&c.font.value?c.font.value:void 0,size:c.size===k.size||isNaN(c.size)?void 0:c.size,bold:c.bold.value!==k.bold?c.bold.value:void 0,italic:c.italic.value!==k.italic?c.italic.value:void 0,underline:c.underline.value!==k.underline?c.underline.value:void 0,strikethrough:c.strikethrough.value!==k.strikethrough?c.strikethrough.value:void 0,fill_color:c.fill!==k.fill_color?c.fill:void 0,stroke_color:c.stroke!==k.stroke_color?c.stroke:void 0,stroke_size:c.stroke_size===k.stroke_size||isNaN(c.stroke_size)?void 0:c.stroke_size,kerning:c.kerning===k.kerning||isNaN(c.kerning)?void 0:c.kerning,leading:c.leading===k.leading||isNaN(c.leading)?void 0:c.leading}}]]}t.set_lines(e.data),t.Base_layers=this.Base_layers,t.layer=e,S.set(e,t)}return e._needs_update_data&&(delete e._needs_update_data,t.hasValueChanged=!0,t.set_lines(JSON.parse(JSON.stringify(e.data)))),t}},{key:"get_text_layer_at_mouse",value:function(e){var t=this.Base_layers.get_sorted_layers();"text"===d.Z.layer.type&&t.unshift(d.Z.layer);var n,r=this.get_mouse_info(e),a=w(t);try{for(a.s();!(n=a.n()).done;){var i=n.value;if("text"===i.type&&r.x>=i.x-5&&r.x<=i.x+i.width+5&&r.y>=i.y-5&&r.y<=i.y+i.height+5)return i}}catch(e){a.e(e)}finally{a.f()}return null}}]),s}(h.Z)},7101:(e,t,n)=>{var r;!function(a){"use strict";var i=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,o=a.Blob&&function(){try{return Boolean(new Blob)}catch(e){return!1}}(),s=o&&a.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}}(),l=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,c=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,u=(o||l)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(e){var t,n,r,a,i,u=e.match(c);if(!u)throw new Error("invalid data URI");for(t=u[2]?u[1]:"text/plain"+(u[3]||";charset=US-ASCII"),r=!!u[4],u=e.slice(u[0].length),n=(r?atob:decodeURIComponent)(u),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;i{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,"/**\r\n * alertifyjs 1.13.1 http://alertifyjs.com\r\n * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.\r\n * Copyright 2019 Mohammad Younes (http://alertifyjs.com) \r\n * Licensed under GPL 3 */\r\n.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;right:0;bottom:0;left:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;right:0;left:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593d2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.275);transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;right:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-right-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0}.alertify-notifier.ajs-center{left:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(-50%);transform:translateX(-50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{left:50%;-webkit-transition-timing-function:cubic-bezier(.57,.43,.1,.65);transition-timing-function:cubic-bezier(.57,.43,.1,.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}}","",{version:3,sources:["webpack://./node_modules/alertifyjs/build/css/alertify.min.css"],names:[],mappings:"AAAA;;;;kEAIkE;AAClE,sBAAsB,cAAc,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,wBAAwB,CAAC,UAAU,CAAC,qBAAqB,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,sBAAsB,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,CAAC,wBAAwB,CAAC,SAAS,CAAC,qBAAqB,CAAC,yCAAyC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,qBAAqB,2BAA2B,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,wBAAwB,iBAAiB,CAAC,SAAS,CAAC,qBAAqB,CAAC,SAAS,CAAC,+BAA+B,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,QAAQ,CAAC,4BAA4B,CAAC,2BAA2B,CAAC,0BAA0B,CAAC,cAAc,CAAC,yCAAyC,gcAAgc,CAAC,4CAA4C,wVAAwV,CAAC,sBAAsB,YAAY,CAAC,eAAe,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,oBAAoB,eAAe,CAAC,iCAAiC,2BAA2B,CAAC,sBAAsB,WAAW,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,qBAAqB,CAAC,+CAA+C,gBAAgB,CAAC,2DAA2D,UAAU,CAAC,iDAAiD,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,6DAA6D,UAAU,CAAC,+CAA+C,cAAc,CAAC,eAAe,CAAC,sBAAsB,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,wWAAwW,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,iDAAiD,yBAAyB,CAAC,8DAA8D,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,uDAAuD,iBAAiB,CAAC,kBAAkB,CAAC,oEAAoE,SAAS,CAAC,8DAA8D,MAAM,CAAC,OAAO,CAAC,uHAAuH,oBAAoB,CAAC,sDAAsD,oBAAoB,CAAC,oCAAoC,oBAAoB,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,eAAe,CAAC,gBAAgB,CAAC,gDAAgD,wBAAwB,CAAC,yBAAyB,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,0DAA0D,gXAAgX,CAAC,wEAAwE,SAAS,CAAC,4EAA4E,oBAAoB,CAAC,wEAAwE,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,oEAAoE,gBAAgB,CAAC,oBAAoB,CAAC,8FAA8F,iBAAiB,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,wEAAwE,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,wDAAwD,eAAe,CAAC,wDAAwD,aAAa,CAAC,sDAAsD,WAAW,CAAC,qEAAqE,YAAY,CAAC,kCAAkC,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,iEAAiE,oBAAoB,CAAC,oWAAoW,CAAC,+CAA+C,iBAAiB,CAAC,iEAAiE,4VAA4V,CAAC,oDAAoD,gBAAgB,CAAC,aAAa,CAAC,gCAAgC,SAAS,CAAC,gCAAgC,iBAAiB,CAAC,oCAAoC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,oCAAoC,YAAY,CAAC,+CAA+C,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,wDAAwD,aAAa,CAAC,sEAAsE,YAAY,CAAC,iBAAiB,yBAAyB,CAAC,SAAS,CAAC,2BAA2B,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,2BAA2B,CAAC,sCAAsC,wBAAwB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,oCAAoC,sBAAsB,eAAe,CAAC,yCAAyC,YAAY,CAAC,wDAAwD,iBAAiB,CAAC,cAAc,CAAC,CAAC,4BAA4B,uBAAuB,0BAA0B,CAAC,CAAC,2CAA2C,oCAAoC,CAAC,4BAA4B,CAAC,8CAA8C,CAAC,sCAAsC,CAAC,yCAAyC,CAAC,iCAAiC,CAAC,iCAAiC,CAAC,yBAAyB,CAAC,iEAAiE,iBAAiB,CAAC,SAAS,CAAC,8CAA8C,8BAA8B,CAAC,sBAAsB,CAAC,yCAAyC,gCAAgC,CAAC,wBAAwB,CAAC,gCAAgC,gCAAgC,CAAC,wBAAwB,CAAC,8BAA8B,CAAC,sBAAsB,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,6BAA6B,QAAQ,oCAAoC,CAAC,4BAA4B,CAAC,oBAAoB,wCAAwC,CAAC,gCAAgC,CAAC,gBAAgB,uCAAuC,CAAC,+BAA+B,CAAC,CAAC,qBAAqB,QAAQ,oCAAoC,CAAC,4BAA4B,CAAC,oBAAoB,wCAAwC,CAAC,gCAAgC,CAAC,gBAAgB,uCAAuC,CAAC,+BAA+B,CAAC,CAAC,wDAAwD,kCAAkC,CAAC,0BAA0B,CAAC,mEAAmE,CAAC,2DAA2D,CAAC,mDAAmD,mCAAmC,CAAC,2BAA2B,CAAC,iEAAiE,CAAC,yDAAyD,CAAC,uDAAuD,iCAAiC,CAAC,yBAAyB,CAAC,kDAAkD,kCAAkC,CAAC,0BAA0B,CAAC,uDAAuD,iCAAiC,CAAC,yBAAyB,CAAC,kDAAkD,kCAAkC,CAAC,0BAA0B,CAAC,wDAAwD,kCAAkC,CAAC,0BAA0B,CAAC,mDAAmD,mCAAmC,CAAC,2BAA2B,CAAC,wDAAwD,kCAAkC,CAAC,0BAA0B,CAAC,mDAAmD,mCAAmC,CAAC,2BAA2B,CAAC,wDAAwD,kCAAkC,CAAC,0BAA0B,CAAC,mDAAmD,mCAAmC,CAAC,2BAA2B,CAAC,+BAA+B,wBAAwB,gEAAgE,CAAC,wDAAwD,CAAC,GAAG,SAAS,CAAC,mCAAmC,CAAC,2BAA2B,CAAC,IAAI,sCAAsC,CAAC,8BAA8B,CAAC,IAAI,mCAAmC,CAAC,2BAA2B,CAAC,IAAI,SAAS,CAAC,yCAAyC,CAAC,iCAAiC,CAAC,IAAI,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,uBAAuB,wBAAwB,gEAAgE,CAAC,wDAAwD,CAAC,GAAG,SAAS,CAAC,mCAAmC,CAAC,2BAA2B,CAAC,IAAI,sCAAsC,CAAC,8BAA8B,CAAC,IAAI,mCAAmC,CAAC,2BAA2B,CAAC,IAAI,SAAS,CAAC,yCAAyC,CAAC,iCAAiC,CAAC,IAAI,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,gCAAgC,IAAI,mCAAmC,CAAC,2BAA2B,CAAC,QAAQ,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,mCAAmC,CAAC,2BAA2B,CAAC,CAAC,wBAAwB,IAAI,mCAAmC,CAAC,2BAA2B,CAAC,QAAQ,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,mCAAmC,CAAC,2BAA2B,CAAC,CAAC,8BAA8B,GAAG,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,sBAAsB,GAAG,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,KAAK,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,+BAA+B,GAAG,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,KAAK,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,CAAC,uBAAuB,GAAG,SAAS,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,KAAK,SAAS,CAAC,sCAAsC,CAAC,8BAA8B,CAAC,CAAC,8BAA8B,GAAG,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,+BAA+B,GAAG,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,uBAAuB,GAAG,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,+BAA+B,GAAG,0DAA0D,CAAC,kDAAkD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,SAAS,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,KAAK,oCAAoC,CAAC,4BAA4B,CAAC,CAAC,uBAAuB,GAAG,0DAA0D,CAAC,kDAAkD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,SAAS,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,KAAK,oCAAoC,CAAC,4BAA4B,CAAC,CAAC,gCAAgC,GAAG,oCAAoC,CAAC,4BAA4B,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,SAAS,CAAC,KAAK,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,CAAC,wBAAwB,GAAG,oCAAoC,CAAC,4BAA4B,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,SAAS,CAAC,KAAK,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,CAAC,+BAA+B,GAAG,0DAA0D,CAAC,kDAAkD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,SAAS,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,KAAK,oCAAoC,CAAC,4BAA4B,CAAC,CAAC,uBAAuB,GAAG,0DAA0D,CAAC,kDAAkD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,SAAS,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,IAAI,0DAA0D,CAAC,kDAAkD,CAAC,KAAK,oCAAoC,CAAC,4BAA4B,CAAC,CAAC,gCAAgC,GAAG,oCAAoC,CAAC,4BAA4B,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,SAAS,CAAC,KAAK,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,CAAC,wBAAwB,GAAG,oCAAoC,CAAC,4BAA4B,CAAC,IAAI,2DAA2D,CAAC,mDAAmD,CAAC,SAAS,CAAC,KAAK,0DAA0D,CAAC,kDAAkD,CAAC,SAAS,CAAC,CAAC,+BAA+B,GAAG,gBAAgB,CAAC,KAAK,aAAa,CAAC,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,KAAK,aAAa,CAAC,CAAC,gCAAgC,GAAG,aAAa,CAAC,KAAK,gBAAgB,CAAC,CAAC,wBAAwB,GAAG,aAAa,CAAC,KAAK,gBAAgB,CAAC,CAAC,mBAAmB,cAAc,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,oCAAoC,CAAC,4BAA4B,CAAC,gCAAgC,iBAAiB,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,oCAAoC,CAAC,4BAA4B,CAAC,iCAAiC,CAAC,yBAAyB,CAAC,yCAAyC,CAAC,iCAAiC,CAAC,4CAA4C,+BAA+B,CAAC,uBAAuB,CAAC,oEAAoE,CAAC,4DAA4D,CAAC,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,eAAe,CAAC,4CAA4C,+BAA+B,CAAC,0CAA0C,8BAA8B,CAAC,4CAA4C,gCAAgC,CAAC,2CAA2C,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,wPAAwP,CAAC,2BAA2B,CAAC,iCAAiC,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,2BAA2B,QAAQ,CAAC,8BAA8B,WAAW,CAAC,6BAA6B,UAAU,CAAC,0CAA0C,YAAY,CAAC,sDAAsD,WAAW,CAAC,4BAA4B,SAAS,CAAC,yCAAyC,WAAW,CAAC,qDAAqD,MAAM,CAAC,8BAA8B,QAAQ,CAAC,2CAA2C,kCAAkC,CAAC,0BAA0B,CAAC,uDAAuD,QAAQ,CAAC,+DAA+D,CAAC,uDAAuD,CAAC,mDAAmD,UAAU,CAAC,+DAA+D,KAAK,CAAC,sDAAsD,aAAa,CAAC,kEAAkE,QAAQ,CAAC,uHAAuH,iCAAiC,CAAC,yBAAyB,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,kDAAkD,iCAAiC,CAAC,yBAAyB,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,uCAAuC,iEAAiE,iCAAiC,CAAC,yBAAyB,CAAC,gCAAgC,CAAC,wBAAwB,CAAC,gCAAgC,iCAAiC,CAAC,yBAAyB,CAAC,gCAAgC,CAAC,wBAAwB,CAAC",sourcesContent:["/**\r\n * alertifyjs 1.13.1 http://alertifyjs.com\r\n * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.\r\n * Copyright 2019 Mohammad Younes (http://alertifyjs.com) \r\n * Licensed under GPL 3 */\r\n.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;right:0;bottom:0;left:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;right:0;left:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593d2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.275);transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;right:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-right-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0}.alertify-notifier.ajs-center{left:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(-50%);transform:translateX(-50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{left:50%;-webkit-transition-timing-function:cubic-bezier(.57,.43,.1,.65);transition-timing-function:cubic-bezier(.57,.43,.1,.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}}"],sourceRoot:""}]);const s=o},6222:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,'/*****************\\\r\n| UI Button Group |\r\n\\*****************/\r\n\r\n.ui_button_group {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n}\r\n.ui_button_group.no_wrap {\r\n flex-wrap: nowrap;\r\n}\r\n.ui_button_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_button_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_button_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_button_group > button,\r\n.ui_button_group > input[type="button"] {\r\n border-radius: 0;\r\n}\r\n.ui_button_group > button:focus,\r\n.ui_button_group > input[type="button"]:focus {\r\n z-index: 1;\r\n}\r\n.ui_button_group > button + button,\r\n.ui_button_group > button + input[type="button"],\r\n.ui_button_group > input[type="button"] + button,\r\n.ui_button_group > input[type="button"] + input[type="button"] {\r\n margin-left: -1px;\r\n}\r\n.ui_button_group > button:first-child,\r\n.ui_button_group > input[type="button"]:first-child {\r\n border-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n}\r\n.ui_button_group > button:last-child,\r\n.ui_button_group > input[type="button"]:last-child {\r\n border-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;\r\n}\r\n\r\n/****************\\\r\n| UI Color Input |\r\n\\****************/\r\n\r\n.ui_color_input {\r\n display: inline-block;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n overflow: hidden;\r\n vertical-align: middle; \r\n}\r\n\r\n.ui_color_input input[type="color"] {\r\n display: block;\r\n cursor: pointer;\r\n\tpadding: 0;\r\n border: .2rem solid var(--input-background-color);\r\n\twidth: 3rem;\r\n}\r\n\r\n.ui_color_input .alpha_overlay {\r\n background-image: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9bRdGKiBlERDJUJwuiIo5ahSJUCLVCqw4mL/2DJg1Jiouj4Fpw8Gex6uDirKuDqyAI/oA4OTopukiJ9yWFFjFeeLyP8+45vHcfEKyVmGa1jQOabpvJeExMZ1bFjld0YxgBCOiTmWXMSVICvvV1T51Ud1Ge5d/3Z/WoWYsBAZF4lhmmTbxBPL1pG5z3iQVWkFXic+Ixky5I/Mh1xeM3znmXgzxTMFPJeWKBWMy3sNLCrGBqxFPEEVXTKT+Y9ljlvMVZK1VY4578heGsvrLMdVpDiGMRS5AgQkEFRZRgI0q7ToqFJJ3HfPyDrl8il0KuIhg5FlCGBtn1g//B79lauckJLykcA9pfHOdjBOjYBepVx/k+dpz6CRB6Bq70pr9cA2Y+Sa82tcgR0LsNXFw3NWUPuNwBBp4M2ZRdKUQrmMsB72f0TRmg/xboWvPm1jjH6QOQolklboCDQ2A0T9nrPu/ubJ3bvz2N+f0AL+pyjMZuudYAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfkCx4BHwaj7CMVAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAC5JREFUOMtjfPfuHQNuICgoiEeWiYECMKp5ZGhm/P//Px7p9+/fjwbYqGZKNAMAANAI7r7rfkQAAAAASUVORK5CYII=\');\r\n background-size: 100% 100%;\r\n position: absolute;\r\n top: 3px;\r\n left: 3px;\r\n right: 3px;\r\n bottom: 3px;\r\n pointer-events: none;\r\n}\r\n\r\n/**************************\\\r\n| UI Color Picker Gradient |\r\n\\**************************/\r\n\r\n.ui_color_picker_gradient {\r\n padding: 0 0 80% 0;\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.ui_color_picker_gradient .primary_pick {\r\n position: absolute;\r\n left: 86%;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: white;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick {\r\n position: absolute;\r\n left: 0;\r\n right: 17%;\r\n top: 0;\r\n bottom: 0;\r\n border: 1px solid var(--border-color);\r\n background: green;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick:focus {\r\n outline: 0;\r\n border: 1px solid var(--input-border-color-active);\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .saturation_gradient {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .value_gradient {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle {\r\n position: absolute;\r\n left: 0;\r\n right: auto;\r\n top: 0;\r\n bottom: auto;\r\n pointer-events: none;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle:before {\r\n content: \'\';\r\n display: block;\r\n position: absolute;\r\n left: -.6rem;\r\n top: -.6rem;\r\n height: .3rem;\r\n width: .3rem;\r\n border: .4rem solid #999;\r\n border-radius: 1000px;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle:after {\r\n content: \'\';\r\n display: block;\r\n position: absolute;\r\n left: -.5rem;\r\n top: -.5rem;\r\n height: .5rem;\r\n width: .5rem;\r\n border: .2rem solid white;\r\n border-radius: 1000px;\r\n}\r\n\r\n.ui_color_picker_gradient .primary_pick .ui_range {\r\n border-color: rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_color_picker_gradient .primary_pick .ui_range:focus {\r\n border-color: var(--input-border-color-active);\r\n}\r\n\r\n/*****************\\\r\n| UI Color Sample |\r\n\\*****************/\r\n\r\n.ui_color_sample {\r\n border: 1px solid #999;\r\n box-shadow: 0 0 0 1px #555 inset;\r\n display: block;\r\n height: 28px;\r\n width: 28px;\r\n}\r\n\r\n/***************\\\r\n| UI Flex Group |\r\n\\***************/\r\n\r\n.ui_flex_group {\r\n display: flex;\r\n flex-direction: row;\r\n}\r\n.ui_flex_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_flex_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_flex_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_flex_group.column {\r\n flex-direction: column;\r\n}\r\n.ui_flex_group.justify_content_center {\r\n justify-content: center;\r\n}\r\n.ui_flex_group.justify_content_start {\r\n justify-content: flex-start;\r\n}\r\n.ui_flex_group.justify_content_end {\r\n justify-content: flex-end;\r\n}\r\n.ui_flex_group.justify_content_space_around {\r\n justify-content: space-around;\r\n}\r\n.ui_flex_group.justify_content_space_between {\r\n justify-content: space-between;\r\n}\r\n.ui_flex_group.align_items_baseline {\r\n align-items: baseline;\r\n}\r\n.ui_flex_group.align_items_center {\r\n align-items: center;\r\n}\r\n.ui_flex_group.align_items_start {\r\n align-items: flex-start;\r\n}\r\n.ui_flex_group.align_items_end {\r\n align-items: flex-end;\r\n}\r\n.ui_flex_group.align_items_stretch {\r\n align-items: stretch;\r\n}\r\n\r\n/****************\\\r\n| UI Icon Button |\r\n\\****************/\r\n\r\n.ui_icon_button {\r\n height: 2.8rem;\r\n line-height: 2.8rem;\r\n}\r\n\r\n.ui_icon_button.input_height {\r\n height: 2.4rem;\r\n line-height: 2.4rem;\r\n}\r\n\r\n.ui_icon_button > svg {\r\n display: block;\r\n font-size: 1.6rem;\r\n}\r\n.ui_icon_button > img {\r\n display: block;\r\n margin: 0 auto;\r\n}\r\nbutton img{\r\n filter: var(--menu-icons-filter);\r\n}\r\n\r\n/****************\\\r\n| UI Input Group |\r\n\\****************/\r\n\r\n.ui_input_group {\r\n display: flex;\r\n flex-direction: row;\r\n min-height: 2.4rem;\r\n width: 100%;\r\n}\r\n.ui_input_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_input_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_input_group > input,\r\n.ui_input_group > .ui_number_input,\r\n.ui_input_group > .ui_range,\r\n.ui_input_group > .ui_color_sample {\r\n border-radius: 0;\r\n height: auto;\r\n min-width: 0;\r\n}\r\n.ui_input_group > .ui_color_sample {\r\n border: none;\r\n width: 100%;\r\n}\r\n.ui_input_group > :first-child {\r\n border-radius: var(--input-border-radius) 0 0 var(--input-border-radius);\r\n}\r\n.ui_input_group > :last-child {\r\n border-radius: 0 var(--input-border-radius) var(--input-border-radius) 0;\r\n}\r\n.ui_input_group > label {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid var(--input-group-border-color);\r\n border-right: 0;\r\n margin: 0;\r\n padding: 0 .75rem;\r\n}\r\n.ui_input_group > .ui_range + input,\r\n.ui_input_group > .ui_range + .ui_number_input {\r\n margin-left: -1px;\r\n}\r\n\r\n.ui_input_grid {\r\n border-radius: var(--input-border-radius);\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_input_grid.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_input_grid.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_grid.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n:not(.ui_input_grid) > .ui_input_group {\r\n border-radius: var(--input-border-radius);\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_input_grid > .ui_input_group {\r\n margin: -1px 0;\r\n}\r\n.ui_input_grid > .ui_input_group > :first-child,\r\n.ui_input_grid > .ui_input_group > :last-child {\r\n border-radius: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child > :first-child {\r\n border-radius: var(--input-border-radius) 0 0 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child > :last-child {\r\n border-radius: 0 var(--input-border-radius) 0 0;\r\n}\r\n.ui_input_grid > .ui_input_group:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:last-child > :first-child {\r\n border-radius: 0 0 0 var(--input-border-radius);\r\n}\r\n.ui_input_grid > .ui_input_group:last-child > :last-child {\r\n border-radius: 0 0 var(--input-border-radius) 0;\r\n}\r\n\r\n/*****************\\\r\n| UI Number Input |\r\n\\*****************/\r\n\r\n.ui_number_input {\r\n border: 1px solid var(--input-border-color);\r\n border-radius: var(--input-border-radius);\r\n display: inline-block;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n overflow: hidden;\r\n vertical-align: middle;\r\n}\r\n\r\n.ui_number_input > input[type="number"]::-webkit-outer-spin-button,\r\n.ui_number_input > input[type="number"]::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n.ui_number_input > input[type="number"] {\r\n border: none;\r\n border-radius: 0;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n padding-right: 2.5rem;\r\n padding-right: calc(var(--number-input-arrow-width) + .5rem);\r\n width: 100%;\r\n}\r\n\r\n.ui_number_input > .increase_number,\r\n.ui_number_input > .decrease_number {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: absolute;\r\n width: 2rem;\r\n width: var(--number-input-arrow-width);\r\n border-radius: 0;\r\n border: 1px solid var(--input-border-color);\r\n border-right: none;\r\n padding: 0;\r\n margin: 0;\r\n}\r\n.ui_number_input > ::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.ui_number_input > .increase_number:focus,\r\n.ui_number_input > .decrease_number:focus {\r\n outline: 0;\r\n}\r\n.ui_number_input > .increase_number {\r\n right: 0;\r\n top: 0;\r\n bottom: 50%;\r\n border-top: none;\r\n}\r\n.ui_number_input > .increase_number::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: 3px solid transparent;\r\n border-right: 3px solid transparent;\r\n border-bottom: 3px solid var(--input-text-color);\r\n}\r\n.ui_number_input > .decrease_number {\r\n right: 0;\r\n top: calc(50% - 1px);\r\n bottom: 0;\r\n border-bottom: none;\r\n}\r\n.ui_number_input > .decrease_number::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: 3px solid transparent;\r\n border-right: 3px solid transparent;\r\n border-top: 3px solid var(--input-text-color);\r\n}\r\n\r\n/**********\\\r\n| UI Range |\r\n\\**********/\r\n\r\n:root {\r\n --range-handle-width: 18px;\r\n}\r\n\r\n.ui_range {\r\n display: flex;\r\n flex-direction: row;\r\n background: var(--input-background-color);\r\n border: 1px solid var(--input-border-color);\r\n border-radius: 1000px;\r\n height: 1.8rem;\r\n overflow: visible;\r\n outline: 0;\r\n padding: 0 calc(var(--range-handle-width) / 2);\r\n position: relative;\r\n width: 100%;\r\n}\r\n.ui_range:focus {\r\n border-color: var(--input-border-color-active);\r\n z-index: 1;\r\n}\r\n\r\n.ui_range.active {\r\n cursor: col-resize;\r\n}\r\n\r\n.ui_range .padded_track {\r\n position: absolute;\r\n left: calc(var(--range-handle-width) / 2);\r\n right: calc(var(--range-handle-width) / 2);\r\n top: 0;\r\n bottom: 0;\r\n}\r\n\r\n.ui_range .bar {\r\n overflow: visible;\r\n position: relative;\r\n width: 0%;\r\n}\r\n\r\n.ui_range .handle {\r\n background: var(--input-text-color);\r\n border: 1px solid var(--border-color);\r\n border-radius: 1000px;\r\n box-sizing: border-box;\r\n cursor: col-resize;\r\n display: block;\r\n height: 1.8rem;\r\n width: var(--range-handle-width);\r\n position: absolute;\r\n top: 50%;\r\n right: 0;\r\n transform: translate(50%, -50%);\r\n}\r\n\r\n.ui_range.color_picker .handle {\r\n background: none;\r\n border: none;\r\n border-radius: 0;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: auto;\r\n top: 0;\r\n bottom: 0;\r\n transform: translateX(50%);\r\n}\r\n\r\n.ui_range.color_picker .handle::before {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: .5rem solid transparent;\r\n border-right: .5rem solid transparent;\r\n border-top: .7rem solid white;\r\n}\r\n.ui_range.color_picker .handle::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: .5rem solid transparent;\r\n border-right: .5rem solid transparent;\r\n border-bottom: .7rem solid black;\r\n}\r\n.ui_range.color_picker .handle:hover::before {\r\n border-top-color: #eaeaea;\r\n}\r\n.ui_range.color_picker .handle:hover::after {\r\n border-bottom-color: #222;\r\n}\r\n\r\n.ui_range.vertical {\r\n flex-direction: column;\r\n justify-content: flex-end;\r\n height: 100%;\r\n width: 1.8rem;\r\n padding: calc(var(--range-handle-width) / 2) 0;\r\n}\r\n\r\n.ui_range.vertical.active {\r\n cursor: row-resize;\r\n}\r\n\r\n.ui_range.vertical .padded_track {\r\n left: 0;\r\n right: 0;\r\n top: calc(var(--range-handle-width) / 2);\r\n bottom: calc(var(--range-handle-width) / 2);\r\n}\r\n\r\n.ui_range.vertical .bar {\r\n width: 100%;\r\n height: 0%;\r\n}\r\n\r\n.ui_range.vertical .handle {\r\n transform: translate(50%, -50%);\r\n top: 0;\r\n right: 50%;\r\n cursor: row-resize;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin {\r\n padding: 1px 0;\r\n border-radius: 0;\r\n width: 100%;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin .padded_track {\r\n top: 0;\r\n bottom: 0;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin .handle {\r\n border-radius: 0;\r\n width: 100%;\r\n height: .5rem;\r\n}\r\n\r\n/*************\\\r\n| UI Swatches |\r\n\\*************/\r\n\r\n.ui_swatches {\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.ui_swatches .swatch_group {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n margin: auto;\r\n border-radius: var(--input-border-radius);\r\n border: 1px solid var(--border-color);\r\n border-right: transparent;\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n overflow: hidden;\r\n max-height: calc(2.3rem);\r\n}\r\n.ui_swatches .swatch_group:focus {\r\n outline: 0;\r\n box-shadow: 0 0 0 1px var(--input-border-color-active);\r\n}\r\n\r\n.ui_swatches .swatch_group.rows_2 {\r\n max-height: calc(4.6rem - 1px);\r\n}\r\n.ui_swatches .swatch_group.rows_3 {\r\n max-height: calc(6.9rem - 2px);\r\n}\r\n.ui_swatches .swatch_group.cols_1 .swatch {\r\n width: 100%;\r\n}\r\n.ui_swatches .swatch_group.cols_2 .swatch {\r\n width: 50%;\r\n}\r\n.ui_swatches .swatch_group.cols_3 .swatch {\r\n width: 33.33%;\r\n}\r\n.ui_swatches .swatch_group.cols_4 .swatch {\r\n width: 25%;\r\n}\r\n.ui_swatches .swatch_group.cols_5 .swatch {\r\n width: 20%;\r\n}\r\n.ui_swatches .swatch_group.cols_6 .swatch {\r\n width: 16.66%;\r\n}\r\n.ui_swatches .swatch_group.cols_7 .swatch {\r\n width: 14.29%;\r\n}\r\n.ui_swatches .swatch_group.cols_8 .swatch {\r\n width: 12.5%;\r\n}\r\n\r\n.ui_swatches .swatch {\r\n background: white;\r\n display: inline-block;\r\n position: relative;\r\n border: 1px solid var(--border-color);\r\n border-radius: 0;\r\n box-shadow: 0 0 0 1px white inset;\r\n margin: -1px 0 0 -1px;\r\n padding: 0;\r\n height: 2.3rem;\r\n min-width: 2.3rem;\r\n flex-grow: 1;\r\n}\r\n\r\n.ui_swatches .swatch:hover,\r\n.ui_swatches .swatch:focus {\r\n background: white;\r\n box-shadow: 0 0 0 2px white inset, 0 0 0 3px var(--border-color) inset;\r\n}\r\n.ui_swatches .swatch:hover:after {\r\n content: \'\';\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1) 100%); \r\n}\r\n\r\n.ui_swatches .swatch.active {\r\n box-shadow: 0 0 0 3px var(--button-text-color-active) inset, 0 0 0 4px var(--border-color) inset;\r\n}\r\n\r\n\r\n/******************\\\r\n| UI Toggle Button |\r\n\\******************/\r\n\r\n.ui_toggle_button {\r\n padding-left: 2.6rem !important;\r\n position: relative;\r\n}\r\n.ui_toggle_button:before {\r\n background-color: var(--button-toggle-background-color);\r\n background-image: url(\'data:image/svg+xml;utf8,\');\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n border-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: 1.8rem;\r\n content: \'\';\r\n}\r\n.ui_toggle_button[aria-pressed="true"]:before {\r\n background-color: var(--button-text-color-active);\r\n background-image: url(\'data:image/svg+xml;utf8,\');\r\n}\r\n\r\n/* media */\r\n\r\n.media-paging{\r\n width: 100%;\r\n margin: 10px 0;\r\n text-align: center;\r\n}\r\n.media-paging button{\r\n background-color: var(--button-background-color);\r\n color: var(--text-color);\r\n}\r\n.media-paging button.selected{\r\n background-color: var(--background-color-active);\r\n color: var(--text-color-active);\r\n}\r\n\r\n/* global search */\r\n#global_search_results{\r\n padding-top: 10px;\r\n font-size: 14px;\r\n}\r\n#global_search_results .search-result {\r\n padding: 3px 5px;\r\n}\r\n#global_search_results .search-result.active{\r\n background-color: var(--background-color-active);\r\n color: var(--text-color-active);\r\n border-radius: 2px;\r\n}\r\n#global_search_results b{\r\n color: var(--text-color-red);\r\n}\r\n\r\n.popup.shortcuts table{\r\n line-height: 1;\r\n}',"",{version:3,sources:["webpack://./src/css/component.css"],names:[],mappings:"AAAA;;kBAEkB;;AAElB;IACI,aAAa;IACb,mBAAmB;IACnB,eAAe;AACnB;AACA;IACI,iBAAiB;AACrB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;;IAEI,gBAAgB;AACpB;AACA;;IAEI,UAAU;AACd;AACA;;;;IAII,iBAAiB;AACrB;AACA;;IAEI,0EAA0E;AAC9E;AACA;;IAEI,0EAA0E;AAC9E;;AAEA;;iBAEiB;;AAEjB;IACI,qBAAqB;IACrB,UAAU;IACV,SAAS;IACT,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;AAC1B;;AAEA;IACI,cAAc;IACd,eAAe;CAClB,UAAU;IACP,iDAAiD;CACpD,WAAW;AACZ;;AAEA;IACI,wzBAAwzB;IACxzB,0BAA0B;IAC1B,kBAAkB;IAClB,QAAQ;IACR,SAAS;IACT,UAAU;IACV,WAAW;IACX,oBAAoB;AACxB;;AAEA;;2BAE2B;;AAE3B;IACI,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;AACf;;AAEA;IACI,kBAAkB;IAClB,SAAS;IACT,QAAQ;IACR,MAAM;IACN,SAAS;IACT,iBAAiB;AACrB;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,UAAU;IACV,MAAM;IACN,SAAS;IACT,qCAAqC;IACrC,iBAAiB;AACrB;;AAEA;IACI,UAAU;IACV,kDAAkD;AACtD;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,mEAAmE;AACvE;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,iEAAiE;AACrE;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,WAAW;IACX,MAAM;IACN,YAAY;IACZ,oBAAoB;AACxB;;AAEA;IACI,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;IACZ,wBAAwB;IACxB,qBAAqB;AACzB;;AAEA;IACI,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;IACZ,yBAAyB;IACzB,qBAAqB;AACzB;;AAEA;IACI,gCAAgC;AACpC;AACA;IACI,8CAA8C;AAClD;;AAEA;;kBAEkB;;AAElB;IACI,sBAAsB;IACtB,gCAAgC;IAChC,cAAc;IACd,YAAY;IACZ,WAAW;AACf;;AAEA;;gBAEgB;;AAEhB;IACI,aAAa;IACb,mBAAmB;AACvB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,sBAAsB;AAC1B;AACA;IACI,uBAAuB;AAC3B;AACA;IACI,2BAA2B;AAC/B;AACA;IACI,yBAAyB;AAC7B;AACA;IACI,6BAA6B;AACjC;AACA;IACI,8BAA8B;AAClC;AACA;IACI,qBAAqB;AACzB;AACA;IACI,mBAAmB;AACvB;AACA;IACI,uBAAuB;AAC3B;AACA;IACI,qBAAqB;AACzB;AACA;IACI,oBAAoB;AACxB;;AAEA;;iBAEiB;;AAEjB;IACI,cAAc;IACd,mBAAmB;AACvB;;AAEA;IACI,cAAc;IACd,mBAAmB;AACvB;;AAEA;IACI,cAAc;IACd,iBAAiB;AACrB;AACA;IACI,cAAc;IACd,cAAc;AAClB;AACA;IACI,gCAAgC;AACpC;;AAEA;;iBAEiB;;AAEjB;IACI,aAAa;IACb,mBAAmB;IACnB,kBAAkB;IAClB,WAAW;AACf;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;;;;IAII,gBAAgB;IAChB,YAAY;IACZ,YAAY;AAChB;AACA;IACI,YAAY;IACZ,WAAW;AACf;AACA;IACI,wEAAwE;AAC5E;AACA;IACI,wEAAwE;AAC5E;AACA;IACI,aAAa;IACb,mBAAmB;IACnB,iDAAiD;IACjD,eAAe;IACf,SAAS;IACT,iBAAiB;AACrB;AACA;;IAEI,iBAAiB;AACrB;;AAEA;IACI,yCAAyC;IACzC,wCAAwC;AAC5C;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,yCAAyC;IACzC,wCAAwC;AAC5C;AACA;IACI,cAAc;AAClB;AACA;;IAEI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,+CAA+C;AACnD;AACA;IACI,+CAA+C;AACnD;AACA;IACI,gBAAgB;AACpB;AACA;IACI,+CAA+C;AACnD;AACA;IACI,+CAA+C;AACnD;;AAEA;;kBAEkB;;AAElB;IACI,2CAA2C;IAC3C,yCAAyC;IACzC,qBAAqB;IACrB,UAAU;IACV,SAAS;IACT,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;AAC1B;;AAEA;;IAEI,wBAAwB;IACxB,SAAS;AACb;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,0BAA0B;IAC1B,qBAAqB;IACrB,qBAAqB;IACrB,4DAA4D;IAC5D,WAAW;AACf;;AAEA;;IAEI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,kBAAkB;IAClB,WAAW;IACX,sCAAsC;IACtC,gBAAgB;IAChB,2CAA2C;IAC3C,kBAAkB;IAClB,UAAU;IACV,SAAS;AACb;AACA;CACC,SAAS;AACV;AACA;;IAEI,UAAU;AACd;AACA;IACI,QAAQ;IACR,MAAM;IACN,WAAW;IACX,gBAAgB;AACpB;AACA;IACI,WAAW;IACX,cAAc;IACd,QAAQ;IACR,SAAS;IACT,kCAAkC;IAClC,mCAAmC;IACnC,gDAAgD;AACpD;AACA;IACI,QAAQ;IACR,oBAAoB;IACpB,SAAS;IACT,mBAAmB;AACvB;AACA;IACI,WAAW;IACX,cAAc;IACd,QAAQ;IACR,SAAS;IACT,kCAAkC;IAClC,mCAAmC;IACnC,6CAA6C;AACjD;;AAEA;;WAEW;;AAEX;IACI,0BAA0B;AAC9B;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,yCAAyC;IACzC,2CAA2C;IAC3C,qBAAqB;IACrB,cAAc;IACd,iBAAiB;IACjB,UAAU;IACV,8CAA8C;IAC9C,kBAAkB;IAClB,WAAW;AACf;AACA;IACI,8CAA8C;IAC9C,UAAU;AACd;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,yCAAyC;IACzC,0CAA0C;IAC1C,MAAM;IACN,SAAS;AACb;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,SAAS;AACb;;AAEA;IACI,mCAAmC;IACnC,qCAAqC;IACrC,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;IAClB,cAAc;IACd,cAAc;IACd,gCAAgC;IAChC,kBAAkB;IAClB,QAAQ;IACR,QAAQ;IACR,+BAA+B;AACnC;;AAEA;IACI,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,8BAA8B;IAC9B,mBAAmB;IACnB,YAAY;IACZ,MAAM;IACN,SAAS;IACT,0BAA0B;AAC9B;;AAEA;IACI,WAAW;IACX,cAAc;IACd,QAAQ;IACR,SAAS;IACT,oCAAoC;IACpC,qCAAqC;IACrC,6BAA6B;AACjC;AACA;IACI,WAAW;IACX,cAAc;IACd,QAAQ;IACR,SAAS;IACT,oCAAoC;IACpC,qCAAqC;IACrC,gCAAgC;AACpC;AACA;IACI,yBAAyB;AAC7B;AACA;IACI,yBAAyB;AAC7B;;AAEA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,YAAY;IACZ,aAAa;IACb,8CAA8C;AAClD;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,OAAO;IACP,QAAQ;IACR,wCAAwC;IACxC,2CAA2C;AAC/C;;AAEA;IACI,WAAW;IACX,UAAU;AACd;;AAEA;IACI,+BAA+B;IAC/B,MAAM;IACN,UAAU;IACV,kBAAkB;AACtB;;AAEA;IACI,cAAc;IACd,gBAAgB;IAChB,WAAW;AACf;;AAEA;IACI,MAAM;IACN,SAAS;AACb;;AAEA;IACI,gBAAgB;IAChB,WAAW;IACX,aAAa;AACjB;;AAEA;;cAEc;;AAEd;IACI,aAAa;IACb,uBAAuB;AAC3B;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,yCAAyC;IACzC,qCAAqC;IACrC,yBAAyB;IACzB,wCAAwC;IACxC,gBAAgB;IAChB,wBAAwB;AAC5B;AACA;IACI,UAAU;IACV,sDAAsD;AAC1D;;AAEA;IACI,8BAA8B;AAClC;AACA;IACI,8BAA8B;AAClC;AACA;IACI,WAAW;AACf;AACA;IACI,UAAU;AACd;AACA;IACI,aAAa;AACjB;AACA;IACI,UAAU;AACd;AACA;IACI,UAAU;AACd;AACA;IACI,aAAa;AACjB;AACA;IACI,aAAa;AACjB;AACA;IACI,YAAY;AAChB;;AAEA;IACI,iBAAiB;IACjB,qBAAqB;IACrB,kBAAkB;IAClB,qCAAqC;IACrC,gBAAgB;IAChB,iCAAiC;IACjC,qBAAqB;IACrB,UAAU;IACV,cAAc;IACd,iBAAiB;IACjB,YAAY;AAChB;;AAEA;;IAEI,iBAAiB;IACjB,sEAAsE;AAC1E;AACA;IACI,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,yJAAyJ;AAC7J;;AAEA;IACI,gGAAgG;AACpG;;;AAGA;;mBAEmB;;AAEnB;IACI,+BAA+B;IAC/B,kBAAkB;AACtB;AACA;IACI,uDAAuD;IACvD,wYAAwY;IACxY,2BAA2B;IAC3B,4BAA4B;IAC5B,0EAA0E;IAC1E,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,aAAa;IACb,WAAW;AACf;AACA;IACI,iDAAiD;IACjD,qVAAqV;AACzV;;AAEA,UAAU;;AAEV;IACI,WAAW;IACX,cAAc;IACd,kBAAkB;AACtB;AACA;IACI,gDAAgD;IAChD,wBAAwB;AAC5B;AACA;IACI,gDAAgD;IAChD,+BAA+B;AACnC;;AAEA,kBAAkB;AAClB;IACI,iBAAiB;IACjB,eAAe;AACnB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,gDAAgD;IAChD,+BAA+B;IAC/B,kBAAkB;AACtB;AACA;IACI,4BAA4B;AAChC;;AAEA;IACI,cAAc;AAClB",sourcesContent:['/*****************\\\r\n| UI Button Group |\r\n\\*****************/\r\n\r\n.ui_button_group {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n}\r\n.ui_button_group.no_wrap {\r\n flex-wrap: nowrap;\r\n}\r\n.ui_button_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_button_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_button_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_button_group > button,\r\n.ui_button_group > input[type="button"] {\r\n border-radius: 0;\r\n}\r\n.ui_button_group > button:focus,\r\n.ui_button_group > input[type="button"]:focus {\r\n z-index: 1;\r\n}\r\n.ui_button_group > button + button,\r\n.ui_button_group > button + input[type="button"],\r\n.ui_button_group > input[type="button"] + button,\r\n.ui_button_group > input[type="button"] + input[type="button"] {\r\n margin-left: -1px;\r\n}\r\n.ui_button_group > button:first-child,\r\n.ui_button_group > input[type="button"]:first-child {\r\n border-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n}\r\n.ui_button_group > button:last-child,\r\n.ui_button_group > input[type="button"]:last-child {\r\n border-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;\r\n}\r\n\r\n/****************\\\r\n| UI Color Input |\r\n\\****************/\r\n\r\n.ui_color_input {\r\n display: inline-block;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n overflow: hidden;\r\n vertical-align: middle; \r\n}\r\n\r\n.ui_color_input input[type="color"] {\r\n display: block;\r\n cursor: pointer;\r\n\tpadding: 0;\r\n border: .2rem solid var(--input-background-color);\r\n\twidth: 3rem;\r\n}\r\n\r\n.ui_color_input .alpha_overlay {\r\n background-image: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9bRdGKiBlERDJUJwuiIo5ahSJUCLVCqw4mL/2DJg1Jiouj4Fpw8Gex6uDirKuDqyAI/oA4OTopukiJ9yWFFjFeeLyP8+45vHcfEKyVmGa1jQOabpvJeExMZ1bFjld0YxgBCOiTmWXMSVICvvV1T51Ud1Ge5d/3Z/WoWYsBAZF4lhmmTbxBPL1pG5z3iQVWkFXic+Ixky5I/Mh1xeM3znmXgzxTMFPJeWKBWMy3sNLCrGBqxFPEEVXTKT+Y9ljlvMVZK1VY4578heGsvrLMdVpDiGMRS5AgQkEFRZRgI0q7ToqFJJ3HfPyDrl8il0KuIhg5FlCGBtn1g//B79lauckJLykcA9pfHOdjBOjYBepVx/k+dpz6CRB6Bq70pr9cA2Y+Sa82tcgR0LsNXFw3NWUPuNwBBp4M2ZRdKUQrmMsB72f0TRmg/xboWvPm1jjH6QOQolklboCDQ2A0T9nrPu/ubJ3bvz2N+f0AL+pyjMZuudYAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfkCx4BHwaj7CMVAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAC5JREFUOMtjfPfuHQNuICgoiEeWiYECMKp5ZGhm/P//Px7p9+/fjwbYqGZKNAMAANAI7r7rfkQAAAAASUVORK5CYII=\');\r\n background-size: 100% 100%;\r\n position: absolute;\r\n top: 3px;\r\n left: 3px;\r\n right: 3px;\r\n bottom: 3px;\r\n pointer-events: none;\r\n}\r\n\r\n/**************************\\\r\n| UI Color Picker Gradient |\r\n\\**************************/\r\n\r\n.ui_color_picker_gradient {\r\n padding: 0 0 80% 0;\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.ui_color_picker_gradient .primary_pick {\r\n position: absolute;\r\n left: 86%;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: white;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick {\r\n position: absolute;\r\n left: 0;\r\n right: 17%;\r\n top: 0;\r\n bottom: 0;\r\n border: 1px solid var(--border-color);\r\n background: green;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick:focus {\r\n outline: 0;\r\n border: 1px solid var(--input-border-color-active);\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .saturation_gradient {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .value_gradient {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n background: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle {\r\n position: absolute;\r\n left: 0;\r\n right: auto;\r\n top: 0;\r\n bottom: auto;\r\n pointer-events: none;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle:before {\r\n content: \'\';\r\n display: block;\r\n position: absolute;\r\n left: -.6rem;\r\n top: -.6rem;\r\n height: .3rem;\r\n width: .3rem;\r\n border: .4rem solid #999;\r\n border-radius: 1000px;\r\n}\r\n\r\n.ui_color_picker_gradient .secondary_pick .handle:after {\r\n content: \'\';\r\n display: block;\r\n position: absolute;\r\n left: -.5rem;\r\n top: -.5rem;\r\n height: .5rem;\r\n width: .5rem;\r\n border: .2rem solid white;\r\n border-radius: 1000px;\r\n}\r\n\r\n.ui_color_picker_gradient .primary_pick .ui_range {\r\n border-color: rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_color_picker_gradient .primary_pick .ui_range:focus {\r\n border-color: var(--input-border-color-active);\r\n}\r\n\r\n/*****************\\\r\n| UI Color Sample |\r\n\\*****************/\r\n\r\n.ui_color_sample {\r\n border: 1px solid #999;\r\n box-shadow: 0 0 0 1px #555 inset;\r\n display: block;\r\n height: 28px;\r\n width: 28px;\r\n}\r\n\r\n/***************\\\r\n| UI Flex Group |\r\n\\***************/\r\n\r\n.ui_flex_group {\r\n display: flex;\r\n flex-direction: row;\r\n}\r\n.ui_flex_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_flex_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_flex_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_flex_group.column {\r\n flex-direction: column;\r\n}\r\n.ui_flex_group.justify_content_center {\r\n justify-content: center;\r\n}\r\n.ui_flex_group.justify_content_start {\r\n justify-content: flex-start;\r\n}\r\n.ui_flex_group.justify_content_end {\r\n justify-content: flex-end;\r\n}\r\n.ui_flex_group.justify_content_space_around {\r\n justify-content: space-around;\r\n}\r\n.ui_flex_group.justify_content_space_between {\r\n justify-content: space-between;\r\n}\r\n.ui_flex_group.align_items_baseline {\r\n align-items: baseline;\r\n}\r\n.ui_flex_group.align_items_center {\r\n align-items: center;\r\n}\r\n.ui_flex_group.align_items_start {\r\n align-items: flex-start;\r\n}\r\n.ui_flex_group.align_items_end {\r\n align-items: flex-end;\r\n}\r\n.ui_flex_group.align_items_stretch {\r\n align-items: stretch;\r\n}\r\n\r\n/****************\\\r\n| UI Icon Button |\r\n\\****************/\r\n\r\n.ui_icon_button {\r\n height: 2.8rem;\r\n line-height: 2.8rem;\r\n}\r\n\r\n.ui_icon_button.input_height {\r\n height: 2.4rem;\r\n line-height: 2.4rem;\r\n}\r\n\r\n.ui_icon_button > svg {\r\n display: block;\r\n font-size: 1.6rem;\r\n}\r\n.ui_icon_button > img {\r\n display: block;\r\n margin: 0 auto;\r\n}\r\nbutton img{\r\n filter: var(--menu-icons-filter);\r\n}\r\n\r\n/****************\\\r\n| UI Input Group |\r\n\\****************/\r\n\r\n.ui_input_group {\r\n display: flex;\r\n flex-direction: row;\r\n min-height: 2.4rem;\r\n width: 100%;\r\n}\r\n.ui_input_group.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_input_group.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_group.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_input_group > input,\r\n.ui_input_group > .ui_number_input,\r\n.ui_input_group > .ui_range,\r\n.ui_input_group > .ui_color_sample {\r\n border-radius: 0;\r\n height: auto;\r\n min-width: 0;\r\n}\r\n.ui_input_group > .ui_color_sample {\r\n border: none;\r\n width: 100%;\r\n}\r\n.ui_input_group > :first-child {\r\n border-radius: var(--input-border-radius) 0 0 var(--input-border-radius);\r\n}\r\n.ui_input_group > :last-child {\r\n border-radius: 0 var(--input-border-radius) var(--input-border-radius) 0;\r\n}\r\n.ui_input_group > label {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid var(--input-group-border-color);\r\n border-right: 0;\r\n margin: 0;\r\n padding: 0 .75rem;\r\n}\r\n.ui_input_group > .ui_range + input,\r\n.ui_input_group > .ui_range + .ui_number_input {\r\n margin-left: -1px;\r\n}\r\n\r\n.ui_input_grid {\r\n border-radius: var(--input-border-radius);\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_input_grid.stacked {\r\n margin: .75rem 0;\r\n}\r\n.ui_input_grid.stacked:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_grid.stacked:last-child {\r\n margin-bottom: 0;\r\n}\r\n:not(.ui_input_grid) > .ui_input_group {\r\n border-radius: var(--input-border-radius);\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n}\r\n.ui_input_grid > .ui_input_group {\r\n margin: -1px 0;\r\n}\r\n.ui_input_grid > .ui_input_group > :first-child,\r\n.ui_input_grid > .ui_input_group > :last-child {\r\n border-radius: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child {\r\n margin-top: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child > :first-child {\r\n border-radius: var(--input-border-radius) 0 0 0;\r\n}\r\n.ui_input_grid > .ui_input_group:first-child > :last-child {\r\n border-radius: 0 var(--input-border-radius) 0 0;\r\n}\r\n.ui_input_grid > .ui_input_group:last-child {\r\n margin-bottom: 0;\r\n}\r\n.ui_input_grid > .ui_input_group:last-child > :first-child {\r\n border-radius: 0 0 0 var(--input-border-radius);\r\n}\r\n.ui_input_grid > .ui_input_group:last-child > :last-child {\r\n border-radius: 0 0 var(--input-border-radius) 0;\r\n}\r\n\r\n/*****************\\\r\n| UI Number Input |\r\n\\*****************/\r\n\r\n.ui_number_input {\r\n border: 1px solid var(--input-border-color);\r\n border-radius: var(--input-border-radius);\r\n display: inline-block;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n overflow: hidden;\r\n vertical-align: middle;\r\n}\r\n\r\n.ui_number_input > input[type="number"]::-webkit-outer-spin-button,\r\n.ui_number_input > input[type="number"]::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n.ui_number_input > input[type="number"] {\r\n border: none;\r\n border-radius: 0;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n padding-right: 2.5rem;\r\n padding-right: calc(var(--number-input-arrow-width) + .5rem);\r\n width: 100%;\r\n}\r\n\r\n.ui_number_input > .increase_number,\r\n.ui_number_input > .decrease_number {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n position: absolute;\r\n width: 2rem;\r\n width: var(--number-input-arrow-width);\r\n border-radius: 0;\r\n border: 1px solid var(--input-border-color);\r\n border-right: none;\r\n padding: 0;\r\n margin: 0;\r\n}\r\n.ui_number_input > ::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.ui_number_input > .increase_number:focus,\r\n.ui_number_input > .decrease_number:focus {\r\n outline: 0;\r\n}\r\n.ui_number_input > .increase_number {\r\n right: 0;\r\n top: 0;\r\n bottom: 50%;\r\n border-top: none;\r\n}\r\n.ui_number_input > .increase_number::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: 3px solid transparent;\r\n border-right: 3px solid transparent;\r\n border-bottom: 3px solid var(--input-text-color);\r\n}\r\n.ui_number_input > .decrease_number {\r\n right: 0;\r\n top: calc(50% - 1px);\r\n bottom: 0;\r\n border-bottom: none;\r\n}\r\n.ui_number_input > .decrease_number::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: 3px solid transparent;\r\n border-right: 3px solid transparent;\r\n border-top: 3px solid var(--input-text-color);\r\n}\r\n\r\n/**********\\\r\n| UI Range |\r\n\\**********/\r\n\r\n:root {\r\n --range-handle-width: 18px;\r\n}\r\n\r\n.ui_range {\r\n display: flex;\r\n flex-direction: row;\r\n background: var(--input-background-color);\r\n border: 1px solid var(--input-border-color);\r\n border-radius: 1000px;\r\n height: 1.8rem;\r\n overflow: visible;\r\n outline: 0;\r\n padding: 0 calc(var(--range-handle-width) / 2);\r\n position: relative;\r\n width: 100%;\r\n}\r\n.ui_range:focus {\r\n border-color: var(--input-border-color-active);\r\n z-index: 1;\r\n}\r\n\r\n.ui_range.active {\r\n cursor: col-resize;\r\n}\r\n\r\n.ui_range .padded_track {\r\n position: absolute;\r\n left: calc(var(--range-handle-width) / 2);\r\n right: calc(var(--range-handle-width) / 2);\r\n top: 0;\r\n bottom: 0;\r\n}\r\n\r\n.ui_range .bar {\r\n overflow: visible;\r\n position: relative;\r\n width: 0%;\r\n}\r\n\r\n.ui_range .handle {\r\n background: var(--input-text-color);\r\n border: 1px solid var(--border-color);\r\n border-radius: 1000px;\r\n box-sizing: border-box;\r\n cursor: col-resize;\r\n display: block;\r\n height: 1.8rem;\r\n width: var(--range-handle-width);\r\n position: absolute;\r\n top: 50%;\r\n right: 0;\r\n transform: translate(50%, -50%);\r\n}\r\n\r\n.ui_range.color_picker .handle {\r\n background: none;\r\n border: none;\r\n border-radius: 0;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: auto;\r\n top: 0;\r\n bottom: 0;\r\n transform: translateX(50%);\r\n}\r\n\r\n.ui_range.color_picker .handle::before {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: .5rem solid transparent;\r\n border-right: .5rem solid transparent;\r\n border-top: .7rem solid white;\r\n}\r\n.ui_range.color_picker .handle::after {\r\n content: \'\';\r\n display: block;\r\n width: 0; \r\n height: 0; \r\n border-left: .5rem solid transparent;\r\n border-right: .5rem solid transparent;\r\n border-bottom: .7rem solid black;\r\n}\r\n.ui_range.color_picker .handle:hover::before {\r\n border-top-color: #eaeaea;\r\n}\r\n.ui_range.color_picker .handle:hover::after {\r\n border-bottom-color: #222;\r\n}\r\n\r\n.ui_range.vertical {\r\n flex-direction: column;\r\n justify-content: flex-end;\r\n height: 100%;\r\n width: 1.8rem;\r\n padding: calc(var(--range-handle-width) / 2) 0;\r\n}\r\n\r\n.ui_range.vertical.active {\r\n cursor: row-resize;\r\n}\r\n\r\n.ui_range.vertical .padded_track {\r\n left: 0;\r\n right: 0;\r\n top: calc(var(--range-handle-width) / 2);\r\n bottom: calc(var(--range-handle-width) / 2);\r\n}\r\n\r\n.ui_range.vertical .bar {\r\n width: 100%;\r\n height: 0%;\r\n}\r\n\r\n.ui_range.vertical .handle {\r\n transform: translate(50%, -50%);\r\n top: 0;\r\n right: 50%;\r\n cursor: row-resize;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin {\r\n padding: 1px 0;\r\n border-radius: 0;\r\n width: 100%;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin .padded_track {\r\n top: 0;\r\n bottom: 0;\r\n}\r\n\r\n.ui_range.vertical.color_picker_thin .handle {\r\n border-radius: 0;\r\n width: 100%;\r\n height: .5rem;\r\n}\r\n\r\n/*************\\\r\n| UI Swatches |\r\n\\*************/\r\n\r\n.ui_swatches {\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.ui_swatches .swatch_group {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n margin: auto;\r\n border-radius: var(--input-border-radius);\r\n border: 1px solid var(--border-color);\r\n border-right: transparent;\r\n box-shadow: 0 1px 0 0 rgba(1, 1, 1, 0.1);\r\n overflow: hidden;\r\n max-height: calc(2.3rem);\r\n}\r\n.ui_swatches .swatch_group:focus {\r\n outline: 0;\r\n box-shadow: 0 0 0 1px var(--input-border-color-active);\r\n}\r\n\r\n.ui_swatches .swatch_group.rows_2 {\r\n max-height: calc(4.6rem - 1px);\r\n}\r\n.ui_swatches .swatch_group.rows_3 {\r\n max-height: calc(6.9rem - 2px);\r\n}\r\n.ui_swatches .swatch_group.cols_1 .swatch {\r\n width: 100%;\r\n}\r\n.ui_swatches .swatch_group.cols_2 .swatch {\r\n width: 50%;\r\n}\r\n.ui_swatches .swatch_group.cols_3 .swatch {\r\n width: 33.33%;\r\n}\r\n.ui_swatches .swatch_group.cols_4 .swatch {\r\n width: 25%;\r\n}\r\n.ui_swatches .swatch_group.cols_5 .swatch {\r\n width: 20%;\r\n}\r\n.ui_swatches .swatch_group.cols_6 .swatch {\r\n width: 16.66%;\r\n}\r\n.ui_swatches .swatch_group.cols_7 .swatch {\r\n width: 14.29%;\r\n}\r\n.ui_swatches .swatch_group.cols_8 .swatch {\r\n width: 12.5%;\r\n}\r\n\r\n.ui_swatches .swatch {\r\n background: white;\r\n display: inline-block;\r\n position: relative;\r\n border: 1px solid var(--border-color);\r\n border-radius: 0;\r\n box-shadow: 0 0 0 1px white inset;\r\n margin: -1px 0 0 -1px;\r\n padding: 0;\r\n height: 2.3rem;\r\n min-width: 2.3rem;\r\n flex-grow: 1;\r\n}\r\n\r\n.ui_swatches .swatch:hover,\r\n.ui_swatches .swatch:focus {\r\n background: white;\r\n box-shadow: 0 0 0 2px white inset, 0 0 0 3px var(--border-color) inset;\r\n}\r\n.ui_swatches .swatch:hover:after {\r\n content: \'\';\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1) 100%); \r\n}\r\n\r\n.ui_swatches .swatch.active {\r\n box-shadow: 0 0 0 3px var(--button-text-color-active) inset, 0 0 0 4px var(--border-color) inset;\r\n}\r\n\r\n\r\n/******************\\\r\n| UI Toggle Button |\r\n\\******************/\r\n\r\n.ui_toggle_button {\r\n padding-left: 2.6rem !important;\r\n position: relative;\r\n}\r\n.ui_toggle_button:before {\r\n background-color: var(--button-toggle-background-color);\r\n background-image: url(\'data:image/svg+xml;utf8,\');\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n border-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: 1.8rem;\r\n content: \'\';\r\n}\r\n.ui_toggle_button[aria-pressed="true"]:before {\r\n background-color: var(--button-text-color-active);\r\n background-image: url(\'data:image/svg+xml;utf8,\');\r\n}\r\n\r\n/* media */\r\n\r\n.media-paging{\r\n width: 100%;\r\n margin: 10px 0;\r\n text-align: center;\r\n}\r\n.media-paging button{\r\n background-color: var(--button-background-color);\r\n color: var(--text-color);\r\n}\r\n.media-paging button.selected{\r\n background-color: var(--background-color-active);\r\n color: var(--text-color-active);\r\n}\r\n\r\n/* global search */\r\n#global_search_results{\r\n padding-top: 10px;\r\n font-size: 14px;\r\n}\r\n#global_search_results .search-result {\r\n padding: 3px 5px;\r\n}\r\n#global_search_results .search-result.active{\r\n background-color: var(--background-color-active);\r\n color: var(--text-color-active);\r\n border-radius: 2px;\r\n}\r\n#global_search_results b{\r\n color: var(--text-color-red);\r\n}\r\n\r\n.popup.shortcuts table{\r\n line-height: 1;\r\n}'],sourceRoot:""}]);const s=o},1041:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,".wrapper{\n\tdisplay: -ms-grid;\n\tdisplay: grid;\n\tmargin: 0;\n\tposition: fixed; /* dont change it, vh does not work on mobiles with bottom footer */\n\ttop: 30px;\n\tright: 0;\n\tleft: 0;\n\tbottom: 5px;\n\theight: auto;\n\toverflow: hidden;\n\n\t-ms-grid-rows: auto 1fr;\n\tgrid-template-rows: auto 1fr;\n\t-ms-grid-columns: auto 1fr auto;\n\tgrid-template-columns: auto 1fr auto;\n\n\tgrid-template-areas:\n\t\t\"submenu submenu submenu\"\n\t\t\"sidebar_left main sidebar_right\";\n}\n.trn{}\n.toggle{\n\tcursor: pointer;\n}\n.hidden{\n\tdisplay:none;\n}\n.center{\n\ttext-align: center;\n}\n.pointer{\n\tcursor: pointer;\n}\n.clear{\n\tclear:both;\n}\n.displayBlock{\n\tdisplay: block;\n}\n.bold{\n\tfont-weight: bold;\n}\n.left{\n\tfloat: left;\n}\n.right{\n\tfloat: right;\n}\n.grey{\n\tcolor:grey;\n}\n.noselect {\n\t-webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n\t-khtml-user-select: none; /* Konqueror HTML */\n\t-moz-user-select: none; /* Firefox */\n\t-ms-user-select: none; /* Internet Explorer/Edge */\n\tuser-select: none; /* Non-prefixed version */\n}\n.block{\n\tposition: relative;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--block-background-color);\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\n\tborder: 1px solid var(--border-color);\n\tmargin-bottom: 10px;\n\tuser-select: none;\n\tborder-radius: 4px;\n}\n.sidebar_right .block{\n\tbackground-color: #68727b;\n\tbackground-color: var(--block-background-color);\n\tborder-bottom: none;\n\tbox-shadow: 0 -2px 0 0 var(--header-background-color) inset;\n}\n.block:last-child{\n\tmargin-bottom: 0;\n}\n.block h2{\n\tposition: relative;\n\tpadding: 2px 5px 2px 6px;\n\tmargin: 0;\n\tfont-size: 110%;\n\tbackground-color: rgba(255, 255, 255, 0.3);\n\tbackground-color: var(--header-background-color);\n\tborder-bottom: #555;\n\tborder-radius: 4px 4px 0 0;\n}\n.block.toggled h2, .block h2.toggled:after{\n\tborder: none;\n}\n.block h2.toggle:before{\n\t/* icon */\n\tposition:absolute;\n\tcontent:'';\n\twidth: 0;\n\theight: 0;\n\tright: 10px;\n\ttop: 10px;\n\tborder-style: solid;\n\tborder-width: 0 4px 5px 4px;\n\tborder-color: transparent transparent var(--text-color-muted) transparent;\n}\n.block h2.toggled:before{\n\t/* icon */\n\tborder-width: 5px 4px 0 4px;\n\tborder-color: var(--text-color-muted) transparent transparent transparent;\n}\n.block .content{\n\tpadding: 7.5px 5px;\n}\n.block_section {\n margin: .75rem 0;\n}\n.block_section:first-child {\n margin-top: 0;\n}\n.block_section:last-child {\n margin-bottom: 0;\n}\n.error{\n\tpadding:20px;\n\tmargin:10px;\n\tborder:1px solid #ff0000;\n\tbackground-color:#ffffff;\n\twidth:500px;\n\tfont-weight:bold;\n}\n\n/* color chooser */\nbody .sp-replacer{\n\twidth: 100%;\n\theight: 40px;\n}\nbody .sp-preview{\n\twidth: calc(100% - 20px);\n\theight: 100%;\n}\n\n/* ========== header ======================================================== */\n\n.logo{\n\tposition: relative;\n\tdisplay: inline-block;\n\theight: 30px;\n\twidth: 110px;\n\tpadding: 5px 5px 5px 36px;\n\tmargin: 5px;\n\tfont-size: 14px;\n\ttext-decoration: none;\n\tfont-weight: bold;\n\tcolor: #ffffff;\n\tcolor: var(--text-color);\n}\n.logo:after{\n\tposition:absolute;\n\tcontent:\"\";\n\tleft: 0;\n\ttop: 0;\n\twidth: 31px;\n\theight: 30px;\n\tbackground: url('images/logo.svg') no-repeat center center;\n\tbackground-size: auto 28px;\n\tfilter: var(--mobile-menu-toggle-filter);\n}\n.logo:hover:after{\n\tleft: 2px;\n}\n.about-logo{\n\tmargin-left:22%;\n}\n.about-name{\n\tfont-size:15px;\n\tfont-weight:bold;\n}\n.undo_button {\n\tdisplay: none;\n\twidth: 50px;\n\theight: 50px;\n\ttop: 0;\n\tborder: 0;\n\toutline: none;\n\tcursor: pointer;\n\tfilter: var(--mobile-menu-toggle-filter);\n\tbackground: url(images/icons/undo.svg) no-repeat center center;\n\tbackground-size: auto 25px;\n\tmargin-left: 10px;\n}\n.undo_button:hover {\n\tbackground-color: transparent;\n}\n@media screen and (max-width: 700px){\n\t.undo_button {\n\t\tdisplay: block;\n\t}\n}\n\n/* ========== sub-header ==================================================== */\n\n.submenu{\n\t-ms-grid-row: 1;\n\t-ms-grid-column: 1;\n\t-ms-grid-column-span: 3;\n\tgrid-area: submenu;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--section-background-color);\n\toverflow: hidden;\n\tmargin-bottom: 5px;\n}\n.attributes{\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\tbackground-color: var(--area-background-color);\n\twidth: calc(100% - 125px);\n\tmargin-top: 5px;\n\tmargin-bottom: 5px !important;\n\tpadding: 3px 10px 3px 10px;\n\tborder: 0;\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\twhite-space: nowrap;\n\tmin-height: 30px;\n}\n.attributes .item{\n\tdisplay: inline-flex;\n\talign-items: center;\n\tmargin-right: 20px;\n}\n.attributes .item > label {\n\tmargin: 0 .5rem 0 0;\n}\n.attributes input[type=\"number\"]{\n\twidth: 60px;\n\tmargin-right: 5px;\n}\n.attributes input[type=\"color\"] {\n\tcursor: pointer;\n\tpadding: 0;\n\tborder: .2rem solid var(--input-background-color);\n\twidth: 3rem;\n}\n.attributes .item > button:not(.ui_icon_button){\n\tdisplay: inline-block;\n\tpadding: 3px 10px;\n}\n\n/* ========== left sidebar ================================================== */\n\n.sidebar_left{\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 1;\n\tgrid-area: sidebar_left;\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tbackground-color: var(--section-background-color);\n\tpadding: 0 5px 5px 0;\n\tmargin-right: 5px;\n\toverflow: hidden;\n\talign-self: start;\n\twidth: 40px;\n\toverflow-y: auto;\n\tmax-height: 100%;\n}\n.sidebar_left .item{\n\tposition: relative;\n\tdisplay:block;\n\tbackground-color: var(--area-background-color);\n\theight: 25px;\n\twidth: 30px;\n\tmargin: 5px 0 0 5px;\n\toverflow: hidden;\n\tcursor: pointer;\n}\n.sidebar_left .item:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 20px 20px;\n}\n.sidebar_left .item:hover{\n\tbackground-color: var(--background-color-hover);\n}\n.sidebar_left .item.active{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n.sidebar_left .item.active:after{\n\tfilter: var(--menu-icons-filter-active);\n}\n\n/*\nIMPORTANT: any new icon should also must be added on /service-worker.js + its version should be updated - FEATURE DISABLED\n */\n.sidebar_left .select:after{ background-image: url('images/icons/select.svg'); }\n.sidebar_left .selection:after{ background-image: url('images/icons/selection.svg'); }\n.sidebar_left .brush:after{ background-image: url('images/icons/brush.svg'); }\n.sidebar_left .pencil:after{ background-image: url('images/icons/pencil.svg'); }\n.sidebar_left .pick_color:after{ background-image: url('images/icons/pick_color.svg'); }\n.sidebar_left .erase:after{ background-image: url('images/icons/erase.svg'); }\n.sidebar_left .magic_erase:after{ background-image: url('images/icons/magic_erase.svg'); }\n.sidebar_left .fill:after{ background-image: url('images/icons/fill.svg'); }\n.sidebar_left .media:after{ background-image: url('images/icons/media.svg'); }\n.sidebar_left .shape:after{ background-image: url('images/icons/shape.svg'); }\n.sidebar_left .text:after{ background-image: url('images/icons/text.svg'); background-size: 16px auto; }\n.sidebar_left .gradient:after{ background-image: url('images/icons/gradient.png'); background-size: 18px 12px; filter: none; }\n.sidebar_left .clone:after{ background-image: url('images/icons/clone.svg'); }\n.sidebar_left .crop:after{ background-image: url('images/icons/crop.svg'); }\n.sidebar_left .blur:after{ background-image: url('images/icons/blur.svg'); }\n.sidebar_left .sharpen:after{ background-image: url('images/icons/sharpen.svg'); }\n.sidebar_left .desaturate:after{ background-image: url('images/icons/desaturate.svg'); }\n.sidebar_left .bulge_pinch:after{ background-image: url('images/icons/bulge_pinch.svg'); }\n.sidebar_left .animation:after{ background-image: url('images/icons/animation.svg'); }\n\n@media screen and (max-width:550px){\n\t#sidebar_left{\n\t\tleft: -110px;\n\t}\n}\n\n/* ========== right sidebar ================================================= */\n\n.sidebar_right{\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 3;\n\tgrid-area: sidebar_right;\n\tz-index: 2;\n\tdisplay: flex;\n\tflex-direction: column;\n\ttransition: 0.2s;\n\toverflow-x: hidden;\n\toverflow-y: scroll;\n\tmargin: 0 5px;\n\twidth: 200px;\n}\n.sidebar_right.active{\n\tright: 0 !important;\n}\n.sidebar_right .block.layers{\n\tflex: 1;\n}\n.sidebar_right .block.layers .content{\n\tpadding-bottom: 25px;\n}\n\n/* preview */\n.canvas_preview_wrapper{\n\tposition:relative;\n\theight:100px;\n\tmargin: 5px 5px 10px 5px;\n}\n.canvas_preview_details{\n\tpadding: 0 5px;\n}\n.canvas_preview_details button{\n\tmargin: 0;\n}\n.preview canvas{\n\tcursor: pointer;\n}\n.details input{\n\tpadding: 5px 10px;\n}\n\n/* color */\n.color_area{\n\tborder: 1px solid #444;\n\twidth: calc(100% - 10px);\n\theight: 40px;\n\tcursor: pointer;\n\tmargin: 5px;\n}\n\n/* layers */\n.layers_list{\n\tmargin-top: 10px;\n}\n.layers_arrow{\n\tdisplay:inline-block;\n\tfloat:right;\n\tmargin-left:5px;\n\tpadding:1px 8px;\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\ttext-decoration:none;\n\tcolor:var(--text-color);\n\tfont-size:12px;\n}\n.layer_add{\n\tdisplay:inline-block;\n\tpadding:1px 8px;\n\tmargin-right: 10px;\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\tcolor: var(--text-color-active);\n\tcursor:pointer;\n\ttext-decoration:none;\n}\n.layers_list .item{\n\tmargin-bottom:2px;\n}\n.layers_list .layer_name{\n\tdisplay:block;\n\tpadding:1px 5px 3px 5px;\n\theight:19px;\n\twidth: calc(100% - 44px);\n\ttext-align: left;\n\toverflow:hidden;\n\tbackground-color:#989898;\n\tbackground-color: var(--area-background-color);\n\tborder:1px solid #393939;\n\tborder-color: var(--border-color);\n\tborder-radius:3px;\n\tcursor:pointer;\n\toverflow:hidden;\n\tfont-size: 12px;\n\tcolor:var(--text-color);\n\twhite-space: nowrap;\n}\n.layers_list .item.shorter .layer_name{\n\twidth: calc(100% - 63px);\n}\n.layers_list .item.active .layer_name{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n.layers_list .arrow_down{\n\tposition: relative;\n\tfloat:left;\n\tmargin-right: 5px;\n\twidth:10px;\n\theight:19px;\n\topacity: 0.4;\n}\n.layers_list .arrow_down:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground: url('images/icons/arrow-down.svg') no-repeat center center;\n\tbackground-size: 12px auto;\n}\n.layers_list .visibility{\n\tposition: relative;\n\tfloat:left;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\tmargin-right: 5px;\n\twidth:20px;\n\theight:19px;\n\topacity:0.1;\n\tborder: none;\n\tbackground: transparent;\n\tbox-shadow: none;\n}\n.layers_list .visibility:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground: url('images/icons/view.svg') no-repeat center center;\n\tbackground-size: 18px auto;\n}\n.layers_list .visible{ opacity:0.4; }\n.layers_list .delete{\n\tfloat:right;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\twidth:12px;\n\theight:19px;\n\tmargin-left: 5px;\n\tbackground: transparent url(images/icons/delete.svg) no-repeat center center;\n\tbackground-size: 10px 10px;\n\tborder: none;\n\tbox-shadow: none;\n}\n/* filters */\n.layers_list .filters{\n\tmargin-bottom: 5px;\n}\n.layers_list .filter{\n\tmargin-bottom: 2px;\n\tmargin-left: 30px;\n\topacity: 0.7;\n}\n.layers_list .filter .layer_name{\n\tposition: relative;\n}\n.layers_list .filter .layer_name:after{\n\tposition:absolute;\n\tcontent:\"fx\";\n\tright: -4px;\n\ttop:1px;\n\tbottom:0;\n\twidth: 20px;\n}\n.sidebar_right .label{\n\tdisplay: inline-block;\n\twidth: 60px;\n}\n.info .toggle.toggled{\n\tmargin-bottom: -3px;\n}\n.block.details .row{\n\tclear:both;\n\tmargin-bottom: 2px;\n}\n.block.details input[type=\"number\"]{\n\twidth: 70px;\n\tpadding: 3px 5px;\n}\n.block.details select{\n\twidth: calc(100% - 70px);\n\theight: 23px;\n}\n.block.details button{\n\twidth: calc(100% - 70px);\n\theight: 23px;\n\tborder: 1px solid #444;\n}\n.block.details button.reset{\n\tposition: relative;\n\twidth: 25px;\n\toverflow: hidden;\n\topacity: 0.5;\n\tcolor: transparent;\n}\n.block.details button.reset:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tbackground: url(images/icons/refresh.svg) no-repeat center center;\n\tbackground-size: auto 14px;\n\tfilter: var(--menu-icons-filter);\n}\n.block.details button.active{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n\n@media screen and (max-width:700px){\n\tbody{\n\t\tpadding-top:50px;\n\t}\n\t.wrapper{\n\t\ttop: 50px;\n\t}\n\t.sidebar_left{\n\t\tposition: absolute;\n\t\tleft: -90px;\n\t\tbackground: var(--background);\n\t}\n\t.sidebar_left.active{\n\t\tbox-shadow: -5px 0px 10px 0px rgba(0,0,0,0.75);\n\t\tleft: 0;\n\t\tz-index: 3;\n\t}\n\t.sidebar_right{\n\t\tposition: absolute;\n\t\theight: 100%;\n\t\tright: -210px;\n\t\tbackground: var(--background);\n\t}\n\t.sidebar_right.active{\n\t\tbox-shadow: -5px 0px 10px 0px rgba(0,0,0,0.75);\n\t\tright: 0;\n\t\tmargin-right: 0;\n\t}\n}\n\n/* ========== content ======================================================= */\n\n.ruler_left{\n\tdisplay: none;\n\tposition: absolute;\n\tleft:0;\n\ttop: 20px;\n\tbackground-color: #ccc;\n}\n.ruler_top{\n\tdisplay: none;\n\tposition: absolute;\n\tleft: 20px;\n\ttop:0;\n\tbackground-color: #ccc;\n}\n.middle_area{\n\tposition: relative;\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 2;\n\tgrid-area: main;\n}\n.main_wrapper{\n\tposition:absolute;\n\ttop:0;\n\tright:0;\n\tbottom:0;\n\tleft:0;\n\toverflow: hidden;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n.middle_area.has-ruler .main_wrapper{\n\ttop: 20px;\n\tleft: 20px;\n}\n.canvas_wrapper{\n\tposition:relative;\n}\n.canvas_wrapper canvas{\n\tposition: absolute;\n\tbox-sizing: content-box;\n\tfont-kerning: normal !important;\n}\n.loaded .canvas_wrapper canvas{\n\tborder: 1px solid var(--border-color);\n}\n#mouse{\n\tposition:absolute;\n\tpointer-events:none;\n\twidth:10px;\n\theight:10px;\n\tz-index:10;\n}\n#mouse.rect{\n\tborder:1px solid rgba(0,0,0,0.5);\n}\n#mouse.circle{\n\tborder:1px solid rgba(0,0,0,0.5);\n\tborder-radius:50%;\n}\n.transparent-grid{\n\twidth: 100%;\n\theight: 100%;\n\tposition: absolute;\n\tpointer-events: none;\n\t/*background: url(images/icons/grid.png) repeat top left;*/\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQElEQVQ4T2N89+7dfwYigKCgIBGqGBgYRw3EGU6jYYgzaIZAsvn//z9ROeX9+/fE5ZRRA3GG02gY4s4pgz7ZAAAnSWvHPkHXaAAAAABJRU5ErkJggg==') repeat top left;\n\tz-index:1;\n\timage-rendering: pixelated; /* disable antialiasing */\n}\n.transparent-grid.white{\n\tbackground:white;\n}\n.transparent-grid.green{\n\tbackground: #5be471;\n}\n.transparent-grid.grey{\n\tbackground: #dfdfdf;\n}\ncanvas{\n\tposition:relative;\n\tz-index:2;\n}\n#canvas_back{\n\tposition: absolute;\n\tbackground-color:#ffffff;\n\toutline: none;\n}\n#canvas_grid{\n\tpointer-events:none;\n}\n.group{\n\tborder:1px solid #999999;\n\tmargin: 5px 0px 5px 0px;\n\tpadding:5px 8px;\n}\n.flex-container{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n.flex-container .item{\n\tflex: auto;\n\tmargin: 2px 0;\n\twidth: 150px;\n}\n.flex-container .item:empty{\n\theight: 0;\n\tborder: none;\n}\n.alertify-notifier{\n\tcolor: black;\n}\n.effectsPreview{\n\tcursor: pointer;\n\tbackground-color: #ddd;\n}\n\n@media screen and (max-width:550px){\n\t.canvas_wrapper{\n\t\tmargin-left: 0px;\n\t}\n}\n@media screen and (max-height: 690px){\n\t.sidebar_left{\n\t\twidth: 75px;\n\t}\n}\n@media screen and (max-height:450px){\n\t.sidebar_left{\n\t\twidth: 88px;\n\t}\n}\n\n/* ========== dialogs ======================================================= */\n\n#dialog_color_picker_group {\n\twidth: 60%;\n}\n#dialog_color_channel_group {\n\twidth: 40%;\n\tmargin-left: 1rem;\n}\n\n@media screen and (max-width: 450px) {\n\t#dialog_color_picker .ui_flex_group {\n\t\tflex-wrap: wrap;\n\t}\n\t#dialog_color_picker_group {\n\t\twidth: 100%;\n\t}\n\t#dialog_color_channel_group {\n\t\twidth: 100%;\n\t\tmargin-left: 0;\n\t\tmargin-top: 1rem;\n\t}\n}","",{version:3,sources:["webpack://./src/css/layout.css"],names:[],mappings:"AAAA;CACC,iBAAiB;CACjB,aAAa;CACb,SAAS;CACT,eAAe,EAAE,mEAAmE;CACpF,SAAS;CACT,QAAQ;CACR,OAAO;CACP,WAAW;CACX,YAAY;CACZ,gBAAgB;;CAEhB,uBAAuB;CACvB,4BAA4B;CAC5B,+BAA+B;CAC/B,oCAAoC;;CAEpC;;mCAEkC;AACnC;AACA,KAAK;AACL;CACC,eAAe;AAChB;AACA;CACC,YAAY;AACb;AACA;CACC,kBAAkB;AACnB;AACA;CACC,eAAe;AAChB;AACA;CACC,UAAU;AACX;AACA;CACC,cAAc;AACf;AACA;CACC,iBAAiB;AAClB;AACA;CACC,WAAW;AACZ;AACA;CACC,YAAY;AACb;AACA;CACC,UAAU;AACX;AACA;CACC,2BAA2B,EAAE,eAAe;IACzC,yBAAyB,EAAE,WAAW;CACzC,wBAAwB,EAAE,mBAAmB;CAC7C,sBAAsB,EAAE,YAAY;CACpC,qBAAqB,EAAE,2BAA2B;CAClD,iBAAiB,EAAE,yBAAyB;AAC7C;AACA;CACC,kBAAkB;CAClB,0CAA0C;CAC1C,+CAA+C;CAC/C,oCAAoC;CACpC,qCAAqC;CACrC,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;AACnB;AACA;CACC,yBAAyB;CACzB,+CAA+C;CAC/C,mBAAmB;CACnB,2DAA2D;AAC5D;AACA;CACC,gBAAgB;AACjB;AACA;CACC,kBAAkB;CAClB,wBAAwB;CACxB,SAAS;CACT,eAAe;CACf,0CAA0C;CAC1C,gDAAgD;CAChD,mBAAmB;CACnB,0BAA0B;AAC3B;AACA;CACC,YAAY;AACb;AACA;CACC,SAAS;CACT,iBAAiB;CACjB,UAAU;CACV,QAAQ;CACR,SAAS;CACT,WAAW;CACX,SAAS;CACT,mBAAmB;CACnB,2BAA2B;CAC3B,yEAAyE;AAC1E;AACA;CACC,SAAS;CACT,2BAA2B;CAC3B,yEAAyE;AAC1E;AACA;CACC,kBAAkB;AACnB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;CACC,YAAY;CACZ,WAAW;CACX,wBAAwB;CACxB,wBAAwB;CACxB,WAAW;CACX,gBAAgB;AACjB;;AAEA,kBAAkB;AAClB;CACC,WAAW;CACX,YAAY;AACb;AACA;CACC,wBAAwB;CACxB,YAAY;AACb;;AAEA,+EAA+E;;AAE/E;CACC,kBAAkB;CAClB,qBAAqB;CACrB,YAAY;CACZ,YAAY;CACZ,yBAAyB;CACzB,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,iBAAiB;CACjB,cAAc;CACd,wBAAwB;AACzB;AACA;CACC,iBAAiB;CACjB,UAAU;CACV,OAAO;CACP,MAAM;CACN,WAAW;CACX,YAAY;CACZ,0DAA0D;CAC1D,0BAA0B;CAC1B,wCAAwC;AACzC;AACA;CACC,SAAS;AACV;AACA;CACC,eAAe;AAChB;AACA;CACC,cAAc;CACd,gBAAgB;AACjB;AACA;CACC,aAAa;CACb,WAAW;CACX,YAAY;CACZ,MAAM;CACN,SAAS;CACT,aAAa;CACb,eAAe;CACf,wCAAwC;CACxC,8DAA8D;CAC9D,0BAA0B;CAC1B,iBAAiB;AAClB;AACA;CACC,6BAA6B;AAC9B;AACA;CACC;EACC,cAAc;CACf;AACD;;AAEA,+EAA+E;;AAE/E;CACC,eAAe;CACf,kBAAkB;CAClB,uBAAuB;CACvB,kBAAkB;CAClB,aAAa;CACb,mBAAmB;CACnB,mBAAmB;CACnB,0CAA0C;CAC1C,iDAAiD;CACjD,gBAAgB;CAChB,kBAAkB;AACnB;AACA;CACC,aAAa;CACb,iBAAiB;CACjB,8CAA8C;CAC9C,yBAAyB;CACzB,eAAe;CACf,6BAA6B;CAC7B,0BAA0B;CAC1B,SAAS;CACT,gBAAgB;CAChB,kBAAkB;CAClB,mBAAmB;CACnB,gBAAgB;AACjB;AACA;CACC,oBAAoB;CACpB,mBAAmB;CACnB,kBAAkB;AACnB;AACA;CACC,mBAAmB;AACpB;AACA;CACC,WAAW;CACX,iBAAiB;AAClB;AACA;CACC,eAAe;CACf,UAAU;CACV,iDAAiD;CACjD,WAAW;AACZ;AACA;CACC,qBAAqB;CACrB,iBAAiB;AAClB;;AAEA,+EAA+E;;AAE/E;CACC,eAAe;CACf,kBAAkB;CAClB,uBAAuB;CACvB,aAAa;CACb,mBAAmB;CACnB,eAAe;CACf,iDAAiD;CACjD,oBAAoB;CACpB,iBAAiB;CACjB,gBAAgB;CAChB,iBAAiB;CACjB,WAAW;CACX,gBAAgB;CAChB,gBAAgB;AACjB;AACA;CACC,kBAAkB;CAClB,aAAa;CACb,8CAA8C;CAC9C,YAAY;CACZ,WAAW;CACX,mBAAmB;CACnB,gBAAgB;CAChB,eAAe;AAChB;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,KAAK;CACL,QAAQ;CACR,OAAO;CACP,gCAAgC;CAChC,kCAAkC;CAClC,4BAA4B;CAC5B,0BAA0B;AAC3B;AACA;CACC,+CAA+C;AAChD;AACA;CACC,gDAAgD;CAChD,+BAA+B;AAChC;AACA;CACC,uCAAuC;AACxC;;AAEA;;EAEE;AACF,6BAA6B,gDAAgD,EAAE;AAC/E,gCAAgC,mDAAmD,EAAE;AACrF,4BAA4B,+CAA+C,EAAE;AAC7E,6BAA6B,gDAAgD,EAAE;AAC/E,iCAAiC,oDAAoD,EAAE;AACvF,4BAA4B,+CAA+C,EAAE;AAC7E,kCAAkC,qDAAqD,EAAE;AACzF,2BAA2B,8CAA8C,EAAE;AAC3E,4BAA4B,+CAA+C,EAAE;AAC7E,4BAA4B,+CAA+C,EAAE;AAC7E,2BAA2B,8CAA8C,EAAE,0BAA0B,EAAE;AACvG,+BAA+B,kDAAkD,EAAE,0BAA0B,EAAE,YAAY,EAAE;AAC7H,4BAA4B,+CAA+C,EAAE;AAC7E,2BAA2B,8CAA8C,EAAE;AAC3E,2BAA2B,8CAA8C,EAAE;AAC3E,8BAA8B,iDAAiD,EAAE;AACjF,iCAAiC,oDAAoD,EAAE;AACvF,kCAAkC,qDAAqD,EAAE;AACzF,gCAAgC,mDAAmD,EAAE;;AAErF;CACC;EACC,YAAY;CACb;AACD;;AAEA,+EAA+E;;AAE/E;CACC,eAAe;CACf,kBAAkB;CAClB,wBAAwB;CACxB,UAAU;CACV,aAAa;CACb,sBAAsB;CACtB,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,aAAa;CACb,YAAY;AACb;AACA;CACC,mBAAmB;AACpB;AACA;CACC,OAAO;AACR;AACA;CACC,oBAAoB;AACrB;;AAEA,YAAY;AACZ;CACC,iBAAiB;CACjB,YAAY;CACZ,wBAAwB;AACzB;AACA;CACC,cAAc;AACf;AACA;CACC,SAAS;AACV;AACA;CACC,eAAe;AAChB;AACA;CACC,iBAAiB;AAClB;;AAEA,UAAU;AACV;CACC,sBAAsB;CACtB,wBAAwB;CACxB,YAAY;CACZ,eAAe;CACf,WAAW;AACZ;;AAEA,WAAW;AACX;CACC,gBAAgB;AACjB;AACA;CACC,oBAAoB;CACpB,WAAW;CACX,eAAe;CACf,eAAe;CACf,qBAAqB;CACrB,iCAAiC;CACjC,oBAAoB;CACpB,uBAAuB;CACvB,cAAc;AACf;AACA;CACC,oBAAoB;CACpB,eAAe;CACf,kBAAkB;CAClB,yBAAyB;CACzB,gDAAgD;CAChD,qBAAqB;CACrB,iCAAiC;CACjC,+BAA+B;CAC/B,cAAc;CACd,oBAAoB;AACrB;AACA;CACC,iBAAiB;AAClB;AACA;CACC,aAAa;CACb,uBAAuB;CACvB,WAAW;CACX,wBAAwB;CACxB,gBAAgB;CAChB,eAAe;CACf,wBAAwB;CACxB,8CAA8C;CAC9C,wBAAwB;CACxB,iCAAiC;CACjC,iBAAiB;CACjB,cAAc;CACd,eAAe;CACf,eAAe;CACf,uBAAuB;CACvB,mBAAmB;AACpB;AACA;CACC,wBAAwB;AACzB;AACA;CACC,gDAAgD;CAChD,+BAA+B;AAChC;AACA;CACC,kBAAkB;CAClB,UAAU;CACV,iBAAiB;CACjB,UAAU;CACV,WAAW;CACX,YAAY;AACb;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,KAAK;CACL,QAAQ;CACR,OAAO;CACP,gCAAgC;CAChC,sEAAsE;CACtE,0BAA0B;AAC3B;AACA;CACC,kBAAkB;CAClB,UAAU;CACV,cAAc;CACd,uBAAuB;CACvB,iBAAiB;CACjB,UAAU;CACV,WAAW;CACX,WAAW;CACX,YAAY;CACZ,uBAAuB;CACvB,gBAAgB;AACjB;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,KAAK;CACL,QAAQ;CACR,OAAO;CACP,gCAAgC;CAChC,gEAAgE;CAChE,0BAA0B;AAC3B;AACA,uBAAuB,WAAW,EAAE;AACpC;CACC,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,UAAU;CACV,WAAW;CACX,gBAAgB;CAChB,4EAA4E;CAC5E,0BAA0B;CAC1B,YAAY;CACZ,gBAAgB;AACjB;AACA,YAAY;AACZ;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;CAClB,iBAAiB;CACjB,YAAY;AACb;AACA;CACC,kBAAkB;AACnB;AACA;CACC,iBAAiB;CACjB,YAAY;CACZ,WAAW;CACX,OAAO;CACP,QAAQ;CACR,WAAW;AACZ;AACA;CACC,qBAAqB;CACrB,WAAW;AACZ;AACA;CACC,mBAAmB;AACpB;AACA;CACC,UAAU;CACV,kBAAkB;AACnB;AACA;CACC,WAAW;CACX,gBAAgB;AACjB;AACA;CACC,wBAAwB;CACxB,YAAY;AACb;AACA;CACC,wBAAwB;CACxB,YAAY;CACZ,sBAAsB;AACvB;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,gBAAgB;CAChB,YAAY;CACZ,kBAAkB;AACnB;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,KAAK;CACL,QAAQ;CACR,OAAO;CACP,iEAAiE;CACjE,0BAA0B;CAC1B,gCAAgC;AACjC;AACA;CACC,gDAAgD;CAChD,+BAA+B;AAChC;;AAEA;CACC;EACC,gBAAgB;CACjB;CACA;EACC,SAAS;CACV;CACA;EACC,kBAAkB;EAClB,WAAW;EACX,6BAA6B;CAC9B;CACA;EACC,8CAA8C;EAC9C,OAAO;EACP,UAAU;CACX;CACA;EACC,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,6BAA6B;CAC9B;CACA;EACC,8CAA8C;EAC9C,QAAQ;EACR,eAAe;CAChB;AACD;;AAEA,+EAA+E;;AAE/E;CACC,aAAa;CACb,kBAAkB;CAClB,MAAM;CACN,SAAS;CACT,sBAAsB;AACvB;AACA;CACC,aAAa;CACb,kBAAkB;CAClB,UAAU;CACV,KAAK;CACL,sBAAsB;AACvB;AACA;CACC,kBAAkB;CAClB,eAAe;CACf,kBAAkB;CAClB,eAAe;AAChB;AACA;CACC,iBAAiB;CACjB,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CACN,gBAAgB;CAChB,aAAa;CACb,uBAAuB;CACvB,mBAAmB;AACpB;AACA;CACC,SAAS;CACT,UAAU;AACX;AACA;CACC,iBAAiB;AAClB;AACA;CACC,kBAAkB;CAClB,uBAAuB;CACvB,+BAA+B;AAChC;AACA;CACC,qCAAqC;AACtC;AACA;CACC,iBAAiB;CACjB,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,UAAU;AACX;AACA;CACC,gCAAgC;AACjC;AACA;CACC,gCAAgC;CAChC,iBAAiB;AAClB;AACA;CACC,WAAW;CACX,YAAY;CACZ,kBAAkB;CAClB,oBAAoB;CACpB,0DAA0D;CAC1D,6NAA6N;CAC7N,SAAS;CACT,0BAA0B,EAAE,yBAAyB;AACtD;AACA;CACC,gBAAgB;AACjB;AACA;CACC,mBAAmB;AACpB;AACA;CACC,mBAAmB;AACpB;AACA;CACC,iBAAiB;CACjB,SAAS;AACV;AACA;CACC,kBAAkB;CAClB,wBAAwB;CACxB,aAAa;AACd;AACA;CACC,mBAAmB;AACpB;AACA;CACC,wBAAwB;CACxB,uBAAuB;CACvB,eAAe;AAChB;AACA;CACC,aAAa;CACb,eAAe;AAChB;AACA;CACC,UAAU;CACV,aAAa;CACb,YAAY;AACb;AACA;CACC,SAAS;CACT,YAAY;AACb;AACA;CACC,YAAY;AACb;AACA;CACC,eAAe;CACf,sBAAsB;AACvB;;AAEA;CACC;EACC,gBAAgB;CACjB;AACD;AACA;CACC;EACC,WAAW;CACZ;AACD;AACA;CACC;EACC,WAAW;CACZ;AACD;;AAEA,+EAA+E;;AAE/E;CACC,UAAU;AACX;AACA;CACC,UAAU;CACV,iBAAiB;AAClB;;AAEA;CACC;EACC,eAAe;CAChB;CACA;EACC,WAAW;CACZ;CACA;EACC,WAAW;EACX,cAAc;EACd,gBAAgB;CACjB;AACD",sourcesContent:[".wrapper{\n\tdisplay: -ms-grid;\n\tdisplay: grid;\n\tmargin: 0;\n\tposition: fixed; /* dont change it, vh does not work on mobiles with bottom footer */\n\ttop: 30px;\n\tright: 0;\n\tleft: 0;\n\tbottom: 5px;\n\theight: auto;\n\toverflow: hidden;\n\n\t-ms-grid-rows: auto 1fr;\n\tgrid-template-rows: auto 1fr;\n\t-ms-grid-columns: auto 1fr auto;\n\tgrid-template-columns: auto 1fr auto;\n\n\tgrid-template-areas:\n\t\t\"submenu submenu submenu\"\n\t\t\"sidebar_left main sidebar_right\";\n}\n.trn{}\n.toggle{\n\tcursor: pointer;\n}\n.hidden{\n\tdisplay:none;\n}\n.center{\n\ttext-align: center;\n}\n.pointer{\n\tcursor: pointer;\n}\n.clear{\n\tclear:both;\n}\n.displayBlock{\n\tdisplay: block;\n}\n.bold{\n\tfont-weight: bold;\n}\n.left{\n\tfloat: left;\n}\n.right{\n\tfloat: right;\n}\n.grey{\n\tcolor:grey;\n}\n.noselect {\n\t-webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n\t-khtml-user-select: none; /* Konqueror HTML */\n\t-moz-user-select: none; /* Firefox */\n\t-ms-user-select: none; /* Internet Explorer/Edge */\n\tuser-select: none; /* Non-prefixed version */\n}\n.block{\n\tposition: relative;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--block-background-color);\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\n\tborder: 1px solid var(--border-color);\n\tmargin-bottom: 10px;\n\tuser-select: none;\n\tborder-radius: 4px;\n}\n.sidebar_right .block{\n\tbackground-color: #68727b;\n\tbackground-color: var(--block-background-color);\n\tborder-bottom: none;\n\tbox-shadow: 0 -2px 0 0 var(--header-background-color) inset;\n}\n.block:last-child{\n\tmargin-bottom: 0;\n}\n.block h2{\n\tposition: relative;\n\tpadding: 2px 5px 2px 6px;\n\tmargin: 0;\n\tfont-size: 110%;\n\tbackground-color: rgba(255, 255, 255, 0.3);\n\tbackground-color: var(--header-background-color);\n\tborder-bottom: #555;\n\tborder-radius: 4px 4px 0 0;\n}\n.block.toggled h2, .block h2.toggled:after{\n\tborder: none;\n}\n.block h2.toggle:before{\n\t/* icon */\n\tposition:absolute;\n\tcontent:'';\n\twidth: 0;\n\theight: 0;\n\tright: 10px;\n\ttop: 10px;\n\tborder-style: solid;\n\tborder-width: 0 4px 5px 4px;\n\tborder-color: transparent transparent var(--text-color-muted) transparent;\n}\n.block h2.toggled:before{\n\t/* icon */\n\tborder-width: 5px 4px 0 4px;\n\tborder-color: var(--text-color-muted) transparent transparent transparent;\n}\n.block .content{\n\tpadding: 7.5px 5px;\n}\n.block_section {\n margin: .75rem 0;\n}\n.block_section:first-child {\n margin-top: 0;\n}\n.block_section:last-child {\n margin-bottom: 0;\n}\n.error{\n\tpadding:20px;\n\tmargin:10px;\n\tborder:1px solid #ff0000;\n\tbackground-color:#ffffff;\n\twidth:500px;\n\tfont-weight:bold;\n}\n\n/* color chooser */\nbody .sp-replacer{\n\twidth: 100%;\n\theight: 40px;\n}\nbody .sp-preview{\n\twidth: calc(100% - 20px);\n\theight: 100%;\n}\n\n/* ========== header ======================================================== */\n\n.logo{\n\tposition: relative;\n\tdisplay: inline-block;\n\theight: 30px;\n\twidth: 110px;\n\tpadding: 5px 5px 5px 36px;\n\tmargin: 5px;\n\tfont-size: 14px;\n\ttext-decoration: none;\n\tfont-weight: bold;\n\tcolor: #ffffff;\n\tcolor: var(--text-color);\n}\n.logo:after{\n\tposition:absolute;\n\tcontent:\"\";\n\tleft: 0;\n\ttop: 0;\n\twidth: 31px;\n\theight: 30px;\n\tbackground: url('images/logo.svg') no-repeat center center;\n\tbackground-size: auto 28px;\n\tfilter: var(--mobile-menu-toggle-filter);\n}\n.logo:hover:after{\n\tleft: 2px;\n}\n.about-logo{\n\tmargin-left:22%;\n}\n.about-name{\n\tfont-size:15px;\n\tfont-weight:bold;\n}\n.undo_button {\n\tdisplay: none;\n\twidth: 50px;\n\theight: 50px;\n\ttop: 0;\n\tborder: 0;\n\toutline: none;\n\tcursor: pointer;\n\tfilter: var(--mobile-menu-toggle-filter);\n\tbackground: url(images/icons/undo.svg) no-repeat center center;\n\tbackground-size: auto 25px;\n\tmargin-left: 10px;\n}\n.undo_button:hover {\n\tbackground-color: transparent;\n}\n@media screen and (max-width: 700px){\n\t.undo_button {\n\t\tdisplay: block;\n\t}\n}\n\n/* ========== sub-header ==================================================== */\n\n.submenu{\n\t-ms-grid-row: 1;\n\t-ms-grid-column: 1;\n\t-ms-grid-column-span: 3;\n\tgrid-area: submenu;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--section-background-color);\n\toverflow: hidden;\n\tmargin-bottom: 5px;\n}\n.attributes{\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\tbackground-color: var(--area-background-color);\n\twidth: calc(100% - 125px);\n\tmargin-top: 5px;\n\tmargin-bottom: 5px !important;\n\tpadding: 3px 10px 3px 10px;\n\tborder: 0;\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\twhite-space: nowrap;\n\tmin-height: 30px;\n}\n.attributes .item{\n\tdisplay: inline-flex;\n\talign-items: center;\n\tmargin-right: 20px;\n}\n.attributes .item > label {\n\tmargin: 0 .5rem 0 0;\n}\n.attributes input[type=\"number\"]{\n\twidth: 60px;\n\tmargin-right: 5px;\n}\n.attributes input[type=\"color\"] {\n\tcursor: pointer;\n\tpadding: 0;\n\tborder: .2rem solid var(--input-background-color);\n\twidth: 3rem;\n}\n.attributes .item > button:not(.ui_icon_button){\n\tdisplay: inline-block;\n\tpadding: 3px 10px;\n}\n\n/* ========== left sidebar ================================================== */\n\n.sidebar_left{\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 1;\n\tgrid-area: sidebar_left;\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tbackground-color: var(--section-background-color);\n\tpadding: 0 5px 5px 0;\n\tmargin-right: 5px;\n\toverflow: hidden;\n\talign-self: start;\n\twidth: 40px;\n\toverflow-y: auto;\n\tmax-height: 100%;\n}\n.sidebar_left .item{\n\tposition: relative;\n\tdisplay:block;\n\tbackground-color: var(--area-background-color);\n\theight: 25px;\n\twidth: 30px;\n\tmargin: 5px 0 0 5px;\n\toverflow: hidden;\n\tcursor: pointer;\n}\n.sidebar_left .item:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 20px 20px;\n}\n.sidebar_left .item:hover{\n\tbackground-color: var(--background-color-hover);\n}\n.sidebar_left .item.active{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n.sidebar_left .item.active:after{\n\tfilter: var(--menu-icons-filter-active);\n}\n\n/*\nIMPORTANT: any new icon should also must be added on /service-worker.js + its version should be updated - FEATURE DISABLED\n */\n.sidebar_left .select:after{ background-image: url('images/icons/select.svg'); }\n.sidebar_left .selection:after{ background-image: url('images/icons/selection.svg'); }\n.sidebar_left .brush:after{ background-image: url('images/icons/brush.svg'); }\n.sidebar_left .pencil:after{ background-image: url('images/icons/pencil.svg'); }\n.sidebar_left .pick_color:after{ background-image: url('images/icons/pick_color.svg'); }\n.sidebar_left .erase:after{ background-image: url('images/icons/erase.svg'); }\n.sidebar_left .magic_erase:after{ background-image: url('images/icons/magic_erase.svg'); }\n.sidebar_left .fill:after{ background-image: url('images/icons/fill.svg'); }\n.sidebar_left .media:after{ background-image: url('images/icons/media.svg'); }\n.sidebar_left .shape:after{ background-image: url('images/icons/shape.svg'); }\n.sidebar_left .text:after{ background-image: url('images/icons/text.svg'); background-size: 16px auto; }\n.sidebar_left .gradient:after{ background-image: url('images/icons/gradient.png'); background-size: 18px 12px; filter: none; }\n.sidebar_left .clone:after{ background-image: url('images/icons/clone.svg'); }\n.sidebar_left .crop:after{ background-image: url('images/icons/crop.svg'); }\n.sidebar_left .blur:after{ background-image: url('images/icons/blur.svg'); }\n.sidebar_left .sharpen:after{ background-image: url('images/icons/sharpen.svg'); }\n.sidebar_left .desaturate:after{ background-image: url('images/icons/desaturate.svg'); }\n.sidebar_left .bulge_pinch:after{ background-image: url('images/icons/bulge_pinch.svg'); }\n.sidebar_left .animation:after{ background-image: url('images/icons/animation.svg'); }\n\n@media screen and (max-width:550px){\n\t#sidebar_left{\n\t\tleft: -110px;\n\t}\n}\n\n/* ========== right sidebar ================================================= */\n\n.sidebar_right{\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 3;\n\tgrid-area: sidebar_right;\n\tz-index: 2;\n\tdisplay: flex;\n\tflex-direction: column;\n\ttransition: 0.2s;\n\toverflow-x: hidden;\n\toverflow-y: scroll;\n\tmargin: 0 5px;\n\twidth: 200px;\n}\n.sidebar_right.active{\n\tright: 0 !important;\n}\n.sidebar_right .block.layers{\n\tflex: 1;\n}\n.sidebar_right .block.layers .content{\n\tpadding-bottom: 25px;\n}\n\n/* preview */\n.canvas_preview_wrapper{\n\tposition:relative;\n\theight:100px;\n\tmargin: 5px 5px 10px 5px;\n}\n.canvas_preview_details{\n\tpadding: 0 5px;\n}\n.canvas_preview_details button{\n\tmargin: 0;\n}\n.preview canvas{\n\tcursor: pointer;\n}\n.details input{\n\tpadding: 5px 10px;\n}\n\n/* color */\n.color_area{\n\tborder: 1px solid #444;\n\twidth: calc(100% - 10px);\n\theight: 40px;\n\tcursor: pointer;\n\tmargin: 5px;\n}\n\n/* layers */\n.layers_list{\n\tmargin-top: 10px;\n}\n.layers_arrow{\n\tdisplay:inline-block;\n\tfloat:right;\n\tmargin-left:5px;\n\tpadding:1px 8px;\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\ttext-decoration:none;\n\tcolor:var(--text-color);\n\tfont-size:12px;\n}\n.layer_add{\n\tdisplay:inline-block;\n\tpadding:1px 8px;\n\tmargin-right: 10px;\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\tcolor: var(--text-color-active);\n\tcursor:pointer;\n\ttext-decoration:none;\n}\n.layers_list .item{\n\tmargin-bottom:2px;\n}\n.layers_list .layer_name{\n\tdisplay:block;\n\tpadding:1px 5px 3px 5px;\n\theight:19px;\n\twidth: calc(100% - 44px);\n\ttext-align: left;\n\toverflow:hidden;\n\tbackground-color:#989898;\n\tbackground-color: var(--area-background-color);\n\tborder:1px solid #393939;\n\tborder-color: var(--border-color);\n\tborder-radius:3px;\n\tcursor:pointer;\n\toverflow:hidden;\n\tfont-size: 12px;\n\tcolor:var(--text-color);\n\twhite-space: nowrap;\n}\n.layers_list .item.shorter .layer_name{\n\twidth: calc(100% - 63px);\n}\n.layers_list .item.active .layer_name{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n.layers_list .arrow_down{\n\tposition: relative;\n\tfloat:left;\n\tmargin-right: 5px;\n\twidth:10px;\n\theight:19px;\n\topacity: 0.4;\n}\n.layers_list .arrow_down:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground: url('images/icons/arrow-down.svg') no-repeat center center;\n\tbackground-size: 12px auto;\n}\n.layers_list .visibility{\n\tposition: relative;\n\tfloat:left;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\tmargin-right: 5px;\n\twidth:20px;\n\theight:19px;\n\topacity:0.1;\n\tborder: none;\n\tbackground: transparent;\n\tbox-shadow: none;\n}\n.layers_list .visibility:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tfilter: var(--menu-icons-filter);\n\tbackground: url('images/icons/view.svg') no-repeat center center;\n\tbackground-size: 18px auto;\n}\n.layers_list .visible{ opacity:0.4; }\n.layers_list .delete{\n\tfloat:right;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\twidth:12px;\n\theight:19px;\n\tmargin-left: 5px;\n\tbackground: transparent url(images/icons/delete.svg) no-repeat center center;\n\tbackground-size: 10px 10px;\n\tborder: none;\n\tbox-shadow: none;\n}\n/* filters */\n.layers_list .filters{\n\tmargin-bottom: 5px;\n}\n.layers_list .filter{\n\tmargin-bottom: 2px;\n\tmargin-left: 30px;\n\topacity: 0.7;\n}\n.layers_list .filter .layer_name{\n\tposition: relative;\n}\n.layers_list .filter .layer_name:after{\n\tposition:absolute;\n\tcontent:\"fx\";\n\tright: -4px;\n\ttop:1px;\n\tbottom:0;\n\twidth: 20px;\n}\n.sidebar_right .label{\n\tdisplay: inline-block;\n\twidth: 60px;\n}\n.info .toggle.toggled{\n\tmargin-bottom: -3px;\n}\n.block.details .row{\n\tclear:both;\n\tmargin-bottom: 2px;\n}\n.block.details input[type=\"number\"]{\n\twidth: 70px;\n\tpadding: 3px 5px;\n}\n.block.details select{\n\twidth: calc(100% - 70px);\n\theight: 23px;\n}\n.block.details button{\n\twidth: calc(100% - 70px);\n\theight: 23px;\n\tborder: 1px solid #444;\n}\n.block.details button.reset{\n\tposition: relative;\n\twidth: 25px;\n\toverflow: hidden;\n\topacity: 0.5;\n\tcolor: transparent;\n}\n.block.details button.reset:after{\n\tposition: absolute;\n\tcontent: '';\n\tleft:0;\n\ttop:0;\n\tbottom:0;\n\tright:0;\n\tbackground: url(images/icons/refresh.svg) no-repeat center center;\n\tbackground-size: auto 14px;\n\tfilter: var(--menu-icons-filter);\n}\n.block.details button.active{\n\tbackground-color: var(--background-color-active);\n\tcolor: var(--text-color-active);\n}\n\n@media screen and (max-width:700px){\n\tbody{\n\t\tpadding-top:50px;\n\t}\n\t.wrapper{\n\t\ttop: 50px;\n\t}\n\t.sidebar_left{\n\t\tposition: absolute;\n\t\tleft: -90px;\n\t\tbackground: var(--background);\n\t}\n\t.sidebar_left.active{\n\t\tbox-shadow: -5px 0px 10px 0px rgba(0,0,0,0.75);\n\t\tleft: 0;\n\t\tz-index: 3;\n\t}\n\t.sidebar_right{\n\t\tposition: absolute;\n\t\theight: 100%;\n\t\tright: -210px;\n\t\tbackground: var(--background);\n\t}\n\t.sidebar_right.active{\n\t\tbox-shadow: -5px 0px 10px 0px rgba(0,0,0,0.75);\n\t\tright: 0;\n\t\tmargin-right: 0;\n\t}\n}\n\n/* ========== content ======================================================= */\n\n.ruler_left{\n\tdisplay: none;\n\tposition: absolute;\n\tleft:0;\n\ttop: 20px;\n\tbackground-color: #ccc;\n}\n.ruler_top{\n\tdisplay: none;\n\tposition: absolute;\n\tleft: 20px;\n\ttop:0;\n\tbackground-color: #ccc;\n}\n.middle_area{\n\tposition: relative;\n\t-ms-grid-row: 2;\n\t-ms-grid-column: 2;\n\tgrid-area: main;\n}\n.main_wrapper{\n\tposition:absolute;\n\ttop:0;\n\tright:0;\n\tbottom:0;\n\tleft:0;\n\toverflow: hidden;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n.middle_area.has-ruler .main_wrapper{\n\ttop: 20px;\n\tleft: 20px;\n}\n.canvas_wrapper{\n\tposition:relative;\n}\n.canvas_wrapper canvas{\n\tposition: absolute;\n\tbox-sizing: content-box;\n\tfont-kerning: normal !important;\n}\n.loaded .canvas_wrapper canvas{\n\tborder: 1px solid var(--border-color);\n}\n#mouse{\n\tposition:absolute;\n\tpointer-events:none;\n\twidth:10px;\n\theight:10px;\n\tz-index:10;\n}\n#mouse.rect{\n\tborder:1px solid rgba(0,0,0,0.5);\n}\n#mouse.circle{\n\tborder:1px solid rgba(0,0,0,0.5);\n\tborder-radius:50%;\n}\n.transparent-grid{\n\twidth: 100%;\n\theight: 100%;\n\tposition: absolute;\n\tpointer-events: none;\n\t/*background: url(images/icons/grid.png) repeat top left;*/\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQElEQVQ4T2N89+7dfwYigKCgIBGqGBgYRw3EGU6jYYgzaIZAsvn//z9ROeX9+/fE5ZRRA3GG02gY4s4pgz7ZAAAnSWvHPkHXaAAAAABJRU5ErkJggg==') repeat top left;\n\tz-index:1;\n\timage-rendering: pixelated; /* disable antialiasing */\n}\n.transparent-grid.white{\n\tbackground:white;\n}\n.transparent-grid.green{\n\tbackground: #5be471;\n}\n.transparent-grid.grey{\n\tbackground: #dfdfdf;\n}\ncanvas{\n\tposition:relative;\n\tz-index:2;\n}\n#canvas_back{\n\tposition: absolute;\n\tbackground-color:#ffffff;\n\toutline: none;\n}\n#canvas_grid{\n\tpointer-events:none;\n}\n.group{\n\tborder:1px solid #999999;\n\tmargin: 5px 0px 5px 0px;\n\tpadding:5px 8px;\n}\n.flex-container{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n.flex-container .item{\n\tflex: auto;\n\tmargin: 2px 0;\n\twidth: 150px;\n}\n.flex-container .item:empty{\n\theight: 0;\n\tborder: none;\n}\n.alertify-notifier{\n\tcolor: black;\n}\n.effectsPreview{\n\tcursor: pointer;\n\tbackground-color: #ddd;\n}\n\n@media screen and (max-width:550px){\n\t.canvas_wrapper{\n\t\tmargin-left: 0px;\n\t}\n}\n@media screen and (max-height: 690px){\n\t.sidebar_left{\n\t\twidth: 75px;\n\t}\n}\n@media screen and (max-height:450px){\n\t.sidebar_left{\n\t\twidth: 88px;\n\t}\n}\n\n/* ========== dialogs ======================================================= */\n\n#dialog_color_picker_group {\n\twidth: 60%;\n}\n#dialog_color_channel_group {\n\twidth: 40%;\n\tmargin-left: 1rem;\n}\n\n@media screen and (max-width: 450px) {\n\t#dialog_color_picker .ui_flex_group {\n\t\tflex-wrap: wrap;\n\t}\n\t#dialog_color_picker_group {\n\t\twidth: 100%;\n\t}\n\t#dialog_color_channel_group {\n\t\twidth: 100%;\n\t\tmargin-left: 0;\n\t\tmargin-top: 1rem;\n\t}\n}"],sourceRoot:""}]);const s=o},7796:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,':root {\r\n\t--menu-dropdown-background-color: #ffffff;\r\n\t--menu-dropdown-border-color: #49844d;\r\n\t--menu-dropdown-text-color: #2d2b2b;\r\n\t--menu-dropdown-text-muted-color: #aaaaaa;\r\n\t--menu-dropdown-hover-background-color: #adecab;\r\n\t--menu-dropdown-hover-text-color: #2d2d2d;\r\n\t--menu-dropdown-divider-color: #e5e5e5;\r\n}\r\n\r\n.sr_only {\r\n\tposition: absolute;\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\tpadding: 0;\r\n\toverflow: hidden;\r\n\tclip: rect(0, 0, 0, 0);\r\n\twhite-space: nowrap;\r\n\tborder: 0;\r\n}\r\n\r\n.main_menu {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tz-index: 100;\r\n}\r\n.main_menu > ul.menu_bar {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tlist-style: none;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\theight: 30px;\r\n\tpadding-left: 10px;\r\n\tbackground: var(--menu-background-color);\r\n}\r\n.main_menu > ul.menu_bar > li {\r\n\tpadding: 0;\r\n\toverflow: hidden;\r\n\theight: 100%;\r\n}\r\n.main_menu > ul.menu_bar > li > a {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 12px;\r\n\tcolor: var(--menu-text-color);\r\n\ttext-decoration: none;\r\n\tpadding: 0 10px;\r\n\theight: 100%;\r\n}\r\n.main_menu > ul.menu_bar > li > a::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.main_menu > ul.menu_bar > li > a:focus {\r\n\toutline: none;\r\n\tbox-shadow: 0 -3px var(--menu-dropdown-background-color) inset;\r\n}\r\n.main_menu > ul.menu_bar > li > a:hover {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_bar > li > a[aria-expanded="true"] {\r\n\tbackground: var(--menu-dropdown-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-text-color);\r\n}\r\n.main_menu > ul.menu_bar > li > a > * {\r\n\tpointer-events: none;\r\n}\r\n\r\n.main_menu > ul.menu_dropdown {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tlist-style: none;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\toverflow-x: hidden;\r\n\toverflow-y: auto;\r\n\tmin-width: 150px;\r\n\tbox-shadow: 0 0 0 1px var(--menu-dropdown-border-color);\r\n\tbackground: var(--menu-dropdown-background-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li {\r\n\tpadding: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > hr {\r\n\tbackground: none;\r\n\tborder: 1px solid var(--menu-dropdown-divider-color);\r\n\tborder-bottom: none;\r\n\tmargin: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\theight: 30px;\r\n\tpadding: 0 10px;\r\n\tfont-size: 12px;\r\n\tline-height: 30px;\r\n\ttext-decoration: none;\r\n\tcolor: var(--menu-dropdown-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > ::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a:focus {\r\n\toutline: none;\r\n\tbox-shadow: 0 0 0 2px var(--menu-dropdown-hover-background-color) inset;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a:hover {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-expanded="true"] {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-haspopup="true"]::after {\r\n\tposition: absolute;\r\n\tcontent: ">";\r\n\tright: 9px;\r\n\twidth: 5px;\r\n\ttransform: scaleY(2);\r\n\tcolor: #808080;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-haspopup="true"] > .name {\r\n\tmargin-right: 8px;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[target="_blank"]::after {\r\n\tcontent: "";\r\n\twidth: 10px;\r\n\theight: 10px;\r\n\tmargin-left: 5px;\r\n\tbackground: url(\'images/icons/external.png\') no-repeat center center;\r\n\tbackground-size: auto 8px;\r\n\topacity: 0.3;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > * {\r\n\tpointer-events: none;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > .name {\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n\twhite-space: nowrap;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > .shortcut {\r\n\tflex-shrink: 1;\r\n\tcolor: var(--menu-dropdown-text-muted-color);\r\n}\r\n\r\n\r\n.mobile_menu {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n}\r\n.left_mobile_menu, .right_mobile_menu {\r\n\tposition: absolute;\r\n\twidth: 50px;\r\n\theight: 50px;\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tz-index: 200;\r\n\tborder: 0;\r\n\toutline: 0;\r\n\tcursor: pointer;\r\n\tbackground-color: transparent;\r\n}\r\n.left_mobile_menu:after, .right_mobile_menu:after {\r\n\tposition: absolute;\r\n\tcontent: \'\';\r\n\tleft:0;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tright:0;\r\n\tfilter: var(--mobile-menu-toggle-filter);\r\n\tbackground: url(\'images/icons/menu.svg\') no-repeat center center;\r\n\tbackground-size: auto 26px;\r\n}\r\n.left_mobile_menu { left:0; }\r\n.right_mobile_menu { right:0; }\r\n\r\n@media screen and (max-width:700px) {\r\n\t.mobile_menu {\r\n\t\tdisplay: block;\r\n\t}\r\n\t.main_menu > ul.menu_bar {\r\n\t\theight: 50px;\r\n\t\tpadding-left: 50px;\r\n\t\tpadding-right: 50px;\r\n\t}\r\n}',"",{version:3,sources:["webpack://./src/css/menu.css"],names:[],mappings:"AAAA;CACC,yCAAyC;CACzC,qCAAqC;CACrC,mCAAmC;CACnC,yCAAyC;CACzC,+CAA+C;CAC/C,yCAAyC;CACzC,sCAAsC;AACvC;;AAEA;CACC,kBAAkB;CAClB,UAAU;CACV,WAAW;CACX,UAAU;CACV,gBAAgB;CAChB,sBAAsB;CACtB,mBAAmB;CACnB,SAAS;AACV;;AAEA;CACC,eAAe;CACf,MAAM;CACN,OAAO;CACP,QAAQ;CACR,YAAY;AACb;AACA;CACC,aAAa;CACb,mBAAmB;CACnB,gBAAgB;CAChB,UAAU;CACV,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,wCAAwC;AACzC;AACA;CACC,UAAU;CACV,gBAAgB;CAChB,YAAY;AACb;AACA;CACC,aAAa;CACb,mBAAmB;CACnB,eAAe;CACf,6BAA6B;CAC7B,qBAAqB;CACrB,eAAe;CACf,YAAY;AACb;AACA;CACC,SAAS;AACV;AACA;CACC,aAAa;CACb,8DAA8D;AAC/D;AACA;CACC,uDAAuD;CACvD,gBAAgB;CAChB,4CAA4C;AAC7C;AACA;CACC,iDAAiD;CACjD,gBAAgB;CAChB,sCAAsC;AACvC;AACA;CACC,oBAAoB;AACrB;;AAEA;CACC,aAAa;CACb,sBAAsB;CACtB,eAAe;CACf,MAAM;CACN,OAAO;CACP,gBAAgB;CAChB,UAAU;CACV,SAAS;CACT,kBAAkB;CAClB,gBAAgB;CAChB,gBAAgB;CAChB,uDAAuD;CACvD,iDAAiD;AAClD;AACA;CACC,UAAU;AACX;AACA;CACC,gBAAgB;CAChB,oDAAoD;CACpD,mBAAmB;CACnB,SAAS;AACV;AACA;CACC,aAAa;CACb,mBAAmB;CACnB,mBAAmB;CACnB,kBAAkB;CAClB,YAAY;CACZ,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,sCAAsC;AACvC;AACA;CACC,SAAS;AACV;AACA;CACC,aAAa;CACb,uEAAuE;AACxE;AACA;CACC,uDAAuD;CACvD,gBAAgB;CAChB,4CAA4C;AAC7C;AACA;CACC,uDAAuD;CACvD,gBAAgB;CAChB,4CAA4C;AAC7C;AACA;CACC,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,UAAU;CACV,oBAAoB;CACpB,cAAc;AACf;AACA;CACC,iBAAiB;AAClB;AACA;CACC,WAAW;CACX,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,oEAAoE;CACpE,yBAAyB;CACzB,YAAY;AACb;AACA;CACC,oBAAoB;AACrB;AACA;CACC,YAAY;CACZ,gBAAgB;CAChB,mBAAmB;AACpB;AACA;CACC,cAAc;CACd,4CAA4C;AAC7C;;;AAGA;CACC,aAAa;CACb,kBAAkB;CAClB,WAAW;CACX,MAAM;AACP;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,MAAM;CACN,YAAY;CACZ,SAAS;CACT,UAAU;CACV,eAAe;CACf,6BAA6B;AAC9B;AACA;CACC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,KAAK;CACL,QAAQ;CACR,OAAO;CACP,wCAAwC;CACxC,gEAAgE;CAChE,0BAA0B;AAC3B;AACA,oBAAoB,MAAM,EAAE;AAC5B,qBAAqB,OAAO,EAAE;;AAE9B;CACC;EACC,cAAc;CACf;CACA;EACC,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;CACpB;AACD",sourcesContent:[':root {\r\n\t--menu-dropdown-background-color: #ffffff;\r\n\t--menu-dropdown-border-color: #49844d;\r\n\t--menu-dropdown-text-color: #2d2b2b;\r\n\t--menu-dropdown-text-muted-color: #aaaaaa;\r\n\t--menu-dropdown-hover-background-color: #adecab;\r\n\t--menu-dropdown-hover-text-color: #2d2d2d;\r\n\t--menu-dropdown-divider-color: #e5e5e5;\r\n}\r\n\r\n.sr_only {\r\n\tposition: absolute;\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\tpadding: 0;\r\n\toverflow: hidden;\r\n\tclip: rect(0, 0, 0, 0);\r\n\twhite-space: nowrap;\r\n\tborder: 0;\r\n}\r\n\r\n.main_menu {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tz-index: 100;\r\n}\r\n.main_menu > ul.menu_bar {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tlist-style: none;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\theight: 30px;\r\n\tpadding-left: 10px;\r\n\tbackground: var(--menu-background-color);\r\n}\r\n.main_menu > ul.menu_bar > li {\r\n\tpadding: 0;\r\n\toverflow: hidden;\r\n\theight: 100%;\r\n}\r\n.main_menu > ul.menu_bar > li > a {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 12px;\r\n\tcolor: var(--menu-text-color);\r\n\ttext-decoration: none;\r\n\tpadding: 0 10px;\r\n\theight: 100%;\r\n}\r\n.main_menu > ul.menu_bar > li > a::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.main_menu > ul.menu_bar > li > a:focus {\r\n\toutline: none;\r\n\tbox-shadow: 0 -3px var(--menu-dropdown-background-color) inset;\r\n}\r\n.main_menu > ul.menu_bar > li > a:hover {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_bar > li > a[aria-expanded="true"] {\r\n\tbackground: var(--menu-dropdown-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-text-color);\r\n}\r\n.main_menu > ul.menu_bar > li > a > * {\r\n\tpointer-events: none;\r\n}\r\n\r\n.main_menu > ul.menu_dropdown {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tlist-style: none;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\toverflow-x: hidden;\r\n\toverflow-y: auto;\r\n\tmin-width: 150px;\r\n\tbox-shadow: 0 0 0 1px var(--menu-dropdown-border-color);\r\n\tbackground: var(--menu-dropdown-background-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li {\r\n\tpadding: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > hr {\r\n\tbackground: none;\r\n\tborder: 1px solid var(--menu-dropdown-divider-color);\r\n\tborder-bottom: none;\r\n\tmargin: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\theight: 30px;\r\n\tpadding: 0 10px;\r\n\tfont-size: 12px;\r\n\tline-height: 30px;\r\n\ttext-decoration: none;\r\n\tcolor: var(--menu-dropdown-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > ::-moz-focus-inner {\r\n\tborder: 0;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a:focus {\r\n\toutline: none;\r\n\tbox-shadow: 0 0 0 2px var(--menu-dropdown-hover-background-color) inset;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a:hover {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-expanded="true"] {\r\n\tbackground: var(--menu-dropdown-hover-background-color);\r\n\tbox-shadow: none;\r\n\tcolor: var(--menu-dropdown-hover-text-color);\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-haspopup="true"]::after {\r\n\tposition: absolute;\r\n\tcontent: ">";\r\n\tright: 9px;\r\n\twidth: 5px;\r\n\ttransform: scaleY(2);\r\n\tcolor: #808080;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[aria-haspopup="true"] > .name {\r\n\tmargin-right: 8px;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a[target="_blank"]::after {\r\n\tcontent: "";\r\n\twidth: 10px;\r\n\theight: 10px;\r\n\tmargin-left: 5px;\r\n\tbackground: url(\'images/icons/external.png\') no-repeat center center;\r\n\tbackground-size: auto 8px;\r\n\topacity: 0.3;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > * {\r\n\tpointer-events: none;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > .name {\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n\twhite-space: nowrap;\r\n}\r\n.main_menu > ul.menu_dropdown > li > a > .shortcut {\r\n\tflex-shrink: 1;\r\n\tcolor: var(--menu-dropdown-text-muted-color);\r\n}\r\n\r\n\r\n.mobile_menu {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n}\r\n.left_mobile_menu, .right_mobile_menu {\r\n\tposition: absolute;\r\n\twidth: 50px;\r\n\theight: 50px;\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tz-index: 200;\r\n\tborder: 0;\r\n\toutline: 0;\r\n\tcursor: pointer;\r\n\tbackground-color: transparent;\r\n}\r\n.left_mobile_menu:after, .right_mobile_menu:after {\r\n\tposition: absolute;\r\n\tcontent: \'\';\r\n\tleft:0;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tright:0;\r\n\tfilter: var(--mobile-menu-toggle-filter);\r\n\tbackground: url(\'images/icons/menu.svg\') no-repeat center center;\r\n\tbackground-size: auto 26px;\r\n}\r\n.left_mobile_menu { left:0; }\r\n.right_mobile_menu { right:0; }\r\n\r\n@media screen and (max-width:700px) {\r\n\t.mobile_menu {\r\n\t\tdisplay: block;\r\n\t}\r\n\t.main_menu > ul.menu_bar {\r\n\t\theight: 50px;\r\n\t\tpadding-left: 50px;\r\n\t\tpadding-right: 50px;\r\n\t}\r\n}'],sourceRoot:""}]);const s=o},5823:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,'#popups:not(:empty) {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n#popups .popup {\r\n\tposition:fixed;\r\n\tdisplay:none;\r\n\ttop: 15vh;\r\n\tleft: calc(100vw / 2);\r\n\ttransform: translate(-50%, 0);\r\n\tbackground-color: #7A838B;\r\n\tbackground-color: var(--block-background-color);\r\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\r\n\tborder: 1px solid var(--border-color);\r\n\twidth: 90vw;\r\n\tmax-width: 500px;\r\n\tmax-height: calc(80vh);\r\n\tmargin:0px auto 0px auto;\r\n\tpadding: 4rem 0 5rem 0;\r\n\tbox-shadow: 0 0 0 4000px rgba(0,0,0,0.3), 0 0 20px rgba(0,0,0,0.5);\r\n\tz-index: 100;\r\n\tfont-size: 13px;\r\n\toverflow: hidden;\r\n}\r\n#popups .popup.wide{\r\n\tmax-width: 840px;\r\n}\r\n#popups .popup a{\r\n\tcolor: var(--link-color);\r\n}\r\n#popups .popup h2{\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tmargin: 0;\r\n\theight: 4rem;\r\n\tline-height: 4rem;\r\n\tpadding: 0 1rem;\r\n\tfont-size: 1.8rem;\r\n\tbackground-color: rgba(255, 255, 255, 0.3);\r\n\tbackground-color: var(--header-background-color);\r\n\tz-index: 0;\r\n\tcursor:move;\r\n}\r\n#popups .popup .dialog_content {\r\n\toverflow-y: auto;\r\n\tmax-height: calc(80vh - 11rem);\r\n\tpadding: 1rem;\r\n}\r\n#popups .popup .buttons{\r\n\tposition: absolute;\r\n\tbackground-color: var(--block-background-color);\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\theight: 5rem;\r\n\tline-height: 4rem;\r\n\tmargin: 0;\r\n\tpadding: .5rem 0;\r\n\ttext-align: center;\r\n\tborder-top: 1px solid var(--header-background-color);\r\n\tz-index: 3;\r\n}\r\n#popups .popup .close{\r\n\tposition: absolute;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tmin-width: 0;\r\n\tpadding: 5px;\r\n\tline-height: 0.5;\r\n\tfont-size: 16px;\r\n\tmargin-top: 10px;\r\n\tmargin-right: 10px;\r\n\tborder: none;\r\n\tbackground: none;\r\n\tz-index: 1;\r\n}\r\n#popups .popup input[type="range"]{\r\n\tmargin:0;\r\n\twidth: 100%;\r\n}\r\n#popups .popup table{\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n}\r\n#popups .popup td, #popups .popup th{\r\n\theight: 25px;\r\n}\r\n#popups .popup td{\r\n\tvertical-align: middle;\r\n}\r\n#popups .popup th{\r\n\ttext-align:left;\r\n\tpadding: 5px 5px 5px 0;\r\n\twidth: 130px;\r\n}\r\n#popups .popup textarea{\r\n\tcolor: var(--input-text-color);\r\n\twidth:100%;\r\n\tborder:1px solid #393939;\r\n\tpadding-left:5px;\r\n}\r\n#popups .popup .button{\r\n\tmargin: 0 3px;\r\n\tbackground-color: rgba(255, 255, 255, 0.2);\r\n\tbackground-color: var(--button-background-color);\r\n\tmin-width:60px;\r\n\tborder:1px solid rgba(0, 0, 0, 0.5);\r\n\tborder:1px solid var(--border-color);\r\n\tpadding: 5px 10px;\r\n}\r\n#popups .popup input[type="text"], #popups .popup input[type="number"], #popups .popup textarea{\r\n\twidth:100%;\r\n}\r\n#popups .popup input[type="number"]{\r\n\twidth:100px;\r\n}\r\n#popups .popup input[type="radio"], #popups .popup input[type="checkbox"]{\r\n\tmargin-left: 0;\r\n}\r\n#popups .popup label span{\r\n\tcolor:var(--text-color-muted);\r\n}\r\n#popups .popup .checkbox label{\r\n\tmargin-top: 5px;\r\n\tcolor:var(--text-color-muted);\r\n}\r\n#popups .popup .preview_container{\r\n\tmargin-top:10px;\r\n\tmargin-bottom:15px;\r\n\ttext-align: center;\r\n}\r\n#popups .popup .preview_canvas_left{\r\n\tposition:relative;\r\n\tmargin:0 5px 5px 0;\r\n\tborder:1px solid #393939;\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n#popups .popup .preview_canvas_post_back{\r\n\tposition:absolute;\r\n\tborder:1px solid #393939;\r\n\tbackground-color:#ffffff;\r\n}\r\n#popups .popup .preview_canvas_post{\r\n\tposition:relative;\r\n\tborder:1px solid #393939;\r\n}\r\n#popups .popup .canvas_preview_container{\r\n\tposition:relative;\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n#popups .popup .radios label{\r\n\tdisplay: inline-block;\r\n\tmargin-right: 10px;\r\n}\r\n#popups .popup .range_value{\r\n\tpadding-left:10px;\r\n\twidth:50px;\r\n}\r\n#popups .popup .long_text_value{\r\n\tfont-size: 12px;\r\n}\r\n#popups .popup .preview-item-title{\r\n\ttext-align: center;\r\n\tmax-width: 150px;\r\n}\r\n#popups .popup .field_comment{\r\n\tdisplay: inline-block;\r\n\tmargin-left: 10px;\r\n\topacity: 0.5;\r\n}\r\n\r\n#popups .popup .selection_card {\r\n\tbackground: var(--input-background-color);\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\tpadding: 0;\r\n\tborder-bottom: 0.1rem solid var(--input-border-color);\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n#popups .popup .selection_card:first-child {\r\n\tmargin-top: 1rem;\r\n\tborder-radius: var(--input-border-radius) var(--input-border-radius) 0 0;\r\n}\r\n#popups .popup .selection_card:last-child {\r\n\tborder-radius: 0 0 var(--input-border-radius) var(--input-border-radius);\r\n\tborder-bottom: none;\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] {\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tcursor: pointer;\r\n\tposition: absolute;\r\n\ttop: 50%;\r\n\tleft: 1.5rem;\r\n\ttransform: translateY(-50%) scale(1.5);\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] + label {\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\tflex-grow: 1;\r\n\tflex-shrink: 1;\r\n\tmargin: 0;\r\n\tpadding: 1rem 0.5rem 1rem 5.5rem;\r\n\tcursor: pointer;\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] + label:hover {\r\n\tbackground: var(--input-background-color-hover);\r\n}\r\n#popups .popup .selection_card .font_preview {\r\n\tfont-size: 1.6rem;\r\n\theight: 2.5rem;\r\n\tline-height: 2.5rem;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n#popups .popup .pagination {\r\n\tdisplay: flex;\r\n\ttext-align: center;\r\n\tmargin: 1rem 0 0 0;\r\n}\r\n#popups .popup .pagination button {\r\n\tflex-grow: 0;\r\n\theight: 2.8rem;\r\n\tline-height: 2.8rem;\r\n\tborder-radius: 0;\r\n\tmargin-left: -1px;\r\n\tmin-width: 3.3rem;\r\n}\r\n#popups .popup .pagination button:first-child {\r\n\tborder-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n\tmargin-left: auto;\r\n}\r\n#popups .popup .pagination button:last-child {\r\n\tborder-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;\r\n\tmargin-right: auto;\r\n}\r\n\r\n@media screen and (max-width:500px){\r\n\t#popups .popup {\r\n\t\tmax-height: calc(80vh - 20px); /* mobile phones has bottom menu */\r\n\t}\r\n\t#popups .popup tr{\r\n\t\tdisplay: block;\r\n\t\tmargin-bottom: 10px;\r\n\t}\r\n\t#popups .popup td, #popups .popup th{\r\n\t\tdisplay: block;\r\n\t\twidth: 100%;\r\n\t\theight: auto;\r\n\t\tpadding: 5px;\r\n\t}\r\n\t#popups .popup th{\r\n\t\tpadding: 5px 5px 0px 5px;\r\n\t}\r\n\t#popups .popup td{\r\n\t\tpadding: 5px 5px 5px 5px;\r\n\t}\r\n\t#popups .popup .range_value{\r\n\t\tdisplay: none;\r\n\t}\r\n}\r\n',"",{version:3,sources:["webpack://./src/css/popup.css"],names:[],mappings:"AAAA;CACC,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACV;AACA;CACC,cAAc;CACd,YAAY;CACZ,SAAS;CACT,qBAAqB;CACrB,6BAA6B;CAC7B,yBAAyB;CACzB,+CAA+C;CAC/C,oCAAoC;CACpC,qCAAqC;CACrC,WAAW;CACX,gBAAgB;CAChB,sBAAsB;CACtB,wBAAwB;CACxB,sBAAsB;CACtB,kEAAkE;CAClE,YAAY;CACZ,eAAe;CACf,gBAAgB;AACjB;AACA;CACC,gBAAgB;AACjB;AACA;CACC,wBAAwB;AACzB;AACA;CACC,cAAc;CACd,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,iBAAiB;CACjB,eAAe;CACf,iBAAiB;CACjB,0CAA0C;CAC1C,gDAAgD;CAChD,UAAU;CACV,WAAW;AACZ;AACA;CACC,gBAAgB;CAChB,8BAA8B;CAC9B,aAAa;AACd;AACA;CACC,kBAAkB;CAClB,+CAA+C;CAC/C,SAAS;CACT,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,iBAAiB;CACjB,SAAS;CACT,gBAAgB;CAChB,kBAAkB;CAClB,oDAAoD;CACpD,UAAU;AACX;AACA;CACC,kBAAkB;CAClB,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,YAAY;CACZ,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,kBAAkB;CAClB,YAAY;CACZ,gBAAgB;CAChB,UAAU;AACX;AACA;CACC,QAAQ;CACR,WAAW;AACZ;AACA;CACC,sBAAsB;CACtB,WAAW;AACZ;AACA;CACC,YAAY;AACb;AACA;CACC,sBAAsB;AACvB;AACA;CACC,eAAe;CACf,sBAAsB;CACtB,YAAY;AACb;AACA;CACC,8BAA8B;CAC9B,UAAU;CACV,wBAAwB;CACxB,gBAAgB;AACjB;AACA;CACC,aAAa;CACb,0CAA0C;CAC1C,gDAAgD;CAChD,cAAc;CACd,mCAAmC;CACnC,oCAAoC;CACpC,iBAAiB;AAClB;AACA;CACC,UAAU;AACX;AACA;CACC,WAAW;AACZ;AACA;CACC,cAAc;AACf;AACA;CACC,6BAA6B;AAC9B;AACA;CACC,eAAe;CACf,6BAA6B;AAC9B;AACA;CACC,eAAe;CACf,kBAAkB;CAClB,kBAAkB;AACnB;AACA;CACC,iBAAiB;CACjB,kBAAkB;CAClB,wBAAwB;CACxB,qBAAqB;CACrB,mBAAmB;AACpB;AACA;CACC,iBAAiB;CACjB,wBAAwB;CACxB,wBAAwB;AACzB;AACA;CACC,iBAAiB;CACjB,wBAAwB;AACzB;AACA;CACC,iBAAiB;CACjB,qBAAqB;CACrB,mBAAmB;AACpB;AACA;CACC,qBAAqB;CACrB,kBAAkB;AACnB;AACA;CACC,iBAAiB;CACjB,UAAU;AACX;AACA;CACC,eAAe;AAChB;AACA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;AACA;CACC,qBAAqB;CACrB,iBAAiB;CACjB,YAAY;AACb;;AAEA;CACC,yCAAyC;CACzC,cAAc;CACd,WAAW;CACX,UAAU;CACV,qDAAqD;CACrD,gBAAgB;CAChB,kBAAkB;AACnB;AACA;CACC,gBAAgB;CAChB,wEAAwE;AACzE;AACA;CACC,wEAAwE;CACxE,mBAAmB;AACpB;AACA;CACC,YAAY;CACZ,cAAc;CACd,SAAS;CACT,eAAe;CACf,kBAAkB;CAClB,QAAQ;CACR,YAAY;CACZ,sCAAsC;AACvC;AACA;CACC,cAAc;CACd,WAAW;CACX,YAAY;CACZ,cAAc;CACd,SAAS;CACT,gCAAgC;CAChC,eAAe;AAChB;AACA;CACC,+CAA+C;AAChD;AACA;CACC,iBAAiB;CACjB,cAAc;CACd,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;CACC,aAAa;CACb,kBAAkB;CAClB,kBAAkB;AACnB;AACA;CACC,YAAY;CACZ,cAAc;CACd,mBAAmB;CACnB,gBAAgB;CAChB,iBAAiB;CACjB,iBAAiB;AAClB;AACA;CACC,0EAA0E;CAC1E,iBAAiB;AAClB;AACA;CACC,0EAA0E;CAC1E,kBAAkB;AACnB;;AAEA;CACC;EACC,6BAA6B,EAAE,kCAAkC;CAClE;CACA;EACC,cAAc;EACd,mBAAmB;CACpB;CACA;EACC,cAAc;EACd,WAAW;EACX,YAAY;EACZ,YAAY;CACb;CACA;EACC,wBAAwB;CACzB;CACA;EACC,wBAAwB;CACzB;CACA;EACC,aAAa;CACd;AACD",sourcesContent:['#popups:not(:empty) {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n#popups .popup {\r\n\tposition:fixed;\r\n\tdisplay:none;\r\n\ttop: 15vh;\r\n\tleft: calc(100vw / 2);\r\n\ttransform: translate(-50%, 0);\r\n\tbackground-color: #7A838B;\r\n\tbackground-color: var(--block-background-color);\r\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\r\n\tborder: 1px solid var(--border-color);\r\n\twidth: 90vw;\r\n\tmax-width: 500px;\r\n\tmax-height: calc(80vh);\r\n\tmargin:0px auto 0px auto;\r\n\tpadding: 4rem 0 5rem 0;\r\n\tbox-shadow: 0 0 0 4000px rgba(0,0,0,0.3), 0 0 20px rgba(0,0,0,0.5);\r\n\tz-index: 100;\r\n\tfont-size: 13px;\r\n\toverflow: hidden;\r\n}\r\n#popups .popup.wide{\r\n\tmax-width: 840px;\r\n}\r\n#popups .popup a{\r\n\tcolor: var(--link-color);\r\n}\r\n#popups .popup h2{\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tmargin: 0;\r\n\theight: 4rem;\r\n\tline-height: 4rem;\r\n\tpadding: 0 1rem;\r\n\tfont-size: 1.8rem;\r\n\tbackground-color: rgba(255, 255, 255, 0.3);\r\n\tbackground-color: var(--header-background-color);\r\n\tz-index: 0;\r\n\tcursor:move;\r\n}\r\n#popups .popup .dialog_content {\r\n\toverflow-y: auto;\r\n\tmax-height: calc(80vh - 11rem);\r\n\tpadding: 1rem;\r\n}\r\n#popups .popup .buttons{\r\n\tposition: absolute;\r\n\tbackground-color: var(--block-background-color);\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\theight: 5rem;\r\n\tline-height: 4rem;\r\n\tmargin: 0;\r\n\tpadding: .5rem 0;\r\n\ttext-align: center;\r\n\tborder-top: 1px solid var(--header-background-color);\r\n\tz-index: 3;\r\n}\r\n#popups .popup .close{\r\n\tposition: absolute;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tmin-width: 0;\r\n\tpadding: 5px;\r\n\tline-height: 0.5;\r\n\tfont-size: 16px;\r\n\tmargin-top: 10px;\r\n\tmargin-right: 10px;\r\n\tborder: none;\r\n\tbackground: none;\r\n\tz-index: 1;\r\n}\r\n#popups .popup input[type="range"]{\r\n\tmargin:0;\r\n\twidth: 100%;\r\n}\r\n#popups .popup table{\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n}\r\n#popups .popup td, #popups .popup th{\r\n\theight: 25px;\r\n}\r\n#popups .popup td{\r\n\tvertical-align: middle;\r\n}\r\n#popups .popup th{\r\n\ttext-align:left;\r\n\tpadding: 5px 5px 5px 0;\r\n\twidth: 130px;\r\n}\r\n#popups .popup textarea{\r\n\tcolor: var(--input-text-color);\r\n\twidth:100%;\r\n\tborder:1px solid #393939;\r\n\tpadding-left:5px;\r\n}\r\n#popups .popup .button{\r\n\tmargin: 0 3px;\r\n\tbackground-color: rgba(255, 255, 255, 0.2);\r\n\tbackground-color: var(--button-background-color);\r\n\tmin-width:60px;\r\n\tborder:1px solid rgba(0, 0, 0, 0.5);\r\n\tborder:1px solid var(--border-color);\r\n\tpadding: 5px 10px;\r\n}\r\n#popups .popup input[type="text"], #popups .popup input[type="number"], #popups .popup textarea{\r\n\twidth:100%;\r\n}\r\n#popups .popup input[type="number"]{\r\n\twidth:100px;\r\n}\r\n#popups .popup input[type="radio"], #popups .popup input[type="checkbox"]{\r\n\tmargin-left: 0;\r\n}\r\n#popups .popup label span{\r\n\tcolor:var(--text-color-muted);\r\n}\r\n#popups .popup .checkbox label{\r\n\tmargin-top: 5px;\r\n\tcolor:var(--text-color-muted);\r\n}\r\n#popups .popup .preview_container{\r\n\tmargin-top:10px;\r\n\tmargin-bottom:15px;\r\n\ttext-align: center;\r\n}\r\n#popups .popup .preview_canvas_left{\r\n\tposition:relative;\r\n\tmargin:0 5px 5px 0;\r\n\tborder:1px solid #393939;\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n#popups .popup .preview_canvas_post_back{\r\n\tposition:absolute;\r\n\tborder:1px solid #393939;\r\n\tbackground-color:#ffffff;\r\n}\r\n#popups .popup .preview_canvas_post{\r\n\tposition:relative;\r\n\tborder:1px solid #393939;\r\n}\r\n#popups .popup .canvas_preview_container{\r\n\tposition:relative;\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n#popups .popup .radios label{\r\n\tdisplay: inline-block;\r\n\tmargin-right: 10px;\r\n}\r\n#popups .popup .range_value{\r\n\tpadding-left:10px;\r\n\twidth:50px;\r\n}\r\n#popups .popup .long_text_value{\r\n\tfont-size: 12px;\r\n}\r\n#popups .popup .preview-item-title{\r\n\ttext-align: center;\r\n\tmax-width: 150px;\r\n}\r\n#popups .popup .field_comment{\r\n\tdisplay: inline-block;\r\n\tmargin-left: 10px;\r\n\topacity: 0.5;\r\n}\r\n\r\n#popups .popup .selection_card {\r\n\tbackground: var(--input-background-color);\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\tpadding: 0;\r\n\tborder-bottom: 0.1rem solid var(--input-border-color);\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n#popups .popup .selection_card:first-child {\r\n\tmargin-top: 1rem;\r\n\tborder-radius: var(--input-border-radius) var(--input-border-radius) 0 0;\r\n}\r\n#popups .popup .selection_card:last-child {\r\n\tborder-radius: 0 0 var(--input-border-radius) var(--input-border-radius);\r\n\tborder-bottom: none;\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] {\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tcursor: pointer;\r\n\tposition: absolute;\r\n\ttop: 50%;\r\n\tleft: 1.5rem;\r\n\ttransform: translateY(-50%) scale(1.5);\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] + label {\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\tflex-grow: 1;\r\n\tflex-shrink: 1;\r\n\tmargin: 0;\r\n\tpadding: 1rem 0.5rem 1rem 5.5rem;\r\n\tcursor: pointer;\r\n}\r\n#popups .popup .selection_card > input[type="checkbox"] + label:hover {\r\n\tbackground: var(--input-background-color-hover);\r\n}\r\n#popups .popup .selection_card .font_preview {\r\n\tfont-size: 1.6rem;\r\n\theight: 2.5rem;\r\n\tline-height: 2.5rem;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n#popups .popup .pagination {\r\n\tdisplay: flex;\r\n\ttext-align: center;\r\n\tmargin: 1rem 0 0 0;\r\n}\r\n#popups .popup .pagination button {\r\n\tflex-grow: 0;\r\n\theight: 2.8rem;\r\n\tline-height: 2.8rem;\r\n\tborder-radius: 0;\r\n\tmargin-left: -1px;\r\n\tmin-width: 3.3rem;\r\n}\r\n#popups .popup .pagination button:first-child {\r\n\tborder-radius: var(--button-border-radius) 0 0 var(--button-border-radius);\r\n\tmargin-left: auto;\r\n}\r\n#popups .popup .pagination button:last-child {\r\n\tborder-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;\r\n\tmargin-right: auto;\r\n}\r\n\r\n@media screen and (max-width:500px){\r\n\t#popups .popup {\r\n\t\tmax-height: calc(80vh - 20px); /* mobile phones has bottom menu */\r\n\t}\r\n\t#popups .popup tr{\r\n\t\tdisplay: block;\r\n\t\tmargin-bottom: 10px;\r\n\t}\r\n\t#popups .popup td, #popups .popup th{\r\n\t\tdisplay: block;\r\n\t\twidth: 100%;\r\n\t\theight: auto;\r\n\t\tpadding: 5px;\r\n\t}\r\n\t#popups .popup th{\r\n\t\tpadding: 5px 5px 0px 5px;\r\n\t}\r\n\t#popups .popup td{\r\n\t\tpadding: 5px 5px 5px 5px;\r\n\t}\r\n\t#popups .popup .range_value{\r\n\t\tdisplay: none;\r\n\t}\r\n}\r\n'],sourceRoot:""}]);const s=o},8027:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,"@media print{\r\n\tbody{\r\n\t\tbackground:none !important;\r\n\t\tbackground: #fff;\r\n\t\tbackground-color: #fff;\r\n\t\tfont-family: Arial,Helvetica,Verdana;\r\n\t\twidth:auto !important;\r\n\t\tpadding:5px !important;\r\n\t\tfont-size: 12px;\r\n\t}\r\n\tprogress,\r\n\t.menu,\r\n\t.sidebar_left,\r\n\t.sidebar_right,\r\n\t.submenu,\r\n\t.main_menu{\r\n\t\tdisplay: none;\r\n\t\theight: 0;\r\n\t\twidth: 0;\r\n\t}\r\n\t.main_wrapper{\r\n\t\tmargin:0px;\r\n\t\tpadding:0px;\r\n\t}\r\n\tcanvas{\r\n\t\tborder:0px;\r\n\t\tposition: absolute;\r\n\t\ttop:0px;\r\n\t\tleft:0px;\r\n\t}\r\n\t.canvas_wrapper canvas{\r\n\t\tborder:0;\r\n\t}\r\n}\r\n","",{version:3,sources:["webpack://./src/css/print.css"],names:[],mappings:"AAAA;CACC;EACC,0BAA0B;EAC1B,gBAAgB;EAChB,sBAAsB;EACtB,oCAAoC;EACpC,qBAAqB;EACrB,sBAAsB;EACtB,eAAe;CAChB;CACA;;;;;;EAMC,aAAa;EACb,SAAS;EACT,QAAQ;CACT;CACA;EACC,UAAU;EACV,WAAW;CACZ;CACA;EACC,UAAU;EACV,kBAAkB;EAClB,OAAO;EACP,QAAQ;CACT;CACA;EACC,QAAQ;CACT;AACD",sourcesContent:["@media print{\r\n\tbody{\r\n\t\tbackground:none !important;\r\n\t\tbackground: #fff;\r\n\t\tbackground-color: #fff;\r\n\t\tfont-family: Arial,Helvetica,Verdana;\r\n\t\twidth:auto !important;\r\n\t\tpadding:5px !important;\r\n\t\tfont-size: 12px;\r\n\t}\r\n\tprogress,\r\n\t.menu,\r\n\t.sidebar_left,\r\n\t.sidebar_right,\r\n\t.submenu,\r\n\t.main_menu{\r\n\t\tdisplay: none;\r\n\t\theight: 0;\r\n\t\twidth: 0;\r\n\t}\r\n\t.main_wrapper{\r\n\t\tmargin:0px;\r\n\t\tpadding:0px;\r\n\t}\r\n\tcanvas{\r\n\t\tborder:0px;\r\n\t\tposition: absolute;\r\n\t\ttop:0px;\r\n\t\tleft:0px;\r\n\t}\r\n\t.canvas_wrapper canvas{\r\n\t\tborder:0;\r\n\t}\r\n}\r\n"],sourceRoot:""}]);const s=o},724:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,':root {\r\n\t/* original - default */\r\n\t--background: #666d6f;\r\n\t--text-color: #f4f3f3;\r\n\t--text-color-muted: #c1c1c1;\r\n\t--text-color-red: #e38282;\r\n\t--text-color-green: #8bdb8b;\r\n\t--text-color-blue: #a4a4ff;\r\n\t--link-color: #9ffda5;\r\n\t--section-background-color: #323a3c;\r\n\t--area-background-color: #464d4f;\r\n\t--block-background-color: #464d4f;\r\n\t--header-background-color: #373d3f;\r\n\t--button-background-color: #2f3739;\r\n\t--button-background-color-hover: #75df72;\r\n\t--button-background-color-active: #4d5153;\r\n\t--button-shadow-color: rgba(0, 0, 0, 0.3);\r\n\t--button-text-color-active: #adecab;\r\n\t--button-border-radius: .4rem;\r\n\t--button-toggle-background-color: #575f62;\r\n\t--button-toggle-background-color-hover: #575f62;\r\n\t--input-background-color: #2f3739;\r\n\t--input-background-color-hover: #383f44;\r\n\t--input-text-color: #f4f3f3;\r\n\t--input-border-color: #0f0f0f;\r\n\t--input-border-color-active: #70996e;\r\n\t--input-border-radius: .4rem;\r\n\t--input-group-border-color: #323a3c;\r\n\t--menu-background-color: #222;\r\n\t--menu-icons-filter: invert(1);\r\n\t--menu-icons-filter-active: none;\r\n\t--menu-text-color: #cccccc;\r\n\t--number-input-arrow-width: 2rem;\r\n\t--background-color-active: #adecab;\r\n\t--background-color-hover: #575f62;\r\n\t--text-color-active: #215b2a;\r\n\t--border-color: #727677;\r\n\t--scrollbar-track-color: #464d4f;\r\n\t--scrollbar-thumb-color: #2f3739;\r\n\t--mobile-menu-toggle-filter: invert(1);\r\n}\r\nbody.theme-light{\r\n\t/* light */\r\n\t--background: #f9f9fa;\r\n\t--text-color: #0c0c0d;\r\n\t--text-color-muted: #444444;\r\n\t--text-color-red: #bb2424;\r\n\t--text-color-green: #2b882b;\r\n\t--text-color-blue: #5454ca;\r\n\t--link-color: #000080;\r\n\t--section-background-color: #eaeaea;\r\n\t--area-background-color: #d9d9d9;\r\n\t--block-background-color: #eaeaea;\r\n\t--header-background-color: #dbdbdb;\r\n\t--button-background-color: #f9f9fa;\r\n\t--button-background-color-hover: #ddd;\r\n\t--button-background-color-active: #f3f3f3;\r\n\t--button-text-color-active: #59aed8;\r\n\t--button-shadow-color: rgba(0, 0, 0, 0.1);\r\n\t--button-toggle-background-color: #b7b7b7;\r\n\t--button-toggle-background-color-hover: #b7b7b7;\r\n\t--input-background-color: #ffffff;\r\n\t--input-background-color-hover: #ddd;\r\n\t--input-text-color: #0c0c0d;\r\n\t--input-border-color: #ccc;\r\n\t--input-border-color-active: #59aed8;\r\n\t--input-group-border-color: #c4c4c4;\r\n\t--menu-background-color: #eaeaea;\r\n\t--menu-icons-filter: none;\r\n\t--menu-icons-filter-active: invert(1);\r\n\t--menu-text-color: #333333;\r\n\t--menu-dropdown-hover-background-color: #a3dbf7;\r\n\t--menu-dropdown-border-color: #15439b;\r\n\t--background-color-active: #a3dbf7;\r\n\t--background-color-hover: #c4c4c4;\r\n\t--text-color-active: #15439b;\r\n\t--border-color: #c1c1c1;\r\n\t--scrollbar-track-color: #f9f9fa;\r\n\t--scrollbar-thumb-color: #919090;\r\n\t--mobile-menu-toggle-filter: none;\r\n}\r\nbody.theme-green{\r\n\t/* green */\r\n\t--background: #050702;\r\n\t--text-color: #acc3a9;\r\n\t--text-color-muted: #80937d;\r\n\t--link-color: #9ffda5;\r\n\t--section-background-color: #1c2e04;\r\n\t--area-background-color: #3b5f11;\r\n\t--block-background-color: #3b5f11;\r\n\t--header-background-color: #2b460f;\r\n\t--button-background-color: #2e4a0d;\r\n\t--button-background-color-hover: #58960e;\r\n\t--button-background-color-active:#2b460f;\r\n\t--button-text-color-active: #ccc;\r\n\t--button-toggle-background-color: #243e05;\r\n\t--button-toggle-background-color-hover: #243e05;\r\n\t--input-background-color: #ffffff;\r\n\t--input-background-color-hover: #ddd;\r\n\t--input-text-color: #0c0c0d;\r\n\t--input-border-color: #ccc;\r\n\t--menu-background-color: #1c2e04;\r\n\t--menu-icons-filter: invert(1);\r\n\t--menu-icons-filter-active: none;\r\n\t--menu-text-color: #acc3a9;\r\n\t--background-color-active: #58960e;\r\n\t--background-color-hover: #58960e;\r\n\t--text-color-active: #acc3a9;\r\n\t--border-color: #4d6b1e;\r\n\t--scrollbar-track-color: #050702;\r\n\t--scrollbar-thumb-color: #80937d;\r\n\t--mobile-menu-toggle-filter: invert(1);\r\n}\r\n\r\n*{\r\n\tbox-sizing: border-box;\r\n\tbackground-repeat: no-repeat;\r\n}\r\nhtml {\r\n\tfont-size: 10px; /* Base is 10px for easy REM calculation */\r\n}\r\nbody{\r\n\tmargin: 0;\r\n\tpadding: 30px 0 0 0;\r\n\tbackground-color: #424F5A;\r\n\tbackground: var(--background);\r\n\tfont-size: 1.3rem;\r\n\tfont-family: Arial, Helvetica, sans-serif;\r\n\tcolor: var(--text-color);\r\n\tline-height: 1.4;\r\n\tfont-weight: normal;\r\n\toverflow: hidden;\r\n}\r\ncanvas{\r\n\toutline: none;\r\n\t/* disable select canvas */\r\n\t-webkit-touch-callout: none;\r\n\t-ms-user-select: none;\r\n\t-webkit-user-select: none;\r\n\tuser-select: none;\r\n}\r\nimg{\r\n\tborder: none;\r\n}\r\ntd, th{\r\n\tvertical-align:top;\r\n}\r\ntable{\r\n\tborder: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tvertical-align: baseline;\r\n\tborder-collapse: collapse;\r\n\tborder-spacing: 0;\r\n\twidth:100%;\r\n}\r\nhr{\r\n\tborder-color: rgba(0,0,0,0.3);\r\n\tborder-bottom: 0;\r\n}\r\ninput[type="text"], select, input[type="number"], textarea{\r\n\tbackground: var(--input-background-color);\r\n\tborder: 1px solid var(--input-border-color);\r\n\tborder-radius: var(--input-border-radius);\r\n\tcolor: var(--input-text-color);\r\n\tpadding: 3px 5px;\r\n\tfont-size: 13px;\r\n}\r\ninput:disabled {\r\n\topacity: 0.3;\r\n}\r\nselect{\r\n\tpadding: 2px 4px;\r\n}\r\ninput[type="range"]{\r\n\tmargin-left: 0;\r\n\twidth:100%;\r\n}\r\nbutton, input[type="button"]{\r\n\tborder-radius: var(--button-border-radius);\r\n\tbox-shadow: 0 1px 2px 0 var(--button-shadow-color), 0 1px 0 0 rgba(255, 255, 255, 0.1) inset;\r\n\tcursor: pointer;\r\n\tborder: 1px solid var(--border-color);\r\n\tbackground-color: var(--button-background-color);\r\n\tcolor: var(--text-color);\r\n}\r\nbutton:hover, input[type="button"]:hover{\r\n\tbackground-color: var(--button-background-color-hover);\r\n}\r\nbutton:disabled, input[type="button"]:disabled{\r\n\tvisibility:hidden;\r\n}\r\nbutton[aria-pressed="true"], input[type="button"][aria-pressed="true"]{\r\n\tbackground-color: var(--button-background-color-active);\r\n\tcolor: var(--button-text-color-active);\r\n\tbox-shadow: 0 1px 2px 0 var(--button-shadow-color), 0 1px 1px 1.5px rgba(58, 40, 40, 0.1) inset, 0 -1px 0 0 var(--button-text-color-active) inset;\r\n}\r\nbutton[aria-pressed="true"]:hover, input[type="button"][aria-pressed="true"]:hover{\r\n\tbackground-color: var(--button-background-color-hover);\r\n}\r\nbutton.ui_toggle_button:hover{\r\n\tbackground-color: var(--button-toggle-background-color-hover);\r\n}\r\nlabel{\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n\tmargin-top: 7px;\r\n}\r\n::-webkit-scrollbar {\r\n width: 12px;\r\n height: 12px;\r\n}\r\n::-webkit-scrollbar-track-piece {\r\n background: rgba(0,0,0,0.3);\r\n}\r\n::-webkit-scrollbar-thumb {\r\n background: rgba(0,0,0,0.6);\r\n}\r\n@supports (zoom:2) {\r\n\tinput[type="radio"], input[type=checkbox]{\r\n\t\tzoom: 1.5;\r\n\t}\r\n}\r\n@supports not (zoom:2) {\r\n\tinput[type="radio"], input[type=checkbox]{\r\n\t\ttransform: scale(1.5);\r\n\t\ttransform-origin: left center;\r\n\t\tmargin: 8px 12px 8px 0;\r\n\t}\r\n}\r\n',"",{version:3,sources:["webpack://./src/css/reset.css"],names:[],mappings:"AAAA;CACC,uBAAuB;CACvB,qBAAqB;CACrB,qBAAqB;CACrB,2BAA2B;CAC3B,yBAAyB;CACzB,2BAA2B;CAC3B,0BAA0B;CAC1B,qBAAqB;CACrB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,kCAAkC;CAClC,kCAAkC;CAClC,wCAAwC;CACxC,yCAAyC;CACzC,yCAAyC;CACzC,mCAAmC;CACnC,6BAA6B;CAC7B,yCAAyC;CACzC,+CAA+C;CAC/C,iCAAiC;CACjC,uCAAuC;CACvC,2BAA2B;CAC3B,6BAA6B;CAC7B,oCAAoC;CACpC,4BAA4B;CAC5B,oCAAoC;CACpC,6BAA6B;CAC7B,8BAA8B;CAC9B,gCAAgC;CAChC,0BAA0B;CAC1B,gCAAgC;CAChC,kCAAkC;CAClC,iCAAiC;CACjC,4BAA4B;CAC5B,uBAAuB;CACvB,gCAAgC;CAChC,gCAAgC;CAChC,sCAAsC;AACvC;AACA;CACC,UAAU;CACV,qBAAqB;CACrB,qBAAqB;CACrB,2BAA2B;CAC3B,yBAAyB;CACzB,2BAA2B;CAC3B,0BAA0B;CAC1B,qBAAqB;CACrB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,kCAAkC;CAClC,kCAAkC;CAClC,qCAAqC;CACrC,yCAAyC;CACzC,mCAAmC;CACnC,yCAAyC;CACzC,yCAAyC;CACzC,+CAA+C;CAC/C,iCAAiC;CACjC,oCAAoC;CACpC,2BAA2B;CAC3B,0BAA0B;CAC1B,oCAAoC;CACpC,mCAAmC;CACnC,gCAAgC;CAChC,yBAAyB;CACzB,qCAAqC;CACrC,0BAA0B;CAC1B,+CAA+C;CAC/C,qCAAqC;CACrC,kCAAkC;CAClC,iCAAiC;CACjC,4BAA4B;CAC5B,uBAAuB;CACvB,gCAAgC;CAChC,gCAAgC;CAChC,iCAAiC;AAClC;AACA;CACC,UAAU;CACV,qBAAqB;CACrB,qBAAqB;CACrB,2BAA2B;CAC3B,qBAAqB;CACrB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,kCAAkC;CAClC,kCAAkC;CAClC,wCAAwC;CACxC,wCAAwC;CACxC,gCAAgC;CAChC,yCAAyC;CACzC,+CAA+C;CAC/C,iCAAiC;CACjC,oCAAoC;CACpC,2BAA2B;CAC3B,0BAA0B;CAC1B,gCAAgC;CAChC,8BAA8B;CAC9B,gCAAgC;CAChC,0BAA0B;CAC1B,kCAAkC;CAClC,iCAAiC;CACjC,4BAA4B;CAC5B,uBAAuB;CACvB,gCAAgC;CAChC,gCAAgC;CAChC,sCAAsC;AACvC;;AAEA;CACC,sBAAsB;CACtB,4BAA4B;AAC7B;AACA;CACC,eAAe,EAAE,0CAA0C;AAC5D;AACA;CACC,SAAS;CACT,mBAAmB;CACnB,yBAAyB;CACzB,6BAA6B;CAC7B,iBAAiB;CACjB,yCAAyC;CACzC,wBAAwB;CACxB,gBAAgB;CAChB,mBAAmB;CACnB,gBAAgB;AACjB;AACA;CACC,aAAa;CACb,0BAA0B;CAC1B,2BAA2B;CAC3B,qBAAqB;CACrB,yBAAyB;CACzB,iBAAiB;AAClB;AACA;CACC,YAAY;AACb;AACA;CACC,kBAAkB;AACnB;AACA;CACC,SAAS;CACT,SAAS;CACT,UAAU;CACV,wBAAwB;CACxB,yBAAyB;CACzB,iBAAiB;CACjB,UAAU;AACX;AACA;CACC,6BAA6B;CAC7B,gBAAgB;AACjB;AACA;CACC,yCAAyC;CACzC,2CAA2C;CAC3C,yCAAyC;CACzC,8BAA8B;CAC9B,gBAAgB;CAChB,eAAe;AAChB;AACA;CACC,YAAY;AACb;AACA;CACC,gBAAgB;AACjB;AACA;CACC,cAAc;CACd,UAAU;AACX;AACA;CACC,0CAA0C;CAC1C,4FAA4F;CAC5F,eAAe;CACf,qCAAqC;CACrC,gDAAgD;CAChD,wBAAwB;AACzB;AACA;CACC,sDAAsD;AACvD;AACA;CACC,iBAAiB;AAClB;AACA;CACC,uDAAuD;CACvD,sCAAsC;CACtC,iJAAiJ;AAClJ;AACA;CACC,sDAAsD;AACvD;AACA;CACC,6DAA6D;AAC9D;AACA;CACC,qBAAqB;CACrB,mBAAmB;CACnB,eAAe;AAChB;AACA;IACI,WAAW;IACX,YAAY;AAChB;AACA;IACI,2BAA2B;AAC/B;AACA;IACI,2BAA2B;AAC/B;AACA;CACC;EACC,SAAS;CACV;AACD;AACA;CACC;EACC,qBAAqB;EACrB,6BAA6B;EAC7B,sBAAsB;CACvB;AACD",sourcesContent:[':root {\r\n\t/* original - default */\r\n\t--background: #666d6f;\r\n\t--text-color: #f4f3f3;\r\n\t--text-color-muted: #c1c1c1;\r\n\t--text-color-red: #e38282;\r\n\t--text-color-green: #8bdb8b;\r\n\t--text-color-blue: #a4a4ff;\r\n\t--link-color: #9ffda5;\r\n\t--section-background-color: #323a3c;\r\n\t--area-background-color: #464d4f;\r\n\t--block-background-color: #464d4f;\r\n\t--header-background-color: #373d3f;\r\n\t--button-background-color: #2f3739;\r\n\t--button-background-color-hover: #75df72;\r\n\t--button-background-color-active: #4d5153;\r\n\t--button-shadow-color: rgba(0, 0, 0, 0.3);\r\n\t--button-text-color-active: #adecab;\r\n\t--button-border-radius: .4rem;\r\n\t--button-toggle-background-color: #575f62;\r\n\t--button-toggle-background-color-hover: #575f62;\r\n\t--input-background-color: #2f3739;\r\n\t--input-background-color-hover: #383f44;\r\n\t--input-text-color: #f4f3f3;\r\n\t--input-border-color: #0f0f0f;\r\n\t--input-border-color-active: #70996e;\r\n\t--input-border-radius: .4rem;\r\n\t--input-group-border-color: #323a3c;\r\n\t--menu-background-color: #222;\r\n\t--menu-icons-filter: invert(1);\r\n\t--menu-icons-filter-active: none;\r\n\t--menu-text-color: #cccccc;\r\n\t--number-input-arrow-width: 2rem;\r\n\t--background-color-active: #adecab;\r\n\t--background-color-hover: #575f62;\r\n\t--text-color-active: #215b2a;\r\n\t--border-color: #727677;\r\n\t--scrollbar-track-color: #464d4f;\r\n\t--scrollbar-thumb-color: #2f3739;\r\n\t--mobile-menu-toggle-filter: invert(1);\r\n}\r\nbody.theme-light{\r\n\t/* light */\r\n\t--background: #f9f9fa;\r\n\t--text-color: #0c0c0d;\r\n\t--text-color-muted: #444444;\r\n\t--text-color-red: #bb2424;\r\n\t--text-color-green: #2b882b;\r\n\t--text-color-blue: #5454ca;\r\n\t--link-color: #000080;\r\n\t--section-background-color: #eaeaea;\r\n\t--area-background-color: #d9d9d9;\r\n\t--block-background-color: #eaeaea;\r\n\t--header-background-color: #dbdbdb;\r\n\t--button-background-color: #f9f9fa;\r\n\t--button-background-color-hover: #ddd;\r\n\t--button-background-color-active: #f3f3f3;\r\n\t--button-text-color-active: #59aed8;\r\n\t--button-shadow-color: rgba(0, 0, 0, 0.1);\r\n\t--button-toggle-background-color: #b7b7b7;\r\n\t--button-toggle-background-color-hover: #b7b7b7;\r\n\t--input-background-color: #ffffff;\r\n\t--input-background-color-hover: #ddd;\r\n\t--input-text-color: #0c0c0d;\r\n\t--input-border-color: #ccc;\r\n\t--input-border-color-active: #59aed8;\r\n\t--input-group-border-color: #c4c4c4;\r\n\t--menu-background-color: #eaeaea;\r\n\t--menu-icons-filter: none;\r\n\t--menu-icons-filter-active: invert(1);\r\n\t--menu-text-color: #333333;\r\n\t--menu-dropdown-hover-background-color: #a3dbf7;\r\n\t--menu-dropdown-border-color: #15439b;\r\n\t--background-color-active: #a3dbf7;\r\n\t--background-color-hover: #c4c4c4;\r\n\t--text-color-active: #15439b;\r\n\t--border-color: #c1c1c1;\r\n\t--scrollbar-track-color: #f9f9fa;\r\n\t--scrollbar-thumb-color: #919090;\r\n\t--mobile-menu-toggle-filter: none;\r\n}\r\nbody.theme-green{\r\n\t/* green */\r\n\t--background: #050702;\r\n\t--text-color: #acc3a9;\r\n\t--text-color-muted: #80937d;\r\n\t--link-color: #9ffda5;\r\n\t--section-background-color: #1c2e04;\r\n\t--area-background-color: #3b5f11;\r\n\t--block-background-color: #3b5f11;\r\n\t--header-background-color: #2b460f;\r\n\t--button-background-color: #2e4a0d;\r\n\t--button-background-color-hover: #58960e;\r\n\t--button-background-color-active:#2b460f;\r\n\t--button-text-color-active: #ccc;\r\n\t--button-toggle-background-color: #243e05;\r\n\t--button-toggle-background-color-hover: #243e05;\r\n\t--input-background-color: #ffffff;\r\n\t--input-background-color-hover: #ddd;\r\n\t--input-text-color: #0c0c0d;\r\n\t--input-border-color: #ccc;\r\n\t--menu-background-color: #1c2e04;\r\n\t--menu-icons-filter: invert(1);\r\n\t--menu-icons-filter-active: none;\r\n\t--menu-text-color: #acc3a9;\r\n\t--background-color-active: #58960e;\r\n\t--background-color-hover: #58960e;\r\n\t--text-color-active: #acc3a9;\r\n\t--border-color: #4d6b1e;\r\n\t--scrollbar-track-color: #050702;\r\n\t--scrollbar-thumb-color: #80937d;\r\n\t--mobile-menu-toggle-filter: invert(1);\r\n}\r\n\r\n*{\r\n\tbox-sizing: border-box;\r\n\tbackground-repeat: no-repeat;\r\n}\r\nhtml {\r\n\tfont-size: 10px; /* Base is 10px for easy REM calculation */\r\n}\r\nbody{\r\n\tmargin: 0;\r\n\tpadding: 30px 0 0 0;\r\n\tbackground-color: #424F5A;\r\n\tbackground: var(--background);\r\n\tfont-size: 1.3rem;\r\n\tfont-family: Arial, Helvetica, sans-serif;\r\n\tcolor: var(--text-color);\r\n\tline-height: 1.4;\r\n\tfont-weight: normal;\r\n\toverflow: hidden;\r\n}\r\ncanvas{\r\n\toutline: none;\r\n\t/* disable select canvas */\r\n\t-webkit-touch-callout: none;\r\n\t-ms-user-select: none;\r\n\t-webkit-user-select: none;\r\n\tuser-select: none;\r\n}\r\nimg{\r\n\tborder: none;\r\n}\r\ntd, th{\r\n\tvertical-align:top;\r\n}\r\ntable{\r\n\tborder: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tvertical-align: baseline;\r\n\tborder-collapse: collapse;\r\n\tborder-spacing: 0;\r\n\twidth:100%;\r\n}\r\nhr{\r\n\tborder-color: rgba(0,0,0,0.3);\r\n\tborder-bottom: 0;\r\n}\r\ninput[type="text"], select, input[type="number"], textarea{\r\n\tbackground: var(--input-background-color);\r\n\tborder: 1px solid var(--input-border-color);\r\n\tborder-radius: var(--input-border-radius);\r\n\tcolor: var(--input-text-color);\r\n\tpadding: 3px 5px;\r\n\tfont-size: 13px;\r\n}\r\ninput:disabled {\r\n\topacity: 0.3;\r\n}\r\nselect{\r\n\tpadding: 2px 4px;\r\n}\r\ninput[type="range"]{\r\n\tmargin-left: 0;\r\n\twidth:100%;\r\n}\r\nbutton, input[type="button"]{\r\n\tborder-radius: var(--button-border-radius);\r\n\tbox-shadow: 0 1px 2px 0 var(--button-shadow-color), 0 1px 0 0 rgba(255, 255, 255, 0.1) inset;\r\n\tcursor: pointer;\r\n\tborder: 1px solid var(--border-color);\r\n\tbackground-color: var(--button-background-color);\r\n\tcolor: var(--text-color);\r\n}\r\nbutton:hover, input[type="button"]:hover{\r\n\tbackground-color: var(--button-background-color-hover);\r\n}\r\nbutton:disabled, input[type="button"]:disabled{\r\n\tvisibility:hidden;\r\n}\r\nbutton[aria-pressed="true"], input[type="button"][aria-pressed="true"]{\r\n\tbackground-color: var(--button-background-color-active);\r\n\tcolor: var(--button-text-color-active);\r\n\tbox-shadow: 0 1px 2px 0 var(--button-shadow-color), 0 1px 1px 1.5px rgba(58, 40, 40, 0.1) inset, 0 -1px 0 0 var(--button-text-color-active) inset;\r\n}\r\nbutton[aria-pressed="true"]:hover, input[type="button"][aria-pressed="true"]:hover{\r\n\tbackground-color: var(--button-background-color-hover);\r\n}\r\nbutton.ui_toggle_button:hover{\r\n\tbackground-color: var(--button-toggle-background-color-hover);\r\n}\r\nlabel{\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n\tmargin-top: 7px;\r\n}\r\n::-webkit-scrollbar {\r\n width: 12px;\r\n height: 12px;\r\n}\r\n::-webkit-scrollbar-track-piece {\r\n background: rgba(0,0,0,0.3);\r\n}\r\n::-webkit-scrollbar-thumb {\r\n background: rgba(0,0,0,0.6);\r\n}\r\n@supports (zoom:2) {\r\n\tinput[type="radio"], input[type=checkbox]{\r\n\t\tzoom: 1.5;\r\n\t}\r\n}\r\n@supports not (zoom:2) {\r\n\tinput[type="radio"], input[type=checkbox]{\r\n\t\ttransform: scale(1.5);\r\n\t\ttransform-origin: left center;\r\n\t\tmargin: 8px 12px 8px 0;\r\n\t}\r\n}\r\n'],sourceRoot:""}]);const s=o},9330:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4015),a=n.n(r),i=n(3645),o=n.n(i)()(a());o.push([e.id,'\r\n/* Common input label sizes */\r\n.label_width_character {\r\n width: 100%;\r\n max-width: 2.88rem;\r\n overflow: hidden;\r\n flex-shrink: 0;\r\n}\r\n.label_width_small {\r\n width: 100%;\r\n max-width: 6.4rem;\r\n overflow: hidden;\r\n}\r\n.label_width_medium {\r\n width: 100%;\r\n max-width: 10.4rem;\r\n overflow: hidden;\r\n}\r\n\r\n/* Font color utility */\r\n.text_red { color: var(--text-color-red); }\r\n.text_green { color: var(--text-color-green); }\r\n.text_blue { color: var(--text-color-blue); }\r\n.text_muted { color: var(--text-color-muted); }\r\n\r\n/*\r\n Size inputs based on the number of "w" characters that could fit in the input. "w" is usually the widest character.\r\n This is a rough estimate since all characters vary in width. For example an input with numbers\r\n usually fits way more characters than an input with letters.\r\n "cw" means character width\r\n*/\r\n.input_cw_1, .input_cw_2, .input_cw_3, .input_cw_4, .input_cw_5,\r\n.input_cw_6, .input_cw_7, .input_cw_8, .input_cw_9, .input_cw_10\r\n.input_cw_11, .input_cw_12, .input_cw_13, .input_cw_14, .input_cw_15 {\r\n width: 100%;\r\n}\r\n.input_cw_1 { max-width: 2.25rem; }\r\n.input_cw_2 { max-width: 3.25rem; }\r\n.input_cw_3 { max-width: 4.25rem; }\r\n.input_cw_4 { max-width: 5.25rem; }\r\n.input_cw_5 { max-width: 6.25rem; }\r\n.input_cw_6 { max-width: 7.25rem; }\r\n.input_cw_7 { max-width: 8.25rem; }\r\n.input_cw_8 { max-width: 9.25rem; }\r\n.input_cw_9 { max-width: 10.25rem; }\r\n.input_cw_10 { max-width: 11.25rem; }\r\n.input_cw_11 { max-width: 12.25rem; }\r\n.input_cw_12 { max-width: 13.25rem; }\r\n.input_cw_13 { max-width: 14.25rem; }\r\n.input_cw_14 { max-width: 15.25rem; }\r\n.input_cw_15 { max-width: 16.25rem; }\r\ninput[type="number"].input_cw_1 { max-width: 4.25rem; }\r\ninput[type="number"].input_cw_2 { max-width: 5.25rem; }\r\ninput[type="number"].input_cw_3 { max-width: 6.25rem; }\r\ninput[type="number"].input_cw_4 { max-width: 7.25rem; }\r\ninput[type="number"].input_cw_5 { max-width: 8.25rem; }\r\ninput[type="number"].input_cw_6 { max-width: 9.25rem; }\r\ninput[type="number"].input_cw_7 { max-width: 10.25rem; }\r\ninput[type="number"].input_cw_8 { max-width: 11.25rem; }\r\ninput[type="number"].input_cw_9 { max-width: 12.25rem; }\r\ninput[type="number"].input_cw_10 { max-width: 13.25rem; }\r\ninput[type="number"].input_cw_11 { max-width: 14.25rem; }\r\ninput[type="number"].input_cw_12 { max-width: 15.25rem; }\r\ninput[type="number"].input_cw_13 { max-width: 16.25rem; }\r\ninput[type="number"].input_cw_14 { max-width: 17.25rem; }\r\ninput[type="number"].input_cw_15 { max-width: 18.25rem; }\r\n.ui_number_input.input_cw_1 { max-width: calc(2.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_2 { max-width: calc(3.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_3 { max-width: calc(4.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_4 { max-width: calc(5.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_5 { max-width: calc(6.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_6 { max-width: calc(7.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_7 { max-width: calc(8.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_8 { max-width: calc(9.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_9 { max-width: calc(10.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_10 { max-width: calc(11.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_11 { max-width: calc(12.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_12 { max-width: calc(13.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_13 { max-width: calc(14.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_14 { max-width: calc(15.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_15 { max-width: calc(16.25rem + var(--number-input-arrow-width)); }',"",{version:3,sources:["webpack://./src/css/utility.css"],names:[],mappings:";AACA,6BAA6B;AAC7B;IACI,WAAW;IACX,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;AAClB;AACA;IACI,WAAW;IACX,iBAAiB;IACjB,gBAAgB;AACpB;AACA;IACI,WAAW;IACX,kBAAkB;IAClB,gBAAgB;AACpB;;AAEA,uBAAuB;AACvB,YAAY,4BAA4B,EAAE;AAC1C,cAAc,8BAA8B,EAAE;AAC9C,aAAa,6BAA6B,EAAE;AAC5C,cAAc,8BAA8B,EAAE;;AAE9C;;;;;CAKC;AACD;;;IAGI,WAAW;AACf;AACA,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,kBAAkB,EAAE;AAClC,cAAc,mBAAmB,EAAE;AACnC,eAAe,mBAAmB,EAAE;AACpC,eAAe,mBAAmB,EAAE;AACpC,eAAe,mBAAmB,EAAE;AACpC,eAAe,mBAAmB,EAAE;AACpC,eAAe,mBAAmB,EAAE;AACpC,eAAe,mBAAmB,EAAE;AACpC,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,kBAAkB,EAAE;AACtD,kCAAkC,mBAAmB,EAAE;AACvD,kCAAkC,mBAAmB,EAAE;AACvD,kCAAkC,mBAAmB,EAAE;AACvD,mCAAmC,mBAAmB,EAAE;AACxD,mCAAmC,mBAAmB,EAAE;AACxD,mCAAmC,mBAAmB,EAAE;AACxD,mCAAmC,mBAAmB,EAAE;AACxD,mCAAmC,mBAAmB,EAAE;AACxD,mCAAmC,mBAAmB,EAAE;AACxD,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,0DAA0D,EAAE;AAC1F,8BAA8B,2DAA2D,EAAE;AAC3F,+BAA+B,2DAA2D,EAAE;AAC5F,+BAA+B,2DAA2D,EAAE;AAC5F,+BAA+B,2DAA2D,EAAE;AAC5F,+BAA+B,2DAA2D,EAAE;AAC5F,+BAA+B,2DAA2D,EAAE;AAC5F,+BAA+B,2DAA2D,EAAE",sourcesContent:['\r\n/* Common input label sizes */\r\n.label_width_character {\r\n width: 100%;\r\n max-width: 2.88rem;\r\n overflow: hidden;\r\n flex-shrink: 0;\r\n}\r\n.label_width_small {\r\n width: 100%;\r\n max-width: 6.4rem;\r\n overflow: hidden;\r\n}\r\n.label_width_medium {\r\n width: 100%;\r\n max-width: 10.4rem;\r\n overflow: hidden;\r\n}\r\n\r\n/* Font color utility */\r\n.text_red { color: var(--text-color-red); }\r\n.text_green { color: var(--text-color-green); }\r\n.text_blue { color: var(--text-color-blue); }\r\n.text_muted { color: var(--text-color-muted); }\r\n\r\n/*\r\n Size inputs based on the number of "w" characters that could fit in the input. "w" is usually the widest character.\r\n This is a rough estimate since all characters vary in width. For example an input with numbers\r\n usually fits way more characters than an input with letters.\r\n "cw" means character width\r\n*/\r\n.input_cw_1, .input_cw_2, .input_cw_3, .input_cw_4, .input_cw_5,\r\n.input_cw_6, .input_cw_7, .input_cw_8, .input_cw_9, .input_cw_10\r\n.input_cw_11, .input_cw_12, .input_cw_13, .input_cw_14, .input_cw_15 {\r\n width: 100%;\r\n}\r\n.input_cw_1 { max-width: 2.25rem; }\r\n.input_cw_2 { max-width: 3.25rem; }\r\n.input_cw_3 { max-width: 4.25rem; }\r\n.input_cw_4 { max-width: 5.25rem; }\r\n.input_cw_5 { max-width: 6.25rem; }\r\n.input_cw_6 { max-width: 7.25rem; }\r\n.input_cw_7 { max-width: 8.25rem; }\r\n.input_cw_8 { max-width: 9.25rem; }\r\n.input_cw_9 { max-width: 10.25rem; }\r\n.input_cw_10 { max-width: 11.25rem; }\r\n.input_cw_11 { max-width: 12.25rem; }\r\n.input_cw_12 { max-width: 13.25rem; }\r\n.input_cw_13 { max-width: 14.25rem; }\r\n.input_cw_14 { max-width: 15.25rem; }\r\n.input_cw_15 { max-width: 16.25rem; }\r\ninput[type="number"].input_cw_1 { max-width: 4.25rem; }\r\ninput[type="number"].input_cw_2 { max-width: 5.25rem; }\r\ninput[type="number"].input_cw_3 { max-width: 6.25rem; }\r\ninput[type="number"].input_cw_4 { max-width: 7.25rem; }\r\ninput[type="number"].input_cw_5 { max-width: 8.25rem; }\r\ninput[type="number"].input_cw_6 { max-width: 9.25rem; }\r\ninput[type="number"].input_cw_7 { max-width: 10.25rem; }\r\ninput[type="number"].input_cw_8 { max-width: 11.25rem; }\r\ninput[type="number"].input_cw_9 { max-width: 12.25rem; }\r\ninput[type="number"].input_cw_10 { max-width: 13.25rem; }\r\ninput[type="number"].input_cw_11 { max-width: 14.25rem; }\r\ninput[type="number"].input_cw_12 { max-width: 15.25rem; }\r\ninput[type="number"].input_cw_13 { max-width: 16.25rem; }\r\ninput[type="number"].input_cw_14 { max-width: 17.25rem; }\r\ninput[type="number"].input_cw_15 { max-width: 18.25rem; }\r\n.ui_number_input.input_cw_1 { max-width: calc(2.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_2 { max-width: calc(3.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_3 { max-width: calc(4.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_4 { max-width: calc(5.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_5 { max-width: calc(6.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_6 { max-width: calc(7.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_7 { max-width: calc(8.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_8 { max-width: calc(9.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_9 { max-width: calc(10.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_10 { max-width: calc(11.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_11 { max-width: calc(12.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_12 { max-width: calc(13.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_13 { max-width: calc(14.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_14 { max-width: calc(15.25rem + var(--number-input-arrow-width)); }\r\n.ui_number_input.input_cw_15 { max-width: calc(16.25rem + var(--number-input-arrow-width)); }'],sourceRoot:""}]);const s=o},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n")+8,c=(s=s.substring(s.indexOf("4?p:t+8,o=[],l=0;l4?p:t+8,h-1);case 3:if(1==h)return e.getUint16(t+8,!a);for(i=h>2?p:t+8,o=[],l=0;le.byteLength)return{};var i=m(e,t,t+a,l,r);if(i.Compression)switch(i.Compression){case 6:if(i.JpegIFOffset&&i.JpegIFByteCount){var o=t+i.JpegIFOffset,s=i.JpegIFByteCount;i.blob=new Blob([new Uint8Array(e.buffer,o,s)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",i.Compression)}else 2==i.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return i}(e,h,p,n),r}function y(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n0)for(var n=0;n=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,o=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,n,o){var s=i.URL||i.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):r(l.href)?t(e,n,o):a(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,i){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),n);else if(r(e))t(e,n,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){a(o)}))}}:function(e,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var s="application/octet-stream"===e.type,l=/constructor/i.test(i.HTMLElement)||i.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||o)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var d=i.URL||i.webkitURL,h=d.createObjectURL(e);a?a.location=h:location.href=h,a=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});i.saveAs=s.saveAs=s,e.exports=s}.apply(t,[]))||(e.exports=r)},7360:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e="function"==typeof Map?Map:function(){var e=Object.create(null);this.get=function(t){return e[t]},this.set=function(t,n){return e[t]=n,this},this.clear=function(){e=Object.create(null)}},t=new e,n=new e,r=[];r.total=0;var a=[],i=[];function o(){t.clear(),n.clear(),a=[],i=[]}function s(e){for(var t=-9007199254740991,n=e.length-1;n>=0;--n){var r=e[n];if(null!==r){var a=r.score;a>t&&(t=a)}}return-9007199254740991===t?null:t}function l(e,t){var n=e[t];if(void 0!==n)return n;var r=t;Array.isArray(t)||(r=t.split("."));for(var a=r.length,i=-1;e&&++i>1]=e[n],a=1+(n<<1)}for(var o=n-1>>1;n>0&&r.score>1)e[n]=e[o];e[n]=r}return n.add=function(n){var r=t;e[t++]=n;for(var a=r-1>>1;r>0&&n.score>1)e[r]=e[a];e[r]=n},n.poll=function(){if(0!==t){var n=e[0];return e[0]=e[--t],r(),n}},n.peek=function(n){if(0!==t)return e[0]},n.replaceTop=function(t){e[0]=t,r()},n}();return function e(d){var h={single:function(e,t,n){if("farzher"==e)return{target:"farzher was here (^-^*)/",score:0,indexes:[0,1,2,3,4,5,6]};if(!e)return null;var r=h.getPreparedSearch(e),a=r.lowerCodes;if(!t)return null;c(t)||(t=h.getPrepared(t));var i=r.bitmask;return(i&t._bitmask)!=i?null:h.algorithm(a,t,e.toLowerCase())},go:function(e,t,n){if("farzher"==e)return[{target:"farzher was here (^-^*)/",score:0,indexes:[0,1,2,3,4,5,6],obj:t?t[0]:null}];if(!e)return n&&n.all||d&&d.all?h.all(e,t,n):r;var a=h.getPreparedSearch(e),i=a.lowerCodes,o=(i[0],a.bitmask),p=e.toLowerCase(),f=n&&n.threshold||d&&d.threshold||-9007199254740991,m=n&&n.limit||d&&d.limit||9007199254740991,g=0,A=0,v=t.length;if(n&&n.keys)for(var y=n.scoreFn||s,_=n.keys,b=_.length,C=v-1;C>=0;--C){for(var w=t[C],x=new Array(b),k=b-1;k>=0;--k)(I=l(w,S=_[k]))?(c(I)||(I=h.getPrepared(I)),(o&I._bitmask)!=o?x[k]=null:x[k]=h.algorithm(i,I,p)):x[k]=null;x.obj=w;var B=y(x);null!==B&&(Bu.peek().score&&u.replaceTop(x))))}else if(n&&n.key){var S=n.key;for(C=v-1;C>=0;--C)if(I=l(w=t[C],S)){if(c(I)||(I=h.getPrepared(I)),(o&I._bitmask)!=o)var Z=null;else Z=h.algorithm(i,I,p);null!==Z&&(Z.scoreu.peek().score&&u.replaceTop(Z))))}}else for(C=v-1;C>=0;--C){var I;(I=t[C])&&(c(I)||(I=h.getPrepared(I)),null!==(Z=(o&I._bitmask)!=o?null:h.algorithm(i,I,p))&&(Z.scoreu.peek().score&&u.replaceTop(Z)))))}if(0===g)return r;var E=new Array(g);for(C=g-1;C>=0;--C)E[C]=u.poll();return E.total=g+A,E},goAsync:function(e,t,n){var r=new Promise((function(r,a){r(h.go(e,t,n))}));return r.cancel=function(){},r},all:function(e,t,n){var r=[];r.total=t.length;var a=n&&n.limit||d&&d.limit||9007199254740991;if(n&&n.keys)for(var i=0;i=0;--u)(f=l(o,n.keys[u]))?(c(f)||(f=h.getPrepared(f)),f.score=-9007199254740991,s[u]=f):s[u]=null;if(s.obj=o,s.score=-9007199254740991,r.push(s),r.length>=a)return r}else if(n&&n.key){for(i=0;i=a)return r}}else for(i=0;i=a))return r}return r},highlight:function(e,t,n){if("function"==typeof t)return h.highlightCallback(e,t);if(null===e)return null;void 0===t&&(t=""),void 0===n&&(n="");for(var r="",a=0,i=!1,o=e.target,s=o.length,l=e.indexes,c=0;c999)return h.prepare(e);var n=t.get(e);return void 0!==n||(n=h.prepare(e),t.set(e,n)),n},getPreparedSearch:function(e){if(e.length>999)return h.prepareSearch(e);var t=n.get(e);return void 0!==t||(t=h.prepareSearch(e),n.set(e,t)),t},algorithm:function(e,t,n){for(var r=e[0],o=t._targetLowerCodes,s=e.length,l=o.length,c=0,u=0,d=0;;){if(r===o[u]){if(a[d++]=u,++c===s)break;r=e[c]}if(++u>=l)return null}c=0;var p=!1,f=0,m=t._nextBeginningIndexes;null===m&&(m=t._nextBeginningIndexes=h.prepareNextBeginningIndexes(t.target));var g=0;if((u=0===a[0]?0:m[a[0]-1])!==l)for(;;)if(u>=l){if(c<=0)break;if(++g>200)break;--c,u=m[i[--f]]}else if(e[c]===o[u]){if(i[f++]=u,++c===s){p=!0;break}++u}else u=m[u];var A=t._targetLower.indexOf(n,a[0]),v=~A;if(v&&!p)for(var y=0;y=1;--y)b[y]-b[y-1]!=1&&(w-=b[y],++x);if(w-=(b[s-1]-b[0]-(s-1))*x,0!==b[0]&&(w-=10*b[0]),p){var k=1;for(y=m[0];y24&&(w*=10*(k-24))}else w*=1e3;for(v&&(w/=10),_&&(w/=10),w-=l-s,t.score=w,t.indexes=new Array(C),y=C-1;y>=0;--y)t.indexes[y]=b[y];return t},prepareLowerCodes:function(e){for(var t=e.length,n=[],r=e.toLowerCase(),a=0;a=65&&s<=90,c=l||s>=97&&s<=122||s>=48&&s<=57,u=l&&!a||!i||!c;a=l,i=c,u&&(n[r++]=o)}return n},prepareNextBeginningIndexes:function(e){for(var t=e.length,n=h.prepareBeginningIndexes(e),r=[],a=n[0],i=0,o=0;oo?r[o]=a:(a=n[++i],r[o]=void 0===a?t:a);return r},prepareBitmask:function(e){for(var t=0,n=e.length-1;n>=0;--n){var r=e[n];t|=1<<(r>=97&&r<=122?r-97:r>=48&&r<=57?26:32===r?27:r<=127?28:29)}return t},cleanup:o,new:e};return h}()})?n.apply(t,[]):n)||(e.exports=r)},6866:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r,a,i={}.hasOwnProperty,o=[].indexOf||function(e){for(var t=0,n=this.length;t0&&n.data&&(this.groups.has(n.data)?this.groups.get(n.data).push(a):this.groups.set(n.data,[a])),this.frames.push(n)},t.prototype.render=function(){var e,t,n;if(this.running)throw new Error("Already running");if(null==this.options.width||null==this.options.height)throw new Error("Width and height must be set prior to rendering");if(this.running=!0,this.nextFrame=0,this.finishedFrames=0,this.imageParts=function(){var e,t,n;for(n=[],e=0,t=this.frames.length;0<=t?et;0<=t?++e:--e)n.push(null);return n}.call(this),t=this.spawnWorkers(),!0===this.options.globalPalette)this.renderNextFrame();else for(e=0,n=t;0<=n?en;0<=n?++e:--e)this.renderNextFrame();return this.emit("start"),this.emit("progress",0)},t.prototype.abort=function(){for(var e;null!=(e=this.activeWorkers.shift());)this.log("killing active worker"),e.terminate();return this.running=!1,this.emit("abort")},t.prototype.spawnWorkers=function(){var e,t,n;return e=Math.min(this.options.workers,this.frames.length),function(){n=[];for(var r=t=this.freeWorkers.length;t<=e?re;t<=e?r++:r--)n.push(r);return n}.apply(this).forEach(function(e){return function(t){var n;return e.log("spawning worker "+t),(n=new Worker(e.options.workerScript)).onmessage=function(t){return e.activeWorkers.splice(e.activeWorkers.indexOf(n),1),e.freeWorkers.push(n),e.frameFinished(t.data,!1)},e.freeWorkers.push(n)}}(this)),e},t.prototype.frameFinished=function(e,t){var n,r,a,i;if(this.finishedFrames++,t?(n=this.frames.indexOf(e),r=this.groups.get(e.data)[0],this.log("frame "+(n+1)+" is duplicate of "+r+" - "+this.activeWorkers.length+" active"),this.imageParts[n]={indexOfFirstInGroup:r}):(this.log("frame "+(e.index+1)+" finished - "+this.activeWorkers.length+" active"),this.emit("progress",this.finishedFrames/this.frames.length),this.imageParts[e.index]=e),!0===this.options.globalPalette&&!t&&(this.options.globalPalette=e.globalPalette,this.log("global palette analyzed"),this.frames.length>2))for(a=1,i=this.freeWorkers.length;1<=i?ai;1<=i?++a:--a)this.renderNextFrame();return o.call(this.imageParts,null)>=0?this.renderNextFrame():this.finishRendering()},t.prototype.finishRendering=function(){var e,t,n,r,a,i,o,s,l,c,u,d,h,p,f,m,g,A,v,y;for(a=i=0,c=(g=this.imageParts).length;i=this.frames.length))return e=this.frames[this.nextFrame++],(t=this.frames.indexOf(e))>0&&this.groups.has(e.data)&&this.groups.get(e.data)[0]!==t?void setTimeout(function(t){return function(){return t.frameFinished(e,!0)}}(this),0):(r=this.freeWorkers.shift(),n=this.getTask(e),this.log("starting frame "+(n.index+1)+" of "+this.frames.length),this.activeWorkers.push(r),r.postMessage(n))},t.prototype.getContextData=function(e){return e.getImageData(0,0,this.options.width,this.options.height).data},t.prototype.getImageData=function(e){var t;return null==this._canvas&&(this._canvas=document.createElement("canvas"),this._canvas.width=this.options.width,this._canvas.height=this.options.height),(t=this._canvas.getContext("2d")).setFill=this.options.background,t.fillRect(0,0,this.options.width,this.options.height),t.drawImage(e,0,0),this.getContextData(t)},t.prototype.getTask=function(e){var t,n;if(n={index:t=this.frames.indexOf(e),last:t===this.frames.length-1,delay:e.delay,transparent:e.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:!0},null!=e.data)n.data=e.data;else if(null!=e.context)n.data=this.getContextData(e.context);else{if(null==e.image)throw new Error("Invalid frame");n.data=this.getImageData(e.image)}return n},t.prototype.log=function(e){if(this.options.debug)return console.log(e)},t}(r),e.exports=a},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,s,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(i(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),o=(c=n.slice()).length,l=0;l0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),a||(a=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var a=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){var n,r,a,i,o;o=navigator.userAgent.toLowerCase(),i=navigator.platform.toLowerCase(),a="ie"===(n=o.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0])[1]&&document.documentMode,(r={name:"version"===n[1]?n[3]:n[1],version:a||parseFloat("opera"===n[1]&&n[4]?n[4]:n[2]),platform:{name:o.match(/ip(?:ad|od|hone)/)?"ios":(o.match(/(?:webos|android)/)||i.match(/mac|win|linux/)||["other"])[0]}})[r.name]=!0,r[r.name+parseInt(r.version,10)]=!0,r.platform[r.platform.name]=!0,e.exports=r}])},5177:e=>{e.exports=function(){var e,t,n=[];this.init=void(e=navigator.hardwareConcurrency||4),this.getCores=function(){return e},this.resample_auto=function(e,t,n,r,a){var i=this.getCores();window.Worker&&10&&t-1 in e)}x.fn=x.prototype={jquery:w,constructor:x,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),W=new RegExp(O+"|>"),V=new RegExp(H),Y=new RegExp("^"+z+"$"),q={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){h()},oe=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(E=D.call(b.childNodes),b.childNodes),E[b.childNodes.length].nodeType}catch(e){P={apply:E.length?function(e,t){R.apply(e,D.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,a){var i,s,c,u,d,f,A,v=t&&t.ownerDocument,b=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return r;if(!a&&(h(t),t=t||p,m)){if(11!==b&&(d=$.exec(e)))if(i=d[1]){if(9===b){if(!(c=t.getElementById(i)))return r;if(c.id===i)return r.push(c),r}else if(v&&(c=v.getElementById(i))&&y(t,c)&&c.id===i)return r.push(c),r}else{if(d[2])return P.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!S[e+" "]&&(!g||!g.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(A=e,v=t,1===b&&(W.test(e)||F.test(e))){for((v=ee.test(e)&&Ae(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ae):t.setAttribute("id",u=_)),s=(f=o(e)).length;s--;)f[s]=(u?"#"+u:":scope")+" "+ye(f[s]);A=f.join(",")}try{return P.apply(r,v.querySelectorAll(A)),r}catch(t){S(e,!0)}finally{u===_&&t.removeAttribute("id")}}}return l(e.replace(G,"$1"),t,r,a)}function le(){var e=[];return function t(n,a){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=a}}function ce(e){return e[_]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),a=n.length;a--;)r.attrHandle[n[a]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,r){for(var a,i=e([],n.length,t),o=i.length;o--;)n[a=i[o]]&&(n[a]=!(r[a]=n[a]))}))}))}function Ae(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Q.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,a,o=e?e.ownerDocument||e:b;return o!=p&&9===o.nodeType&&o.documentElement?(f=(p=o).documentElement,m=!i(p),b!=p&&(a=p.defaultView)&&a.top!==a&&(a.addEventListener?a.addEventListener("unload",ie,!1):a.attachEvent&&a.attachEvent("onunload",ie)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=_,!p.getElementsByName||!p.getElementsByName(_).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,a,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(a=t.getElementsByName(e),r=0;i=a[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],a=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[a++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},A=[],g=[],(n.qsa=J.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+M+")"),e.querySelectorAll("[id~="+_+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),A.push("!=",H)})),g=g.length&&new RegExp(g.join("|")),A=A.length&&new RegExp(A.join("|")),t=J.test(f.compareDocumentPosition),y=t||J.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Z=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==b&&y(b,e)?-1:t==p||t.ownerDocument==b&&y(b,t)?1:u?L(u,e)-L(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,a=e.parentNode,i=t.parentNode,o=[e],s=[t];if(!a||!i)return e==p?-1:t==p?1:a?-1:i?1:u?L(u,e)-L(u,t):0;if(a===i)return he(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?he(o[r],s[r]):o[r]==b?-1:s[r]==b?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!S[t+" "]&&(!A||!A.test(t))&&(!g||!g.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){S(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var a=r.attrHandle[t.toLowerCase()],i=a&&I.call(r.attrHandle,t.toLowerCase())?a(e,t,!m):void 0;return void 0!==i?i:n.attributes||!m?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,ae)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],a=0,i=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(Z),d){for(;t=e[i++];)t===e[i]&&(a=r.push(i));for(;a--;)e.splice(r[a],1)}return u=null,e},a=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},r=se.selectors={cacheLength:50,createPseudo:ce,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+O+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var a=se.attr(r,e);return null==a?"!="===t:!t||(a+="","="===t?a===n:"!="===t?a!==n:"^="===t?n&&0===a.indexOf(n):"*="===t?n&&a.indexOf(n)>-1:"$="===t?n&&a.slice(-n.length)===n:"~="===t?(" "+a.replace(N," ")+" ").indexOf(n)>-1:"|="===t&&(a===n||a.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,a){var i="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f,m=i!==o?"nextSibling":"previousSibling",g=t.parentNode,A=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(i){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===A:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&v){for(y=(p=(c=(u=(d=(h=g)[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(y=p=0)||f.pop();)if(1===h.nodeType&&++y&&h===t){u[e]=[C,p,y];break}}else if(v&&(y=p=(c=(u=(d=(h=t)[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===y)for(;(h=++p&&h&&h[m]||(y=p=0)||f.pop())&&((s?h.nodeName.toLowerCase()!==A:1!==h.nodeType)||!++y||(v&&((u=(d=h[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,y]),h!==t)););return(y-=a)===r||y%r==0&&y/r>=0}}},PSEUDO:function(e,t){var n,a=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[_]?a(t):a.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var r,i=a(e,t),o=i.length;o--;)e[r=L(e,i[o])]=!(n[r]=i[o])})):function(e){return a(e,0,n)}):a}},pseudos:{not:ce((function(e){var t=[],n=[],r=s(e.replace(G,"$1"));return r[_]?ce((function(e,t,n,a){for(var i,o=r(e,null,a,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))})):function(e,a,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return se(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||a(t)).indexOf(e)>-1}})),lang:ce((function(e){return Y.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function Ce(e,t,n,r,a){for(var i,o=[],s=0,l=e.length,c=null!=t;s-1&&(i[c]=!(o[c]=d))}}else A=Ce(A===o?A.splice(f,A.length):A),a?a(null,o,A,l):P.apply(o,A)}))}function xe(e){for(var t,n,a,i=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],l=o?1:0,u=_e((function(e){return e===t}),s,!0),d=_e((function(e){return L(t,e)>-1}),s,!0),h=[function(e,n,r){var a=!o&&(r||n!==c)||((t=n).nodeType?u(e,n,r):d(e,n,r));return t=null,a}];l1&&be(h),l>1&&ye(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(G,"$1"),n,l0,a=e.length>0,i=function(i,o,s,l,u){var d,f,g,A=0,v="0",y=i&&[],_=[],b=c,w=i||a&&r.find.TAG("*",u),x=C+=null==b?1:Math.random()||.1,k=w.length;for(u&&(c=o==p||o||u);v!==k&&null!=(d=w[v]);v++){if(a&&d){for(f=0,o||d.ownerDocument==p||(h(d),s=!m);g=e[f++];)if(g(d,o||p,s)){l.push(d);break}u&&(C=x)}n&&((d=!g&&d)&&A--,i&&y.push(d))}if(A+=v,n&&v!==A){for(f=0;g=t[f++];)g(y,_,o,s);if(i){if(A>0)for(;v--;)y[v]||_[v]||(_[v]=T.call(l));_=Ce(_)}P.apply(l,_),u&&!i&&_.length>0&&A+t.length>1&&se.uniqueSort(l)}return u&&(C=x,c=b),y};return n?ce(i):i}(i,a)),s.selector=e}return s},l=se.select=function(e,t,n,a){var i,l,c,u,d,h="function"==typeof e&&e,p=!a&&o(e=h.selector||e);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(i=q.needsContext.test(e)?0:l.length;i--&&(c=l[i],!r.relative[u=c.type]);)if((d=r.find[u])&&(a=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&Ae(t.parentNode)||t))){if(l.splice(i,1),!(e=a.length&&ye(l)))return P.apply(n,a),n;break}}return(h||s(e,p))(a,t,!m,n,!t||ee.test(e)&&Ae(t.parentNode)||t),n},n.sortStable=_.split("").sort(Z).join("")===_,n.detectDuplicates=!!d,h(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(M,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);x.find=B,x.expr=B.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=B.uniqueSort,x.text=B.getText,x.isXMLDoc=B.isXML,x.contains=B.contains,x.escapeSelector=B.escape;var S=function(e,t,n){for(var r=[],a=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(a&&x(e).is(n))break;r.push(e)}return r},Z=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},I=x.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(e,t,n){return A(t)?x.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?x.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?x.grep(e,(function(e){return u.call(t,e)>-1!==n})):x.filter(t,e,n)}x.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,(function(e){return 1===e.nodeType})))},x.fn.extend({find:function(e){var t,n,r=this.length,a=this;if("string"!=typeof e)return this.pushStack(x(e).filter((function(){for(t=0;t1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(R(this,e||[],!1))},not:function(e){return this.pushStack(R(this,e||[],!0))},is:function(e){return!!R(this,"string"==typeof e&&I.test(e)?x(e):e||[],!1).length}});var P,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var r,a;if(!e)return this;if(n=n||P,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),T.test(r[1])&&x.isPlainObject(t))for(r in t)A(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(a=y.getElementById(r[2]))&&(this[0]=a,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):A(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,P=x(y);var L=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&x.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?x.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?u.call(x(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return Z((e.parentNode||{}).firstChild,e)},children:function(e){return Z(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},(function(e,t){x.fn[e]=function(n,r){var a=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(a=x.filter(r,a)),this.length>1&&(M[e]||x.uniqueSort(a),L.test(e)&&a.reverse()),this.pushStack(a)}}));var z=/[^\x20\t\r\n\f]+/g;function j(e){return e}function H(e){throw e}function N(e,t,n,r){var a;try{e&&A(a=e.promise)?a.call(e).done(t).fail(n):e&&A(a=e.then)?a.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(z)||[],(function(e,n){t[n]=!0})),t}(e):x.extend({},e);var t,n,r,a,i=[],o=[],s=-1,l=function(){for(a=a||e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?x.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return a=o=[],i=n="",this},disabled:function(){return!i},lock:function(){return a=o=[],n||t||(i=n=""),this},locked:function(){return!!a},fireWith:function(e,n){return a||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},x.extend({Deferred:function(e){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],n="pending",a={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return x.Deferred((function(n){x.each(t,(function(t,r){var a=A(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=a&&a.apply(this,arguments);e&&A(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,a?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,a){var i=0;function o(e,t,n,a){return function(){var s=this,l=arguments,c=function(){var r,c;if(!(e=i&&(n!==H&&(s=void 0,l=[r]),t.rejectWith(s,l))}};e?u():(x.Deferred.getStackHook&&(u.stackTrace=x.Deferred.getStackHook()),r.setTimeout(u))}}return x.Deferred((function(r){t[0][3].add(o(0,r,A(a)?a:j,r.notifyWith)),t[1][3].add(o(0,r,A(e)?e:j)),t[2][3].add(o(0,r,A(n)?n:H))})).promise()},promise:function(e){return null!=e?x.extend(e,a):a}},i={};return x.each(t,(function(e,r){var o=r[2],s=r[5];a[r[1]]=o.add,s&&o.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=o.fireWith})),a.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),a=s.call(arguments),i=x.Deferred(),o=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,a)}};if(t<=1&&(N(e,i.done(o(n)).resolve,i.reject,!t),"pending"===i.state()||A(a[n]&&a[n].then)))return i.then();for(;n--;)N(a[n],o(n),i.reject);return i.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&G.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},x.readyException=function(e){r.setTimeout((function(){throw e}))};var U=x.Deferred();function F(){y.removeEventListener("DOMContentLoaded",F),r.removeEventListener("load",F),x.ready()}x.fn.ready=function(e){return U.then(e).catch((function(e){x.readyException(e)})),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||U.resolveWith(y,[x]))}}),x.ready.then=U.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?r.setTimeout(x.ready):(y.addEventListener("DOMContentLoaded",F),r.addEventListener("load",F));var W=function(e,t,n,r,a,i,o){var s=0,l=e.length,c=null==n;if("object"===C(n))for(s in a=!0,n)W(e,t,s,n[s],!0,i,o);else if(void 0!==r&&(a=!0,A(r)||(o=!0),c&&(o?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(x(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){$.remove(this,e)}))}}),x.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,a=n.shift(),i=x._queueHooks(e,t);"inprogress"===a&&(a=n.shift(),r--),a&&("fx"===t&&n.unshift("inprogress"),delete i.stop,a.call(e,(function(){x.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:x.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",n])}))})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;fe=y.createDocumentFragment().appendChild(y.createElement("div")),(me=y.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),fe.appendChild(me),g.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="",g.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML="",g.option=!!fe.lastChild;var ye={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function _e(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?x.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n",""]);var Ce=/<|&#?\w+;/;function we(e,t,n,r,a){for(var i,o,s,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p-1)a&&a.push(i);else if(c=se(i),o=_e(d.appendChild(i),"script"),c&&be(o),n)for(u=0;i=o[u++];)ve.test(i.type||"")&&n.push(i);return d}var xe=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Be(){return!1}function Se(e,t){return e===function(){try{return y.activeElement}catch(e){}}()==("focus"===t)}function Ze(e,t,n,r,a,i){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ze(e,s,n,r,t[s],i);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=Be;else if(!a)return e;return 1===i&&(o=a,a=function(e){return x().off(e),o.apply(this,arguments)},a.guid=o.guid||(o.guid=x.guid++)),e.each((function(){x.event.add(this,t,a,r,n)}))}function Ie(e,t,n){n?(J.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var r,a,i=J.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),J.set(this,t,i),r=n(this,t),this[t](),i!==(a=J.get(this,t))||r?J.set(this,t,!1):a={},i!==a)return e.stopImmediatePropagation(),e.preventDefault(),a&&a.value}else i.length&&(J.set(this,t,{value:x.event.trigger(x.extend(i[0],x.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&x.event.add(e,t,ke)}x.event={global:{},add:function(e,t,n,r,a){var i,o,s,l,c,u,d,h,p,f,m,g=J.get(e);if(K(e))for(n.handler&&(n=(i=n).handler,a=i.selector),a&&x.find.matchesSelector(oe,a),n.guid||(n.guid=x.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(z)||[""]).length;c--;)p=m=(s=xe.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p&&(d=x.event.special[p]||{},p=(a?d.delegateType:d.bindType)||p,d=x.event.special[p]||{},u=x.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:f.join(".")},i),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,f,o)||e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),a?h.splice(h.delegateCount++,0,u):h.push(u),x.event.global[p]=!0)},remove:function(e,t,n,r,a){var i,o,s,l,c,u,d,h,p,f,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(z)||[""]).length;c--;)if(p=m=(s=xe.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p){for(d=x.event.special[p]||{},h=l[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=i=h.length;i--;)u=h[i],!a&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(h.splice(i,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||x.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)x.event.remove(e,p+t[c],n,r,!0);x.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,a,i,o,s=new Array(arguments.length),l=x.event.fix(e),c=(J.get(this,"events")||Object.create(null))[l.type]||[],u=x.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(i=[],o={},n=0;n-1:x.find(a,this,null,[c]).length),o[a]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,l\s*$/g;function Pe(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,a,i,o,s;if(1===t.nodeType){if(J.hasData(e)&&(s=J.get(e).events))for(a in J.remove(t,"handle events"),s)for(n=0,r=s[a].length;n1&&"string"==typeof f&&!g.checkClone&&Te.test(f))return e.each((function(a){var i=e.eq(a);m&&(t[0]=f.call(this,a,i.html())),ze(i,t,n,r)}));if(h&&(i=(a=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===a.childNodes.length&&(a=i),i||r)){for(s=(o=x.map(_e(a,"script"),De)).length;d0&&be(o,!l&&_e(e,"script")),s},cleanData:function(e){for(var t,n,r,a=x.event.special,i=0;void 0!==(n=e[i]);i++)if(K(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)a[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),x.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return W(this,(function(e){return void 0===e?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)}))},prepend:function(){return ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return x.clone(this,e,t)}))},html:function(e){return W(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!ye[(Ae.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-l-s-.5))||0),l}function nt(e,t,n){var r=Ne(e),a=(!g.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,r),i=a,o=Fe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&a||!g.reliableTrDimensions()&&E(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===x.css(e,"display",!1,r))&&e.getClientRects().length&&(a="border-box"===x.css(e,"boxSizing",!1,r),(i=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+tt(e,t,n||(a?"border":"content"),i,r,o)+"px"}function rt(e,t,n,r,a){return new rt.prototype.init(e,t,n,r,a)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,i,o,s=Q(t),l=Xe.test(t),c=e.style;if(l||(t=Qe(s)),o=x.cssHooks[t]||x.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(a=o.get(e,!1,r))?a:c[t];"string"==(i=typeof n)&&(a=ae.exec(n))&&a[1]&&(n=ue(e,t,a),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=a&&a[3]||(x.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var a,i,o,s=Q(t);return Xe.test(t)||(t=Qe(s)),(o=x.cssHooks[t]||x.cssHooks[s])&&"get"in o&&(a=o.get(e,!0,n)),void 0===a&&(a=Fe(e,t,r)),"normal"===a&&t in $e&&(a=$e[t]),""===n||n?(i=parseFloat(a),!0===n||isFinite(i)?i||0:a):a}}),x.each(["height","width"],(function(e,t){x.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):Ge(e,Je,(function(){return nt(e,t,r)}))},set:function(e,n,r){var a,i=Ne(e),o=!g.scrollboxSize()&&"absolute"===i.position,s=(o||r)&&"border-box"===x.css(e,"boxSizing",!1,i),l=r?tt(e,t,r,s,i):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-tt(e,t,"border",!1,i)-.5)),l&&(a=ae.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),et(0,n,l)}}})),x.cssHooks.marginLeft=We(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(e,t){x.cssHooks[e+t]={expand:function(n){for(var r=0,a={},i="string"==typeof n?n.split(" "):[n];r<4;r++)a[e+ie[r]+t]=i[r]||i[r-2]||i[0];return a}},"margin"!==e&&(x.cssHooks[e+t].set=et)})),x.fn.extend({css:function(e,t){return W(this,(function(e,t,n){var r,a,i={},o=0;if(Array.isArray(t)){for(r=Ne(e),a=t.length;o1)}}),x.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,a,i){this.elem=e,this.prop=n,this.easing=a||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(x.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=rt.prototype.init,x.fx.step={};var at,it,ot=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function lt(){it&&(!1===y.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(lt):r.setTimeout(lt,x.fx.interval),x.fx.tick())}function ct(){return r.setTimeout((function(){at=void 0})),at=Date.now()}function ut(e,t){var n,r=0,a={height:e};for(t=t?1:0;r<4;r+=2-t)a["margin"+(n=ie[r])]=a["padding"+n]=e;return t&&(a.opacity=a.width=e),a}function dt(e,t,n){for(var r,a=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),i=0,o=a.length;i1)},removeAttr:function(e){return this.each((function(){x.removeAttr(this,e)}))}}),x.extend({attr:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?x.prop(e,t,n):(1===i&&x.isXMLDoc(e)||(a=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:(e.setAttribute(t,n+""),n):a&&"get"in a&&null!==(r=a.get(e,t))?r:null==(r=x.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,a=t&&t.match(z);if(a&&1===e.nodeType)for(;n=a[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ft[t]||x.find.attr;ft[t]=function(e,t,r){var a,i,o=t.toLowerCase();return r||(i=ft[o],ft[o]=a,a=null!=n(e,t,r)?o:null,ft[o]=i),a}}));var mt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function At(e){return(e.match(z)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(z)||[]}x.fn.extend({prop:function(e,t){return W(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[x.propFix[e]||e]}))}}),x.extend({prop:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&x.isXMLDoc(e)||(t=x.propFix[t]||t,a=x.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:e[t]=n:a&&"get"in a&&null!==(r=a.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(e){var t,n,r,a,i,o,s,l=0;if(A(e))return this.each((function(t){x(this).addClass(e.call(this,t,vt(this)))}));if((t=yt(e)).length)for(;n=this[l++];)if(a=vt(n),r=1===n.nodeType&&" "+At(a)+" "){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a!==(s=At(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,a,i,o,s,l=0;if(A(e))return this.each((function(t){x(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[l++];)if(a=vt(n),r=1===n.nodeType&&" "+At(a)+" "){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a!==(s=At(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):A(e)?this.each((function(n){x(this).toggleClass(e.call(this,n,vt(this),t),t)})):this.each((function(){var t,a,i,o;if(r)for(a=0,i=x(this),o=yt(e);t=o[a++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=vt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+At(vt(n))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;x.fn.extend({val:function(e){var t,n,r,a=this[0];return arguments.length?(r=A(e),this.each((function(n){var a;1===this.nodeType&&(null==(a=r?e.call(this,n,x(this).val()):e)?a="":"number"==typeof a?a+="":Array.isArray(a)&&(a=x.map(a,(function(e){return null==e?"":e+""}))),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))}))):a?(t=x.valHooks[a.type]||x.valHooks[a.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:"string"==typeof(n=a.value)?n.replace(_t,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:At(x.text(e))}},select:{get:function(e){var t,n,r,a=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?i+1:a.length;for(r=i<0?l:o?i:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},g.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in r;var bt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(e,t,n,a){var i,o,s,l,c,u,d,h,f=[n||y],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!bt.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[x.expando]?e:new x.Event(m,"object"==typeof e&&e)).isTrigger=a?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:x.makeArray(t,[e]),d=x.event.special[m]||{},a||!d.trigger||!1!==d.trigger.apply(n,t))){if(!a&&!d.noBubble&&!v(n)){for(l=d.delegateType||m,bt.test(l+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||y)&&f.push(s.defaultView||s.parentWindow||r)}for(i=0;(o=f[i++])&&!e.isPropagationStopped();)h=o,e.type=i>1?l:d.bindType||m,(u=(J.get(o,"events")||Object.create(null))[e.type]&&J.get(o,"handle"))&&u.apply(o,t),(u=c&&o[c])&&u.apply&&K(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,a||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!K(n)||c&&A(n[m])&&!v(n)&&((s=n[c])&&(n[c]=null),x.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,Ct),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,Ct),x.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var r=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(r,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each((function(){x.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}}),g.focusin||x.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,a=J.access(r,t);a||r.addEventListener(e,n,!0),J.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,a=J.access(r,t)-1;a?J.access(r,t,a):(r.removeEventListener(e,n,!0),J.remove(r,t))}}}));var wt=r.location,xt={guid:Date.now()},kt=/\?/;x.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||x.error("Invalid XML: "+(n?x.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Bt=/\[\]$/,St=/\r?\n/g,Zt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Et(e,t,n,r){var a;if(Array.isArray(t))x.each(t,(function(t,a){n||Bt.test(e)?r(e,a):Et(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,n,r)}));else if(n||"object"!==C(t))r(e,t);else for(a in t)Et(e+"["+a+"]",t[a],n,r)}x.param=function(e,t){var n,r=[],a=function(e,t){var n=A(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,(function(){a(this.name,this.value)}));else for(n in e)Et(n,e[n],t,a);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&It.test(this.nodeName)&&!Zt.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,(function(e){return{name:t.name,value:e.replace(St,"\r\n")}})):{name:t.name,value:n.replace(St,"\r\n")}})).get()}});var Tt=/%20/g,Rt=/#.*$/,Pt=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Ot={},zt={},jt="*/".concat("*"),Ht=y.createElement("a");function Nt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,a=0,i=t.toLowerCase().match(z)||[];if(A(n))for(;r=i[a++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Gt(e,t,n,r){var a={},i=e===zt;function o(s){var l;return a[s]=!0,x.each(e[s]||[],(function(e,s){var c=s(t,n,r);return"string"!=typeof c||i||a[c]?i?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!a["*"]&&o("*")}function Ut(e,t){var n,r,a=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((a[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}Ht.href=wt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,x.ajaxSettings),t):Ut(x.ajaxSettings,e)},ajaxPrefilter:Nt(Ot),ajaxTransport:Nt(zt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,a,i,o,s,l,c,u,d,h,p=x.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?x(f):x.event,g=x.Deferred(),A=x.Callbacks("once memory"),v=p.statusCode||{},_={},b={},C="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o)for(o={};t=Dt.exec(i);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)w.always(e[w.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),k(0,t),this}};if(g.promise(w),p.url=((e||p.url||wt.href)+"").replace(Mt,wt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(z)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ht.protocol+"//"+Ht.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),Gt(Ot,p,t,w),c)return w;for(d in(u=x.event&&p.global)&&0==x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Lt.test(p.type),a=p.url.replace(Rt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Tt,"+")):(h=p.url.slice(a.length),p.data&&(p.processData||"string"==typeof p.data)&&(a+=(kt.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(a=a.replace(Pt,"$1"),h=(kt.test(a)?"&":"?")+"_="+xt.guid+++h),p.url=a+h),p.ifModified&&(x.lastModified[a]&&w.setRequestHeader("If-Modified-Since",x.lastModified[a]),x.etag[a]&&w.setRequestHeader("If-None-Match",x.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+jt+"; q=0.01":""):p.accepts["*"]),p.headers)w.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,w,p)||c))return w.abort();if(C="abort",A.add(p.complete),w.done(p.success),w.fail(p.error),n=Gt(zt,p,t,w)){if(w.readyState=1,u&&m.trigger("ajaxSend",[w,p]),c)return w;p.async&&p.timeout>0&&(s=r.setTimeout((function(){w.abort("timeout")}),p.timeout));try{c=!1,n.send(_,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,o,l){var d,h,y,_,b,C=t;c||(c=!0,s&&r.clearTimeout(s),n=void 0,i=l||"",w.readyState=e>0?4:0,d=e>=200&&e<300||304===e,o&&(_=function(e,t,n){for(var r,a,i,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)i=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){i=a;break}o||(o=a)}i=i||o}if(i)return i!==l[0]&&l.unshift(i),n[i]}(p,w,o)),!d&&x.inArray("script",p.dataTypes)>-1&&x.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),_=function(e,t,n,r){var a,i,o,s,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(o=c[l+" "+i]||c["* "+i]))for(a in c)if((s=a.split(" "))[1]===i&&(o=c[l+" "+s[0]]||c["* "+s[0]])){!0===o?o=c[a]:!0!==c[a]&&(i=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+i}}}return{state:"success",data:t}}(p,_,w,d),d?(p.ifModified&&((b=w.getResponseHeader("Last-Modified"))&&(x.lastModified[a]=b),(b=w.getResponseHeader("etag"))&&(x.etag[a]=b)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=_.state,h=_.data,d=!(y=_.error))):(y=C,!e&&C||(C="error",e<0&&(e=0))),w.status=e,w.statusText=(t||C)+"",d?g.resolveWith(f,[h,C,w]):g.rejectWith(f,[w,C,y]),w.statusCode(v),v=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[w,p,d?h:y]),A.fireWith(f,[w,C]),u&&(m.trigger("ajaxComplete",[w,p]),--x.active||x.event.trigger("ajaxStop")))}return w},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],(function(e,t){x[t]=function(e,n,r,a){return A(n)&&(a=a||r,r=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:a,data:n,success:r},x.isPlainObject(e)&&e))}})),x.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(A(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return A(e)?this.each((function(t){x(this).wrapInner(e.call(this,t))})):this.each((function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=A(e);return this.each((function(n){x(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Ft={0:200,1223:204},Wt=x.ajaxSettings.xhr();g.cors=!!Wt&&"withCredentials"in Wt,g.ajax=Wt=!!Wt,x.ajaxTransport((function(e){var t,n;if(g.cors||Wt&&!e.crossDomain)return{send:function(a,i){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(o,a[o]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ft[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),x.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),x.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,a){t=x("