File: /home/alloesb/www/wp-content/plugins/customify/js/vendor/CSSOM.min.js
/**
* CSSOM v0.4.4
* https://github.com/NV/CSSOM
*
* @license MIT
* https://github.com/NV/CSSOM/blob/master/LICENSE.txt
*/
!function(e){"use strict";const t=e.CSSOM={};t.CSSStyleDeclaration=function(){this.length=0,this.parentRule=null,this._importants={}},t.CSSStyleDeclaration.prototype={constructor:t.CSSStyleDeclaration,getPropertyValue:function(e){return this[e]||""},setProperty:function(e,t,s){if(this[e]){Array.prototype.indexOf.call(this,e)<0&&(this[this.length]=e,this.length++)}else this[this.length]=e,this.length++;this[e]=t+"",this._importants[e]=s},removeProperty:function(e){if(!(e in this))return"";const t=Array.prototype.indexOf.call(this,e);if(t<0)return"";const s=this[e];return this[e]="",Array.prototype.splice.call(this,t,1),s},getPropertyCSSValue:function(){},getPropertyPriority:function(e){return this._importants[e]||""},getPropertyShorthand:function(){},isPropertyImplicit:function(){},get cssText(){const e=[];let t=0,s=this.length;for(;t<s;++t){const s=this[t],r=this.getPropertyValue(s);let o=this.getPropertyPriority(s);o&&(o=" !"+o),e[t]=s+": "+r+o+";"}return e.join(" ")},set cssText(e){let s,r;for(s=this.length;s--;)this[r=this[s]]="";Array.prototype.splice.call(this,0,this.length),this._importants={};const o=t.parse("#bogus{"+e+"}").cssRules[0].style,n=o.length;for(s=0;s<n;++s)r=o[s],this.setProperty(o[s],o.getPropertyValue(r),o.getPropertyPriority(r))}},t.CSSRule=function(){this.parentRule=null,this.parentStyleSheet=null},t.CSSRule.UNKNOWN_RULE=0,t.CSSRule.STYLE_RULE=1,t.CSSRule.CHARSET_RULE=2,t.CSSRule.IMPORT_RULE=3,t.CSSRule.MEDIA_RULE=4,t.CSSRule.FONT_FACE_RULE=5,t.CSSRule.PAGE_RULE=6,t.CSSRule.KEYFRAMES_RULE=7,t.CSSRule.KEYFRAME_RULE=8,t.CSSRule.MARGIN_RULE=9,t.CSSRule.NAMESPACE_RULE=10,t.CSSRule.COUNTER_STYLE_RULE=11,t.CSSRule.SUPPORTS_RULE=12,t.CSSRule.DOCUMENT_RULE=13,t.CSSRule.FONT_FEATURE_VALUES_RULE=14,t.CSSRule.VIEWPORT_RULE=15,t.CSSRule.REGION_STYLE_RULE=16,t.CSSRule.prototype={constructor:t.CSSRule},t.CSSStyleRule=function(){t.CSSRule.call(this),this.selectorText="",this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSStyleRule.prototype=new t.CSSRule,t.CSSStyleRule.prototype.constructor=t.CSSStyleRule,t.CSSStyleRule.prototype.type=1,Object.defineProperty(t.CSSStyleRule.prototype,"cssText",{get:function(){let e;return e=this.selectorText?this.selectorText+" {"+this.style.cssText+"}":""},set:function(e){const s=t.CSSStyleRule.parse(e);this.style=s.style,this.selectorText=s.selectorText}}),t.CSSStyleRule.parse=function(e){let s,r=0,o="selector",n=r,i="";const l={selector:!0,value:!0},c=new t.CSSStyleRule;let a,u,S="";for(;u=e.charAt(r);r++)switch(u){case" ":case"\t":case"\r":case"\n":case"\f":if(l[o])switch(e.charAt(r-1)){case" ":case"\t":case"\r":case"\n":case"\f":break;default:i+=" "}break;case'"':if(n=r+1,!(s=e.indexOf('"',n)+1))throw'" is missing';i+=e.slice(r,s),r=s-1;break;case"'":if(n=r+1,!(s=e.indexOf("'",n)+1))throw"' is missing";i+=e.slice(r,s),r=s-1;break;case"/":if("*"===e.charAt(r+1)){if(r+=2,-1===(s=e.indexOf("*/",r)))throw new SyntaxError("Missing */");r=s+1}else i+=u;break;case"{":"selector"===o&&(c.selectorText=i.trim(),i="",o="name");break;case":":"name"===o?(a=i.trim(),i="",o="value"):i+=u;break;case"!":"value"===o&&e.indexOf("!important",r)===r?(S="important",r+="important".length):i+=u;break;case";":"value"===o?(c.style.setProperty(a,i.trim(),S),S="",i="",o="name"):i+=u;break;case"}":if("value"===o)c.style.setProperty(a,i.trim(),S),S="",i="";else{if("name"===o)break;i+=u}o="selector";break;default:i+=u}return c},t.MediaList=function(){this.length=0},t.MediaList.prototype={constructor:t.MediaList,get mediaText(){return Array.prototype.join.call(this,", ")},set mediaText(e){const t=e.split(","),s=this.length=t.length;for(let e=0;e<s;e++)this[e]=t[e].trim()},appendMedium:function(e){-1===Array.prototype.indexOf.call(this,e)&&(this[this.length]=e,this.length++)},deleteMedium:function(e){const t=Array.prototype.indexOf.call(this,e);-1!==t&&Array.prototype.splice.call(this,t,1)}},t.CSSMediaRule=function(){t.CSSRule.call(this),this.media=new t.MediaList,this.cssRules=[]},t.CSSMediaRule.prototype=new t.CSSRule,t.CSSMediaRule.prototype.constructor=t.CSSMediaRule,t.CSSMediaRule.prototype.type=4,Object.defineProperty(t.CSSMediaRule.prototype,"cssText",{get:function(){const e=[];for(var t=0,s=this.cssRules.length;t<s;t++)e.push(this.cssRules[t].cssText);return"@media "+this.media.mediaText+" {"+e.join("")+"}"}}),t.CSSSupportsRule=function(){t.CSSRule.call(this),this.conditionText="",this.cssRules=[]},t.CSSSupportsRule.prototype=new t.CSSRule,t.CSSSupportsRule.prototype.constructor=t.CSSSupportsRule,t.CSSSupportsRule.prototype.type=12,Object.defineProperty(t.CSSSupportsRule.prototype,"cssText",{get:function(){const e=[];let t=0,s=this.cssRules.length;for(;t<s;t++)e.push(this.cssRules[t].cssText);return"@supports "+this.conditionText+" {"+e.join("")+"}"}}),t.CSSImportRule=function(){t.CSSRule.call(this),this.href="",this.media=new t.MediaList,this.styleSheet=new t.CSSStyleSheet},t.CSSImportRule.prototype=new t.CSSRule,t.CSSImportRule.prototype.constructor=t.CSSImportRule,t.CSSImportRule.prototype.type=3,Object.defineProperty(t.CSSImportRule.prototype,"cssText",{get:function(){const e=this.media.mediaText;return"@import url("+this.href+")"+(e?" "+e:"")+";"},set:function(e){let t,s,r=0,o="",n="";for(;s=e.charAt(r);r++)switch(s){case" ":case"\t":case"\r":case"\n":case"\f":"after-import"===o?o="url":n+=s;break;case"@":o||e.indexOf("@import",r)!==r||(o="after-import",r+="import".length,n="");break;case"u":if("url"===o&&e.indexOf("url(",r)===r){if(-1===(t=e.indexOf(")",r+1)))throw r+': ")" not found';r+="url(".length;var i=e.slice(r,t);i[0]===i[i.length-1]&&('"'!==i[0]&&"'"!==i[0]||(i=i.slice(1,-1))),this.href=i,r=t,o="media"}break;case'"':if("url"===o){if(!(t=e.indexOf('"',r+1)))throw r+": '\"' not found";this.href=e.slice(r+1,t),r=t,o="media"}break;case"'":if("url"===o){if(!(t=e.indexOf("'",r+1)))throw r+': "\'" not found';this.href=e.slice(r+1,t),r=t,o="media"}break;case";":"media"===o&&n&&(this.media.mediaText=n.trim());break;default:"media"===o&&(n+=s)}}}),t.CSSFontFaceRule=function(){t.CSSRule.call(this),this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSFontFaceRule.prototype=new t.CSSRule,t.CSSFontFaceRule.prototype.constructor=t.CSSFontFaceRule,t.CSSFontFaceRule.prototype.type=5,Object.defineProperty(t.CSSFontFaceRule.prototype,"cssText",{get:function(){return"@font-face {"+this.style.cssText+"}"}}),t.CSSHostRule=function(){t.CSSRule.call(this),this.cssRules=[]},t.CSSHostRule.prototype=new t.CSSRule,t.CSSHostRule.prototype.constructor=t.CSSHostRule,t.CSSHostRule.prototype.type=1001,Object.defineProperty(t.CSSHostRule.prototype,"cssText",{get:function(){const e=[];let t=0,s=this.cssRules.length;for(;t<s;t++)e.push(this.cssRules[t].cssText);return"@host {"+e.join("")+"}"}}),t.StyleSheet=function(){this.parentStyleSheet=null},t.CSSStyleSheet=function(){t.StyleSheet.call(this),this.cssRules=[]},t.CSSStyleSheet.prototype=new t.StyleSheet,t.CSSStyleSheet.prototype.constructor=t.CSSStyleSheet,t.CSSStyleSheet.prototype.insertRule=function(e,s){if(s<0||s>this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");const r=t.parse(e).cssRules[0];return r.parentStyleSheet=this,this.cssRules.splice(s,0,r),s},t.CSSStyleSheet.prototype.deleteRule=function(e){if(e<0||e>=this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");this.cssRules.splice(e,1)},t.CSSStyleSheet.prototype.toString=function(){let e="";const t=this.cssRules;for(let s=0;s<t.length;s++)e+=t[s].cssText+"\n";return e},t.CSSKeyframesRule=function(){t.CSSRule.call(this),this.name="",this.cssRules=[]},t.CSSKeyframesRule.prototype=new t.CSSRule,t.CSSKeyframesRule.prototype.constructor=t.CSSKeyframesRule,t.CSSKeyframesRule.prototype.type=7,Object.defineProperty(t.CSSKeyframesRule.prototype,"cssText",{get:function(){const e=[];let t=0,s=this.cssRules.length;for(;t<s;t++)e.push(" "+this.cssRules[t].cssText);return"@"+(this._vendorPrefix||"")+"keyframes "+this.name+" { \n"+e.join("\n")+"\n}"}}),t.CSSKeyframeRule=function(){t.CSSRule.call(this),this.keyText="",this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSKeyframeRule.prototype=new t.CSSRule,t.CSSKeyframeRule.prototype.constructor=t.CSSKeyframeRule,t.CSSKeyframeRule.prototype.type=8,Object.defineProperty(t.CSSKeyframeRule.prototype,"cssText",{get:function(){return this.keyText+" {"+this.style.cssText+"} "}}),t.MatcherList=function(){this.length=0},t.MatcherList.prototype={constructor:t.MatcherList,get matcherText(){return Array.prototype.join.call(this,", ")},set matcherText(e){const t=e.split(","),s=this.length=t.length;for(let e=0;e<s;e++)this[e]=t[e].trim()},appendMatcher:function(e){-1===Array.prototype.indexOf.call(this,e)&&(this[this.length]=e,this.length++)},deleteMatcher:function(e){const t=Array.prototype.indexOf.call(this,e);-1!==t&&Array.prototype.splice.call(this,t,1)}},t.CSSDocumentRule=function(){t.CSSRule.call(this),this.matcher=new t.MatcherList,this.cssRules=[]},t.CSSDocumentRule.prototype=new t.CSSRule,t.CSSDocumentRule.prototype.constructor=t.CSSDocumentRule,t.CSSDocumentRule.prototype.type=10,Object.defineProperty(t.CSSDocumentRule.prototype,"cssText",{get:function(){const e=[];let t=0,s=this.cssRules.length;for(;t<s;t++)e.push(this.cssRules[t].cssText);return"@-moz-document "+this.matcher.matcherText+" {"+e.join("")+"}"}}),t.CSSValue=function(){},t.CSSValue.prototype={constructor:t.CSSValue,set cssText(e){const t=this._getConstructorName();throw new Error('DOMException: property "cssText" of "'+t+'" is readonly and can not be replaced with "'+e+'"!')},get cssText(){const e=this._getConstructorName();throw new Error('getter "cssText" of "'+e+'" is not implemented!')},_getConstructorName:function(){return this.constructor.toString().match(/function\s([^\(]+)/)[1]}},t.CSSValueExpression=function(e,t){this._token=e,this._idx=t},t.CSSValueExpression.prototype=new t.CSSValue,t.CSSValueExpression.prototype.constructor=t.CSSValueExpression,t.CSSValueExpression.prototype.parse=function(){let e,t,s=this._token,r=this._idx,o="",n="",i="",l=[];for(;;++r){if(""===(o=s.charAt(r))){i="css expression error: unfinished expression!";break}switch(o){case"(":l.push(o),n+=o;break;case")":l.pop(o),n+=o;break;case"/":(e=this._parseJSComment(s,r))?e.error?i="css expression error: unfinished comment in expression!":r=e.idx:(e=this._parseJSRexExp(s,r))?(r=e.idx,n+=e.text):n+=o;break;case"'":case'"':(e=this._parseJSString(s,r,o))?(r=e.idx,n+=e.text):n+=o;break;default:n+=o}if(i)break;if(0===l.length)break}return t=i?{error:i}:{idx:r,expression:n}},t.CSSValueExpression.prototype._parseJSComment=function(e,t){let s,r=e.charAt(t+1);if("/"===r||"*"===r){let o,n,i=t;if("/"===r?n="\n":"*"===r&&(n="*/"),-1!==(o=e.indexOf(n,i+1+1)))return{idx:o=o+n.length-1,text:s=e.substring(t,o+1)};return{error:"css expression error: unfinished comment in expression!"}}return!1},t.CSSValueExpression.prototype._parseJSString=function(e,t,s){let r,o=this._findMatchedIdx(e,t,s);return-1!==o&&{idx:o,text:r=e.substring(t,o+s.length)}},t.CSSValueExpression.prototype._parseJSRexExp=function(e,t){const s=e.substring(0,t).replace(/\s+$/,"");if([/^$/,/\($/,/\[$/,/\!$/,/\+$/,/\-$/,/\*$/,/\/\s+/,/\%$/,/\=$/,/\>$/,/<$/,/\&$/,/\|$/,/\^$/,/\~$/,/\?$/,/\,$/,/delete$/,/in$/,/instanceof$/,/new$/,/typeof$/,/void$/].some(function(e){return e.test(s)})){const s="/";return this._parseJSString(e,t,s)}return!1},t.CSSValueExpression.prototype._findMatchedIdx=function(e,t,s){let r,o=t;for(;;){if(-1===(r=e.indexOf(s,o+1))){r=-1;break}{const s=e.substring(t+1,r).match(/\\+$/);if(!s||s[0]%2==0)break;o=r}}return e.indexOf("\n",t+1)<r&&(r=-1),r},t.parse=function(e){let s,r=0,o="before-selector",n="",i=0;const l={selector:!0,value:!0,"value-parenthesis":!0,atRule:!0,"importRule-begin":!0,importRule:!0,atBlock:!0,conditionBlock:!0,"documentRule-begin":!0},c=new t.CSSStyleSheet;let a,u=c;const S=[];let p,h,f,y,R,m,C,d,x,g,b=!1,k="";const w=/@(-(?:\w+-)+)?keyframes/g,T=function(t){const s=e.substring(0,r).split("\n"),o=s.length,n=s.pop().length+1,i=new Error(t+" (line "+o+", char "+n+")");throw i.line=o,i.char=n,i.styleSheet=c,i};for(let _;_=e.charAt(r);r++)switch(_){case" ":case"\t":case"\r":case"\n":case"\f":l[o]&&(n+=_);break;case'"':s=r+1;do{(s=e.indexOf('"',s)+1)||T('Unmatched "')}while("\\"===e[s-2]);switch(n+=e.slice(r,s),r=s-1,o){case"before-value":o="value";break;case"importRule-begin":o="importRule"}break;case"'":s=r+1;do{(s=e.indexOf("'",s)+1)||T("Unmatched '")}while("\\"===e[s-2]);switch(n+=e.slice(r,s),r=s-1,o){case"before-value":o="value";break;case"importRule-begin":o="importRule"}break;case"/":"*"===e.charAt(r+1)?(r+=2,-1===(s=e.indexOf("*/",r))?T("Missing */"):r=s+1):n+=_,"importRule-begin"===o&&(n+=" ",o="importRule");break;case"@":if(e.indexOf("@-moz-document",r)===r){o="documentRule-begin",(x=new t.CSSDocumentRule).__starts=r,r+="-moz-document".length,n="";break}if(e.indexOf("@media",r)===r){o="atBlock",(y=new t.CSSMediaRule).__starts=r,r+="media".length,n="";break}if(e.indexOf("@supports",r)===r){o="conditionBlock",(R=new t.CSSSupportsRule).__starts=r,r+="supports".length,n="";break}if(e.indexOf("@host",r)===r){o="hostRule-begin",r+="host".length,(g=new t.CSSHostRule).__starts=r,n="";break}if(e.indexOf("@import",r)===r){o="importRule-begin",r+="import".length,n+="@import";break}if(e.indexOf("@font-face",r)===r){o="fontFaceRule-begin",r+="font-face".length,(C=new t.CSSFontFaceRule).__starts=r,n="";break}{w.lastIndex=r;const s=w.exec(e);if(s&&s.index===r){o="keyframesRule-begin",(d=new t.CSSKeyframesRule).__starts=r,d._vendorPrefix=s[1],r+=s[0].length-1,n="";break}"selector"===o&&(o="atRule")}n+=_;break;case"{":"selector"===o||"atRule"===o?(f.selectorText=n.trim(),f.style.__starts=r,n="",o="before-name"):"atBlock"===o?(y.media.mediaText=n.trim(),a&&S.push(a),u=a=y,y.parentStyleSheet=c,n="",o="before-selector"):"conditionBlock"===o?(R.conditionText=n.trim(),a&&S.push(a),u=a=R,R.parentStyleSheet=c,n="",o="before-selector"):"hostRule-begin"===o?(a&&S.push(a),u=a=g,g.parentStyleSheet=c,n="",o="before-selector"):"fontFaceRule-begin"===o?(a&&(C.parentRule=a),C.parentStyleSheet=c,f=C,n="",o="before-name"):"keyframesRule-begin"===o?(d.name=n.trim(),a&&(S.push(a),d.parentRule=a),d.parentStyleSheet=c,u=a=d,n="",o="keyframeRule-begin"):"keyframeRule-begin"===o?((f=new t.CSSKeyframeRule).keyText=n.trim(),f.__starts=r,n="",o="before-name"):"documentRule-begin"===o&&(x.matcher.matcherText=n.trim(),a&&(S.push(a),x.parentRule=a),u=a=x,x.parentStyleSheet=c,n="",o="before-selector");break;case":":"name"===o?(h=n.trim(),n="",o="before-value"):n+=_;break;case"(":if("value"===o)if("expression"===n.trim()){const s=new t.CSSValueExpression(e,r).parse();s.error?T(s.error):(n+=s.expression,r=s.idx)}else o="value-parenthesis",i=1,n+=_;else"value-parenthesis"===o?(i++,n+=_):n+=_;break;case")":"value-parenthesis"===o&&0===--i&&(o="value"),n+=_;break;case"!":"value"===o&&e.indexOf("!important",r)===r?(k="important",r+="important".length):n+=_;break;case";":switch(o){case"value":f.style.setProperty(h,n.trim(),k),k="",n="",o="before-name";break;case"atRule":n="",o="before-selector";break;case"importRule":(m=new t.CSSImportRule).parentStyleSheet=m.styleSheet.parentStyleSheet=c,m.cssText=n+_,c.cssRules.push(m),n="",o="before-selector";break;default:n+=_}break;case"}":switch(o){case"value":f.style.setProperty(h,n.trim(),k),k="";case"before-name":case"name":f.__ends=r+1,a&&(f.parentRule=a),f.parentStyleSheet=c,u.cssRules.push(f),n="",o=u.constructor===t.CSSKeyframesRule?"keyframeRule-begin":"before-selector";break;case"keyframeRule-begin":case"before-selector":case"selector":for(a||T("Unexpected }"),b=S.length>0;S.length>0;){if("CSSMediaRule"===(a=S.pop()).constructor.name||"CSSSupportsRule"===a.constructor.name){p=u,(u=a).cssRules.push(p);break}0===S.length&&(b=!1)}b||(u.__ends=r+1,c.cssRules.push(u),u=c,a=null),n="",o="before-selector"}break;default:switch(o){case"before-selector":o="selector",(f=new t.CSSStyleRule).__starts=r;break;case"before-name":o="name";break;case"before-value":o="value";break;case"importRule-begin":o="importRule"}n+=_}return c},t.clone=function e(s){const r=new t.CSSStyleSheet,o=s.cssRules;if(!o)return r;let n=0,i=o.length;for(;n<i;n++){const s=o[n],i=r.cssRules[n]=new s.constructor,l=s.style;if(l){const e=i.style=new t.CSSStyleDeclaration;let s=0,r=l.length;for(;s<r;s++){const t=e[s]=l[s];e[t]=l[t],e._importants[t]=l.getPropertyPriority(t)}e.length=l.length}s.hasOwnProperty("keyText")&&(i.keyText=s.keyText),s.hasOwnProperty("selectorText")&&(i.selectorText=s.selectorText),s.hasOwnProperty("mediaText")&&(i.mediaText=s.mediaText),s.hasOwnProperty("conditionText")&&(i.conditionText=s.conditionText),s.hasOwnProperty("cssRules")&&(i.cssRules=e(s).cssRules)}return r}}(window);