!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=ctEvents},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.maybePromoteScalarValueIntoResponsive=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}},function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=window.wp.editPost},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.compose},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)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}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function l(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return h(o)||(o=u(e,o,n)),o}var i=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(h(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(b(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(i)return i;var c=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(c);if(e.showHidden&&(c=Object.getOwnPropertyNames(r)),k(r)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return p(r);if(0===c.length){if(T(r)){var s=r.name?": "+r.name:"";return e.stylize("[Function"+s+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(O(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return p(r)}var l,_="",w=!1,j=["{","}"];(f(r)&&(w=!0,j=["[","]"]),T(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(_=" "+RegExp.prototype.toString.call(r)),O(r)&&(_=" "+Date.prototype.toUTCString.call(r)),k(r)&&(_=" "+p(r)),0!==c.length||w&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),l=w?function(e,t,r,n,o){for(var i=[],c=0,a=t.length;c=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(l,_,j)):j[0]+_+j[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var c,a,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(a=e.stylize("[Setter]","special")),x(n,o)||(c="["+o+"]"),a||(e.seen.indexOf(s.value)<0?(a=y(r)?u(e,s.value,null):u(e,s.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(c)){if(i&&o.match(/^\d+$/))return a;(c=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=e.stylize(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=e.stylize(c,"string"))}return c+": "+a}function f(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function h(e){return"string"==typeof e}function v(e){return void 0===e}function m(e){return _(e)&&"[object RegExp]"===w(e)}function _(e){return"object"==typeof e&&null!==e}function O(e){return _(e)&&"[object Date]"===w(e)}function k(e){return _(e)&&("[object Error]"===w(e)||e instanceof Error)}function T(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function j(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!c[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;c[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else c[r]=function(){};return c[r]},t.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=b,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=h,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=m,t.isObject=_,t.isDate=O,t.isError=k,t.isFunction=T,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(13);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date,t=[j(e.getHours()),j(e.getMinutes()),j(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=r(14),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(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(C&&e[C]){var t;if("function"!=typeof(t=e[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,C,{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;i1)for(var r=1;r1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e},m=function(e,t){var r=t.forcedOutput,n=void 0!==r&&r;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return n?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return n?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")};function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O(e,t){return e(t={exports:{}},t.exports),t.exports}var k=O((function(e,t){ /** * @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={}))}));_(k);k.matcher,k.nodeType;var T=O((function(e,t){ /** * @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.iterateOverAst=function*e(t){switch(yield t,t.type){case k.nodeType.stylesheet:for(const r of t.rules)yield*e(r);return;case k.nodeType.ruleset:return yield*e(t.rulelist);case k.nodeType.rulelist:for(const r of t.rules)yield*e(r);return;case k.nodeType.declaration:return void(void 0!==t.value&&(yield*e(t.value)));case k.nodeType.atRule:return void(t.rulelist&&(yield*e(t.rulelist)));case k.nodeType.expression:case k.nodeType.comment:case k.nodeType.discarded:return;default:const r=t;console.error("Got a node of unknown type: "+d.a.inspect(r))}}}));_(T);T.iterateOverAst;var w=O((function(e,t){ /** * @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.NodeFactory=class{stylesheet(e,t){return{type:k.nodeType.stylesheet,rules:e,range:t}}atRule(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;return{type:k.nodeType.atRule,name:e,parameters:t,rulelist:r,nameRange:n,parametersRange:o,range:i}}comment(e,t){return{type:k.nodeType.comment,value:e,range:t}}rulelist(e,t){return{type:k.nodeType.rulelist,rules:e,range:t}}ruleset(e,t,r,n){return{type:k.nodeType.ruleset,selector:e,rulelist:t,selectorRange:r,range:n}}declaration(e,t,r,n){return{type:k.nodeType.declaration,name:e,value:t,nameRange:r,range:n}}expression(e,t){return{type:k.nodeType.expression,text:e,range:t}}discarded(e,t){return{type:k.nodeType.discarded,text:e,range:t}}}}));_(w);w.NodeFactory;var j=O((function(e,t){ /** * @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}}}));_(j);j.NodeVisitor;var S=O((function(e,t){var r; /** * @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}),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}));_(S);S.TokenType,S.Token,S.boundaryTokenTypes;var P=O((function(e,t){ /** * @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.Tokenizer=class{constructor(e){this.cursorToken_=new S.Token(S.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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const{start:r,end:n}=this.getRange(e,t);return this.cssText.substring(r,n)}getRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{start:e.start,end:(t||e).end}}trimRange(e){let{start:t,end:r}=e;for(;t<=r&&/\s/.test(this.cssText.charAt(t));)t++;for(;t<=r&&r>0&&/\s/.test(this.cssText.charAt(r-1));)r--;return{start:t,end:r}}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=k.matcher.whitespace.test(e)?this.tokenizeWhitespace(this.offset):k.matcher.stringBoundary.test(e)?this.tokenizeString(this.offset):"/"===e&&"*"===this.cssText[this.offset+1]?this.tokenizeComment(this.offset):k.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 o;for(;o=this.cssText[++e];)if(r)r=!1;else{if(o===t){++e;break}"\\"===o&&(r=!0)}return new S.Token(S.Token.type.string,n,e)}tokenizeWord(e){const t=e;let r;for(;(r=this.cssText[e])&&!k.matcher.boundary.test(r);)e++;return new S.Token(S.Token.type.word,t,e)}tokenizeWhitespace(e){const t=e;k.matcher.whitespaceGreedy.lastIndex=e;const r=k.matcher.whitespaceGreedy.exec(this.cssText);return null!=r&&r.index===e&&(e=k.matcher.whitespaceGreedy.lastIndex),new S.Token(S.Token.type.whitespace,t,e)}tokenizeComment(e){const t=e;return k.matcher.commentGreedy.lastIndex=e,e=null==k.matcher.commentGreedy.exec(this.cssText)?this.cssText.length:k.matcher.commentGreedy.lastIndex,new S.Token(S.Token.type.comment,t,e)}tokenizeBoundary(e){const t=S.boundaryTokenTypes[this.cssText[e]]||S.Token.type.boundary;return new S.Token(t,e,e+1)}}}));_(P);P.Tokenizer;var x=O((function(e,t){ /** * @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.Parser=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new w.NodeFactory;this.nodeFactory=e}parse(e){return this.parseStylesheet(new P.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(S.Token.type.whitespace)?(e.advance(),null):t.is(S.Token.type.comment)?this.parseComment(e):t.is(S.Token.type.word)?this.parseDeclarationOrRuleset(e):t.is(S.Token.type.propertyBoundary)?this.parseUnknown(e):t.is(S.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(S.Token.type.boundary);)r=e.advance();return this.nodeFactory.discarded(e.slice(t,r),e.getRange(t,r))}parseAtRule(e){let t=void 0,r=void 0,n=void 0,o=void 0,i=void 0;if(!e.currentToken)return null;const c=e.currentToken.start;for(;e.currentToken;)if(e.currentToken.is(S.Token.type.whitespace))e.advance();else if(!t&&e.currentToken.is(S.Token.type.at)){e.advance();const n=e.currentToken;let o;for(;e.currentToken&&e.currentToken.is(S.Token.type.word);)o=e.advance();r=e.getRange(n,o),t=e.cssText.slice(r.start,r.end)}else{if(e.currentToken.is(S.Token.type.openBrace)){n=this.parseRulelist(e);break}if(e.currentToken.is(S.Token.type.propertyBoundary)){e.advance();break}null==o?o=e.advance():i=e.advance()}if(void 0===t||void 0===r)return null;let a=void 0,s="";o&&(a=e.trimRange(e.getRange(o,i)),s=e.cssText.slice(a.start,a.end));const l=e.currentToken?e.currentToken.previous.end:e.cssText.length;return this.nodeFactory.atRule(t,s,n,r,a,{start:c,end:l})}parseRulelist(e){const t=[],r=e.currentToken.start;let n;for(e.advance();e.currentToken;){if(e.currentToken.is(S.Token.type.closeBrace)){n=e.currentToken,e.advance();break}{const r=this.parseRule(e);r&&t.push(r)}}const o=n?n.end:e.cssText.length;return this.nodeFactory.rulelist(t,{start:r,end:o})}parseDeclarationOrRuleset(e){let t=null,r=null,n=null;for(;e.currentToken;)if(e.currentToken.is(S.Token.type.whitespace))e.advance();else if(e.currentToken.is(S.Token.type.openParenthesis))for(;e.currentToken&&!e.currentToken.is(S.Token.type.closeParenthesis);)e.advance();else{if(e.currentToken.is(S.Token.type.openBrace)||e.currentToken.is(S.Token.type.propertyBoundary))break;e.currentToken.is(S.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(S.Token.type.propertyBoundary)){const o=e.getRange(t,n?n.previous:r),i=e.cssText.slice(o.start,o.end);let c=void 0;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(S.Token.type.semicolon)&&e.advance();const a=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,c,o,a)}if(n&&n===r){const n=this.parseRulelist(e);e.currentToken.is(S.Token.type.semicolon)&&e.advance();const o=e.getRange(t,r.previous),i=e.cssText.slice(o.start,o.end),c=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,n,o,c)}{const n=e.getRange(t,r),o=e.cssText.slice(n.start,n.end),i=this.parseRulelist(e),c=t.start;let a;return a=e.currentToken?e.currentToken.previous?e.currentToken.previous.end:t.end:e.cssText.length,this.nodeFactory.ruleset(o,i,n,{start:c,end:a})}}}}));_(x);x.Parser;var C=O((function(e,t){ /** * @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});class r extends j.NodeVisitor{stringify(e){return this.visit(e)||""}[k.nodeType.stylesheet](e){let t="";for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:"desktop",n="".concat(e["".concat(r,"_selector_prefix")]?"".concat(e["".concat(r,"_selector_prefix")]," "):"").concat(e.selector||":root"),o="--".concat(D(e.variable)?e.variable():e.variable),i=L[r].ast.rules.find((function(e){return e.selector===n})),c=L[r].ast.rules.find((function(e){var t=e.type,r=e.rulelist;return"ruleset"===t&&r.rules.length>0})),a=y({},L[r].ast,{rules:i?L[r].ast.rules.map((function(e){if(e.selector!==n)return e;if(t.indexOf("CT_CSS_SKIP_RULE")>-1)return y({},e,{rulelist:y({},e.rulelist,{rules:e.rulelist.rules.filter((function(e){return e.name!==o}))})});var r=e.rulelist.rules.find((function(e){return e.name===o}));return y({},e,{rulelist:y({},e.rulelist,{rules:r?e.rulelist.rules.map((function(e){return e.name===o?y({},e,{value:y({},e.value,{text:t})}):e})):[].concat(g(e.rulelist.rules),[y({},c.rulelist.rules[0],{name:o,value:y({},c.rulelist.rules[0].value,{text:t})})])})})})):[].concat(g(L[r].ast.rules),[y({},c,{selector:n,rulelist:y({},c.rulelist,{rules:[y({},c.rulelist.rules[0],{name:o,value:y({},c.rulelist.rules[0].value,{text:t})})]})})])}),s=new z;L[r].ast=a,document.querySelector("style#".concat(I[r])).innerText=s.stringify(a)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variableDescriptor,r=e.value,n=e.device,o=void 0===n?"desktop":n,i=e.customReplaceVariableInStyleTag,c=void 0===i?null:i,a=(t.type||"").indexOf("color")>-1?r["color"===t.type?"default":t.type.split(":")[1]].color:r;"border"===(t.type||"")&&(a=r&&"none"!==r.style?"".concat(r.width,"px ").concat(r.style," ").concat(r.color.color):"none",t.skip_none&&"none"===a&&(a="CT_CSS_SKIP_RULE")),"spacing"===(t.type||"")&&(a=h(r)),"box-shadow"===(t.type||"")&&(a=m(r,t)),c?c({replaceVariableInStyleTag:V,variableDescriptor:t,value:"".concat(a).concat(t.unit||"").concat(t.important?" !important":""),device:o}):V(t,"".concat(a).concat(t.unit||"").concat(t.important?" !important":""),o)},F=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=v(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),M({variableDescriptor:e,value:t.desktop,device:"desktop",customReplaceVariableInStyleTag:r}),M({variableDescriptor:e,value:t.tablet,device:"tablet",customReplaceVariableInStyleTag:r}),M({variableDescriptor:e,value:t.mobile,device:"mobile",customReplaceVariableInStyleTag:r})):M({variableDescriptor:e,value:t,customReplaceVariableInStyleTag:r})},U=function(){Object.keys(I).map((function(e){var t=document.querySelector("style#".concat(I[e]));if(t){var r=t.innerText,n=new R,o=(new z,n.parse(r));L[e].ast=o}}))},A=r(2),N=r(6);function B(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 K(e){for(var t=1;t{var t=e.toString(16);return 1==t.length?"0"+t:t},J=e=>{let{responsive:t,value:r,cb:n}=e;return r=Object(N.maybePromoteScalarValueIntoResponsive)(r,t),t?{desktop:n(r.desktop),tablet:n(r.tablet),mobile:n(r.mobile)}:n(r)},H=e=>{let{id:t,selector:r,responsive:n=!1,force_overlay:o=!1,valueExtractor:i=(e=>e),addToDescriptors:c={}}=e;return{[t]:[K({variable:"background-color",selector:r,responsive:n,extractValue:e=>J({value:i(e),responsive:n,cb:e=>e.backgroundColor.default.color})},c),K({variable:"pattern-color",selector:r,responsive:n,extractValue:e=>J({value:i(e),responsive:n,cb:e=>"pattern"===e.background_type?e.patternColor.default.color:"CT_CSS_SKIP_RULE"})},c),K({variable:"overlay",selector:r,responsive:n,extractValue:e=>J({value:i(e),responsive:n,cb:e=>"image"===e.background_type&&e.background_image.url&&"CT_CSS_SKIP_RULE"!==e.overlayColor.default.color?e.overlayColor.default.color:"CT_CSS_SKIP_RULE"})},c),K({variable:"overlay-color",selector:r,responsive:n,extractValue:e=>J({value:i(e),responsive:n,cb:e=>"image"===e.background_type&&e.background_image.url&&"CT_CSS_SKIP_RULE"!==e.overlayColor.default.color?"CT_CSS_SKIP_RULE":o?"none":"CT_CSS_SKIP_RULE"})},c),K({variable:"background-image",selector:r,responsive:n,extractValue:e=>J({value:i(e),responsive:n,cb:e=>{let{background_type:t,gradient:r,background_image:n,background_pattern:o,patternColor:i,backgroundColor:c}=e;if("color"===t)return"CT_CSS_SKIP_RULE"!==c.default.color?"none":"CT_CSS_SKIP_RULE";const a=(e,t,r)=>(r+"").split(e).join(t);if("image"===t)return n.url?`url(${n.url})`:"CT_CSS_SKIP_RULE"!==c.default?"none":"CT_CSS_SKIP_RULE";if("gradient"===t)return r;let s=1,l=i.default.color;if(l.indexOf("paletteColor1")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor1")),l.indexOf("paletteColor2")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor2")),l.indexOf("paletteColor3")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor3")),l.indexOf("paletteColor4")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor4")),l.indexOf("paletteColor5")>-1&&(l=getComputedStyle(document.body).getPropertyValue("--paletteColor5")),l.indexOf("rgb")>-1){const e=a("rgb(","",a(")","",a("rgba(","",a(" ","",l)))).split(",");l=`#${$(parseInt(e[0],10))}${$(parseInt(e[1],10))}${$(parseInt(e[2],10))}`,e.length>3&&(s=e[3])}return l=a("#","",l),`url("${a("OPACITY",s,a("COLOR",l,ct_localizations.customizer_sync.svg_patterns[o]||ct_localizations.customizer_sync.svg_patterns["type-1"]))}")`}})},c),K(K({variable:"background-position",selector:r,responsive:n},c),{},{extractValue:e=>J({value:i(e),responsive:n,cb:e=>{let{background_type:t,background_image:{x:r,y:n}}=e;return"image"!==t?"CT_CSS_SKIP_RULE":`${Math.round(100*parseFloat(r))}% ${Math.round(100*parseFloat(n))}%`}})}),K(K({variable:"background-size",selector:r,responsive:n},c),{},{extractValue:e=>J({value:i(e),responsive:n,cb:e=>{let{background_type:t,background_size:r}=e;return"image"!==t?"CT_CSS_SKIP_RULE":r}})}),K(K({variable:"background-attachment",selector:r,responsive:n},c),{},{extractValue:e=>J({value:i(e),responsive:n,cb:e=>{let{background_type:t,background_attachment:r}=e;return"image"!==t?"CT_CSS_SKIP_RULE":r}})}),K(K({selector:r,variable:"background-repeat",responsive:n},c),{},{extractValue:e=>J({value:i(e),responsive:n,cb:e=>{let{background_type:t,background_repeat:r}=e;return"image"!==t?"CT_CSS_SKIP_RULE":r}})})]}};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 q(e){for(var t=1;t{let{background:t}=e;return!ee&&"color"===t.background_type&&t.backgroundColor.default.color&&t.backgroundColor.default.color.indexOf("CT_CSS_SKIP_RULE")>-1?ct_editor_localizations.default_background:t}})),(re=["content_style_source","content_style","content_background","content_boxed_shadow","boxed_content_spacing","content_boxed_radius",...ee?["has_content_block_structure"]:[]],ne=[{selector:".block-editor-writing-flow",variable:"has-boxed",responsive:!0,extractValue:e=>{let{content_style_source:t="inherit",has_content_block_structure:r,content_style:n="wide"}=e;return ee||"inherit"!==t||(n=ct_editor_localizations.default_content_style),n=Object(N.maybePromoteScalarValueIntoResponsive)(n),ee&&"yes"!==r&&(n={desktop:"wide",tablet:"wide",mobile:"wide"}),{desktop:"boxed"===n.desktop?"var(--true)":"var(--false)",tablet:"boxed"===n.tablet?"var(--true)":"var(--false)",mobile:"boxed"===n.mobile?"var(--true)":"var(--false)"}},fullValue:!0,unit:""},{selector:".block-editor-writing-flow",variable:"has-wide",responsive:!0,extractValue:e=>{let{has_content_block_structure:t,content_style_source:r="inherit",content_style:n="wide"}=e;return ee||"inherit"!==r||(n=ct_editor_localizations.default_content_style),n=Object(N.maybePromoteScalarValueIntoResponsive)(n),ee&&"yes"!==t&&(n={desktop:"wide",tablet:"wide",mobile:"wide"}),{desktop:"wide"===n.desktop?"var(--true)":"var(--false)",tablet:"wide"===n.tablet?"var(--true)":"var(--false)",mobile:"wide"===n.mobile?"var(--true)":"var(--false)"}},fullValue:!0,unit:""},...H({id:"background",selector:".block-editor-writing-flow",responsive:!0,addToDescriptors:{fullValue:!0},valueExtractor:e=>{let{has_content_block_structure:t,content_style_source:r="inherit",content_background:n}=e;return ee||"inherit"!==r||(n=ct_editor_localizations.default_content_background),ee&&"yes"!==t&&(n=JSON.parse(JSON.stringify(Object(N.maybePromoteScalarValueIntoResponsive)(n))),n.desktop.background_type="color",n.desktop.backgroundColor.default.color="CT_CSS_SKIP_RULE",n.tablet.background_type="color",n.tablet.backgroundColor.default.color="CT_CSS_SKIP_RULE",n.mobile.background_type="color",n.mobile.backgroundColor.default.color="CT_CSS_SKIP_RULE"),n}}).background,{selector:".block-editor-writing-flow",type:"spacing",variable:"boxed-content-spacing",responsive:!0,unit:"",fullValue:!0,extractValue:e=>{let{content_style_source:t="inherit",boxed_content_spacing:r,has_content_block_structure:n}=e;return ee||"inherit"!==t||(r=ct_editor_localizations.default_boxed_content_spacing),ee&&"yes"!==n?"CT_CSS_SKIP_RULE":r}},{selector:".block-editor-writing-flow",type:"spacing",variable:"border-radius",responsive:!0,fullValue:!0,extractValue:e=>{let{content_style_source:t="inherit",content_boxed_radius:r,has_content_block_structure:n}=e;return ee||"inherit"!==t||(r=ct_editor_localizations.default_content_boxed_radius),ee&&"yes"!==n?"CT_CSS_SKIP_RULE":r}},{selector:".block-editor-writing-flow",type:"box-shadow",variable:"box-shadow",responsive:!0,fullValue:!0,extractValue:e=>{let{content_style_source:t="inherit",content_boxed_shadow:r,has_content_block_structure:n}=e;return ee||"inherit"!==t||(r=ct_editor_localizations.default_content_boxed_shadow),ee&&"yes"!==n?"CT_CSS_SKIP_RULE":r}}],re.reduce((e,t)=>q(q({},e),{},{[t]:ne}),{})));var re,ne;function oe(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 ie(e){for(var t=1;t{const e=Object(c.select)("core/edit-post").__experimentalGetPreviewDeviceType(),t=Object(c.select)("core/edit-post").isFeatureActive("themeStyles");document.body.classList.remove("ct-tablet-view","ct-mobile-view"),document.body.classList.remove("ct-theme-editor-styles"),t&&document.body.classList.add("ct-theme-editor-styles"),"tablet"===e.toLowerCase()&&document.body.classList.add("ct-tablet-view"),"mobile"===e.toLowerCase()&&(document.body.classList.add("ct-tablet-view"),document.body.classList.add("ct-mobile-view"))});const ae=e=>{let{atts:t}=e,r=t.content_block_structure||"type-4";document.body.classList.remove("ct-structure-narrow","ct-structure-normal"),"yes"===t.has_content_block_structure?document.body.classList.add("ct-structure-"+("type-4"===r?"normal":"narrow")):document.body.classList.add("ct-structure-normal")},se=(e,t)=>{"page_structure_type"!==e&&"has_content_block_structure"!==e&&"content_block_structure"!==e||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e=ie(ie({},Object(c.select)("core/editor").getEditedPostAttribute("blocksy_meta")||{}),e),document.body.classList.contains("post-type-ct_content_block"))return void ae({atts:e});let t=e.page_structure_type||"default";"default"===t&&(t=ct_editor_localizations.default_page_structure),document.body.classList.remove("ct-structure-narrow","ct-structure-normal"),document.body.classList.add("ct-structure-"+("type-4"===t?"normal":"narrow"))}({[e]:t});const r=ie(ie({},Object(A.getValueFromInput)(ct_editor_localizations.post_options,wp.data.select("core/editor").getEditedPostAttribute("blocksy_meta")||{})),{},{[e]:t});te[e]&&(Array.isArray(te[e])?te[e]:[te[e]]).map(e=>F(e,e.fullValue?r:t,e=>{let{replaceVariableInStyleTag:t,value:r,variableDescriptor:n,device:o}=e;t(ie(ie({},n),{},{selector:`${"tablet"===o?".ct-tablet-view ":"mobile"===o?".ct-mobile-view ":""}${n.selector}`}),r,"desktop")}))};var le=r(1),ue=r(4);function pe(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 de(e){for(var t=1;t{let{name:r}=t;return{sidebarName:`${e.name}/${r}`}}),Object(c.withSelect)((e,t)=>{let{sidebarName:r}=t;const n=e("core/editor").getEditedPostAttribute("blocksy_meta"),{getActiveGeneralSidebarName:o,isPluginItemPinned:i}=e("core/edit-post");return{isActive:o()===r,isPinned:i(r),value:Array.isArray(n)?{}:n||{},options:ct_editor_localizations.post_options}}),Object(c.withDispatch)((e,t)=>{let{sidebarName:r}=t;const{closeGeneralSidebar:n,openGeneralSidebar:o,togglePinnedPluginItem:i}=e("core/edit-post");return{closeGeneralSidebar:n,togglePin:()=>{i(r)},onChange:t=>{e("core/editor").editPost({blocksy_meta:t})}}}))(e=>{let{name:t,value:r,options:o,onChange:c,isActive:a,isPinnable:l=!0,isPinned:p,togglePin:d,toggleSidebar:f,closeGeneralSidebar:b}=e;const y=Object(n.useRef)(),g=Object(n.useRef)(),[h,v]=Object(n.useState)(null);Object(n.useEffect)(()=>{document.body.classList[a?"add":"remove"]("blocksy-sidebar-active")},[a]);const m=e=>{let{id:t,value:n}=e;const i=de(de({},h||Object(A.getValueFromInput)(o,r||{})),{},{[t]:n});se(t,n),c(i),v(i)};return Object(n.useEffect)(()=>(u.a.on("ct:metabox:options:trigger-change",m),()=>{u.a.off("ct:metabox:options:trigger-change",m)}),[]),Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.PluginSidebarMoreMenuItem,{target:"blocksy",icon:"admin-customizer"},Object(le.sprintf)(Object(le.__)("%s Page Settings","blocksy"),ct_localizations.product_name)),Object(n.createElement)(i.PluginSidebar,{name:t,icon:Object(n.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 60 60"},Object(n.createElement)("path",{d:"M30 0c16.569 0 30 13.431 30 30 0 16.569-13.431 30-30 30C13.431 60 0 46.569 0 30 0 13.431 13.431 0 30 0zm8.07 30.552a.381.381 0 00-.507 0L21.08 45.718c-.113.104-.033.282.126.282h15.424c.19 0 .372-.07.506-.193l7.233-6.657c.84-.774.84-2.027 0-2.8zm0-16.5a.381.381 0 00-.507 0L19.21 30.94a.635.635 0 00-.21.467v12.56c0 .148.193.222.306.118l23.784-22c.84-.773.84-2.622 0-3.395zM34.72 13H19.358c-.197 0-.358.148-.358.33v14.138c0 .147.193.22.306.117l15.54-14.303c.114-.104.033-.282-.126-.282z","fill-rule":"evenodd"})),className:"ct-components-panel",title:Object(le.sprintf)(Object(le.__)("%s Page Settings","blocksy"),ct_localizations.product_name)},Object(n.createElement)("div",{id:"ct-page-options",ref:g},Object(n.createElement)("div",{className:"ct-options-container",ref:y},Object(n.createElement)(A.DeviceManagerProvider,null,Object(n.createElement)(A.PanelLevel,{containerRef:y,parentContainerRef:g,useRefsAsWrappers:!0},Object(n.createElement)("div",{className:"ct-panel-options-header components-panel__header edit-post-sidebar-header"},Object(n.createElement)("strong",null,Object(le.sprintf)(Object(le.__)("%s Page Settings","blocksy"),ct_localizations.product_name)),l&&Object(n.createElement)(s.Button,{icon:p?ge:ye,label:p?Object(le.__)("Unpin from toolbar","blocksy"):Object(le.__)("Pin to toolbar","blocksy"),onClick:d,isPressed:p,"aria-expanded":p}),Object(n.createElement)(s.IconButton,{onClick:b,icon:be,label:Object(le.__)("Close plugin","blocksy")})),Object(n.createElement)(A.OptionsPanel,{onChange:(e,t)=>{const n=de(de({},h||Object(A.getValueFromInput)(o,r||{})),{},{[e]:t});se(e,t),c(n),v(n)},value:h||Object(A.getValueFromInput)(o,r||{}),options:o})))))))});ct_editor_localizations.post_options&&Object(o.registerPlugin)("blocksy",{render:()=>Object(n.createElement)(he,{name:"blocksy"})})}]);