1// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/src/style-mod.js 2 3const e="ͼ";const t=typeof Symbol=="undefined"?"__"+e:Symbol.for(e);const s=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet");const l=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class StyleModule{constructor(e,t){this.rules=[];let{finish:s}=t||{};function l(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,n,o){let r=[],h=/^@(\w+)\b/.exec(e[0]),u=h&&h[1]=="keyframes";if(h&&t==null)return n.push(e[0]+";");for(let s in t){let o=t[s];if(/&/.test(s))i(s.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),o,n);else if(o&&typeof o=="object"){if(!h)throw new RangeError("The value of a property ("+s+") should be a primitive value.");i(l(s),o,r,u)}else o!=null&&r.push(s.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+o+";")}(r.length||u)&&n.push((!s||h||o?e:e.map(s)).join(", ")+" {"+r.join(" ")+"}")}for(let t in e)i(l(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let s=l[t]||1;l[t]=s+1;return e+s.toString(36)}static mount(e,t,l){let i=e[s],n=l&&l.nonce;i?n&&i.setNonce(n):i=new StyleSet(e,n);i.mount(Array.isArray(t)?t:[t],e)}}let i=new Map;class StyleSet{constructor(e,t){let l=e.ownerDocument||e,n=l.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=i.get(l);if(t)return e[s]=t;this.sheet=new n.CSSStyleSheet;i.set(l,this)}else{this.styleTag=l.createElement("style");t&&this.styleTag.setAttribute("nonce",t)}this.modules=[];e[s]=this}mount(e,t){let s=this.sheet;let l=0,i=0;for(let t=0;t<e.length;t++){let n=e[t],o=this.modules.indexOf(n);if(o<i&&o>-1){this.modules.splice(o,1);i--;o=-1}if(o==-1){this.modules.splice(i++,0,n);if(s)for(let e=0;e<n.rules.length;e++)s.insertRule(n.rules[e],l++)}else{while(i<o)l+=this.modules[i++].rules.length;l+=n.rules.length;i++}}if(s)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let s=t.head||t;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}export{StyleModule}; 4
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.