kollapsminoriteten/wp-content/themes/blocksy/static/bundle/editor.js

96 lines
80 KiB
JavaScript
Raw Permalink Normal View History

2025-12-12 13:14:39 +01:00
!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,u=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],p=!!a&&a(e,t);if(n)n(e,t,{configurable:null===s&&p?p.configurable:!s,enumerable:null===c&&p?p.enumerable:!c,value:r,writable:null===u&&p?p.writable:!u});else{if(!l&&(c||u||s))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},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),u=r(9538),s=r(8068),l=r(9675),p=r(5345),f=r(1514),y=r(8968),d=r(6188),b=r(8002),g=r(5880),v=r(414),h=r(3093),m=Function,w=function(e){try{return m('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=r(5795),S=r(655),k=function(){throw new l},x=_?function(){try{return k}catch(e){try{return _(arguments,"callee").get}catch(e){return k}}}():k,O=r(4039)(),T=r(3628),P=r(1064),j=r(8648),A=r(1002),E=r(76),R={},D="undefined"!=typeof Uint8Array&&T?T(Uint8Array):n,I={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":O&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%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%":m,"%GeneratorFunction%":R,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&T?T(T([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&O&&T?T((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":c,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&O&&T?T((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefin
2025-08-27 08:44:30 +02:00
/**
* @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(e,"__esModule",{value:!0});var t;e.matcher={whitespace:/\s/,whitespaceGreedy:/(\s+)/g,commentGreedy:/(\*\/)/g,boundary:/[\(\)\{\}'"@;:\s]/,stringBoundary:/['"]/},(t=e.nodeType||(e.nodeType={})).stylesheet="stylesheet",t.comment="comment",t.atRule="atRule",t.ruleset="ruleset",t.expression="expression",t.declaration="declaration",t.rulelist="rulelist",t.discarded="discarded"}(m),
/**
* @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
*/
2025-12-12 13:14:39 +01:00
Object.defineProperty(h,"__esModule",{value:!0});const w=p(),_=m;h.iterateOverAst=function*e(t){switch(yield t,t.type){case _.nodeType.stylesheet:for(const r of t.rules)yield*e(r);return;case _.nodeType.ruleset:return yield*e(t.rulelist);case _.nodeType.rulelist:for(const r of t.rules)yield*e(r);return;case _.nodeType.declaration:return void(void 0!==t.value&&(yield*e(t.value)));case _.nodeType.atRule:return void(t.rulelist&&(yield*e(t.rulelist)));case _.nodeType.expression:case _.nodeType.comment:case _.nodeType.discarded:return;default:const r=t;console.error(`Got a node of unknown type: ${w.inspect(r)}`)}};var S={};
2025-08-27 08:44:30 +02:00
/**
* @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
2025-12-12 13:14:39 +01:00
*/Object.defineProperty(S,"__esModule",{value:!0});const k=m;S.NodeFactory=class{stylesheet(e,t){return{type:k.nodeType.stylesheet,rules:e,range:t}}atRule(e,t,r=void 0,n,o,i){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}}};var x={};
2025-08-27 08:44:30 +02:00
/**
* @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
2025-12-12 13:14:39 +01:00
*/Object.defineProperty(x,"__esModule",{value:!0});x.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}};var O={},T={};!function(e){var t;
2025-08-27 08:44:30 +02:00
/**
* @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
*/
2025-12-12 13:14:39 +01:00
Object.defineProperty(e,"__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"}(t=e.TokenType||(e.TokenType={}));class r{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}}r.type=t,e.Token=r;const n={"(":r.type.openParenthesis,")":r.type.closeParenthesis,":":r.type.colon,"@":r.type.at,"{":r.type.openBrace,"}":r.type.closeBrace,";":r.type.semicolon,"-":r.type.hyphen,_:r.type.underscore};e.boundaryTokenTypes=n}(T);var P={};
2025-08-27 08:44:30 +02:00
/**
* @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
2025-12-12 13:14:39 +01:00
*/Object.defineProperty(P,"__esModule",{value:!0});const j=m,A=T;P.Tokenizer=class{constructor(e){this.cursorToken_=new A.Token(A.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=j.matcher.whitespace.test(e)?this.tokenizeWhitespace(this.offset):j.matcher.stringBoundary.test(e)?this.tokenizeString(this.offset):"/"===e&&"*"===this.cssText[this.offset+1]?this.tokenizeComment(this.offset):j.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 A.Token(A.Token.type.string,n,e)}tokenizeWord(e){const t=e;let r;for(;(r=this.cssText[e])&&!j.matcher.boundary.test(r);)e++;return new A.Token(A.Token.type.word,t,e)}tokenizeWhitespace(e){const t=e;j.matcher.whitespaceGreedy.lastIndex=e;const r=j.matcher.whitespaceGreedy.exec(this.cssText);return null!=r&&r.index===e&&(e=j.matcher.whitespaceGreedy.lastIndex),new A.Token(A.Token.type.whitespace,t,e)}tokenizeComment(e){const t=e;j.matcher.commentGreedy.lastIndex=e;return e=null==j.matcher.commentGreedy.exec(this.cssText)?this.cssText.length:j.matcher.commentGreedy.lastIndex,new A.Token(A.Token.type.comment,t,e)}tokenizeBoundary(e){const t=A.boundaryTokenTypes[this.cssText[e]]||A.Token.type.boundary;return new A.Token(t,e,e+1)}},
2025-08-27 08:44:30 +02:00
/**
* @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
*/
2025-12-12 13:14:39 +01:00
Object.defineProperty(O,"__esModule",{value:!0});const E=S,R=T,D=P;O.Parser=class{constructor(e=new E.NodeFactory){this.nodeFactory=e}parse(e){return this.parseStylesheet(new D.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(R.Token.type.whitespace)?(e.advance(),null):t.is(R.Token.type.comment)?this.parseComment(e):t.is(R.Token.type.word)?this.parseDeclarationOrRuleset(e):t.is(R.Token.type.propertyBoundary)?this.parseUnknown(e):t.is(R.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(R.Token.type.boundary);)r=e.advance();return this.nodeFactory.discarded(e.slice(t,r),e.getRange(t,r))}parseAtRule(e){let t,r,n,o,i;if(!e.currentToken)return null;const a=e.currentToken.start;for(;e.currentToken;)if(e.currentToken.is(R.Token.type.whitespace))e.advance();else if(!t&&e.currentToken.is(R.Token.type.at)){e.advance();const n=e.currentToken;let o;for(;e.currentToken&&e.currentToken.is(R.Token.type.word);)o=e.advance();r=e.getRange(n,o),t=e.cssText.slice(r.start,r.end)}else{if(e.currentToken.is(R.Token.type.openBrace)){n=this.parseRulelist(e);break}if(e.currentToken.is(R.Token.type.propertyBoundary)){e.advance();break}null==o?o=e.advance():i=e.advance()}if(void 0===t||void 0===r)return null;let c,u="";o&&(c=e.trimRange(e.getRange(o,i)),u=e.cssText.slice(c.start,c.end));const s=e.currentToken?e.currentToken.previous.end:e.cssText.length;return this.nodeFactory.atRule(t,u,n,r,c,{start:a,end:s})}parseRulelist(e){const t=[],r=e.currentToken.start;let n;for(e.advance();e.currentToken;){if(e.currentToken.is(R.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(R.Token.type.whitespace))e.advance();else if(e.currentToken.is(R.Token.type.openParenthesis))for(;e.currentToken&&!e.currentToken.is(R.Token.type.closeParenthesis);)e.advance();else{if(e.currentToken.is(R.Token.type.openBrace)||e.currentToken.is(R.Token.type.propertyBoundary))break;e.currentToken.is(R.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(R.Token.type.propertyBoundary)){const o=e.getRange(t,n?n.previous:r),i=e.cssText.slice(o.start,o.end);let a;if(n&&n.next){const t=e.getRange(n.next,r),o=e.trimRange(t),i=e.cssText.slice(o.start,o.end);a=this.nodeFactory.expression(i,o)}e.currentToken.is(R.Token.type.semicolon)&&e.advance();const c=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,a,o,c)}if(n&&n===r){const n=this.parseRulelist(e);e.currentToken.is(R.Token.type.semicolon)&&e.advance();const o=e.getRange(t,r.previous),i=e.cssText.slice(o.start,o.end),a=e.trimRange(e.getRange(t,e.currentToken&&e.currentToken.previous||r));return this.nodeFactory.declaration(i,n,o,a)}{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})}}};var I={};
2025-08-27 08:44:30 +02:00
/**
* @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
2025-12-12 13:14:39 +01:00
*/Object.defineProperty(I,"__esModule",{value:!0});const C=m,M=x;class F extends M.NodeVisitor{stringify(e){return this.visit(e)||""}[C.nodeType.stylesheet](e){let t="";for(let r=0;r<e.rules.length;++r)t+=this.visit(e.rules[r]);return t}[C.nodeType.atRule](e){return`@${e.name}`+(e.parameters?` ${e.parameters}`:"")+(e.rulelist?`${this.visit(e.rulelist)}`:";")}[C.nodeType.rulelist](e){let t="{";for(let r=0;r<e.rules.length;++r)t+=this.visit(e.rules[r]);return t+"}"}[C.nodeType.comment](e){return`${e.value}`}[C.nodeType.ruleset](e){return`${e.selector}${this.visit(e.rulelist)}`}[C.nodeType.declaration](e){return null!=e.value?`${e.name}:${this.visit(e.value)};`:`${e.name};`}[C.nodeType.expression](e){return`${e.text}`}[C.nodeType.discarded](e){return""}}I.Stringifier=F,
2025-08-27 08:44:30 +02:00
/**
* @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
*/
2025-12-12 13:14:39 +01:00
Object.defineProperty(v,"__esModule",{value:!0});var U=h;v.iterateOverAst=U.iterateOverAst;var B=m;v.nodeType=B.nodeType;var V=S;v.NodeFactory=V.NodeFactory;var z=x;v.NodeVisitor=z.NodeVisitor;var N=O,L=v.Parser=N.Parser,$=I,G=v.Stringifier=$.Stringifier,W=T;v.Token=W.Token;var K=P;v.Tokenizer=K.Tokenizer;var J={},Q=function(e){if("auto"===e||""===e)return{value:e,unit:""};var t=parseFloat(e);return isNaN(t)?{value:"",unit:""}:{value:t,unit:e.toString().replace(t.toString(),"")}},H=function(e){return e},q=function(e){return e&&"[object Function]"==={}.toString.call(e)},Z=function(e){var t=e.variableDescriptor,r=e.value;return{type:"declaration",name:t.variableName,value:{type:"expression",text:r}}},Y=function(e,t){return e.selector&&e.selector.desktop?e.selector[t]:e.selector||":root"},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e=y({variableDescriptorsWithValue:[],ast:{},device:"desktop"},e)).ast,r=e.variableDescriptorsWithValue.flatMap(function(e){return e.variableDescriptor.dropSelectors||[]});if(r.length>0&&Array.isArray(t.rules)){var n=new Set(t.rules.map(function(e){return e.selector}));t=y(y({},t),{},{rules:t.rules.filter(function(e){var t=n.has(e.selector),o="string"==typeof e.selector&&r.some(function(t){return e.selector.includes(t)});return!(t&&o)})})}if(0===e.variableDescriptorsWithValue.length)return t;var o,i,a=(o=e.variableDescriptorsWithValue,i=function(t){var r=t.variableDescriptor;return Y(r,e.device)},o.reduce(function(e,t,r){var n;return(e[n=i(t,r,o)]||(e[n]=[])).push(t),e},{})),c=[],u={};if(u=y(y({},t),{},{rules:t.rules.map(function(e){if(!e.selector||!a[e.selector])return e;c.push(e.selector);var t=a[e.selector],r=[],n=t.filter(function(e){return!e.value.includes("CT_CSS_SKIP_RULE")}).reduce(function(e,t){return y(y({},e),{},d({},t.variableDescriptor.variableName,t))},{}),o=t.filter(function(e){return e.value.includes("CT_CSS_SKIP_RULE")}).reduce(function(e,t){return y(y({},e),{},d({},t.variableDescriptor.variableName,t))},{}),i=e.rulelist.rules.filter(function(e){var t=e.type,r=e.name;return"declaration"!==t||!o[r]}).map(function(e){return"declaration"===e.type&&n[e.name]?(r.push(e.name),y(y({},e),{},{value:y(y({},e.value),{},{text:n[e.name].value})})):e});return r.length!==Object.values(n).length&&(i=[].concat(b(i),b(Object.values(n).filter(function(e){var t=e.variableDescriptor;return!r.includes(t.variableName)}).map(function(e){return Z(e)})))),y(y({},e),{},{rulelist:y(y({},e.rulelist),{},{rules:i})})})}),c.length!==Object.keys(a).length){var s=Object.values(a).filter(function(t){return!c.includes(Y(t[0].variableDescriptor,e.device))&&!!t.find(function(e){return!e.value.includes("CT_CSS_SKIP_RULE")})});u=y(y({},u),{},{rules:[].concat(b(u.rules),b(s.map(function(t){return{type:"ruleset",selector:Y(t[0].variableDescriptor,e.device),rulelist:{type:"rulelist",rules:t.filter(function(e){return!e.value.includes("CT_CSS_SKIP_RULE")}).map(Z)}}})))})}return u},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e=y({variableDescriptor:{},value:{},device:"desktop"},e)).value;(e.variableDescriptor.type||"").indexOf("color")>-1&&"CT_CSS_SKIP_RULE"!==e.value&&(t=e.value["color"===e.variableDescriptor.type?"default":e.variableDescriptor.type.split(":")[1]].color),"border"===(e.variableDescriptor.type||"")&&(t=e.value&&"none"!==e.value.style?"".concat(e.value.width,"px ").concat(e.value.style," ").concat(e.value.color.color):"none",e.variableDescriptor.skip_none&&"none"===t&&(t="CT_CSS_SKIP_RULE")),"spacing"===(e.variableDescriptor.type||"")&&(t=function(e,t,r){if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";e.values||(e={values:[Q(e.top),Q(e.right),Q(e.bottom),Q(e.left)],custom:"",state:e.linked?1:2});var n=t.transformSpacingValue||H;if(3===e.state)return e.custom.trim()?n(e.custom.trim(),[e.custom.trim()],r):"CT_CSS_SKIP_RULE";var o=0;Object.keys(t).includes("emptyValue")&&(o=t.emptyValue);var i=e.values.map(function(t){return""===t.value||"auto"===t.value?y(y({},t),{},{value:1===e.state?o:0}):t}),a=!0,c="";return i.forEach(function(e){e.va