chrome-options
Version:
Options page for your Chrome extension
12 lines • 53.1 kB
JavaScript
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(o),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var s=e[r];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){var o={},r=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),i=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var o=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}}(),s=null,a=0,c=[],l=n(3);function u(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(g(r.parts[s],t))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(g(r.parts[s],t));o[r.id]={id:r.id,refs:1,parts:a}}}}function d(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],s=t.base?i[0]+t.base:i[0],a={css:i[1],media:i[2],sourceMap:i[3]};o[s]?o[s].parts.push(a):n.push(o[s]={id:s,parts:[a]})}return n}function p(e,t){var n=i(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=i(e.insertAt.before,n);n.insertBefore(t,r)}}function f(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return n.nc}();o&&(e.attrs.nonce=o)}return m(t,e.attrs),p(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=a++;n=s||(s=h(t)),o=b.bind(null,n,c,!1),r=b.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),p(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=l(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([o],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,t),r=function(){f(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),o=function(e,t){var n=t.css,o=t.media;o&&e.setAttribute("media",o);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){f(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return u(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}e&&u(d(e,t),t);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete o[a.id]}}}};var v=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function b(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){"use strict";(function(t){var o=n(5),r=n(12),i=n(15),s=document,a=s.documentElement;function c(e,n,o,i){t.navigator.pointerEnabled?r[n](e,{mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"}[o],i):t.navigator.msPointerEnabled?r[n](e,{mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"}[o],i):(r[n](e,{mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"}[o],i),r[n](e,o,i))}function l(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var t=e.button;return void 0!==t?1&t?1:2&t?3:4&t?2:0:void 0}function u(e,n){return void 0!==t[n]?t[n]:a.clientHeight?a[e]:s.body[e]}function d(e,t,n){var o,r=e||{},i=r.className;return r.className+=" gu-hide",o=s.elementFromPoint(t,n),r.className=i,o}function p(){return!1}function f(){return!0}function h(e){return e.width||e.right-e.left}function m(e){return e.height||e.bottom-e.top}function g(e){return e.parentNode===s?null:e.parentNode}function v(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||function e(t){if(!t)return!1;if("false"===t.contentEditable)return!1;if("true"===t.contentEditable)return!0;return e(g(t))}(e)}function b(e){return e.nextElementSibling||function(){var t=e;do{t=t.nextSibling}while(t&&1!==t.nodeType);return t}()}function y(e,t){var n=function(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}(t),o={pageX:"clientX",pageY:"clientY"};return e in o&&!(e in n)&&o[e]in n&&(e=o[e]),n[e]}e.exports=function(e,t){var n,w,x,k,T,S,E,L,C,O,j;1===arguments.length&&!1===Array.isArray(e)&&(t=e,e=[]);var A,_=null,M=t||{};void 0===M.moves&&(M.moves=f),void 0===M.accepts&&(M.accepts=f),void 0===M.invalid&&(M.invalid=function(){return!1}),void 0===M.containers&&(M.containers=e||[]),void 0===M.isContainer&&(M.isContainer=p),void 0===M.copy&&(M.copy=!1),void 0===M.copySortSource&&(M.copySortSource=!1),void 0===M.revertOnSpill&&(M.revertOnSpill=!1),void 0===M.removeOnSpill&&(M.removeOnSpill=!1),void 0===M.direction&&(M.direction="vertical"),void 0===M.ignoreInputTextSelection&&(M.ignoreInputTextSelection=!0),void 0===M.mirrorContainer&&(M.mirrorContainer=s.body);var B=o({containers:M.containers,start:function(e){var t=P(e);t&&F(t)},end:X,cancel:G,remove:V,destroy:function(){I(!0),Y({})},canMove:function(e){return!!P(e)},dragging:!1});return!0===M.removeOnSpill&&B.on("over",function(e){i.rm(e,"gu-hide")}).on("out",function(e){B.dragging&&i.add(e,"gu-hide")}),I(),B;function N(e){return-1!==B.containers.indexOf(e)||M.isContainer(e)}function I(e){var t=e?"remove":"add";c(a,t,"mousedown",q),c(a,t,"mouseup",Y)}function R(e){c(a,e?"remove":"add","mousemove",z)}function H(e){var t=e?"remove":"add";r[t](a,"selectstart",$),r[t](a,"click",$)}function $(e){A&&e.preventDefault()}function q(e){if(S=e.clientX,E=e.clientY,1===l(e)&&!e.metaKey&&!e.ctrlKey){var t=e.target,n=P(t);n&&(A=n,R(),"mousedown"===e.type&&(v(t)?t.focus():e.preventDefault()))}}function z(e){if(A)if(0!==l(e)){if(void 0===e.clientX||e.clientX!==S||void 0===e.clientY||e.clientY!==E){if(M.ignoreInputTextSelection){var t=y("clientX",e),o=y("clientY",e);if(v(s.elementFromPoint(t,o)))return}var r=A;R(!0),H(),X(),F(r);var d=function(e){var t=e.getBoundingClientRect();return{left:t.left+u("scrollLeft","pageXOffset"),top:t.top+u("scrollTop","pageYOffset")}}(x);k=y("pageX",e)-d.left,T=y("pageY",e)-d.top,i.add(O||x,"gu-transit"),function(){if(!n){var e=x.getBoundingClientRect();(n=x.cloneNode(!0)).style.width=h(e)+"px",n.style.height=m(e)+"px",i.rm(n,"gu-transit"),i.add(n,"gu-mirror"),M.mirrorContainer.appendChild(n),c(a,"add","mousemove",K),i.add(M.mirrorContainer,"gu-unselectable"),B.emit("cloned",n,x,"mirror")}}(),K(e)}}else Y({})}function P(e){if(!(B.dragging&&n||N(e))){for(var t=e;g(e)&&!1===N(g(e));){if(M.invalid(e,t))return;if(!(e=g(e)))return}var o=g(e);if(o&&!M.invalid(e,t)&&M.moves(e,o,t,b(e)))return{item:e,source:o}}}function F(e){(function(e,t){return"boolean"==typeof M.copy?M.copy:M.copy(e,t)})(e.item,e.source)&&(O=e.item.cloneNode(!0),B.emit("cloned",O,e.item,"copy")),w=e.source,x=e.item,L=C=b(e.item),B.dragging=!0,B.emit("drag",x,w)}function X(){if(B.dragging){var e=O||x;D(e,g(e))}}function U(){A=!1,R(!0),H(!0)}function Y(e){if(U(),B.dragging){var t=O||x,o=y("clientX",e),r=y("clientY",e),i=J(d(n,o,r),o,r);i&&(O&&M.copySortSource||!O||i!==w)?D(t,i):M.removeOnSpill?V():G()}}function D(e,t){var n=g(e);O&&M.copySortSource&&t===w&&n.removeChild(x),Z(t)?B.emit("cancel",e,w,w):B.emit("drop",e,t,w,C),W()}function V(){if(B.dragging){var e=O||x,t=g(e);t&&t.removeChild(e),B.emit(O?"cancel":"remove",e,t,w),W()}}function G(e){if(B.dragging){var t=arguments.length>0?e:M.revertOnSpill,n=O||x,o=g(n),r=Z(o);!1===r&&t&&(O?o&&o.removeChild(O):w.insertBefore(n,L)),r||t?B.emit("cancel",n,w,w):B.emit("drop",n,o,w,C),W()}}function W(){var e=O||x;U(),n&&(i.rm(M.mirrorContainer,"gu-unselectable"),c(a,"remove","mousemove",K),g(n).removeChild(n),n=null),e&&i.rm(e,"gu-transit"),j&&clearTimeout(j),B.dragging=!1,_&&B.emit("out",e,_,w),B.emit("dragend",e),w=x=O=L=C=j=_=null}function Z(e,t){var o;return o=void 0!==t?t:n?C:b(O||x),e===w&&o===L}function J(e,t,n){for(var o=e;o&&!r();)o=g(o);return o;function r(){if(!1===N(o))return!1;var r=Q(o,e),i=ee(o,r,t,n);return!!Z(o,i)||M.accepts(x,o,w,i)}}function K(e){if(n){e.preventDefault();var t=y("clientX",e),o=y("clientY",e),r=t-k,i=o-T;n.style.left=r+"px",n.style.top=i+"px";var s=O||x,a=d(n,t,o),c=J(a,t,o),l=null!==c&&c!==_;(l||null===c)&&(_&&h("out"),_=c,l&&h("over"));var u=g(s);if(c!==w||!O||M.copySortSource){var p,f=Q(c,a);if(null!==f)p=ee(c,f,t,o);else{if(!0!==M.revertOnSpill||O)return void(O&&u&&u.removeChild(s));p=L,c=w}(null===p&&l||p!==s&&p!==b(s))&&(C=p,c.insertBefore(s,p),B.emit("shadow",s,c,w))}else u&&u.removeChild(s)}function h(e){B.emit(e,s,_,w)}}function Q(e,t){for(var n=t;n!==e&&g(n)!==e;)n=g(n);return n===a?null:n}function ee(e,t,n,o){var r="horizontal"===M.direction;return t!==e?function(){var e=t.getBoundingClientRect();return i(r?n>e.left+h(e)/2:o>e.top+m(e)/2)}():function(){var t,i,s,a=e.children.length;for(t=0;t<a;t++){if(i=e.children[t],s=i.getBoundingClientRect(),r&&s.left+s.width/2>n)return i;if(!r&&s.top+s.height/2>o)return i}return null}();function i(e){return e?b(t):t}}}}).call(this,n(0))},function(e,t,n){"use strict";var o=n(6),r=n(7);e.exports=function(e,t){var n=t||{},i={};return void 0===e&&(e={}),e.on=function(t,n){return i[t]?i[t].push(n):i[t]=[n],e},e.once=function(t,n){return n._once=!0,e.on(t,n),e},e.off=function(t,n){var o=arguments.length;if(1===o)delete i[t];else if(0===o)i={};else{var r=i[t];if(!r)return e;r.splice(r.indexOf(n),1)}return e},e.emit=function(){var t=o(arguments);return e.emitterSnapshot(t.shift()).apply(this,t)},e.emitterSnapshot=function(t){var s=(i[t]||[]).slice(0);return function(){var i=o(arguments),a=this||e;if("error"===t&&!1!==n.throws&&!s.length)throw 1===i.length?i[0]:i;return s.forEach(function(o){n.async?r(o,i,a):o.apply(a,i),o._once&&e.off(t,o)}),e}},e}},function(e,t){e.exports=function(e,t){return Array.prototype.slice.call(e,t)}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t,n){e&&o(function(){e.apply(n||null,t||[])})}},function(e,t,n){(function(t){var n;n="function"==typeof t?function(e){t(e)}:function(e){setTimeout(e,0)},e.exports=n}).call(this,n(9).setImmediate)},function(e,t,n){(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(10),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var o,r=1,i={},s=!1,a=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&u(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),o=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){u(e.data)},o=function(t){e.port2.postMessage(t)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var e=a.documentElement;o=function(t){var n=a.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():o=function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var s={callback:e,args:t};return i[r]=s,o(r),r++},c.clearImmediate=l}function l(e){delete i[e]}function u(e){if(s)setTimeout(u,0,e);else{var t=i[e];if(t){s=!0;try{!function(e){var t=e.callback,o=e.args;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;default:t.apply(n,o)}}(t)}finally{l(e),s=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(11))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=a(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(t){var o=n(13),r=n(14),i=t.document,s=function(e,t,n,o){return e.addEventListener(t,n,o)},a=function(e,t,n,o){return e.removeEventListener(t,n,o)},c=[];function l(e,t,n){var o=function(e,t,n){var o,r;for(o=0;o<c.length;o++)if((r=c[o]).element===e&&r.type===t&&r.fn===n)return o}(e,t,n);if(o){var r=c[o].wrapper;return c.splice(o,1),r}}t.addEventListener||(s=function(e,n,o){return e.attachEvent("on"+n,function(e,n,o){var r=l(e,n,o)||function(e,n,o){return function(n){var r=n||t.event;r.target=r.target||r.srcElement,r.preventDefault=r.preventDefault||function(){r.returnValue=!1},r.stopPropagation=r.stopPropagation||function(){r.cancelBubble=!0},r.which=r.which||r.keyCode,o.call(e,r)}}(e,0,o);return c.push({wrapper:r,element:e,type:n,fn:o}),r}(e,n,o))},a=function(e,t,n){var o=l(e,t,n);if(o)return e.detachEvent("on"+t,o)}),e.exports={add:s,remove:a,fabricate:function(e,t,n){var s=-1===r.indexOf(t)?new o(t,{detail:n}):function(){var e;i.createEvent?(e=i.createEvent("Event")).initEvent(t,!0,!0):i.createEventObject&&(e=i.createEventObject());return e}();e.dispatchEvent?e.dispatchEvent(s):e.fireEvent("on"+t,s)}}}).call(this,n(0))},function(e,t,n){(function(t){var n=t.CustomEvent;e.exports=function(){try{var e=new n("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?n:"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var n=[],o="",r=/^on/;for(o in t)r.test(o)&&n.push(o.slice(2));e.exports=n}).call(this,n(0))},function(e,t,n){"use strict";var o={},r="(?:^|\\s)",i="(?:\\s|$)";function s(e){var t=o[e];return t?t.lastIndex=0:o[e]=t=new RegExp(r+e+i,"g"),t}e.exports={add:function(e,t){var n=e.className;n.length?s(t).test(n)||(e.className+=" "+t):e.className=t},rm:function(e,t){e.className=e.className.replace(s(t)," ").trim()}}},function(e,t,n){var o=n(17);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 0.8;\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";\n filter: alpha(opacity=80);\n}\n.gu-hide {\n display: none !important;\n}\n.gu-unselectable {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n}\n.gu-transit {\n opacity: 0.2;\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";\n filter: alpha(opacity=20);\n}\n',""])},function(e,t){
/*!
* ==========================================================
* COLOR PICKER PLUGIN 1.4.0
* ==========================================================
* Author: Taufik Nurrohman <https://github.com/tovic>
* License: MIT
* ----------------------------------------------------------
*/
!function(e,t,n){var o="firstChild",r=setTimeout;function i(e){return void 0!==e}function s(e){return"object"==typeof e}function a(e){return Object.keys(e).length}function c(e,t,n){return e<t?t:e>n?n:e}function l(e,t){return parseInt(e,t||10)}function u(e){return Math.round(e)}function d(e){var t,n,o,r,i,s,a,c,l=+e[0],d=+e[1],p=+e[2];switch(s=p*(1-d),a=p*(1-(i=6*l-(r=Math.floor(6*l)))*d),c=p*(1-(1-i)*d),r=r||0,a=a||0,c=c||0,r%6){case 0:t=p,n=c,o=s;break;case 1:t=a,n=p,o=s;break;case 2:t=s,n=p,o=c;break;case 3:t=s,n=a,o=p;break;case 4:t=c,n=s,o=p;break;case 5:t=p,n=s,o=a}return[u(255*t),u(255*n),u(255*o)]}function p(e){return h(d(e))}function f(e){var t,n=+e[0],o=+e[1],r=+e[2],i=Math.max(n,o,r),s=Math.min(n,o,r),a=i-s,c=0===i?0:a/i,l=i/255;switch(i){case s:t=0;break;case n:t=o-r+a*(o<r?6:0),t/=6*a;break;case o:t=r-n+2*a,t/=6*a;break;case r:t=n-o+4*a,t/=6*a}return[t,c,l]}function h(e){var t=+e[2]|+e[1]<<8|+e[0]<<16;return(t="000000"+t.toString(16)).slice(-6)}function m(e){return f(g(e))}function g(e){return 3===e.length&&(e=e.replace(/./g,"$&$&")),[l(e[0]+e[1],16),l(e[2]+e[3],16),l(e[4]+e[5],16)]}function v(e){return[+e[0]/360,+e[1]/100,+e[2]/100]}function b(e){return[u(360*+e[0]),u(100*+e[1]),u(100*+e[2])]}function y(e){if(s(e))return e;var t=/\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i.exec(e),n=/\s*hsv\s*\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)\s*$/i.exec(e);return"#"===e[0]&&e.match(/^#([\da-f]{3}|[\da-f]{6})$/i)?m(e.slice(1)):n?v([+n[1],+n[2],+n[3]]):t?f([+t[1],+t[2],+t[3]]):[0,1,1]}!function(e){e.version="1.4.0",e.__instance__={},e.each=function(t,n){return r(function(){var n,o=e.__instance__;for(n in o)t.call(o[n],n,o)},0===n?0:n||1),e},e.parse=y,e._HSV2RGB=d,e._HSV2HEX=p,e._RGB2HSV=f,e._HEX2HSV=m,e._HEX2RGB=function(e){return function(e){return[+e[0]/255,+e[1]/255,+e[2]/255]}(g(e))},e.HSV2RGB=function(e){return d(v(e))},e.HSV2HEX=function(e){return p(v(e))},e.RGB2HSV=function(e){return b(f(e))},e.RGB2HEX=h,e.HEX2HSV=function(e){return b(m(e))},e.HEX2RGB=g}(e.CP=function(n,l,u){var f=t.body,h=t.documentElement,m=this,g=e.CP,v=!1,b={},y=t.createElement("div"),w="touchstart mousedown",x="touchmove mousemove",k="touchend mouseup",T="orientationchange resize";if(!(m instanceof g))return new g(n,l);function S(e,t,n){for(var o=0,r=(e=e.split(/\s+/)).length;o<r;++o)t.addEventListener(e[o],n,!1)}function E(e,t,n){for(var o=0,r=(e=e.split(/\s+/)).length;o<r;++o)t.removeEventListener(e[o],n)}function L(e,t){var n="touches",o="clientX",r="clientY",i=t[n]?t[n][0][o]:t[o],s=t[n]?t[n][0][r]:t[r],a=C(e);return{x:i-a.l,y:s-a.t}}function C(t){var n,o,r;return t===e?(n=e.pageXOffset||h.scrollLeft,o=e.pageYOffset||h.scrollTop):(n=(r=t.getBoundingClientRect()).left,o=r.top),{l:n,t:o}}function O(e,t){for(;(e=e.parentElement)&&e!==t;);return e}function j(e){e&&e.preventDefault()}function A(t){return t===e?{w:e.innerWidth,h:e.innerHeight}:{w:t.offsetWidth,h:t.offsetHeight}}function _(e){return v||!!i(e)&&e}function M(e){v=e}function B(e,t,n){if(!i(b[e]))return m;if(i(n))i(b[e][n])&&b[e][n].apply(m,t);else for(var o in b[e])b[e][o].apply(m,t);return m}g.__instance__[n.id||n.name||a(g.__instance__)]=m,i(l)&&!0!==l||(l=w),M(g.parse(n.getAttribute("data-color")||n.value||[0,1,1])),y.className="color-picker",y.innerHTML='<div class="color-picker-container"><span class="color-picker-h"><i></i></span><span class="color-picker-sv"><i></i></span></div>';var N,I=y[o].children,R=_([0,1,1]),H=I[0],$=I[1],q=H[o],z=$[o],P=0,F=0,X=0,U=0,Y=0,D=0,V=0,G=0,W=p(R);function Z(e,t){e&&"h"!==e||B("change:h",t),e&&"sv"!==e||B("change:sv",t),B("change",t)}function J(){return y.parentNode}function K(o,r){o||((u||r||f).appendChild(y),m.visible=!0),V=A(y).w,G=A(y).h;var i=A($),s=A(z),a=A(H).h,h=i.w,g=i.h,v=A(q).h,b=s.w,C=s.h;if(o){function I(e){var t=e.target,o=t===n||O(t,n)===n;o?K():m.exit(),B(o?"enter":"exit",[m])}y.style.left=y.style.top="-9999px",!1!==l&&S(l,n,I),m.create=function(){return K(1),B("create",[m]),m},m.destroy=function(){return!1!==l&&E(l,n,I),m.exit(),M(!1),B("destroy",[m]),m}}else Q();function Y(e){d(R);var t=d([R[0],1,1]);$.style.backgroundColor="rgb("+t.join(",")+")",M(R),j(e)}function D(e){X&&(function(e){var t=c(L(H,e).y,0,a);R[0]=(a-t)/a,q.style.top=t-v/2+"px",Y(e)}(e),W=p(R),P||(B("drag:h",[W,m]),B("drag",[W,m]),Z("h",[W,m]))),U&&(function(e){var t=L($,e),n=c(t.x,0,h),o=c(t.y,0,g);R[1]=1-(h-n)/h,R[2]=(g-o)/g,z.style.right=h-n-b/2+"px",z.style.top=o-C/2+"px",Y(e)}(e),W=p(R),F||(B("drag:sv",[W,m]),B("drag",[W,m]),Z("sv",[W,m]))),P=0,F=0}function ee(e){var t=e.target,o=X?"h":"sv",r=[p(R),m],i=t===n||O(t,n)===n,s=t===y||O(t,y)===y;i||s?s&&(B("stop:"+o,r),B("stop",r),Z(o,r)):J()&&!1!==l&&(m.exit(),B("exit",[m]),Z(0,r)),X=0,U=0}function te(e){P=1,X=1,D(e),j(e),B("start:h",[W,m]),B("start",[W,m]),Z("h",[W,m])}function ne(e){F=1,U=1,D(e),j(e),B("start:sv",[W,m]),B("start",[W,m]),Z("sv",[W,m])}N=function(){R=_(R),Y(),q.style.top=a-v/2-a*+R[0]+"px",z.style.right=h-b/2-h*+R[1]+"px",z.style.top=g-C/2-g*+R[2]+"px"},m.exit=function(n){return J()&&(J().removeChild(y),m.visible=!1),E(w,H,te),E(w,$,ne),E(x,t,D),E(k,t,ee),E(T,e,Q),m},N(),o||(S(w,H,te),S(w,$,ne),S(x,t,D),S(k,t,ee),S(T,e,Q))}function Q(){return m.fit()}return K(1),r(function(){var e=[p(R),m];B("create",e),Z(0,e)},0),m.fit=function(t){var o=A(e),r=A(h),a=o.w-r.w,l=o.h-h.clientHeight,u=C(e),d=C(n);if(Y=d.l+u.l,D=d.t+u.t+A(n).h,s(t))i(t[0])&&(Y=t[0]),i(t[1])&&(D=t[1]);else{var p=u.l,f=u.t,g=u.l+o.w-V-a,v=u.t+o.h-G-l;Y=c(Y,p,g)>>0,D=c(D,f,v)>>0}return y.style.left=Y+"px",y.style.top=D+"px",B("fit",[m]),m},m.set=function(e){return i(e)?(function(e){return"string"==typeof e}(e)&&(e=g.parse(e)),M(e),N(),m):_()},m.get=function(e){return _(e)},m.source=n,m.self=y,m.visible=!1,m.on=function(e,t,n){return i(e)?i(t)?(i(b[e])||(b[e]={}),i(n)||(n=a(b[e])),b[e][n]=t,m):b[e]:b},m.off=function(e,t){return i(e)?i(t)?(delete b[e][t],m):(b[e]={},m):(b={},m)},m.fire=B,m.hooks=b,m.enter=function(e){return K(0,e)},m})}(window,document)},function(e,t,n){var o=n(20);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(21);(e.exports=n(1)(!1)).push([e.i,'.color-picker,\n.color-picker::before,\n.color-picker::after,\n.color-picker *,\n.color-picker *::before,\n.color-picker *::after {\n -webkit-box-sizing:border-box;\n -moz-box-sizing:border-box;\n box-sizing:border-box;\n}\n.color-picker {\n position:absolute;\n top:0;\n left:0;\n z-index:9999;\n}\n.color-picker-container {\n background:#000;\n color:#000;\n padding:1px;\n -webkit-box-shadow:1px 5px 10px rgba(0,0,0,.5);\n -moz-box-shadow:1px 5px 10px rgba(0,0,0,.5);\n box-shadow:1px 5px 10px rgba(0,0,0,.5);\n width:calc(11.5em + 3px); /* TODO */\n}\n.color-picker-container *,\n.color-picker-container *::before,\n.color-picker-container *::after {border-color:inherit}\n.color-picker-container::after {\n content:"";\n display:table;\n clear:both;\n}\n.color-picker i {\n font:inherit;\n font-size:12px; /* measure the color control size by measuring the text size */\n}\n.color-picker-h {\n position:relative;\n width:1.5em;\n height:10em;\n float:right;\n cursor:ns-resize;\n background:transparent url('+o(n(22))+') no-repeat 50% 50%;\n background-image:-webkit-linear-gradient(to top,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);\n background-image:-moz-linear-gradient(to top,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);\n background-image:linear-gradient(to top,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);\n -webkit-background-size:100% 100%;\n -moz-background-size:100% 100%;\n background-size:100% 100%;\n overflow:hidden;\n}\n.color-picker-h i {\n position:absolute;\n top:-.25em;\n right:0;\n left:0;\n z-index:3;\n display:block;\n height:.5em;\n}\n.color-picker-h i::before {\n content:"";\n position:absolute;\n top:0;\n right:0;\n bottom:0;\n left:0;\n display:block;\n border:.25em solid;\n border-color:inherit;\n border-top-color:transparent;\n border-bottom-color:transparent;\n}\n.color-picker-sv {\n position:relative;\n width:10em;\n height:10em;\n float:left;\n margin-right:1px;\n background:transparent url('+o(n(23))+') no-repeat 50% 50%;\n background-image:-webkit-linear-gradient(to top,#000,rgba(0,0,0,0)),linear-gradient(to right,#fff,rgba(255,255,255,0));\n background-image:-moz-linear-gradient(to top,#000,rgba(0,0,0,0)),linear-gradient(to right,#fff,rgba(255,255,255,0));\n background-image:linear-gradient(to top,#000,rgba(0,0,0,0)),linear-gradient(to right,#fff,rgba(255,255,255,0));\n -webkit-background-size:100% 100%;\n -moz-background-size:100% 100%;\n background-size:100% 100%;\n cursor:crosshair;\n}\n.color-picker-sv i {\n position:absolute;\n top:-.4em;\n right:-.4em;\n z-index:3;\n display:block;\n width:.8em;\n height:.8em;\n}\n.color-picker-sv i::before,\n.color-picker-sv i::after {\n content:"";\n position:absolute;\n top:0;\n right:0;\n bottom:0;\n left:0;\n display:block;\n border:1px solid;\n border-color:inherit;\n -webkit-border-radius:100%;\n -moz-border-radius:100%;\n border-radius:100%;\n}\n.color-picker-sv i::before {\n top:-1px;\n right:-1px;\n bottom:-1px;\n left:-1px;\n border-color:#fff;\n}\n.color-picker-h,\n.color-picker-sv {\n -webkit-touch-callout:none;\n -webkit-user-select:none;\n -moz-user-select:none;\n -ms-user-select:none;\n user-select:none;\n -webkit-tap-highlight-color:rgba(0,0,0,0);\n -webkit-tap-highlight-color:transparent;\n}',""])},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t){e.exports="data:image/png;base64,bW9kdWxlLmV4cG9ydHMgPSBfX3dlYnBhY2tfcHVibGljX3BhdGhfXyArICIwYzUwMmViMmE3YTQ5OWY0NjAzODNhYjA4YzMwOTZjNi5wbmciOw=="},function(e,t){e.exports="data:image/png;base64,bW9kdWxlLmV4cG9ydHMgPSBfX3dlYnBhY2tfcHVibGljX3BhdGhfXyArICJjYWM4ZDg2ZDNiNGMyNzMxY2FmY2VkNTA5ZDRiMjZjNC5wbmciOw=="},,,,function(e,t,n){"use strict";n.r(t);const o=e=>Array.isArray(e)||e instanceof NodeList;var r=(e,t={},n)=>{null!=t&&(o(t)||"string"==typeof t||t.tagName)&&(n=t,t={});const r={},i=/\[([^\s=]+)=(?:"([^"]*)"|([^\]]*))\]/;let s;for(;s=i.exec(e);)r[s[1]]=s[2]||s[3],e=e.slice(0,s.index)+e.slice(s.index+s[0].length);const a=e.split(/(\.|#)/),c="."===a[0]||"#"===a[0]||""===a[0]?"div":a[0],l=document.createElement(c);for(let e=1;e<a.length;e+=2)"."===a[e]?l.classList.add(a[e+1]):"#"===a[e]&&(r.id=a[e+1]);for(let e in r)l.setAttribute(e,r[e]);for(let e in t){let n=/^on(\w+)/.exec(e),o=t[e];n?l.addEventListener(n[1],o):"innerHTML"===e?l[e]=o:!1!==o&&l.setAttribute(e,o)}return null!=n&&(o(n)?l.append(...n):l.append(n)),l};const i=(e,t=500)=>{const n=e.offsetParent?window.getComputedStyle(e).height:"0";e.style.display="block",e.style.height="auto",e.style.paddingTop="",e.style.paddingBottom="",e.style.marginTop="",e.style.marginBottom="";const o=window.getComputedStyle(e).height,r=parseInt(o,10);e.style.height=n,e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",e.style.overflow="hidden",r>window.innerHeight&&(t*=r/window.innerHeight),e.style.transition=`\n height ${t}ms ease-in-out,\n padding ${t}ms ease-in-out,\n margin ${t}ms ease-in-out\n `,setTimeout(()=>{e.style.height=o,e.style.paddingTop="",e.style.paddingBottom="",e.style.marginTop="",e.style.marginBottom=""})},s=(e,t=500)=>{e.style.overflow="hidden",e.style.position="relative",e.style.paddingTop="",e.style.paddingBottom="",e.style.marginTop="",e.style.marginBottom="";const n=window.getComputedStyle(e).height,o=parseInt(n,10);e.style.height=n,o>window.innerHeight&&(t*=1+(o/window.innerHeight-1)/2),e.style.transition=`\n height ${t}ms ease-in-out,\n padding ${t}ms ease-in-out,\n margin ${t}ms ease-in-out\n `,setTimeout(()=>{e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0"})},a=(e,t=500)=>{e.style.display="",e.style.width="",e.style.paddingLeft="",e.style.paddingRight="",e.style.marginLeft="",e.style.marginRight="";const n=window.getComputedStyle(e).width;e.style.width="0",e.style.paddingLeft="0",e.style.paddingRight="0",e.style.marginLeft="0",e.style.marginRight="0",e.style.transition=`\n width ${t}ms ease-in-out,\n padding ${t}ms ease-in-out,\n margin ${t}ms ease-in-out\n `,e.style.overflow="hidden",e.style.whiteSpace="nowrap",setTimeout(()=>{e.style.width=n,e.style.paddingLeft="",e.style.paddingRight="",e.style.marginLeft="",e.style.marginRight=""})},c=(e,t=500)=>{e.style.width=window.getComputedStyle(e).width,e.style.paddingLeft="",e.style.paddingRight="",e.style.marginLeft="",e.style.marginRight="",e.style.transition=`\n width ${t}ms ease-in-out,\n padding ${t}ms ease-in-out,\n margin ${t}ms ease-in-out\n `,e.style.overflow="hidden",e.style.whiteSpace="nowrap",setTimeout(()=>{e.style.width="0",e.style.paddingLeft="0",e.style.paddingRight="0",e.style.marginLeft="0",e.style.marginRight="0",setTimeout(()=>{e.style.display="none"},t)})},l=(e,t,n)=>{let o;return()=>{e.classList.add(t),clearTimeout(o),o=setTimeout(()=>{e.classList.remove(t)},n)}};var u=n(4),d=n.n(u);var p=
/*! (c) Andrea Giammarchi - ISC License */
function(e){var t=[[],[],[]],n=/\x01(\d)/g,o=function(e,t,n){switch(n=n.replace(/([*_~"]+)(?!\s)([\S\s]*?\S)\1/g,o),t.charAt(0)){case"*":t=1===t.length?"em>":"strong>";break;case"_":t=1===t.length?"em>":"u>";break;case"~":t="strike>";break;case'"':return"“"+n+"”"}return"<"+t+n+"</"+t};return e.replace(n,"").replace(/(`{2,})([\S\s]+?)\1(\r\n|\n|\r)?/g,function(e,n,o){var r="",i=/^( )?([a-z]+)[\r\n]/i.exec(o);return i&&(r=i[2].toLowerCase(),o=o.slice((i[1]||"").length+r.length)),o=o.replace(/^\s+|\s+$/g,""),t[0].push('<pre><code class="'+r+'">'+o+"</code></pre>"),"0"}).replace(/(`)(?!\s)([\S\s]*?\S)\1/g,function(e,n,o){return t[1].push("<code>"+o+"</code>"),"1"}).replace(/(^|\s)([a-z]{2,}:\/\/[^\s/$.?#-]+\.\S+)/g,function(e,n,o){return n=n+'<a href="'+o.replace(/"/g,""")+'">',o=o.replace(/^[a-z]{2,}:\/\/(www\.)?(.{0,36})(.+)$/,function(e,t,n,o){return n+(o.length<2?o:"…")}),t[2].push(n+o+"</a>"),"2"}).replace(/([*_~"]+)(?!\s)([\S\s]*?\S)\1/g,o).replace(/^( *)\*( +)/gm,"$1•$2").replace(/^> (\S.*)(\r\n|\n|\r)?/gm,"<blockquote>$1</blockquote>").replace(/<\/blockquote><blockquote>/gm,"<br/>").replace(n,function(e,n){return t[n].shift()})};n(16),chrome.options={},chrome.options.base={},chrome.options.fields={};const f=e=>({innerHTML:p(e.replace(/[<>]/g,e=>({"<":"<",">":">"})[e]))});chrome.options.addOption=((e,t,n,o)=>{let i,s;switch(void 0===t&&null!=o.default&&(t=o.default,o.type&&"checkbox"!==o.type||!o.options||"boolean"!=typeof t||(t={enabled:t}),chrome.options.opts.saveDefaults&&n(t)),o.type){case"checkbox":i=chrome.options.base.checkbox(t,n,o,e);break;case"object":i=chrome.options.base.object(t,n,o,e);break;case"list":i=chrome.options.base.list(t,n,o,e);break;case"column":i=chrome.options.base.column(t,n,o,e);break;case"row":i=chrome.options.base.row(t,n,o,e);break;case"h3":i=(e=>r("h3",e.desc))(o);break;case"html":i=(e=>r("",{innerHTML:e.html}))(o);break;default:if(o.type)if(chrome.options.fields[o.type])i=chrome.options.addLabelNField(t,n,o);else if(s=/(\w+)-list/.exec(o.type))i=chrome.options.base.singleFieldList(t,n,o,s[1]);else{if(!(s=/checkbox-(\w+)/.exec(o.type)))throw Error("Could not find option type: "+o.type);i=chrome.options.base.checkboxNField(t,n,o,s[1])}else i=chrome.options.base.checkbox(t,n,o,e)}if(o.hidden)i.classList.add("hidden");else if(o.disabled)i.classList.add("disabled"),i.querySelectorAll("input, select, textarea").forEach(e=>{e.setAttribute("disabled",!0)});else if(o.preview){i.querySelector("label").append(r("span.preview-container",r("span.preview")),r("img.preview-image",{src:"previews/"+e+"."+o.preview}))}return i}),chrome.options.base.checkbox=((e,t,n,o)=>{const a=r("label"),c=r(".checkbox",a);let l,u;const d=!!n.options;let p=e;d&&(null!=e&&"object"==typeof e||(e={}),p=e.enabled);const m=chrome.options.fields.checkbox(p,n=>{d?e.enabled=n:e=n,t(e)},n);if(a.append(m),d){l=h(e,t,n,o),c.append(l),p||(l.style.display="none");const d=e=>{e?(u.textContent="▼",i(l)):(u.textContent="▶",s(l))};(u=a.appendChild(r("span.triangle",p?"▼":"▶"))).addEventListener("click",e=>{e.preventDefault(),d(p=!p)}),m.addEventListener("change",()=>{p=m.checked,d(p)})}return a.append(r("span",f(n.desc))),c}),chrome.options.base.checkboxNField=((e,t,n,o)=>{null!=e&&"object"==typeof e||(e={});let i=!1;if(void 0===e.enabled&&void 0!==n.defaultEnabled&&(e.enabled=n.defaultEnabled,i=!0),void 0===e.value&&void 0!==n.defaultValue&&(e.value=n.defaultValue,i=!0),i&&chrome.options.opts.saveDefaults&&t(e),!chrome.options.fields[o])throw Error("Could not find option type: "+o);const s=r(".suboption");return s.appendChild(r("span")).append(chrome.options.fields.checkbox(e.enabled,n=>{e.enabled=n,t(e)},n)),n=Object.assign({},n,{type:o}),s.append(chrome.options.addField(e.value,n=>{e.value=n,t(e)},n)),n.desc&&s.append(r("label",f(n.desc))),s}),chrome.options.base.object=((e,t,n,o)=>{const i=r(".object",r("label",f(n.desc)));return i.append(h(e,t,n,o)),i});const h=(e,t,n,o)=>(null!=e&&"object"==typeof e||(e={}),r(".suboptions",n.options.map(n=>{const r=((e,t)=>(e||"")+(e&&t.name?".":"")+(t.name||""))(o,n),i="column"===n.type||"row"===n.type?e:e[n.name];return chrome.options.addOption(r,i,o=>{n.name&&(e[n.name]=o),t(e)},n)})));chrome.options.addLabelNField=((e,t,n)=>{const o=r(".suboption",r("label",f(n.desc))),i=chrome.options.addField(e,t,n);return o.append(r(".field-container",i)),o.classList.add(n.singleline?"singleline":"multiline"),o}),chrome.options.base.list=((e,t,n,o)=>{const l=r(".suboption.list");let u,p=!0;if(n.desc){const e=l.appendChild(r("label",f(n.desc)));if(n.collapsible){p=!1;const t=r("span.triangle",{onclick:()=>{(p=!p)?(t.textContent="▼",i(u)):(t.textContent="▶",s(u))}},"▶");e.prepend(t)}}e=e||[];const h=l.appendChild(r("table"));n.desc&&n.collapsible&&(u=l.appendChild(r("",{style:"display: none"},h)));const g=h.appendChild(r("tbody"));let v,b={};if(n.head){const e=r("tr");let t;n.fields.forEach(n=>{if(n.bindTo&&t.bindTo)b[n.name]=b[t.name];else{const t=b[n.name]=r("div",f(n.desc));e.append(r("th",t))}t=n}),h.prepend(r("thead",e))}const y=e=>{n.fields.forEach(t=>{if(!t.bindTo)return;const n=v.some(e=>e.shown[t.name]),o=b[t.name],r=!!o.offsetParent;n&&!r?setTimeout(a.bind(null,o),e?0:500):!n&&r&&(e?o.style.display="none":c(o))})},w=()=>{const e=v.map(e=>e());t(e.filter(e=>{if(null==e||""===e)return!1;if(n.filter&&!n.filter(e))return!1;if("object"==typeof e){for(let t of n.fields)if(t.required&&!e[t.name])return!1;return Object.keys(e).some(t=>null!=e[t])}return!0})),requestAnimationFrame(()=>{v.forEach(t=>{t.update(e)}),n.head&&y(!1)})},x={};n.fields.forEach(e=>{x[e.name]=e});const k=e=>{let t;t=m(g,null,n.fields,x,w,()=>{v.splice(v.indexOf(t),1),w()},!1,n.sortable,e,o),v.push(t),requestAnimationFrame(()=>{const e=v.map(e=>e());v.forEach(t=>{t.update(e)})})};if(v=e.map((e,t)=>{let r;const i=0===t&&n.first?n.first:n.fields;return r=m(g,e,i,x,w,()=>{v.splice(v.indexOf(r),1),w()},0===t&&n.first,n.sortable,!1,o)}),n.first&&!v.length){const e=m(g,null,n.first,x,w,()=>{},!0,n.sortable,!1,o);v.push(e),w()}k(),n.head&&requestAnimationFrame(y.bind(null,!0));const T=e=>{g.lastChild.contains(e.target)&&k(!0)};return g.addEventListener("input",T),g.addEventListener("change",T),n.sortable&&d()([g],{moves:(e,t,o)=>(!n.first||e!=e.parentNode.children[0])&&o.classList.contains("sort")&&o.closest("tbody")==g,accepts:(e,t,n,o)=>!o.classList.contains("gu-mirror"),direction:"vertical",mirrorContainer:g}).on("cloned",(e,t)=>{const n=e.querySelectorAll(":scope > td");t.querySelectorAll(":scope > td").forEach((e,t)=>{n[t].style.width=e.offsetWidth+"px"});const o=e.querySelectorAll("select, input[type=radio]");t.querySelectorAll("select, input[type=radio]").forEach((e,t)=>{const n=o[t];n.value=e.value,n.checked&&(n.setAttribute("name",n.getAttribute("name")+"_"),e.checked=!0)})}).on("dragend",()=>{v.forEach(e=>{let t=e.$tr;for(e.index=0;null!=(t=t.previousSibling);)e.index++}),v.sort((e,t)=>e.index-t.index),w()}),l});const m=(e,t,n,o,l,u,d,p,f,h)=>{const m=r("tr");d&&m.classList.add("unremovable"),f&&(m.style.display="none",setTimeout((e=>{e.style.display="";for(let t of e.children){let e=t.appendChild(r("",{style:"display: none"},t.childNodes));i(e),setTimeout(()=>{t.append(...e.childNodes),e.remove()},500)}}).bind(null,m),100));const v=()=>t;let b,y;v.$tr=m,v.shown={};const w=n.map(e=>{const i=o=>{const r=e.name;1===n.length?t=o:r&&(t[r]=o),w.forEach(e=>{e.checkBind(r,o)}),l()};let s;const u={checkBind:(t,n)=>{const o=e.bindTo;if(o&&o.field===t){const t=!!s.offsetParent,r=g(o.value,n);r&&!t?(a(s),v.shown[e.name]=!0):!r&&t&&(c(s),v.shown[e.name]=!1)}},hide:()=>{e.bindTo&&c(s)},checkSelect:n=>{"select"===e.type&&e.options.filter(e=>e.unique).forEach(o=>{const r=n.some(n=>n!==t&&n[e.name]===o.value)?"none":"";s.querySelector('option[value="'+o.value+'"]').style.display=r})}},d=e.bindTo,p=d&&y&&y.bindTo?b:r("td");d&&p.classList.add("bind-to"),b=p,y=e;const x=m.appendChild(p);let k;if(!t&&(n.length>1||"column"===e.type||"row"===e.type)&&(t={}),k=1===n.length?t=void 0!==t?t:e.default:t[e.name]=void 0!==t[e.name]?t[e.name]:e.default,chrome.options.fields[e.type])s=chrome.options.addField(k,i,e);else if("column"===e.type)s=chrome.options.base.column(t,l,e,h);else{if("row"!==e.type)throw Error("Could not find option type: "+e.type);s=chrome.options.base.row(t,l,e,h)}return x.append(s),requestAnimationFrame(()=>{d&&(t[d.field]&&!g(d.value,t[d.field])||!t[d.field]&&!g(d.value,o[d.field].options[0].value)?(s.style.display="none",v.shown[e.name]=!1):(f?setTimeout(()=>{a(s)},500):(s.style.display="",s.style.maxWidth="100%;"),v.shown[e.name]=!0))}),u});return m.append(r("td",r("a.delete",{onclick:()=>{w.forEach(e=>{e.hide()}),setTimeout(()=>{((e,t)=>{let n=e.children.length;for(let o of e.children){let i=r("");i.append(...o.childNodes),o.append(i),s(i),setTimeout(()=>{e.style.display="none",o.append(...i.childNodes),i.remove(),0==--n&&(e.style.display="none",t&&t())},500)}})(m,()=>{m.remove()})},250),u()}},"delete"))),!d&&p&&m.append(r("td",r("a.sort","sort"))),e.append(m),v.update=(e=>{w.forEach(t=>{t.checkSelect(e)})}),v},g=(e,t)=>Array.isArray(e)?e.indexOf(t)>-1:e===t;chrome.options.base.singleFieldList=((e,t,n,o)=>(n.fields=[{type:o,name:n.name}],chrome.options.base.list(e,t,n))),chrome.options.base.column=((e,t,n,o)=>{delete n.name;const r=h(e,t,n,o);return r.classList.add("column"),r}),chrome.options.base.row=((e,t,n,o)=>{const r=chrome.options.base.column(e,t,n,o);return r.classList.add("row"),r}),chrome.options.addField=((e,t,n)=>{const o=chrome.options.fields[n.type];if(!o)return;let r;const i=o(e,(e,o)=>{if(o){if(o.timeStamp<r)return;r=o.timeStamp}n.validate&&!n.validate(e)?i.classList.add("invalid"):(i.classList.remove("invalid"),t(e,o))},n);return n.desc&&i.setAttribute("data-title",n.desc),i});const v=(e,t)=>{const n=typeof e;if(n!==typeof t)return!1;if("object"!==n||null==e)return e===t;const o=Object.keys(e).sort(),r=Object.keys(t).sort();if(o.length!==r.length)return!1;for(let n=0,i=o.length;n<i;n++){if(o[n]!==r[n])return!1;if(!v(e[o[n]],t[r[n]]))return!1}return!0},b=e=>{if(!(e instanceof Object))return e;if(Array.isArray(e))return e.slice().map(b);{const t={};for(let n in e)t[n]=b(e[n]);return t}},y=(e,t)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{t(...o)},e)}};n(18),n(19),chrome.options.fields.color=((e,t,n)=>{let o=!0;const i=n.format||"rgba";if(!["rgb","rgba","hsl","hsla","hex"].includes(i))throw TypeError("Unsupported format given for color field: "+i);const s=["rgba","hsla"].includes(i),a=e=>[Math.round(360*e[0]),Math.round(100*e[1])+"%",Math.round(100*e[2])+"%"],c={rgb:CP._HSV2RGB,rgba:CP._HSV2RGB,hsl:a,hsv2hsl:a,hex:CP._HSV2HEX}[i],l=y(500,t),u=()=>{if(o)return o=!1;const e=c(m.set()),t=/^hex/.test(i)?`#${e}`:`${i}(${e.join(", ")}${s?`, ${v.value}`:""})`;h.value=t,f.style.backgroundColor=t,l(t)},d=e=>{const t=/(?:rgba|hsla)\(\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(\d?(?:\.\d+)?)\s*\)/.exec(e);return t&&""!=t[1]?t[1]:1},p=r("span.color");p.append(r("span.color-alpha"));const f=p.appendChild(r("span.color-box",{style:e?`background-color: ${e};`:"",onclick:()=>{m.enter()}})),h=chrome.options.fields.text(e,()=>{v&&(v.value=d(h.value));let e=h.value.split(",");e=(e=e.length>=4?e.slice(0,3).join(",")+")":e.join(",")).replace("rgba","rgb").replace("hsla","hsv").replace("hsl","hsv"),m.set(e)});p.append(h);const m=new CP(h);m.on("change",u);const g=m.self.appendChild(r(".extra-options"));let v;return s&&(v=r("input[type=range][min=0][max=1][step=.1]",{"data-title":"Alpha",onchange:u,oninput:u,value:null!=e?d(e):1}),g.append(v)),n.default&&g.append(r("span.color-reset",{"data-title":"Reset to default",onclick:()=>{m.set(n.default),m.trigger("change",[n.default])},style:`background-color: ${n.default};`})),p}),chrome.options.fields.predefined_sound=((e,t,n)=>{const o=()=>{if(!e)return void s.classList.add("disabled");s.classList.remove("disabled");const t=new Audio;t.src="node_modules/chrome-options/sounds/"+e+".wav",t.onerror=console.error,t.play()},i=r("span.predefined-sound"),s=r("span.play",{onclick:o,innerHTML:"▶"}),a=["Basso","Bip","Blow","Boing","Bottle","Clink-Klank","Droplet","Frog","Funk","Glass","Hero","Indigo","Laugh","Logjam","Monkey","moof","Ping","Pong2003","Pop","Purr","Quack","Single Click","Sosumi","Temple","Uh oh","Voltage","Whit","Wild Eep"];n.allowNoSound?(a.unshift({value:"",desc:"Select"}),(e=e||"")||s.classList.add("disabled")):e=e||a[0];const c=chrome.options.fields.select(e,(n,o)=>{e=n,t(n,o)},{options:a});return c.addEventListener("change",o),i.append(c,s),i}),chrome.options.fields.checkbox=((e,t)=>{const n=r("input[type=checkbox]");return null!=e&&(n.checked=e),n.addEventListener("change",()=>{t(n.checked)}),n}),chrome.options.fields.text=((e,t)=>{const n=r("input[type=text]");void 0!==e&&(n.value=e);const o=y(500,e=>{e.target.validity.valid&&t(n.value,e)});return n.addEventListener("input",o),n.addEventListener("change",o),n}),chrome.options.fields.url=((e,t,n)=>{const o=chrome.options.fields.text(e,t,n);return o.setAttribute("type","url"),o}),chrome.options.fields.select=((e,t,n)=>{const o={},i=r("select",{onchange:e=>{const n=i.value;t(void 0!==o[n]?o[n]:n,e)}});let s=null;return n.options.forEach(e=>{const t="object"==typeof e?e.value:e,n="object"==typeof e?e.desc:e;o[t]=t,i.append(r("option",{value:t},n)),null===s&&(s=t)}),i.value=e||s,i}),chrome.options.fields.radio=((e,t,n)=>{const o=r(".radio-options"),i=(~~(1e9*Math.random())).toString(36);return n.options.forEach(n=>{const s="object"==typeof n?n.value:n,a="object"==typeof n?n.desc:n,c=(~~(1e9*Math.random())).toString(36),l=o.appendChild(r(".radio-option")),u=l.appendChild(r("input[type=radio]",{id:c,name:i,value:s,checked:e==s,onchange:e=>{u.checked&&t(s,e)}}));l.append(r("label",{for:c},a))}),o}),chrome.options.fields.custom_sound=((e,t)=>{const n=r("span.custom-sound"),o=()=>{const t=new Audio;t.src=e,t.play()},i=chrome.options.addField(e,(n,o)=>{e=n,t(n,o)},{type:"url"});return i.addEventListener("keypress",e=>{13===e.keyCode&&o()}),n.append(i),n.append(r("span.play",{onclick:o,innerHTML:"▶"})),n}),chrome.options.fields.file=((e,t)=>r("input[type=file]",{value:e,onchange:e=>{t(e.target.files,e)}})),chrome.options.opts={title:null,about:null,autoSave:!0,saveDefaults:!0};const w=document.querySelector("#main-menu"),x=document.querySelector(".mainview");let k=null,T=window.location.hash.split(".");const S=()=>{const e=window.location.hash;if(!e)return document.querySelector(".mainview > *:nth-child(2)").classList.add("selected"),void document.querySelector("#main-menu li:first-child").classList.add("selected");if(e===k)return;k=e,document.querySelec