!function(){var e={41:function(e,t,r){"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],p=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&p?p.configurable:!u,enumerable:null===c&&p?p.enumerable:!c,value:r,writable:null===s&&p?p.writable:!s});else{if(!l&&(c||s||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},76:function(e){"use strict";e.exports=Function.prototype.call},292:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});const n=r(1624),o=r(5692);t.Tokenizer=class{constructor(e){this.cursorToken_=new o.Token(o.Token.type.none,0,0),this.currentToken_=null,this.cssText=e}get offset(){return this.cursorToken_.end}get currentToken(){return null==this.currentToken_&&(this.currentToken_=this.getNextToken_()),this.currentToken_}advance(){let e;return null!=this.currentToken_?(e=this.currentToken_,this.currentToken_=null):e=this.getNextToken_(),e}slice(e,t=void 0){const{start:r,end:n}=this.getRange(e,t);return this.cssText.substring(r,n)}getRange(e,t=void 0){return{start:e.start,end:(t||e).end}}trimRange({start:e,end:t}){for(;e<=t&&/\s/.test(this.cssText.charAt(e));)e++;for(;e<=t&&t>0&&/\s/.test(this.cssText.charAt(t-1));)t--;return{start:e,end:t}}flush(){const e=[];for(;this.currentToken;)e.push(this.advance());return e}getNextToken_(){const e=this.cssText[this.offset];let t;return this.currentToken_=null,this.offset>=this.cssText.length?null:(t=n.matcher.whitespace.test(e)?this.tokenizeWhitespace(this.offset):n.matcher.stringBoundary.test(e)?this.tokenizeString(this.offset):"/"===e&&"*"===this.cssText[this.offset+1]?this.tokenizeComment(this.offset):n.matcher.boundary.test(e)?this.tokenizeBoundary(this.offset):this.tokenizeWord(this.offset),t.previous=this.cursorToken_,this.cursorToken_.next=t,this.cursorToken_=t,t)}tokenizeString(e){const t=this.cssText[e];let r=!1;const n=e;let i;for(;i=this.cssText[++e];)if(r)r=!1;else{if(i===t){++e;break}"\\"===i&&(r=!0)}return new o.Token(o.Token.type.string,n,e)}tokenizeWord(e){const t=e;let r;for(;(r=this.cssText[e])&&!n.matcher.boundary.test(r);)e++;return new o.Token(o.Token.type.word,t,e)}tokenizeWhitespace(e){const t=e;n.matcher.whitespaceGreedy.lastIndex=e;const r=n.matcher.whitespaceGreedy.exec(this.cssText);return null!=r&&r.index===e&&(e=n.matcher.whitespaceGreedy.lastIndex),new o.Token(o.Token.type.whitespace,t,e)}tokenizeComment(e){const t=e;n.matcher.commentGreedy.lastIndex=e;return e=null==n.matcher.commentGreedy.exec(this.cssText)?this.cssText.length:n.matcher.commentGreedy.lastIndex,new o.Token(o.Token.type.comment,t,e)}tokenizeBoundary(e){const t=o.boundaryTokenTypes[this.cssText[e]]||o.Token.type.boundary;return new o.Token(t,e,e+1)}}},414:function(e){"use strict";e.exports=Math.round},453:function(e,t,r){"use strict";var n,o=r(9612),i=r(9383),a=r(1237),c=r(9290),s=r(9538),u=r(8068),l=r(9675),p=r(5345),f=r(1514),y=r(8968),d=r(6188),g=r(8002),m=r(5880),h=r(414),b=r(3093),v=Function,w=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},O=r(5795),T=r(655),A=function(){throw new l},k=O?function(){try{return A}catch(e){try{return O(arguments,"callee").get}catch(e){return A}}}():A,j=r(4039)(),x=r(3628),S=r(1064),P=r(8648),E=r(1002),F=r(76),U={},_="undefined"!=typeof Uint8Array&&x?x(Uint8Array):n,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":j&&x?x([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":U,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&x?x(x([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&j&&x?x((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":c,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&j&&x?x((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&x?x(""[Symbol.iterator]()):n,"%Symbol%":j?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":_,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":E,"%Object.defineProperty%":T,"%Object.getPrototypeOf%":S,"%Math.abs%":f,"%Math.floor%":y,"%Math.max%":d,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":b,"%Reflect.getPrototypeOf%":P};if(x)try{null.error}catch(e){var B=x(x(e));R["%Error.prototype%"]=B}var M=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&x&&(r=x(o.prototype))}return R[t]=r,r},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=r(6743),N=r(9957),C=D.call(F,Array.prototype.concat),G=D.call(E,Array.prototype.splice),z=D.call(F,String.prototype.replace),$=D.call(F,String.prototype.slice),W=D.call(F,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,J=function(e,t){var r,n=e;if(N(I,n)&&(n="%"+(r=I[n])[0]+"%"),N(R,n)){var o=R[n];if(o===U&&(o=M(n)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=$(e,0,1),r=$(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return z(e,V,function(e,t,r,o){n[n.length]=r?z(o,L,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=J("%"+n+"%",t),i=o.name,a=o.value,c=!1,s=o.alias;s&&(n=s[0],G(r,C([0,1],s)));for(var p=1,f=!0;p<r.length;p+=1){var y=r[p],d=$(y,0,1),g=$(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===g||"'"===g||"`"===g)&&d!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==y&&f||(c=!0),N(R,i="%"+(n+="."+y)+"%"))a=R[i];else if(null!=a){if(!(y in a)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(O&&p+1>=r.length){var m=O(a,y);a=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[y]}else f=N(a,y),a=a[y];f&&!c&&(R[i]=a)}}return a}},487:function(e,t,r){"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);e.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},537:function(e,t,r){var n=r(5606),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),c=n[r];r<o;c=n[++r])h(c)||!T(c)?a+=" "+c:a+=" "+u(c);return a},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}};var a={},c=/^$/;if(n.env.NODE_DEBUG){var s=n.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),c=new RegExp("^"+s+"$","i")}function u(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),f(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function p(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&j(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=f(e,o,n)),o}var i=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),c=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return y(r);if(0===a.length){if(j(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return y(r)}var u,l="",p=!1,T=["{","}"];(g(r)&&(p=!0,T=["[","]"]),j(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return O(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),k(r)&&(l=" "+y(r)),0!==a.length||p&&0!=r.length?n<0?O(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=p?function(e,t,r,n,o){for(var i=[],a=0,c=t.length;a<c;++a)E(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))}),i}(e,r,n,c,a):a.map(function(t){return d(e,r,n,c,t,p)}),e.seen.pop(),function(e,t,r){var n=e.reduce(function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,T)):T[0]+l+T[1]}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,c,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?c=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(c=e.stylize("[Setter]","special")),E(n,o)||(a="["+o+"]"),c||(e.seen.indexOf(s.value)<0?(c=h(r)?f(e,s.value,null):f(e,s.value,r-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map(function(e){return"  "+e}).join("\n").slice(2):"\n"+c.split("\n").map(function(e){return"   "+e}).join("\n")):c=e.stylize("[Circular]","special")),w(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function g(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function h(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function O(e){return T(e)&&"[object RegExp]"===x(e)}function T(e){return"object"==typeof e&&null!==e}function A(e){return T(e)&&"[object Date]"===x(e)}function k(e){return T(e)&&("[object Error]"===x(e)||e instanceof Error)}function j(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(c.test(e)){var r=n.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=g,t.isBoolean=m,t.isNull=h,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=O,t.types.isRegExp=O,t.isObject=T,t.isDate=A,t.types.isDate=A,t.isError=k,t.types.isNativeError=k,t.isFunction=j,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),t._extend=function(e,t){if(!t||!T(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var F="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function U(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(F&&e[F]){var t;if("function"!=typeof(t=e[F]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,F,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,n){e?r(e):t(n)});try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),F&&Object.defineProperty(t,F,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=F,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then(function(e){n.nextTick(a.bind(null,null,e))},function(e){n.nextTick(U.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},592:function(e,t,r){"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1002:function(e){"use strict";e.exports=Function.prototype.apply},1064:function(e,t,r){"use strict";var n=r(9612);e.exports=n.getPrototypeOf||null},1135:function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1237:function(e){"use strict";e.exports=EvalError},1333:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1514:function(e){"use strict";e.exports=Math.abs},1624:function(e,t){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});t.matcher={whitespace:/\s/,whitespaceGreedy:/(\s+)/g,commentGreedy:/(\*\/)/g,boundary:/[\(\)\{\}'"@;:\s]/,stringBoundary:/['"]/},function(e){e.stylesheet="stylesheet",e.comment="comment",e.atRule="atRule",e.ruleset="ruleset",e.expression="expression",e.declaration="declaration",e.rulelist="rulelist",e.discarded="discarded"}(t.nodeType||(t.nodeType={}))},2205:function(e,t,r){"use strict";var n=r(6743),o=r(1002),i=r(3144);e.exports=function(){return i(n,o,arguments)}},2682:function(e,t,r){"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a,c;arguments.length>=3&&(a=r),c=e,"[object Array]"===o.call(c)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},3093:function(e,t,r){"use strict";var n=r(4459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3126:function(e,t,r){"use strict";var n=r(6743),o=r(9675),i=r(76),a=r(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(n,i,e)}},3144:function(e,t,r){"use strict";var n=r(6743),o=r(1002),i=r(76),a=r(7119);e.exports=a||n.call(i,o)},3272:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});const n=r(537),o=r(1624);t.iterateOverAst=function*e(t){switch(yield t,t.type){case o.nodeType.stylesheet:for(const r of t.rules)yield*e(r);return;case o.nodeType.ruleset:return yield*e(t.rulelist);case o.nodeType.rulelist:for(const r of t.rules)yield*e(r);return;case o.nodeType.declaration:return void(void 0!==t.value&&(yield*e(t.value)));case o.nodeType.atRule:return void(t.rulelist&&(yield*e(t.rulelist)));case o.nodeType.expression:case o.nodeType.comment:case o.nodeType.discarded:return;default:const r=t;console.error(`Got a node of unknown type: ${n.inspect(r)}`)}}},3628:function(e,t,r){"use strict";var n=r(8648),o=r(1064),i=r(7176);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},4035:function(e,t,r){"use strict";var n,o=r(6556),i=r(9092)(),a=r(9957),c=r(5795);if(i){var s=o("RegExp.prototype.exec"),u={},l=function(){throw u},p={toString:l,valueOf:l};"symbol"==typeof Symbol.toPrimitive&&(p[Symbol.toPrimitive]=l),n=function(e){if(!e||"object"!=typeof e)return!1;var t=c(e,"lastIndex");if(!(t&&a(t,"value")))return!1;try{s(e,p)}catch(e){return e===u}}}else{var f=o("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===f(e)}}e.exports=n},4039:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},4233:function(e){"use strict";const t=function*(){}.constructor;e.exports=()=>t},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4522:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});const n=r(1624);t.NodeFactory=class{stylesheet(e,t){return{type:n.nodeType.stylesheet,rules:e,range:t}}atRule(e,t,r=void 0,o,i,a){return{type:n.nodeType.atRule,name:e,parameters:t,rulelist:r,nameRange:o,parametersRange:i,range:a}}comment(e,t){return{type:n.nodeType.comment,value:e,range:t}}rulelist(e,t){return{type:n.nodeType.rulelist,rules:e,range:t}}ruleset(e,t,r,o){return{type:n.nodeType.ruleset,selector:e,rulelist:t,selectorRange:r,range:o}}declaration(e,t,r,o){return{type:n.nodeType.declaration,name:e,value:t,nameRange:r,range:o}}expression(e,t){return{type:n.nodeType.expression,text:e,range:t}}discarded(e,t){return{type:n.nodeType.discarded,text:e,range:t}}}},5345:function(e){"use strict";e.exports=URIError},5350:function(e,t){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});t.NodeVisitor=class{constructor(){this.path_=[]}get path(){return this.path_}visit(e){let t;return this[e.type]&&(this.path_.push(e),t=this[e.type](e),this.path_.pop()),t}}},5606:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,s=[],u=!1,l=-1;function p(){u&&c&&(u=!1,c.length?s=c.concat(s):l=-1,s.length&&f())}function f(){if(!u){var e=a(p);u=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new y(e,t)),1!==s.length||u||a(f)},y.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5680:function(e,t,r){"use strict";var n=r(5767);e.exports=function(e){return!!n(e)}},5692:function(e,t){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.none=0]="none",e[e.whitespace=Math.pow(2,0)]="whitespace",e[e.string=Math.pow(2,1)]="string",e[e.comment=Math.pow(2,2)]="comment",e[e.word=Math.pow(2,3)]="word",e[e.boundary=Math.pow(2,4)]="boundary",e[e.propertyBoundary=Math.pow(2,5)]="propertyBoundary",e[e.openParenthesis=Math.pow(2,6)|e.boundary]="openParenthesis",e[e.closeParenthesis=Math.pow(2,7)|e.boundary]="closeParenthesis",e[e.at=Math.pow(2,8)|e.boundary]="at",e[e.openBrace=Math.pow(2,9)|e.boundary]="openBrace",e[e.closeBrace=Math.pow(2,10)|e.propertyBoundary|e.boundary]="closeBrace",e[e.semicolon=Math.pow(2,11)|e.propertyBoundary|e.boundary]="semicolon",e[e.colon=Math.pow(2,12)|e.boundary|e.word]="colon",e[e.hyphen=Math.pow(2,13)]="hyphen",e[e.underscore=Math.pow(2,14)]="underscore"}(r=t.TokenType||(t.TokenType={}));class n{constructor(e,t,r){this.type=e,this.start=t,this.end=r,this.previous=null,this.next=null}is(e){return(this.type&e)===e}}n.type=r,t.Token=n;const o={"(":n.type.openParenthesis,")":n.type.closeParenthesis,":":n.type.colon,"@":n.type.at,"{":n.type.openBrace,"}":n.type.closeBrace,";":n.type.semicolon,"-":n.type.hyphen,_:n.type.underscore};t.boundaryTokenTypes=o},5767:function(e,t,r){"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(6556),c=r(5795),s=r(3628),u=a("Object.prototype.toString"),l=r(9092)(),p="undefined"==typeof globalThis?r.g:globalThis,f=o(),y=a("String.prototype.slice"),d=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},g={__proto__:null};n(f,l&&c&&s?function(e){var t=new p[e];if(Symbol.toStringTag in t&&s){var r=s(t),n=c(r,Symbol.toStringTag);if(!n&&r){var o=s(r);n=c(o,Symbol.toStringTag)}g["$"+e]=i(n.get)}}:function(e){var t=new p[e],r=t.slice||t.set;r&&(g["$"+e]=i(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t=y(u(e),8,-1);return d(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(g,function(r,n){if(!t)try{r(e),t=y(n,1)}catch(e){}}),t}(e)}return c?function(e){var t=!1;return n(g,function(r,n){if(!t)try{"$"+r(e)===n&&(t=y(n,1))}catch(e){}}),t}(e):null}},5795:function(e,t,r){"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},5880:function(e){"use strict";e.exports=Math.pow},6188:function(e){"use strict";e.exports=Math.max},6231:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});const n=r(1624),o=r(5350);class i extends o.NodeVisitor{stringify(e){return this.visit(e)||""}[n.nodeType.stylesheet](e){let t="";for(let r=0;r<e.rules.length;++r)t+=this.visit(e.rules[r]);return t}[n.nodeType.atRule](e){return`@${e.name}`+(e.parameters?` ${e.parameters}`:"")+(e.rulelist?`${this.visit(e.rulelist)}`:";")}[n.nodeType.rulelist](e){let t="{";for(let r=0;r<e.rules.length;++r)t+=this.visit(e.rules[r]);return t+"}"}[n.nodeType.comment](e){return`${e.value}`}[n.nodeType.ruleset](e){return`${e.selector}${this.visit(e.rulelist)}`}[n.nodeType.declaration](e){return null!=e.value?`${e.name}:${this.visit(e.value)};`:`${e.name};`}[n.nodeType.expression](e){return`${e.text}`}[n.nodeType.discarded](e){return""}}t.Stringifier=i},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:function(e,t,r){"use strict";var n=r(453),o=r(3126),i=o([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o([r]):r}},6578:function(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6743:function(e,t,r){"use strict";var n=r(9353);e.exports=Function.prototype.bind||n},6897:function(e,t,r){"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),c=r(9675),s=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new c("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new c("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6942:function(e,t){var r;
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=a(e,i(r)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=a(t,r));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7176:function(e,t,r){"use strict";var n,o=r(3126),i=r(5795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&i&&i(Object.prototype,"__proto__"),c=Object,s=c.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof s&&function(e){return s(null==e?e:c(e))}},7244:function(e,t,r){"use strict";var n=r(9092)(),o=r(6556)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},c=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=c?i:a},7406:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */Object.defineProperty(t,"__esModule",{value:!0});const n=r(4522),o=r(5692),i=r(292);t.Parser=class{constructor(e=new n.NodeFactory){this.nodeFactory=e}parse(e){return this.parseStylesheet(new i.Tokenizer(e))}parseStylesheet(e){return this.nodeFactory.stylesheet(this.parseRules(e),{start:0,end:e.cssText.length})}parseRules(e){const t=[];for(;e.currentToken;){const r=this.parseRule(e);r&&t.push(r)}return t}parseRule(e){const t=e.currentToken;return null===t?null:t.is(o.Token.type.whitespace)?(e.advance(),null):t.is(o.Token.type.comment)?this.parseComment(e):t.is(o.Token.type.word)?this.parseDeclarationOrRuleset(e):t.is(o.Token.type.propertyBoundary)?this.parseUnknown(e):t.is(o.Token.type.at)?this.parseAtRule(e):this.parseUnknown(e)}parseComment(e){const t=e.advance();return null===t?null:this.nodeFactory.comment(e.slice(t),{start:t.start,end:t.end})}parseUnknown(e){const t=e.advance();let r;if(null===t)return null;for(;e.currentToken&&e.currentToken.is(o.Token.type.boundary);)r=e.advance();return this.nodeFactory.discarded(e.slice(t,r),e.getRange(t,r))}parseAtRule(e){let t,r,n,i,a;if(!e.currentToken)return null;const c=e.currentToken.start;for(;e.currentToken;)if(e.currentToken.is(o.Token.type.whitespace))e.advance();else if(!t&&e.currentToken.is(o.Token.type.at)){e.advance();const n=e.currentToken;let i;for(;e.currentToken&&e.currentToken.is(o.Token.type.word);)i=e.advance();r=e.getRange(n,i),t=e.cssText.slice(r.start,r.end)}else{if(e.currentToken.is(o.Token.type.openBrace)){n=this.parseRulelist(e);break}if(e.currentToken.is(o.Token.type.propertyBoundary)){e.advance();break}null==i?i=e.advance():a=e.advance()}if(void 0===t||void 0===r)return null;let s,u="";i&&(s=e.trimRange(e.getRange(i,a)),u=e.cssText.slice(s.start,s.end));const l=e.currentToken?e.currentToken.previous.end:e.cssText.length;return this.nodeFactory.atRule(t,u,n,r,s,{start:c,end:l})}parseRulelist(e){const t=[],r=e.currentToken.start;let n;for(e.advance();e.currentToken;){if(e.currentToken.is(o.Token.type.closeBrace)){n=e.currentToken,e.advance();break}{const r=this.parseRule(e);r&&t.push(r)}}const i=n?n.end:e.cssText.length;return this.nodeFactory.rulelist(t,{start:r,end:i})}parseDeclarationOrRuleset(e){let t=null,r=null,n=null;for(;e.currentToken;)if(e.currentToken.is(o.Token.type.whitespace))e.advance();else if(e.currentToken.is(o.Token.type.openParenthesis))for(;e.currentToken&&!e.currentToken.is(o.Token.type.closeParenthesis);)e.advance();else{if(e.currentToken.is(o.Token.type.openBrace)||e.currentToken.is(o.Token.type.propertyBoundary))break;e.currentToken.is(o.Token.type.colon)&&(n=e.currentToken),null===t?(t=e.advance(),r=t):r=e.advance()}if(null===e.currentToken)return null;if(e.currentToken.is(o.Token.type.propertyBoundary)){const i=e.getRange(t,n?n.previous:r),a=e.cssText.slice(i.start,i.end);let c;if(n&&n.next){const t=e.getRange(n.next,r),o=e.trimRange(t),i=e.cssText.slice(o.start,o.end);c=this.nodeFactory.expression(i,o)}e.currentToken.is(o.Token.type.semicolon)&&e.advance();const s=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(a,c,i,s)}if(n&&n===r){const n=this.parseRulelist(e);e.currentToken.is(o.Token.type.semicolon)&&e.advance();const i=e.getRange(t,r.previous),a=e.cssText.slice(i.start,i.end),c=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(a,n,i,c)}{const n=e.getRange(t,r),o=e.cssText.slice(n.start,n.end),i=this.parseRulelist(e),a=t.start;let c;return c=e.currentToken?e.currentToken.previous?e.currentToken.previous.end:t.end:e.cssText.length,this.nodeFactory.ruleset(o,i,n,{start:a,end:c})}}}},8002:function(e){"use strict";e.exports=Math.min},8068:function(e){"use strict";e.exports=SyntaxError},8184:function(e,t,r){"use strict";var n=r(6556),o=r(9721)(/^\s*(?:function)?\*/),i=r(9092)(),a=r(3628),c=n("Object.prototype.toString"),s=n("Function.prototype.toString"),u=r(4233);e.exports=function(e){if("function"!=typeof e)return!1;if(o(s(e)))return!0;if(!i)return"[object GeneratorFunction]"===c(e);if(!a)return!1;var t=u();return t&&a(e)===t.prototype}},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8898:function(e,t,r){"use strict";
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */
r(3272).iterateOverAst,r(1624).nodeType,r(4522).NodeFactory,r(5350).NodeVisitor;var n=r(7406);t.iX=n.Parser,r(6231).Stringifier,r(5692).Token,r(292).Tokenizer},8968:function(e){"use strict";e.exports=Math.floor},9032:function(e,t,r){"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function c(e){return e.call.bind(e)}var s="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=c(Object.prototype.toString),p=c(Number.prototype.valueOf),f=c(String.prototype.valueOf),y=c(Boolean.prototype.valueOf);if(s)var d=c(BigInt.prototype.valueOf);if(u)var g=c(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function h(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function O(e){return"[object ArrayBuffer]"===l(e)}function T(e){return"undefined"!=typeof ArrayBuffer&&(O.working?O(e):e instanceof ArrayBuffer)}function A(e){return"[object DataView]"===l(e)}function k(e){return"undefined"!=typeof DataView&&(A.working?A(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},h.working="undefined"!=typeof Map&&h(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(h.working?h(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},O.working="undefined"!=typeof ArrayBuffer&&O(new ArrayBuffer),t.isArrayBuffer=T,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var j="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function x(e){return"[object SharedArrayBuffer]"===l(e)}function S(e){return void 0!==j&&(void 0===x.working&&(x.working=x(new j)),x.working?x(e):e instanceof j)}function P(e){return m(e,p)}function E(e){return m(e,f)}function F(e){return m(e,y)}function U(e){return s&&m(e,d)}function _(e){return u&&m(e,g)}t.isSharedArrayBuffer=S,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=P,t.isStringObject=E,t.isBooleanObject=F,t.isBigIntObject=U,t.isSymbolObject=_,t.isBoxedPrimitive=function(e){return P(e)||E(e)||F(e)||U(e)||_(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(T(e)||S(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},9092:function(e,t,r){"use strict";var n=r(1333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9209:function(e,t,r){"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}},9290:function(e){"use strict";e.exports=RangeError},9353:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),c=r(0,o.length-a.length),s=[],u=0;u<c;u++)s[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(s,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))}),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},9383:function(e){"use strict";e.exports=Error},9538:function(e){"use strict";e.exports=ReferenceError},9600:function(e){"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o(function(){throw 42},null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},c=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var f=document.all;s.call(f)===s.call(document.all)&&(p=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&c(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return c(e);if(a(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&c(e)}},9612:function(e){"use strict";e.exports=Object},9675:function(e){"use strict";e.exports=TypeError},9721:function(e,t,r){"use strict";var n=r(6556),o=r(4035),i=n("RegExp.prototype.exec"),a=r(9675);e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},9957:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);e.exports=i.call(n,o)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function n(e,r,n){return(r=t(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var o=window.wp.element,i=window.wp.hooks,a=(window.ctEvents,r(6942)),c=r.n(a),s=window.wp.i18n,u=window.blocksyOptions;const l={"U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F":"cyrillic-ext","U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116":"cyrillic","U+1F00-1FFF":"greek-ext","U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF":"greek","U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB":"vietnamese","U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF":"latin-ext","U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD":"latin"},p={"cyrillic-ext":"Cyrillic Extended",cyrillic:"Cyrillic","greek-ext":"Greek Extended",greek:"Greek",vietnamese:"Vietnamese","latin-ext":"Latin Extended",latin:"Latin"},f=function(e,t=!1){return function(e){return{n1:"Thin 100",i1:"Thin 100 Italic",n2:"Extra-Light 200",i2:"Extra-Light 200 Italic",n3:"Light 300",i3:"Light 300 Italic",n4:"Regular 400",i4:e?"Italic":"Regular 400 Italic",n5:"Medium 500",i5:"Medium 500 Italic",n6:"Semi-Bold 600",i6:"Semi-Bold 600 Italic",n7:"Bold 700",i7:"Bold 700 Italic",n8:"Extra-Bold 800",i8:"Extra-Bold 800 Italic",n9:"Ultra-Bold 900",i9:"Ultra-Bold 900 Italic"}}(t)[e]};function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var g=function({futureVariations:e,setFutureVariations:t,remoteFont:r}){return(0,o.createElement)(React.Fragment,null,(0,o.createElement)("h4",{className:"ct-title"},(0,s.__)("Select Variations","blocksy-companion")),e&&(0,o.createElement)(u.Checkboxes,{value:r.all_variations.reduce(function(t,r){return d(d({},t),{},{[r]:e.includes(r)})},{}),option:{choices:r.all_variations.map(function(e){return{key:e,value:f(e)}}),attr:{"data-columns":2}},onChange:function(e){t(Object.keys(e).reduce(function(t,r){return[...t,...e[r]?[r]:[]]},[]))}}))};function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var b=function({futureVariations:e=[],remoteFont:t,futurePreloads:r,setFuturePreloads:n}){return(0,o.createElement)(React.Fragment,null,(0,o.createElement)("section",{className:"ct-group-preload-variation"},(0,o.createElement)("h4",{className:"ct-title"},(0,s.__)("Preload Variations","blocksy-companion")),(0,o.createElement)(u.Checkboxes,{value:(e||[]).reduce(function(t,n){return h(h({},t),{},{[n]:(e||[]).includes(n)&&((null==r?void 0:r.variations)||[]).includes(n)})},{}),option:{choices:(e||[]).map(function(e){return{key:e,value:f(e)}}),attr:{"data-columns":2},allow_empty:!0},onChange:function(e){n(h(h({},r),{},{variations:Object.keys(e).filter(function(t){return e[t]})}))}})),(0,o.createElement)("section",{className:"ct-group-preload-subset"},(0,o.createElement)("h4",{className:"ct-title"},(0,s.__)("Preload Subsets","blocksy-companion")),(0,o.createElement)(u.Checkboxes,{value:t.subsets.reduce(function(e,n){return h(h({},e),{},{[n]:t.subsets.includes(n)&&((null==r?void 0:r.subsets)||[]).includes(n)})},{}),option:{choices:t.subsets.map(function(e){return{key:e,value:p[e]||e}}),attr:{"data-columns":2},allow_empty:!0},onChange:function(e){n(h(h({},r),{},{subsets:Object.keys(e).filter(function(t){return e[t]})}))}})))};const v=["variations"];function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var T=function({font:e,remoteFont:t,onChange:r,onRemove:n,isLoading:i}){const[a,l]=(0,o.useState)(!1),[p,y]=(0,o.useState)("general"),[d,m]=(0,o.useState)(!1),[h,w]=(0,o.useState)((null==e?void 0:e.preloads)||{variations:[],subsets:[]});if(!t)return null;const T=a||i||!!h.variations.length^!!h.subsets.length,A=e.variations||t.all_variations;return(0,o.createElement)("li",null,(0,o.createElement)("div",{className:"ct-google-font-info"},(0,o.createElement)("span",null,e.id),(0,o.createElement)("i",null,(0,s.__)("Variations","blocksy-companion"),": ",A.map(function(e){return f(e)}).join(", "))),(0,o.createElement)("div",{className:"ct-google-font-actions"},(0,o.createElement)("button",{className:"ct-edit-font","data-tooltip-reveal":"top",disabled:a,onClick:function(){m(e.variations||t.all_variations),w(e.preloads||{variations:[],subsets:[]})}},(0,o.createElement)("span",{className:"ct-tooltip"},(0,s.__)("Select Variations","blocksy-companion"))),(0,o.createElement)("button",{className:"ct-remove-font","data-hover":"red","data-tooltip-reveal":"top",disabled:a,onClick:function(){n()}},(0,o.createElement)("span",{className:"ct-tooltip"},(0,s.__)("Remove Font","blocksy-companion")))),(0,o.createElement)(u.Overlay,{items:!!d||a,className:"ct-local-google-fonts-modal",onDismiss:function(){m(!1)},render:function(){return(0,o.createElement)("div",{className:"ct-modal-content","data-state":"edit"},(0,o.createElement)("h2",null,e.id," Font"),(0,o.createElement)("div",{className:"ct-tabs-scroll"},(0,o.createElement)("div",{className:"ct-tabs"},(0,o.createElement)("ul",null,["general","advanced"].map(function(e){const t=p===e;return(0,o.createElement)("li",{key:e,className:c()({active:t}),onClick:function(){return y(e)}},{general:(0,s.__)("General","blocksy-companion"),advanced:(0,s.__)("Preload","blocksy-companion")}[e])})),(0,o.createElement)("div",{className:"ct-current-tab"},"general"===p?(0,o.createElement)(g,{futureVariations:d,setFutureVariations:m,remoteFont:t,isSaving:a}):(0,o.createElement)(b,{futureVariations:d,remoteFont:t,futurePreloads:h,setFuturePreloads:w,isSaving:a})))),(0,o.createElement)("div",{className:"ct-modal-actions has-divider"},(0,o.createElement)("button",{className:"button button-primary",disabled:T,onClick:async function(){l(!0);const{variations:n}=e,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,v);await r(O(O(O({},o),d.length===t.all_variations.length?{}:{variations:d}),h?{preloads:h}:{})),l(!1),w({variations:[],subsets:[]}),m(!1)}},a?(0,o.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},(0,o.createElement)("g",{transform:"translate(50,50)"},(0,o.createElement)("g",{transform:"scale(1)"},(0,o.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,o.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,o.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):(0,s.__)("Save Font","blocksy-companion"))))}}))},A=r(8898);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var x=function({extension:e,onExtsSync:t}){const[r,n]=(0,o.useState)(null),[i,a]=(0,o.useState)(!1),[p,f]=(0,o.useState)(null),y=e.data,d=async function(e){n(e),a(!0),await t({extAction:{type:"start-persistence",settings:{last_saved:(new Date).getTime(),fonts:e.map(function({id:e,variations:t,preloads:r}){return j(j({name:e},t&&t.length>0?{variations:t}:{}),r?{preloads:r}:{})})}}});for await(const r of e)await t({extAction:{type:"persist-single-font",settings:{last_saved:(new Date).getTime(),fonts:[j(j({name:r.id},r.variations&&r.variations.length>0?{variations:r.variations}:{}),r.preloads?{preloads:r.preloads}:{})]}}});const r=await t({extAction:{type:"conclude-persistence",settings:{last_saved:(new Date).getTime(),fonts:e.map(function({id:e,variations:t,preloads:r}){return j(j({name:e},t&&t.length>0?{variations:t}:{}),r?{preloads:r}:{})})}}});if(r.data.settings.cached_css){const n=(new A.iX).parse(r.data.settings.cached_css.replace(new RegExp("\n","g"),"")).rules.filter(function({type:e}){return"atRule"===e}).reduce(function(e,t){const r=t.rulelist.rules.reduce(function(e,t){return"font-family"===t.name&&(e.family=t.value.text.replaceAll(/['"]/g,"")),"src"===t.name&&(e.src=t.value.text),"font-style"===t.name&&(e.style="italic"===t.value.text?"i":"n"),"font-weight"===t.name&&(e.weight=t.value.text/100),"unicode-range"===t.name&&(e.subset=l[t.value.text]),e},{});return e[r.family]||(e[r.family]={subsets:{}}),e[r.family].subsets[r.subset]=j(j({},e[r.family].subsets[r.subset]),{},{[`${r.style}${r.weight}`]:r.src}),e},{}),o=e.map(function(e){if(!n[e.id])return[];const{preloads:t}=e;if(!t)return[];const{subsets:r}=n[e.id];return Object.entries(r).map(function([e,r]){return t.subsets.includes(e)?Object.entries(r).map(function([e,r]){return t.variations.includes(e)?r.replace("url(","").replace(")","").split(" format")[0]:""}):""}).flat().filter(function(e){return e})});await t({extAction:{type:"preload-urls",settings:j(j({},y.settings),{},{urls:o.flat()})}})}a(!1)},g=r||y.settings.fonts.map(function({name:e,variations:t,preloads:r}){return j(j({id:e},t&&t.length>0?{variations:t}:{}),r?{preloads:r}:{})})||[],m=y.all_google_fonts.filter(function({family:e}){return!g.find(function({id:t}){return t===e})});return(0,o.createElement)("div",{className:c()("ct-extension-options ct-local-google-fonts-options",{"ct-syncing":i})},(0,o.createElement)("h4",null,(0,s.__)("Local Google Fonts Settings","blocksy-companion")),(0,o.createElement)("p",null,(0,s.__)("Download a font and serve it directly from your server, this is handy for those who want to comply with GDPR regulations or serve the font via CDN.","blocksy-companion")),(0,o.createElement)("form",null,(0,o.createElement)(u.Select,{option:{placeholder:(0,s.__)("Select font","blocksy-companion"),choices:m.map(function(e){return{key:e.family,value:e.family}}),search:!0,defaultToFirstItem:!1,selectInputStart:function(){return i?(0,o.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},(0,o.createElement)("g",{transform:"translate(50,50)"},(0,o.createElement)("g",{transform:"scale(1)"},(0,o.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,o.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,o.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):null}},value:p||m[0].family,onChange:function(e){f(e)}}),(0,o.createElement)("button",{className:"ct-button-primary",disabled:i,onClick:function(e){e.preventDefault(),d([...g,{id:p||m[0].family}])}},(0,s.__)("Download Font","blocksy-companion"))),g.length>0&&(0,o.createElement)("div",{className:"ct-local-google-fonts-list"},(0,o.createElement)("h4",null,(0,s.__)("Available Fonts","blocksy-companion"),y.settings.last_saved&&(0,o.createElement)("span",{className:"ct-sync-date"},"Last synced:"," ",function(e){let t=e.getFullYear();return`${(1+e.getMonth()).toString().padStart(2,"0")}/${e.getDate().toString().padStart(2,"0")}/${t} at ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}(new Date(parseFloat(y.settings.last_saved))))),(0,o.createElement)("ul",null,g.map(function(e,t){return(0,o.createElement)(T,{key:e.id,font:e,isLoading:i,remoteFont:y.all_google_fonts.find(function({family:t}){return t===e.id}),onChange:async function(e){await d(g.map(function(t){return t.id===e.id?e:t}))},onRemove:function(){d(g.filter(function({id:t}){return t!==e.id}))}})}))))};function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}(0,i.addFilter)("blocksy.extensions.current_extension_content","blocksy",function(e,{extension:t,onExtsSync:r}){return"local-google-fonts"!==t.name?e:P(P({},e),{},{content:(0,o.createElement)(x,{extension:t,onExtsSync:r})})})}()}();