Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: appengine/config_service/ui/bower_components/shadycss/apply-shim.min.js

Issue 2923973003: Added base template for config ui. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 (function(){/*
2
3 Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 */
10 'use strict';var k={};function n(){this.end=this.start=0;this.rules=this.parent= this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0 ;this.parsedSelector=this.selector=this.keyframesName=""}
11 function p(a){a=a.replace(aa,"").replace(ba,"");var b=q,c=a,d=new n;d.start=0;d. end=c.length;for(var e=d,f=0,h=c.length;f<h;f++)if("{"===c[f]){e.rules||(e.rules =[]);var g=e,m=g.rules[g.rules.length-1]||null,e=new n;e.start=f+1;e.parent=g;e. previous=m;g.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d, a)}
12 function q(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.t rim();a.parent&&((c=b.substring(a.previous?a.previous.end:a.parent.start,a.start -1),c=ca(c),c=c.replace(r," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSel ector=a.selector=c.trim(),a.atRule=!c.indexOf("@"),a.atRule)?c.indexOf("@media") ?c.match(da)&&(a.type=u,a.keyframesName=a.selector.split(r).pop()):a.type=t:a.ty pe=c.indexOf("--")?v:x);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++) q(f,b);return a}
13 function ca(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c= 6-a.length;c--;)a="0"+a;return"\\"+a})}
14 function y(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rule s,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for (var h=e.length,g;f<h&&(g=e[f]);f++)d=y(g,b,d)}else b?b=a.cssText:(b=a.cssText,b =b.replace(ea,"").replace(fa,""),b=b.replace(ga,"").replace(ha,"")),(d=b.trim()) &&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="} \n\n"));return c}
15 var v=1,u=7,t=4,x=1E3,aa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ba=/@import[^;]*;/g im,ea=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,fa=/(?:^[^;\-\s}]+)?-- [^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ga=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$ )?/gim,ha=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,da=/^@[^\s]*keyframes/,r=/ \s+/g;var ia=Promise.resolve();function ja(a){if(a=k[a])a._applyShimCurrentVersi on=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValid atingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function z(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ka(a){ a._applyShimValidatingVersion=a._applyShimNextVersion;a.a||(a.a=!0,ia.then(funct ion(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.a=!1}))};var A=/(?:^| [;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};{ ])+)|\{([^\}]*)\}(?:(?=[;\s}])|$))/gi,B=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,l a=/@media[^(]*(\([^)]*\))/;var C=!(window.ShadyDOM&&window.ShadyDOM.inUse),E;fun ction F(a){E=a&&a.shimcssproperties?!1:C||!(navigator.userAgent.match("AppleWebK it/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--fo o)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?E=window.ShadyCSS.nati veCss:window.ShadyCSS?(F(window.ShadyCSS),window.ShadyCSS=void 0):F(window.WebCo mponents&&window.WebComponents.flags);var G=E;function H(a){if(!a)return"";"stri ng"===typeof a&&(a=p(a));return y(a,G)}function I(a){!a.__cssRules&&a.textConten t&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function J(a,b,c,d) {if(a){var e=!1,f=a.type;if(d&&f===t){var h=a.selector.match(la);h&&(window.matc hMedia(h[1]).matches||(e=!0))}f===v?b(a):c&&f===u?c(a):f===x&&(e=!0);if((a=a.rul es)&&!e)for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++)J(g,b,c,d)}}
16 function K(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d= 0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&!-- d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=K(a.substring(e+1),b);e =d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.su bstring(e+1).trim(),a)};var ma=/;\s*/m,na=/^\s*(initial)|(inherit)\s*$/;function L(){this.a={}}L.prototype.set=function(a,b){a=a.trim();this.a[a]={h:b,i:{}}};L. prototype.get=function(a){a=a.trim();return this.a[a]||null};var M=null;function N(){this.b=this.c=null;this.a=new L}N.prototype.o=function(a){a=B.test(a)||A.te st(a);B.lastIndex=0;A.lastIndex=0;return a};N.prototype.m=function(a,b){a=a.cont ent.querySelector("style");var c=null;a&&(c=this.j(a,b));return c};
17 N.prototype.j=function(a,b){b=void 0===b?"":b;var c=I(a);this.l(c,b);a.textConte nt=H(c);return c};N.prototype.f=function(a){var b=this,c=I(a);J(c,function(a){": root"===a.selector&&(a.selector="html");b.g(a)});a.textContent=H(c);return c};N. prototype.l=function(a,b){var c=this;this.c=b;J(a,function(a){c.g(a)});this.c=nu ll};N.prototype.g=function(a){a.cssText=oa(this,a.parsedCssText);":root"===a.sel ector&&(a.selector=":host > *")};
18 function oa(a,b){b=b.replace(A,function(b,d,e,f){return pa(a,b,d,e,f)});return O (a,b)}function O(a,b){for(var c;c=B.exec(b);){var d=c[0],e=c[1];c=c.index;var f= b.slice(0,c+d.indexOf("@apply"));b=b.slice(c+d.length);var h=P(a,f),d=void 0;var g=a;var e=e.replace(ma,""),m=[];var l=g.a.get(e);l||(g.a.set(e,{}),l=g.a.get(e) );if(l)for(d in g.c&&(l.i[g.c]=!0),l.h)g=h&&h[d],l=[d,": var(",e,"_-_",d],g&&l.p ush(",",g),l.push(")"),m.push(l.join(""));d=m.join("; ");b=""+f+d+b;B.lastIndex= c+d.length}return b}
19 function P(a,b){b=b.split(";");for(var c,d,e={},f=0,h;f<b.length;f++)if(c=b[f])i f(h=c.split(":"),1<h.length){c=h[0].trim();var g=a;d=c;h=h.slice(1).join(":");va r m=na.exec(h);m&&(m[1]?(g.b||(g.b=document.createElement("meta"),g.b.setAttribu te("apply-shim-measure",""),g.b.style.all="initial",document.head.appendChild(g. b)),d=window.getComputedStyle(g.b).getPropertyValue(d)):d="apply-shim-inherit",h =d);d=h;e[c]=d}return e}function qa(a,b){if(M)for(var c in b.i)c!==a.c&&M(c)}
20 function pa(a,b,c,d,e){d&&K(d,function(b,c){c&&a.a.get(c)&&(e="@apply "+c+";")}) ;if(!e)return b;var f=O(a,e),h=b.slice(0,b.indexOf("--")),g=f=P(a,f),m=a.a.get(c ),l=m&&m.h;l?g=Object.assign(Object.create(l),f):a.a.set(c,g);var X=[],w,Y=!1;fo r(w in g){var D=f[w];void 0===D&&(D="initial");!l||w in l||(Y=!0);X.push(""+c+"_ -_"+w+": "+D)}Y&&qa(a,m);m&&(m.h=g);d&&(h=b+";"+h);return""+h+X.join("; ")+";"}N .prototype.detectMixin=N.prototype.o;N.prototype.transformStyle=N.prototype.j;
21 N.prototype.transformCustomStyle=N.prototype.f;N.prototype.transformRules=N.prot otype.l;N.prototype.transformRule=N.prototype.g;N.prototype.transformTemplate=N. prototype.m;N.prototype._separator="_-_";Object.defineProperty(N.prototype,"inva lidCallback",{get:function(){return M},set:function(a){M=a}});var Q=null,R=windo w.HTMLImports&&window.HTMLImports.whenReady||null,S;function ra(a){requestAnimat ionFrame(function(){R?R(a):(Q||(Q=new Promise(function(a){S=a}),"complete"===doc ument.readyState?S():document.addEventListener("readystatechange",function(){"co mplete"===document.readyState&&S()})),Q.then(function(){a&&a()}))})};var T=new N ;function U(){var a=this;this.a=null;ra(function(){V(a)});T.invalidCallback=ja}f unction V(a){a.a||(a.a=window.ShadyCSS.CustomStyleInterface,a.a&&(a.a.transformC allback=function(a){T.f(a)},a.a.validateCallback=function(){requestAnimationFram e(function(){a.a.enqueued&&W(a)})}))}U.prototype.prepareTemplate=function(a,b){V (this);k[b]=a;b=T.m(a,b);a._styleAst=b};
22 function W(a){V(a);if(a.a){var b=a.a.processStyles();if(a.a.enqueued){for(var c= 0;c<b.length;c++){var d=a.a.getStyleForCustomStyle(b[c]);d&&T.f(d)}a.a.enqueued= !1}}}U.prototype.styleSubtree=function(a,b){V(this);if(b)for(var c in b)null===c ?a.style.removeProperty(c):a.style.setProperty(c,b[c]);if(a.shadowRoot)for(this. styleElement(a),a=a.shadowRoot.children||a.shadowRoot.childNodes,b=0;b<a.length; b++)this.styleSubtree(a[b]);else for(a=a.children||a.childNodes,b=0;b<a.length;b ++)this.styleSubtree(a[b])};
23 U.prototype.styleElement=function(a){V(this);var b=a.localName,c;b?-1<b.indexOf( "-")?c=b:c=a.getAttribute&&a.getAttribute("is")||"":c=a.is;if((b=k[c])&&!z(b)){i f(z(b)||b._applyShimValidatingVersion!==b._applyShimNextVersion)this.prepareTemp late(b,c),ka(b);if(a=a.shadowRoot)if(a=a.querySelector("style"))a.__cssRules=b._ styleAst,a.textContent=H(b._styleAst)}};U.prototype.styleDocument=function(a){V( this);this.styleSubtree(document.body,a)};
24 if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var Z=new U,sa=window.ShadyCS S&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:functio n(a,b){W(Z);Z.prepareTemplate(a,b)},styleSubtree:function(a,b){W(Z);Z.styleSubtr ee(a,b)},styleElement:function(a){W(Z);Z.styleElement(a)},styleDocument:function (a){W(Z);Z.styleDocument(a)},getComputedStyleValue:function(a,b){return(a=window .getComputedStyle(a).getPropertyValue(b))?a.trim():""},nativeCss:G,nativeShadow: C};sa&&(window.ShadyCSS.CustomStyleInterface=
25 sa)}window.ShadyCSS.ApplyShim=T;}).call(this);
26
27 //# sourceMappingURL=apply-shim.min.js.map
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698