jodit-pro
Version:
PRO Version of Jodit Editor
1 lines • 85.4 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[917],{43746:function(t){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1)}([function(t,e,o){"use strict";var n=o(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,o;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(o=e.prototype)&&!1!==o.hasOwnProperty("isPrototypeOf")}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var o=0;e.length>o;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var o=[],n=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(o.push(a.value),!e||o.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return o}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=o(2),a=l(o(0)),s=l(o(4));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);t.length>e;e++)o[e]=t[e];return o}return Array.from(t)}var u="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,d={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},g="COLOR",f="RGBA_USER",m="HSLA_USER";function v(t,e,o){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):o?e:null:e}function y(t){var e=t.getContext("2d"),o=+t.width,n=+t.height,a=e.createLinearGradient(1,1,1,n-1);return a.addColorStop(0,"white"),a.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,o-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=a,e.fillRect(0,0,o,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,o,n),e.globalCompositeOperation="source-over"},grabColor:function(t,o){return e.getImageData(t,o,1,1).data},findColor:function(t,e,a){var s=(0,i.rgbToHsv)(t,e,a),l=r(s,3);return[l[1]*o,n-l[2]*n]}}}function b(t,e,o){return null===t?e:/^\s*$/.test(t)?o:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function C(t,e,o){if(null===t)return e;if(/^\s*$/.test(t))return o;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,o){if(c(this,t),o?(e=v(e),this.options=Object.assign({},d,o)):e&&(0,a.default)(e)?(this.options=Object.assign({},d,e),e=v(this.options.attachTo)):(this.options=Object.assign({},d),e=v((0,i.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(o+"show-hsl")&&(t.showHSL=b(e.getAttribute(o+"show-hsl"),d.showHSL,!0)),e.hasAttribute(o+"show-rgb")&&(t.showRGB=b(e.getAttribute(o+"show-rgb"),d.showRGB,!0)),e.hasAttribute(o+"show-hex")&&(t.showHEX=b(e.getAttribute(o+"show-hex"),d.showHEX,!0)),e.hasAttribute(o+"show-alpha")&&(t.showAlpha=b(e.getAttribute(o+"show-alpha"),d.showAlpha,!0)),e.hasAttribute(o+"palette-editable")&&(t.paletteEditable=b(e.getAttribute(o+"palette-editable"),d.paletteEditable,!0)),e.hasAttribute(o+"sl-bar-size")&&(t.slBarSize=C(e.getAttribute(o+"sl-bar-size"),d.slBarSize,[232,150])),e.hasAttribute(o+"hue-bar-size")&&(t.hueBarSize=C(e.getAttribute(o+"hue-bar-size"),d.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(o+"palette")){var n=e.getAttribute(o+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=i.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=i.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(o+"color")&&(t.color=e.getAttribute(o+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=s.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=y(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=y(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(g,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var o=t.getContext("2d"),n=o.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;1>=r;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");o.fillStyle=n,o.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var a=function(o){var n=(0,i.limit)(o.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},s=function t(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){a(t),document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var o=function(o){var n=(0,i.limit)(o.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,i.limit)(o.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),a=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",a)},n=function t(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){o(t),document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var o=t.getContext("2d"),n=o.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),o.fillStyle=n,o.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(o){var n=(0,i.limit)(o.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},a=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",a)}))}},{key:"setupInput",value:function(t){var e=this,o=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||h)&&t.addEventListener("keydown",(function(a){"Up"===a.key?(t.value=(0,i.limit)(+t.value+1,o,n),e.onValueChanged(r,t.value),a.returnValue=!1):"Down"===a.key&&(t.value=(0,i.limit)(+t.value-1,o,n),e.onValueChanged(r,t.value),a.returnValue=!1)})),t.addEventListener("change",(function(){e.onValueChanged(r,(0,i.limit)(+t.value,o,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,i.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,o="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=i.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=i.PALETTE_MATERIAL_CHROME;break;default:n=(0,i.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(o,n,r){var i=t.querySelector('.a-color-picker-palette-color[data-color="'+o+'"]')||document.createElement("div");i.className="a-color-picker-palette-color",i.style.backgroundColor=o,i.setAttribute("data-color",o),i.title=o,t.insertBefore(i,n),e.palette[o]=!0,r&&e.onPaletteColorAdd(o)},a=function(o,n){o?(t.removeChild(o),e.palette[o.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(o.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,i.parseColor)(t,o?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var s=document.createElement("div");s.className="a-color-picker-palette-color a-color-picker-palette-add",s.innerHTML="+",t.appendChild(s),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?a(null,!0):r(o?(0,i.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,i.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?a(t.target,!0):e.onValueChanged(g,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(g,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,i.hslToRgb)(this.H,this.S,this.L),a=r(n,3);this.R=a[0],this.G=a[1],this.B=a[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var s=(0,i.hslToRgb)(this.H,this.S,this.L),l=r(s,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,i.hslToRgb)(this.H,this.S,this.L),p=r(c,3);this.R=p[0],this.G=p[1],this.B=p[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,i.rgbToHsl)(this.R,this.G,this.B),h=r(u,3);this.H=h[0],this.S=h[1],this.L=h[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var d=(0,i.rgbToHsl)(this.R,this.G,this.B),v=r(d,3);this.H=v[0],this.S=v[1],this.L=v[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var y=(0,i.rgbToHsl)(this.R,this.G,this.B),b=r(y,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var C=r(e,3);this.R=C[0],this.G=C[1],this.B=C[2];var _=(0,i.rgbToHsl)(this.R,this.G,this.B),k=r(_,3);this.H=k[0],this.S=k[1],this.L=k[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case f:var w=r(e,4);this.R=w[0],this.G=w[1],this.B=w[2],this.A=w[3];var E=(0,i.rgbToHsl)(this.R,this.G,this.B),A=r(E,3);this.H=A[0],this.S=A[1],this.L=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var x=r(e,4);this.H=x[0],this.S=x[1],this.L=x[2],this.A=x[3];var S=(0,i.hslToRgb)(this.H,this.S,this.L),F=r(S,3);this.R=F[0],this.G=F[1],this.B=F[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var M=(0,i.cssColorToRgb)(e)||[this.R,this.G,this.B],B=r(M,3);this.R=B[0],this.G=B[1],this.B=B[2];var L=(0,i.rgbToHsl)(this.R,this.G,this.B),R=r(L,3);this.H=R[0],this.S=R[1],this.L=R[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case g:var H=(0,i.parseColor)(e,"rgba")||[0,0,0,1],I=r(H,4);this.R=I[0],this.G=I[1],this.B=I[2],this.A=I[3];var T=(0,i.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}this.preview.style.backgroundColor=1===this.A?"rgb("+this.R+","+this.G+","+this.B+")":"rgba("+this.R+","+this.G+","+this.B+","+this.A+")",o&&o.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,o){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=o)}},{key:"updateInputRGB",value:function(t,e,o){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=o)}},{key:"updateInputRGBHEX",value:function(t,e,o){this.options.showHEX&&(this.inputRGBHEX.value=(0,i.rgbToHex)(t,e,o))}},{key:"updatePointerH",value:function(t){this.huePointer.style.left=this.options.hueBarSize[0]*t/360-7+"px"}},{key:"updatePointerSL",value:function(t,e,o){var n=(0,i.hslToRgb)(t,e,o),a=r(n,3),s=this.slBarHelper.findColor(a[0],a[1],a[2]),l=r(s,2),c=l[0],p=l[1];c>=0&&(this.slPointer.style.left=c-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){this.options.showAlpha&&(this.alphaPointer.style.left=this.options.alphaBarSize[0]*t-7+"px")}}]),t}(),k=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var o=this.listeners.slice(0),n=0;o.length>n;n++)o[n].apply(e,t)}}]),t}();function w(t,e){var o=new _(t,e),n={change:new k("change"),coloradd:new k("coloradd"),colorremove:new k("colorremove")},a=!0,s={},l={get element(){return o.element},get rgb(){return[o.R,o.G,o.B]},set rgb(t){var e=r(t,3),n=e[0],a=e[1],s=e[2],l=[(0,i.limit)(n,0,255),(0,i.limit)(a,0,255),(0,i.limit)(s,0,255)];o.onValueChanged(f,[n=l[0],a=l[1],s=l[2],1])},get hsl(){return[o.H,o.S,o.L]},set hsl(t){var e=r(t,3),n=e[0],a=e[1],s=e[2],l=[(0,i.limit)(n,0,360),(0,i.limit)(a,0,100),(0,i.limit)(s,0,100)];o.onValueChanged(m,[n=l[0],a=l[1],s=l[2],1])},get rgbhex(){return this.all.hex},get rgba(){return[o.R,o.G,o.B,o.A]},set rgba(t){var e=r(t,4),n=e[0],a=e[1],s=e[2],l=e[3],c=[(0,i.limit)(n,0,255),(0,i.limit)(a,0,255),(0,i.limit)(s,0,255),(0,i.limit)(l,0,1)];o.onValueChanged(f,[n=c[0],a=c[1],s=c[2],l=c[3]])},get hsla(){return[o.H,o.S,o.L,o.A]},set hsla(t){var e=r(t,4),n=e[0],a=e[1],s=e[2],l=e[3],c=[(0,i.limit)(n,0,360),(0,i.limit)(a,0,100),(0,i.limit)(s,0,100),(0,i.limit)(l,0,1)];o.onValueChanged(m,[n=c[0],a=c[1],s=c[2],l=c[3]])},get color(){return this.all.toString()},set color(t){o.onValueChanged(g,t)},setColor:function(t){o.onValueChanged(g,t,{silent:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})},get all(){if(a){var t=[o.R,o.G,o.B,o.A],e=1>o.A?"rgba("+o.R+","+o.G+","+o.B+","+o.A+")":i.rgbToHex.apply(void 0,t);(s=(0,i.parseColor)(t,s)).toString=function(){return e},a=!1}return Object.assign({},s)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(o.palette).filter((function(t){return o.palette[t]}))},set palette(t){o.updatePalette(t)},show:function(){o.element.classList.remove("hidden")},hide:function(){o.element.classList.add("hidden")},toggle:function(){o.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),o.element.remove(),n=null,o=null}};return o.onchange=function(){for(var t=arguments.length,e=Array(t),o=0;t>o;o++)e[o]=arguments[o];a=!0,n.change.emit([l].concat(e),l)},o.oncoloradd=function(){for(var t=arguments.length,e=Array(t),o=0;t>o;o++)e[o]=arguments[o];n.coloradd.emit([l].concat(e),l)},o.oncolorremove=function(){for(var t=arguments.length,e=Array(t),o=0;t>o;o++)e[o]=arguments[o];n.colorremove.emit([l].concat(e),l)},o.element.ctrl=l,l}if("undefined"!=typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var E=o(5).toString(),A=document.createElement("style");A.setAttribute("type","text/css"),A.setAttribute("data-source","a-color-picker"),A.innerHTML=E,document.querySelector("head").appendChild(A)}e.createPicker=w,e.from=function(t,e){var o=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(p(t)):"string"==typeof t?[].concat(p(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,o){var n=w(t,e);return n.index=o,n}));return o.on=function(t,e){return o.forEach((function(o){return o.on(t,e)})),this},o.off=function(t){return o.forEach((function(e){return e.off(t)})),this},o},e.parseColorToRgb=i.parseColorToRgb,e.parseColorToRgba=i.parseColorToRgba,e.parseColorToHsl=i.parseColorToHsl,e.parseColorToHsla=i.parseColorToHsla,e.parseColor=i.parseColor,e.rgbToHex=i.rgbToHex,e.hslToRgb=i.hslToRgb,e.rgbToHsl=i.rgbToHsl,e.rgbToHsv=i.rgbToHsv,e.rgbToInt=i.rgbToInt,e.intToRgb=i.intToRgb,e.getLuminance=i.getLuminance,e.COLOR_NAMES=i.COLOR_NAMES,e.PALETTE_MATERIAL_500=i.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=i.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var o=[],n=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(o.push(a.value),!e||o.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return o}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(o(0));function i(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);t.length>e;e++)o[e]=t[e];return o}return Array.from(t)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function s(t,e,o){return t=+t,isNaN(t)||e>t?e:t>o?o:t}function l(t,e){return null==t?e:t}function c(t,e,o){var n=[s(t,0,255),s(e,0,255),s(o,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(o=n[2])).toString(16)).slice(-6)}function p(t,e,o){var n=void 0,r=void 0,i=void 0,a=[s(t,0,360)/360,s(e,0,100)/100,s(o,0,100)/100];if(t=a[0],o=a[2],0==(e=a[1]))n=r=i=o;else{var l=function(t,e,o){return 0>o&&(o+=1),o>1&&(o-=1),1/6>o?t+6*(e-t)*o:.5>o?e:2/3>o?t+(e-t)*(2/3-o)*6:t},c=.5>o?o*(1+e):o+e-o*e,p=2*o-c;n=l(p,c,t+1/3),r=l(p,c,t),i=l(p,c,t-1/3)}return[255*n,255*r,255*i].map(Math.round)}function u(t,e,o){var n=[s(t,0,255)/255,s(e,0,255)/255,s(o,0,255)/255];t=n[0],e=n[1],o=n[2];var r=Math.max(t,e,o),i=Math.min(t,e,o),a=void 0,l=void 0,c=(r+i)/2;if(r==i)a=l=0;else{var p=r-i;switch(l=c>.5?p/(2-r-i):p/(r+i),r){case t:a=(e-o)/p+(o>e?6:0);break;case e:a=(o-t)/p+2;break;case o:a=(t-e)/p+4}a/=6}return[360*a,100*l,100*c].map(Math.round)}function h(t,e,o){return t<<16|e<<8|o}function d(t){if(t){var e=a[t.toString().toLowerCase()],o=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(e||t)||[],r=n(o,10),i=r[3],s=r[4],l=r[5],c=r[7],p=r[8],u=r[9];if(void 0!==i)return[parseInt(i+i,16),parseInt(s+s,16),parseInt(l+l,16)];if(void 0!==c)return[parseInt(c,16),parseInt(p,16),parseInt(u,16)]}}function g(t){if(t){var e=a[t.toString().toLowerCase()],o=/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(e||t)||[],r=n(o,12),i=r[3],s=r[4],l=r[5],c=r[6],p=r[8],u=r[9],h=r[10],d=r[11];if(void 0!==i)return[parseInt(i+i,16),parseInt(s+s,16),parseInt(l+l,16),c?+(parseInt(c+c,16)/255).toFixed(2):1];if(void 0!==p)return[parseInt(p,16),parseInt(u,16),parseInt(h,16),d?+(parseInt(d,16)/255).toFixed(2):1]}}function f(t){if(t){var e=/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(t)||[],o=n(e,4),r=o[2],i=o[3];return o[0]?[s(o[1],0,255),s(r,0,255),s(i,0,255)]:void 0}}function m(t){if(t){var e=/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(t)||[],o=n(e,6),r=o[2],i=o[3],a=o[5];return o[0]?[s(o[1],0,255),s(r,0,255),s(i,0,255),s(l(a,1),0,1)]:void 0}}function v(t){if(Array.isArray(t))return[s(t[0],0,255),s(t[1],0,255),s(t[2],0,255),s(l(t[3],1),0,1)];var e=g(t)||m(t);return e&&3===e.length&&e.push(1),e}function y(t){if(t){var e=/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(t)||[],o=n(e,4),r=o[2],i=o[3];return o[0]?[s(o[1],0,360),s(r,0,100),s(i,0,100)]:void 0}}function b(t){if(t){var e=/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(t)||[],o=n(e,6),r=o[2],i=o[3],a=o[5];return o[0]?[s(o[1],0,255),s(r,0,255),s(i,0,255),s(l(a,1),0,1)]:void 0}}function C(t){if(Array.isArray(t))return[s(t[0],0,360),s(t[1],0,100),s(t[2],0,100),s(l(t[3],1),0,1)];var e=b(t);return e&&3===e.length&&e.push(1),e}function _(t,e){switch(e){case"rgb":default:return t.slice(0,3);case"rgbcss":return"rgb("+t[0]+", "+t[1]+", "+t[2]+")";case"rgbcss4":return"rgb("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")";case"rgba":return t;case"rgbacss":return"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")";case"hsl":return u.apply(void 0,i(t));case"hslcss":return"hsl("+(t=u.apply(void 0,i(t)))[0]+", "+t[1]+", "+t[2]+")";case"hslcss4":var o=u.apply(void 0,i(t));return"hsl("+o[0]+", "+o[1]+", "+o[2]+", "+t[3]+")";case"hsla":return[].concat(i(u.apply(void 0,i(t))),[t[3]]);case"hslacss":var n=u.apply(void 0,i(t));return"hsla("+n[0]+", "+n[1]+", "+n[2]+", "+t[3]+")";case"hex":return c.apply(void 0,i(t));case"hexcss4":return c.apply(void 0,i(t))+("00"+parseInt(255*t[3]).toString(16)).slice(-2);case"int":return h.apply(void 0,i(t))}}e.COLOR_NAMES=a,e.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],e.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],e.rgbToHex=c,e.hslToRgb=p,e.rgbToHsl=u,e.rgbToHsv=function(t,e,o){var n=[s(t,0,255)/255,s(e,0,255)/255,s(o,0,255)/255];t=n[0],e=n[1],o=n[2];var r,i=Math.max(t,e,o),a=Math.min(t,e,o),l=void 0,c=i,p=i-a;if(r=0===i?0:p/i,i==a)l=0;else{switch(i){case t:l=(e-o)/p+(o>e?6:0);break;case e:l=(o-t)/p+2;break;case o:l=(t-e)/p+4}l/=6}return[l,r,c]},e.rgbToInt=h,e.intToRgb=function(t){return[t>>16&255,t>>8&255,255&t]},e.cssColorToRgb=d,e.cssColorToRgba=g,e.cssRgbToRgb=f,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[s(t[0],0,255),s(t[1],0,255),s(t[2],0,255)]:d(t)||f(t)},e.parseColorToRgba=v,e.cssHslToHsl=y,e.cssHslaToHsla=b,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[s(t[0],0,360),s(t[1],0,100),s(t[2],0,100)]:y(t)},e.parseColorToHsla=C,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var o=void 0;if((o=v(t))||(o=C(t))&&(o=[].concat(i(p.apply(void 0,i(o))),[o[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(o,e),t}),e||{}):_(o,e.toString().toLowerCase())}},e.getLuminance=function(t,e,o){return.2126*(t=.03928>(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=.03928>(e/=255)?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(.03928>(o/=255)?o/12.92:Math.pow((o+.055)/1.055,2.4))},e.limit=s,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,o){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(t,e,o){var n=o(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,o){(t.exports=o(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=function(t,e){var o=t[1]||"",n=t[3];if(!n)return o;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),i=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[o].concat(i).concat([r]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o})).join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;this.length>r;r++){var i=this[r][0];"number"==typeof i&&(n[i]=!0)}for(r=0;t.length>r;r++){var a=t[r];"number"==typeof a[0]&&n[a[0]]||(o&&!a[2]?a[2]=o:o&&(a[2]="("+a[2]+") and ("+o+")"),e.push(a))}},e}}])},88572:function(t,e,o){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e,o){var r=o.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(r)));var i=!1;return{configurable:!0,get:function(){if(i||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof r)return r;var o=r.bind(this);return i=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return o},set:function(t){r=t,delete this[e]}}),i=!1,o},set:function(t){r=t}}}function i(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((function(e){if("constructor"!==e){var o=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof o.value&&Object.defineProperty(t.prototype,e,r(t,e,o))}})),t}function a(){return 1===arguments.length?i.apply(void 0,arguments):r.apply(void 0,arguments)}o.r(e),o.d(e,{boundClass:function(){return i},boundMethod:function(){return r},default:function(){return a}})},27618:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UIRange=void 0;var n=o(70655);o(74054);var r=o(98440),i=o(51923),a=o(16892),s=o(88572),l=function(t){function e(e,o){var i=t.call(this,e,n.__assign(n.__assign({},o),{type:"hidden"}))||this;return i.state=n.__assign(n.__assign({},r.UIInput.defaultState),{min:0,max:100}),i.startValue=0,i.startX=0,i.width=100,Object.assign(i.state,o),i.appendUIRange(),i.onChangeSelfValue(),i}return n.__extends(e,t),e.prototype.className=function(){return"UIRange"},e.prototype.appendUIRange=function(){var t=this.j.create.div(this.getFullElName("slider"));this.container.appendChild(t);var e=this.j.create.div(this.getFullElName("handle"));t.appendChild(e);var o=this.j.create.div(this.getFullElName("log")),n=this.getElm("label");(0,a.assert)(null!=n,"label element does not exists"),n.appendChild(o)},e.prototype.onDragStart=function(t){this.startValue=parseFloat(this.value)||0,this.startX=t.clientX;var e=this.getElm("slider");(0,a.assert)(null!=e,"slider element does not exists"),this.width=e.offsetWidth,this.j.e.on(this.j.ow,"mousemove",this.onDrag)},e.prototype.onDrag=function(t){var e=this.state,o=e.min,n=e.max,r=this.startValue+(t.clientX-this.startX)/this.width*(this.state.max-this.state.min);o>r&&(r=o),r>n&&(r=n),this.value=r.toString()},e.prototype.onDragEnd=function(){this.j.e.off(this.j.ow,"mousemove",this.onDrag)},e.prototype.onChangeSelfValue=function(){var t=this.getElm("handle"),e=parseFloat(this.value)||0;(0,a.assert)(null!=t,"Handle element does not exist"),(0,a.css)(t,{left:(e-this.state.min)/(this.state.max-this.state.min)*100+"%"});var o=this.getElm("log");(0,a.assert)(null!=o,"log element does not exist"),o.innerText=e.toString()},e.prototype.destruct=function(){return this.onDragEnd(),t.prototype.destruct.call(this)},n.__decorate([(0,i.watch)(["handle:mousedown","handle:touchstart"])],e.prototype,"onDragStart",null),n.__decorate([s.default],e.prototype,"onDrag",null),n.__decorate([(0,i.watch)(["j.ow:mouseup","j.ow:touchend"])],e.prototype,"onDragEnd",null),n.__decorate([(0,i.watch)(":change")],e.prototype,"onChangeSelfValue",null),n.__decorate([i.component],e)}(r.UIInput);e.UIRange=l},6626:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorInput=void 0;var n=o(70655);o(26164);var r=o(98440),i=o(51923),a=o(16892),s=o(43746),l=o(71910),c=o(49940),p=o(16892),u=function(t){function e(e,o){var n=t.call(this,e,o)||this,i=new r.Popup(e);n.popup=i,n.trigger=(0,r.Button)(n.j,"ok");var c=n.getElm("wrapper");(0,p.assert)(null!=c,"wrapper element does not exist"),c.appendChild(n.trigger.container),n.trigger.container.classList.add(n.getFullElName("trigger")),n.trigger.onAction((function(){var t,e;null===(e=(t=n.state).onChange)||void 0===e||e.call(t,n.value),i.close()})),i.setMod("padding",!1).setMod("max-height",!1);var u=n.j.create.div(n.getFullElName("picker")),h=s.createPicker(u,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",(function(t,e){n.isFocused||(n.value=s.parseColor(e||"","hex"))}));return n.j.e.on(n,"change",(function(){s.parseColor(n.value,"hex")!==h.color&&(h.color=n.value)})),i.setContent(u),n.j.e.on(n.nativeInput,"click",(function(){i.parentElement=n,n.jodit instanceof l.Dialog&&i.setZIndex(n.jodit.getZIndex()+1),i.open((function(){return(0,a.position)(n.container)}))})),n.onChangeValue(),n.onChangeSelfValue(),n}return n.__extends(e,t),e.prototype.className=function(){return"ColorInput"},e.prototype.afterSetMode=function(t,e){"slim"===t&&e&&this.nativeInput.setAttribute("readonly","true")},e.prototype.onChangeSelfValue=function(){this.nativeInput.style.backgroundColor=this.value},e.prototype.onEscKeyDown=function(t){var e;t.key===c.KEY_ESC&&(null===(e=this.popup)||void 0===e||e.close())},n.__decorate([(0,i.watch)(":change")],e.prototype,"onChangeSelfValue",null),n.__decorate([(0,i.watch)("nativeInput:keydown")],e.prototype,"onEscKeyDown",null),n.__decorate([i.component],e)}(r.UIInput);e.ColorInput=u},75922:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),o(98440).Icon.set("map",o(32207)).set("edit-hand",o(40767)).set("edit-polygon",o(26929)).set("edit-marker",o(22657)).set("edit-text",o(98576)).set("edit-polyline",o(87526)).set("edit-circle",o(88862))},21779:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(733),r=o(95929);n.Config.prototype.googleMaps={saveStateInStorage:!0,useStaticImage:!1,apiUrl:"https://maps.googleapis.com/maps/api/js?key=${j.o.googleMaps.API_KEY}&libraries=geometry,places,drawing&language=${j.o.language}&callback=JoditGoogleReadyHandler",API_KEY:"AIzaSyDjnR03hxN8fo0QJ85Jkkvk2DALTh3eynY",dialog:{size:[700,700]},inlineEditorOptions:{buttons:["bold","italic","link","brush","fontsize","image"]},map:{type:"roadmap",layer:"default",center:"auto",defaultCenter:[-34.397,150.644],defaultZoom:10,zoom:10,size:[500,400],defaultStates:{polyline:{strokeColor:"#5ba4f3",strokeWeight:3},polygon:{strokeColor:"#417706",fillColor:"#5b9302",strokeWeight:1,fillOpacity:.5},marker:{},text:{},circle:{strokeColor:"#da767c",fillColor:"#f34ca8",strokeWeight:1,fillOpacity:.5}}}},n.Config.prototype.controls.googleMaps={tooltip:"Google Maps",icon:"map",command:r.COMMAND_OPEN_DIALOG};var i=function(t){return{icon:"edit-".concat(t),isActive:function(e){return e.buffer.get("createMode.gm")===t},exec:function(e){e.e.fire("changeCreateMode.gm",t)}}};n.Config.prototype.controls.gm={hand:i("hand"),marker:i("marker"),polyline:i("polyline"),polygon:i("polygon"),circle:i("circle"),text:i("text")}},28137:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.googleMaps=void 0;var n=o(70655);o(34436);var r=o(43464),i=o(97029);o(21779),o(75922);var a=o(19800),s=o(24697),l=o(16892),c=o(49940),p=o(51923),u=o(48310),h=o(30099),d=o(33251),g=o(30804),f=o(75895),m=o(45143),v=o(95929);window.JoditGoogleReadyHandler=d.GoogleReadyHandler;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requires=["license","color-picker"],e.buttons=[{group:"media",name:"googleMaps"}],e.dialog=null,e}return n.__extends(e,t),e.prototype.className=function(){return"google-maps"},e.prototype.afterInit=function(t){var e=this;t.registerCommand(v.COMMAND_OPEN_DIALOG,(function(){e.openMapEditor(null,{})}))},e.prototype.beforeDestruct=function(t){},e.prototype.onOpenOnDblClick=function(t){if(t.dataset.googleMaps){var e=void 0;try{e=JSON.parse(this.j.ow.atob(t.dataset.googleMaps))}catch(t){}return this.openMapEditor(t,e),!1}},e.prototype.openMapEditor=function(t,e){return n.__awaiter(this,void 0,Promise,(function(){var o,r,i,c,p,u,m,y,b=this;return n.__generator(this,(function(C){return o=this.j,r=this.getDialog(),i=this.j.o.googleMaps.saveStateInStorage?r.storage.get(v.STORAGE_KEY):void 0,c=this.jodit.o.googleMaps.apiUrl,(0,d.isApiAvailable)()||(0,l.appendScriptAsync)(this.jodit,c.replace(/\${([^}]+)}/g,(function(t,e){var o;return null!==(o=b.get(e))&&void 0!==o?o:""}))),p=n.__assign(n.__assign({type:this.j.o.googleMaps.map.type,layer:this.j.o.googleMaps.map.layer,size:this.j.o.googleMaps.map.size},i),e),(u=new h.UIMap(r,p,this.j.options)).container.classList.add(r.getFullElName("map")),(m=new f.UIComboBox(o,{icon:"search",placeholder:"Search",clearButton:!0}).setMod("in-header",!0)).container.classList.add(r.getFullElName("search")),this.j.async.promise((function(t){if((0,d.isApiAvailable)())t(0);else{var e=function(){(0,d.isApiAvailable)()?t(0):b.j.async.setTimeout(e,100)};e(),(0,d.googleReady)(t)}})).then((function(){u.setStatus("ready"),m.setStatus("ready")})),this.j.e.on(m,"select",(function(t,e){e?u.map.fitBounds(e):t&&(u.state.center=[t.lat(),t.lng()])})),i||("auto"===this.j.o.googleMaps.map.center?navigator.geolocation.getCurrentPosition((function(t){u.state.center=[t.coords.latitude,t.coords.longitude]}),(function(){u.state.center=b.j.o.googleMaps.map.defaultCenter})):u.state.center=this.j.o.googleMaps.map.center),r.setSize.apply(r,n.__spreadArray([],n.__read(o.o.googleMaps.dialog.size),!1)).setHeader([m," ",(0,s.Button)(o,"eye").onAction((function(){var t=b.jodit.createInside.element("img");t.src=(0,g.staticUrl)(u),t.dataset.googleMaps=btoa(u.json());var e={value:t.outerHTML};b.onAfterGetValueFromEditor(e),o.execCommand("preview",null,e.value)}))]).setContent((0,a.TabsWidget)(o,[{name:"Map",icon:"map",content:u},{name:"Settings",content:new h.UIMapsPropsForm(o,u.state)},{name:"Controls",icon:"menu",content:new h.UIMapsControlsForm(o,u.state)}])).setFooter([(0,s.Button)(o,"cancel","Cancel","default").onAction((function(){return r.close()})),(0,s.Button)(o,"ok",t?"Save":"Insert","primary").onAction((function(){u.destruct(),m.destruct(),r.e.off("beforeClose",y),r.close(),b.insertMap(t,u)}))]).open(),y=function(){if(u.state.elements.length&&JSON.stringify(u.state.elements)!==JSON.stringify(p.elements)&&!confirm(b.i18n("Are you sure?")))return!1;u.destruct(),m.destruct(),r.e.off("beforeClose",y)},r.e.on("beforeClose",y),[2]}))}))},e.prototype.getDialog=function(){if(!this.dialog){var t=new u.Dialog({language:this.j.o.language});t.container.classList.add(this.getFullElName("")),this.dialog=t}return this.dialog},e.prototype.insertMap=function(t,e){var o=null!=t?t:this.jodit.createInside.element("img");o.src=(0,g.staticUrl)(e),o.dataset.googleMaps=btoa(e.json()),t||this.jodit.s.insertImage(o)},e.prototype.onBeforeSetNativeEditorValue=function(t){t.value=t.value.replace(/<script[^>]+jodit-google-maps-init[^>]+>.*?<\/script>/gs,"")},e.prototype.onAfterGetValueFromEditor=function(t,e){var o=this;this.j.o.googleMaps.useStaticImage||e===c.SOURCE_CONSUMER||(t.value=t.value.replace(/(<img[^>]+)(["']?)data-google-maps\2\s*=(["'])([^"']+)\3([^>]*>)/gs,(function(t,e,n,r,i,a){var s={};try{s=JSON.parse(o.j.ow.atob(i))}catch(t){}return"".concat(e,' id="').concat(s.uid,'" ').concat(n,"data-google-maps").concat(n,"=").concat(r).concat(i).concat(r).concat(a).concat((0,m.generateJSScript)(o.j,s))})))},n.__decorate([(0,p.watch)("?:openOnDblClick")],e.prototype,"onOpenOnDblClick",null),n.__decorate([(0,p.watch)(":beforeSetNativeEditorValue")],e.prototype,"onBeforeSetNativeEditorValue",null),n.__decorate([(0,p.watch)(":afterGetValueFromEditor")],e.prototype,"onAfterGetValueFromEditor",null),e}(r.Plugin);e.googleMaps=y,i.Jodit.plugins.add("google