@webqit/oohtml 4.3.4 → 4.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings-api.js +1 -1
- package/dist/bindings-api.js.map +2 -2
- package/dist/context-api.js +1 -1
- package/dist/context-api.js.map +2 -2
- package/dist/data-binding.js +1 -1
- package/dist/data-binding.js.map +2 -2
- package/dist/html-imports.js +1 -1
- package/dist/html-imports.js.map +2 -2
- package/dist/main.js +12 -12
- package/dist/main.js.map +2 -2
- package/dist/main.lite.js +13 -13
- package/dist/main.lite.js.map +2 -2
- package/dist/namespaced-html.js +1 -1
- package/dist/namespaced-html.js.map +2 -2
- package/dist/scoped-css.js +3 -3
- package/dist/scoped-css.js.map +2 -2
- package/package.json +1 -1
- package/src/bindings-api/index.js +83 -20
- package/src/context-api/DOMContext.js +1 -0
- package/src/context-api/DOMContexts.js +2 -27
- package/src/context-api/index.js +31 -0
- package/src/data-binding/index.js +1 -1
package/dist/scoped-css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var ce=Object.defineProperty;var ae=(n,t,r)=>t in n?ce(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r;var gt=(n,t,r)=>(ae(n,typeof t!="symbol"?t+"":t,r),r);function x(n){return!Array.isArray(n)&&typeof n=="object"&&n}function g(n){return Array.isArray(n)}function yt(n,t,r=null){return g(t)?n.filter(e=>r?t.filter(i=>r(e,i)).length:t.indexOf(e)!==-1):[]}function P(n,...t){if(globalThis.webqit||(globalThis.webqit={}),globalThis.webqit.refs||Object.defineProperty(globalThis.webqit,"refs",{value:new J}),!arguments.length)return globalThis.webqit.refs;let r=globalThis.webqit.refs.get(n);r||(r=new J,globalThis.webqit.refs.set(n,r));let e,i;for(;e=t.shift();)(i=r)&&!(r=r.get(e))&&(r=new J,i.set(e,r));return r}var J=class extends Map{constructor(...t){super(...t),this.observers=new Set}set(t,r){let e=super.set(t,r);return this.fire("set",t,r,t),e}delete(t){let r=super.delete(t);return this.fire("delete",t),r}has(t){return this.fire("has",t),super.has(t)}get(t){return this.fire("get",t),super.get(t)}keyNames(){return Array.from(super.keys())}observe(t,r,e){let i={type:t,key:r,callback:e};return this.observers.add(i),()=>this.observers.delete(i)}unobserve(t,r,e){if(Array.isArray(t)||Array.isArray(r))throw new Error('The "type" and "key" arguments can only be strings.');for(let i of this.observers)!(at([t,"*"],i.type)&&at([r,"*"],i.key)&&i.callback===e)||this.observers.delete(i)}fire(t,r,...e){for(let i of this.observers)!(at([t,"*"],i.type)&&at([r,"*"],i.key))||i.callback(...e)}},at=(n,t)=>Array.isArray(t)?yt(n,t).length:n.includes(t);function X(n){return typeof n=="function"}function Y(n){return n===null||n===""}function R(n){return arguments.length&&(n===void 0||typeof n>"u")}function v(n){return Array.isArray(n)||typeof n=="object"&&n||X(n)}function wt(n){return Y(n)||R(n)||n===!1||n===0||v(n)&&!Object.keys(n).length}function b(n){return X(n)||n&&{}.toString.call(n)==="[object function]"}function Z(n){return n instanceof Number||typeof n=="number"}function I(n){return Z(n)||n!==!0&&n!==!1&&n!==null&&n!==""&&!isNaN(n*1)}function Q(n){return n instanceof String||typeof n=="string"&&n!==null}function bt(n){return!Q(n)&&!R(n.length)}function ft(n,...t){return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n}function _t(e,t){t=t||Object.prototype,t=t&&!g(t)?[t]:t;for(var r=[],e=e;e&&(!t||t.indexOf(e)<0)&&e.name!=="default";)r.push(e),e=e?Object.getPrototypeOf(e):null;return r}function xt(n,t){var r=[];return _t(n,t).forEach(e=>{ft(r,...Object.getOwnPropertyNames(e))}),r}function $(n,t,r=!1,e=!1,i=!1){var o=0,s=n.shift();if((I(s)||s===!0||s===!1)&&(o=s,s=n.shift()),!n.length)throw new Error("_merge() requires two or more array/objects.");return n.forEach((l,c)=>{!v(l)&&!b(l)||(r?xt(l):Object.keys(l)).forEach(f=>{if(!!t(f,s,l,c)){var a=s[f],m=l[f];if((g(a)&&g(m)||x(a)&&x(m))&&(o===!0||o>0))s[f]=g(a)&&g(m)?[]:{},$([I(o)?o-1:o,s[f],a,m],t,r,e,i);else if(g(s)&&g(l))e?s[f]=m:s.push(m);else try{i?Object.defineProperty(s,f,Object.getOwnPropertyDescriptor(l,f)):s[f]=l[f]}catch{}}})}),s}function K(...n){return $(n,(t,r,e)=>!0,!1,!1,!1)}function A(n,t=!0){return g(n)?n:!t&&x(n)?[n]:n!==!1&&n!==0&&wt(n)?[]:bt(n)?Array.prototype.slice.call(n):x(n)?Object.values(n):[n]}function tt(n,t,r={},e={}){t=A(t).slice();for(var i=n;!R(i)&&!Y(i)&&t.length;){var o=t.shift();if(!(r.get?r.get(i,o):v(i)?o in i:i[o])){e.exists=!1;return}i=r.get?r.get(i,o):i[o]}return e.exists=!0,i}function St(n,t,r,e={},i={}){let o=(a,m,u)=>i.set?i.set(a,m,u):(I(t[l])&&g(a)?a.push(u):a[m]=u,!0);t=A(t);for(var s=n,l=0;l<t.length;l++)if(l<t.length-1){if(!s||!v(s)&&!b(s))return!1;var c=tt(s,t[l],i);if(!v(c)){if(i.buildTree===!1)return!1;c=b(i.buildTree)?i.buildTree(l):I(t[l+1])?[]:{};var f=o(s,t[l],c);if(!f)return!1}s=c}else return o(s,t[l],r)}var et=class{constructor(t,r=!1){Object.defineProperty(this,"window",{value:t}),Object.defineProperty(this,"readCallbacks",{value:new Set}),Object.defineProperty(this,"writeCallbacks",{value:new Set}),Object.defineProperty(this,"_synthesis",{value:0,writable:!0}),!r&&this.window.requestAnimationFrame?this._loop():this._synthesis++}get synthesis(){return this._synthesis}async synthesizeWhile(t){this._synthesis++,this._fulfill();let r=await t();return this._synthesis--,r}_fulfill(){for(let t of this.readCallbacks)t(),this.readCallbacks.delete(t);for(let t of this.writeCallbacks)t(),this.writeCallbacks.delete(t)}_loop(){this.window.requestAnimationFrame(()=>{this._fulfill(),this._loop()})}onread(t,r=!1){if(r)return new Promise(e=>{this.synthesis?e(t()):this.readCallbacks.add(()=>{e(t())})});this.synthesis?Promise.resolve().then(t):this.readCallbacks.add(t)}onwrite(t,r=!1){if(r)return new Promise(e=>{this.synthesis?e(t()):this.writeCallbacks.add(()=>{e(t())})});this.synthesis?Promise.resolve().then(t):this.writeCallbacks.add(t)}cycle(t,r,e){this.onread(()=>{let i=t(e),o=s=>{s!==void 0&&this.onwrite(()=>{let l=r(s,e),c=f=>{f!==void 0&&this.cycle(t,r,f)};l instanceof Promise?l.then(c):c(l)})};i instanceof Promise?i.then(o):o(i)})}};function Ht(n){return(n=n.trim())&&n.startsWith("(")&&n.endsWith(")")}function mt(n,t,r,e=!0){r=(Array.isArray(r)?r:[r]).map(s=>(s+"").replace("(",e?"(.//":"(./")).join("|");let i=[],o;try{let s=n.document.evaluate(r,t,null,n.XPathResult.ANY_TYPE);for(;o=s.iterateNext();)i.push(o)}catch{}return i}function kt(n,t,r){r=(Array.isArray(r)?r:[r]).map(e=>(e+"").replace("(","(self::")).join("|");try{return n.document.evaluate(`${r}`,t,null,n.XPathResult.BOOLEAN_TYPE).booleanValue}catch{}}function rt(n,t,r,e=!1,i=null){let o=i?.get(t)?.get(r);if(typeof o<"u")return o;let s=f=>(i?.has(t)||i?.set(t,new WeakMap),i?.get(t)?.set(r,f),f),l=t.getRootNode(),c=r.getRootNode();return l===c?s(t.contains(r)):e&&c instanceof n.ShadowRoot?s(rt(n,t,c.host,e,i)):s(!1)}function Wt(n,t="|"){return[...n].reduce(([r,e,i,o],s)=>!r&&e===0&&(Array.isArray(t)?t:[t]).includes(s)?[r,e,[""].concat(i)]:(!r&&["(","[","{"].includes(s)&&!i[0].endsWith("\\")&&e++,!r&&[")","]","}"].includes(s)&&!i[0].endsWith("\\")&&e--,['"',"'","`"].includes(s)&&!i[0].endsWith("\\")&&(r=r===s?null:r||s),i[0]+=s,[r,e,i]),[null,0,[""]])[2].reverse()}var q=class{constructor(t){this.content=t,this.type=typeof t=="string"?"selector":"instance",this.kind=this.type==="instance"?null:Ht(t)?"xpath":"css",this.kind==="xpath"&&(this.isXpathAttr=Wt(t.trim().slice(1,-1),"@").length>1)}toString(){return this.content}};var G=class{constructor(t,r,e){this.context=t,this.namespace=r,this.window=t.defaultView||t.ownerDocument?.defaultView||e,this.document=this.window.document,this.webqit=this.window.webqit,Object.defineProperty(this,"#",{value:{}})}resolveArgs(t){if(b(t[0])?t=[[],...t]:x(t[0])&&!(t[0]instanceof q)&&t.length===1?t=[[],void 0,t[0]]:x(t[1])&&t.length===2?t=[A(t[0],!1),void 0,t[1]]:t[0]=A(t[0],!1),t[0].filter(r=>typeof r!="string"&&!(r instanceof q)&&!(r instanceof this.window.Node)).length)throw new Error("Argument #2 must be either a string or a Node object, or a list of those.");return t[0]=t[0].map(r=>r instanceof q?r:new q(r)),t}registry(...t){return P("realdom.realtime",this.window,this.namespace,...t)}createSignalGenerator(){return{generate(){return this.lastController?.abort(),this.lastController=new AbortController,{signal:this.lastController.signal}},disconnect(){this.lastController?.abort()}}}forEachMatchingContext(t,r,e){let{window:i}=this,o=new Set,s=new WeakMap;for(let[l,c]of this.registry(t)){let f=[].concat(r).filter(m=>rt(i,l.context,m.target,l.params.subtree==="cross-roots",s));if(!f.length)continue;let a=[l,Array.isArray(r)?f:f[0]];c?o.add(a):e.call(i,...a)}for(let l of o)e.call(i,...l);o.clear()}disconnectables(t,...r){let e={disconnect(){r.forEach(i=>i&&b(i.disconnect)&&i.disconnect()||b(i)&&i()||x(i)&&(i.disconnected=!0))}};return t&&t.addEventListener("abort",()=>e.disconnect()),e}};var W=class extends G{type="attr";constructor(t,...r){super(t,"attr",...r)}get(t,r=void 0,e={}){let i=typeof t=="string"||t instanceof q;[t=[],r=void 0,e={}]=this.resolveArgs(arguments);let{context:o}=this,s=Bt(o,t);if(!r)return s;let l=e.lifecycleSignals&&this.createSignalGenerator();if(i)for(let c of s){let f=l?.generate()||{};r(c,f,o)}else{let c=l?.generate()||{};r(s,c,o)}if(e.live){l&&(e={...e,signalGenerator:l});let c=this.observe(i?t[0]:t,r,{newValue:!0,...e});return this.disconnectables(e.signal,c)}}observe(t,r,e={}){let i=typeof t=="string"||t instanceof q;if([t=[],r,e={}]=this.resolveArgs(arguments),["sync","intercept"].includes(e.timing))return this.observeSync(i?t[0]:t,r,e);if(e.timing&&e.timing!=="async")throw new Error(`Timing option "${e.timing}" invalid.`);let{context:o,window:s,webqit:l}=this;e.eventDetails&&!l.realdom.attrInterceptionHooks?.intercepting&&Ut.call(s,"intercept",()=>{});let c=new s.MutationObserver(u=>{u=Vt(u).map(d=>Gt.call(s,d)),Ft.call(s,m,u,o)}),f={attributes:!0,attributeOldValue:e.oldValue,subtree:e.subtree&&!0};t.length&&(f.attributeFilter=t.map(u=>u+"")),c.observe(o,f);let a=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),m={context:o,spec:t,callback:r,params:e,atomics:new Map,originalFilterIsString:i,signalGenerator:a,disconnectable:c};return this.disconnectables(e.signal,c,a)}observeSync(t,r,e={}){let i=typeof t=="string"||t instanceof q;[t,r,e={}]=this.resolveArgs(arguments);let{context:o,window:s}=this;if(e.timing&&!["sync","intercept"].includes(e.timing))throw new Error(`Timing option "${e.timing}" invalid.`);let l=e.timing==="intercept"?"intercept":"sync";this.registry(l).size||Ut.call(s,l,u=>{this.forEachMatchingContext(l,u,Ft)});let c={disconnect(){m.delete(a)}},f=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),a={context:o,spec:t,callback:r,params:e,atomics:new Map,originalFilterIsString:i,signalGenerator:f,disconnectable:c},m=this.registry(l);return m.set(a,!!a.params.deferred),this.disconnectables(e.signal,c,f)}};function Vt(n){return n.reduce((t,r,e)=>t[e-1]?.attributeName===r.attributeName||P(r.target,"internalAttrInteractions").get(r.attributeName)?t:t.concat(r),[])}function Ft(n,t){let{context:r,spec:e,callback:i,params:o,atomics:s,originalFilterIsString:l,signalGenerator:c}=n,f=e.map(u=>u+"");if(o.atomic&&!s.size?t=Bt(r,e,t):o.timing!=="async"&&e.length&&(t=t.filter(u=>f.includes(u.name))),!t.length)return;o.newValue===null&&o.oldValue===null&&o.eventDetails||(t=t.map(u=>{let d;return o.eventDetails||({event:d,...u}=u),!o.oldValue&&"oldValue"in u&&({oldValue:d,...u}=u),!o.newValue&&"value"in u?{value:d,...u}=u:o.newValue&&typeof u.value>"u"&&(u={...u,value:dt(u.target,u.name,()=>u.target.getAttribute(u.name))}),u})),o.atomic&&(t.forEach(u=>s.set(u.name,u)),t=Array.from(s.entries()).map(([,u])=>u));let a=l?t[0]:t,m=c?.generate()||{};i(a,m,r)}function dt(n,t,r){let e=P(n,"internalAttrInteractions").get(t);P(n,"internalAttrInteractions").set(t,!0);let i=r();return P(n,"internalAttrInteractions").set(t,e),i}function Bt(n,t,r=[]){let e={event:null,type:"attribute"};return t.length?t.map(o=>(o=o+"",r.find(s=>s.name===o)||{target:n,name:o,value:dt(n,o,()=>n.getAttribute(o)),...e})):Array.from(n.attributes).map(o=>r.find(s=>s.name===o.nodeName)||{target:n,name:o.nodeName,value:dt(n,o.nodeName,()=>o.nodeValue),...e})}function Gt({target:n,attributeName:t,value:r,oldValue:e}){let s=(this.webqit.realdom.attrInterceptionRecords?.get(n)||{})[t]?.[0]||"mutation";return{target:n,name:t,value:r,oldValue:e,type:"observation",event:s}}function Ut(n,t){let r=this,{webqit:e,document:i,Element:o}=r;e.realdom.attrInterceptionHooks||Object.defineProperty(e.realdom,"attrInterceptionHooks",{value:new Map}),e.realdom.attrInterceptionHooks.has(n)||e.realdom.attrInterceptionHooks.set(n,new Set),e.realdom.attrInterceptionHooks.get(n).add(t);let s=()=>e.realdom.attrInterceptionHooks.get(n).delete(t);if(e.realdom.attrInterceptionHooks?.intercepting)return s;console.warn("Attr mutation APIs are now being intercepted."),e.realdom.attrInterceptionHooks.intercepting=!0,Object.defineProperty(e.realdom,"attrInterceptionRecords",{value:new Map});let l=(a,m)=>{e.realdom.attrInterceptionRecords.has(a.target)||e.realdom.attrInterceptionRecords.set(a.target,{});let u=e.realdom.attrInterceptionRecords.get(a.target);if(u[a.name]=u[a.name]||[],u[a.name].unshift(a.event),P(a.target,"internalAttrInteractions").get(a.name))return m();e.realdom.attrInterceptionHooks.get("intercept")?.forEach(w=>w([a]));let d=m();return e.realdom.attrInterceptionHooks.get("sync")?.forEach(w=>w([a])),d};new r.MutationObserver(a=>{a=a.filter(m=>!(r.webqit.realdom.attrInterceptionRecords?.get(m.target)||{})[m.attributeName]?.shift()),a=Vt(a).map(m=>Gt.call(r,m)),a.length&&(e.realdom.attrInterceptionHooks.get("intercept")?.forEach(m=>m(a)),e.realdom.attrInterceptionHooks.get("sync")?.forEach(m=>m(a)))}).observe(i,{attributes:!0,subtree:!0,attributeOldValue:!0});let f=Object.create(null);return["setAttribute","removeAttribute","toggleAttribute"].forEach(a=>{f[a]=o.prototype[a],o.prototype[a]=function(...m){let u,d=dt(this,m[0],()=>this.getAttribute(m[0]));["setAttribute","toggleAttribute"].includes(a)&&(u=m[1]),a==="toggleAttribute"&&u===void 0&&(u=d===null);let w={target:this,name:m[0],value:u,oldValue:d,type:"interception",event:[this,a]};return l(w,()=>f[a].call(this,...m))}}),s}var nt=class extends G{constructor(t,...r){super(t,"tree",...r)}attr(t,r=void 0,e={}){let{context:i,window:o}=this;return new W(i,o).get(...arguments)}query(t,r=void 0,e={}){[t,r=void 0,e={}]=this.resolveArgs(arguments);let{context:i}=this,o=new Map,s=f=>(o.has(f)||o.set(f,{target:f,entrants:[],exits:[],type:"query",event:null}),o.get(f));if(!e.generation||e.generation==="entrants"){if(!t.length)[...i.children].forEach(f=>s(i).entrants.push(f));else if(t.every(f=>f.type==="selector")){let[f,a]=t.reduce(([u,d],w)=>w.kind==="xpath"?[u,d.concat(w)]:[u.concat(w),d],[[],[]]),m=[];e.subtree?(f.length&&m.push(...i.querySelectorAll(f.join(","))),a.length&&m.push(...mt(this.window,i,a))):(f.length&&m.push(...[...i.children].filter(u=>u.matches(f))),a.length&&m.push(...mt(this.window,i,a,!1))),m.forEach(u=>s(u.parentNode||i).entrants.push(u))}}if(!r)return o;let l={disconnected:!1},c=r&&e.lifecycleSignals&&this.createSignalGenerator();for(let[,f]of o){if(l.disconnected)break;let a=c?.generate()||{};r(f,a,i)}if(e.live){c&&(e={...e,signalGenerator:c});let f=this.observe(t,r,e);return this.disconnectables(e.signal,l,f)}return this.disconnectables(e.signal,l,c)}children(t,r=void 0,e={}){return[t,r=void 0,e={}]=this.resolveArgs(arguments),this.query(t,r,{...e,subtree:!1})}subtree(t,r=void 0,e={}){return[t,r=void 0,e={}]=this.resolveArgs(arguments),this.query(t,r,{...e,subtree:!0})}observe(t,r,e={}){if([t,r,e={}]=this.resolveArgs(arguments),["sync","intercept"].includes(e.timing))return this.observeSync(t,r,e);if(e.timing&&e.timing!=="async")throw new Error(`Timing option "${e.timing}" invalid.`);let{context:i,window:o,webqit:s,document:l}=this;e.eventDetails&&(s.realdom.domInterceptionRecordsAlwaysOn=!0),(l.readyState==="loading"||s.realdom.domInterceptionRecordsAlwaysOn)&&!s.realdom.domInterceptionHooks?.intercepting&&Qt.call(o,"sync",()=>{});let c=new o.MutationObserver(m=>m.forEach(u=>{Ct.call(o,a,Xt.call(o,u),i)}));c.observe(i,{childList:!0,subtree:e.subtree&&!0});let f=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),a={context:i,spec:t,callback:r,params:e,signalGenerator:f,disconnectable:c};if(e.staticSensitivity){let m=zt.call(o,a);return this.disconnectables(e.signal,c,f,m)}return this.disconnectables(e.signal,c,f)}observeSync(t,r,e={}){[t,r,e={}]=this.resolveArgs(arguments);let{context:i,window:o}=this;if(e.timing&&!["sync","intercept"].includes(e.timing))throw new Error(`Timing option "${e.timing}" invalid.`);let s=e.timing==="intercept"?"intercept":"sync";this.registry(s).size||Qt.call(o,s,u=>{this.forEachMatchingContext(s,u,Ct)});let l=new o.MutationObserver(u=>u.forEach(d=>{Array.isArray((d=Xt.call(o,d)).event)||Ct.call(o,a,d,i)}));l.observe(i,{childList:!0,subtree:e.subtree&&!0});let c={disconnect(){m.delete(a),l.disconnect()}},f=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),a={context:i,spec:t,callback:r,params:e,signalGenerator:f,disconnectable:c},m=this.registry(s);if(m.set(a,!!a.params.deferred),e.staticSensitivity){let u=zt.call(o,a);return this.disconnectables(e.signal,c,f,u)}return this.disconnectables(e.signal,c,f)}track(t,r,e={}){return e={subtree:!0,...e},this.observe(t,i=>{i.entrants.length&&r(!0,Array.isArray(t)?i.entrants:i.entrants[0]),i.exits.length&&r(!1,Array.isArray(t)?i.exits:i.exits[0])},e)}};function zt(n){let t=this,{context:r,spec:e,callback:i,params:o,signalGenerator:s}=n,l=e.filter(d=>d.kind==="css"),c=d=>d.match(/\.([\w-]+)/g)?.length?["class"]:[],f=d=>d.match(/#([\w-]+)/g)?.length?["id"]:[],a=d=>[...d.matchAll(/\[([^\=\]]+)(\=[^\]]+)?\]/g)].map(w=>w[1]).concat(c(d)).concat(f(d));if(!(n.$attrs=Array.from(new Set(l.filter(d=>(d+"").includes("[")).reduce((d,w)=>d.concat(a(w+"")),[])))).length)return;let m=new Set,u=new Set;return m.push=d=>(u.delete(d),m.add(d)),u.push=d=>(m.delete(d),u.add(d)),n.$deliveryCache={entrants:m,exits:u},new W(r,t).observe(n.$attrs,d=>{let w=new Map,O=y=>(w.has(y)||w.set(y,{target:y,entrants:[],exits:[],type:"static",event:null}),w.get(y)),L=new WeakMap,p=y=>(L.has(y)||L.set(y,l.some(_=>y.matches(_+""))),L.get(y));for(let y of d)["entrants","exits"].forEach(_=>{o.generation&&_!==o.generation||n.$deliveryCache[_].has(y.target)||(_==="entrants"?!p(y.target):p(y.target))||(n.$deliveryCache[_].push(y.target),O(y.target)[_].push(y.target),O(y.target).event=y.event)});for(let[,y]of w){let _=s?.generate()||{};i(y,_,r)}},{subtree:o.subtree,timing:o.timing,eventDetails:o.eventDetails})}function Ct(n,t){let{context:r,spec:e,callback:i,params:o,signalGenerator:s,$deliveryCache:l}=n,c={...t,entrants:[],exits:[]};if(o.eventDetails||delete c.event,["entrants","exits"].forEach(a=>{if(!(o.generation&&a!==o.generation)&&(e.length?c[a]=ve.call(this,e,o.subtree==="cross-roots",t[a],t.event!=="parse"):c[a]=[...t[a]],!!l))for(let m of c[a])l[a].push(m)}),!c.entrants.length&&!c.exits.length)return;let f=s?.generate()||{};i(c,f,r)}function ve(n,t,r,e){r=Array.isArray(r)?r:[...r];let i=(o,s)=>{if(s.type==="selector"){let l=s.isXpathAttr?[]:o.filter(c=>s.kind==="xpath"?kt(this,c,s+""):c.matches&&c.matches(s+""));if((e||s.isXpathAttr)&&(l=o.reduce((c,f)=>s.kind==="xpath"?[...c,...mt(this,f,s,e)]:f.querySelectorAll?[...c,...f.querySelectorAll(s+"")]:c,l)),l.length)return l}else if(o.includes(s.content)||e&&o.some(l=>rt(this,l,s.content,t)))return[s.content]};return r.$$searchCache||(r.$$searchCache=new Map),n.reduce((o,s)=>{let l;return r.$$searchCache.has(s.content)?l=r.$$searchCache.get(s.content):(l=i(r,s)||[],s.type==="instance"&&r.$$searchCache.set(s.content,l)),o.concat(l)},[])}function Xt({target:n,addedNodes:t,removedNodes:r}){let e=this,i;return i=A(t).reduce((o,s)=>o||e.webqit.realdom.domInterceptionRecords?.get(s),null),i=A(r).reduce((o,s)=>o||e.webqit.realdom.domInterceptionRecords?.get(s),i),i=i||e.document.readyState==="loading"&&"parse"||"mutation",{target:n,entrants:t,exits:r,type:"observation",event:i}}function Qt(n,t){let r=this,{webqit:e,document:i,Node:o,CharacterData:s,Element:l,HTMLElement:c,HTMLTemplateElement:f,DocumentFragment:a}=r;e.realdom.domInterceptionHooks||Object.defineProperty(e.realdom,"domInterceptionHooks",{value:new Map}),e.realdom.domInterceptionNoRecurse||Object.defineProperty(e.realdom,"domInterceptionNoRecurse",{value:new Map}),e.realdom.domInterceptionHooks.has(n)||e.realdom.domInterceptionHooks.set(n,new Set),e.realdom.domInterceptionHooks.get(n).add(t);let m=()=>e.realdom.domInterceptionHooks.get(n).delete(t);if(e.realdom.domInterceptionHooks?.intercepting)return m;console.warn("DOM mutation APIs are now being intercepted."),e.realdom.domInterceptionHooks.intercepting=!0,Object.defineProperty(e.realdom,"domInterceptionRecords",{value:new Map});let u=(p,y,_)=>{e.realdom.domInterceptionNoRecurse.set(p,y);let h=_();return e.realdom.domInterceptionNoRecurse.delete(p),h},d=(p,y)=>{p.entrants.concat(p.exits).forEach(h=>{clearTimeout(e.realdom.domInterceptionRecords.get(h)?.timeout),e.realdom.domInterceptionRecords.set(h,p.event);let C=setTimeout(()=>{e.realdom.domInterceptionRecords.delete(h)},0);Object.defineProperty(p.event,"timeout",{value:C,configurable:!0})}),e.realdom.domInterceptionHooks.get("intercept")?.forEach(h=>h(p));let _=y();return e.realdom.domInterceptionHooks.get("sync")?.forEach(h=>h(p)),_},w={ShadowRoot:["innerHTML","setHTMLUnsafe"],DocumentFragment:["replaceChildren","append","prepend"],Document:["replaceChildren","append","prepend"],HTMLElement:["outerText","innerText"],Element:["append","prepend","before","after","insertAdjacentElement","insertAdjacentHTML","remove","replaceChildren","replaceWith","setHTMLUnsafe","innerHTML","outerHTML"],CharacterData:["before","after","remove","replaceWith"],Node:["insertBefore","replaceChild","removeChild","appendChild","textContent","nodeValue"]},O={ShadowRoot:Object.create(null),DocumentFragment:Object.create(null),Document:Object.create(null),HTMLElement:Object.create(null),Element:Object.create(null),CharacterData:Object.create(null),Node:Object.create(null)};return new Set(Object.values(w).reduce((p,y)=>p.concat(y),[])).forEach(p=>{Object.keys(w).forEach(h=>{if(!w[h].includes(p))return;let C=Object.getOwnPropertyDescriptor(r[h].prototype,p);!C||(Object.defineProperty(r[h].prototype,p,"value"in C?{...C,value:y}:{...C,set:_}),O[h][p]=C)});function y(...h){let C=Object.keys(O).find(j=>this instanceof r[j]&&p in O[j]),U=O[C],T=()=>U[p].value.call(this,...h);if(e.realdom.domInterceptionNoRecurse.get(this)===p)return T();let E=[],S=[],H=this;["insertBefore"].includes(p)?S=[h[0]]:["insertAdjacentElement","insertAdjacentHTML"].includes(p)?(S=[h[1]],["beforebegin","afterend"].includes(h[0])&&(H=this.parentNode)):["setHTMLUnsafe","replaceChildren"].includes(p)?(E=[...this.childNodes],S=p==="replaceChildren"?[...h]:[h[0]]):["replaceWith","remove"].includes(p)?(E=[this],S=p==="replaceWith"?[...h]:[],H=this.parentNode):["replaceChild"].includes(p)?(E=[h[1]],S=[h[0]]):["removeChild"].includes(p)?E=[...h]:(S=[...h],["before","after"].includes(p)&&(H=this.parentNode));let ct=p;if(["insertAdjacentHTML","setHTMLUnsafe"].includes(p)){let j=this.nodeName;if(p==="insertAdjacentHTML"&&["beforebegin","afterend"].includes(h[0])){if(!this.parentNode)return U[p].value.call(this,...h);j=this.parentNode.nodeName}let k=i.createElement(j.includes("-")?"div":j);U.setHTMLUnsafe.value.call(k,S[0],p==="setHTMLUnsafe"?h[1]:{}),S=[...k.childNodes],p==="insertAdjacentHTML"?(ct="insertAdjacentElement",h[1]=new a,u(h[1],"append",()=>h[1].append(...k.childNodes))):(ct="replaceChildren",h=[...k.childNodes])}return d({target:H,entrants:S,exits:E,type:"interception",event:[this,p]},()=>U[ct].value.call(this,...h))}function _(h){let C=Object.keys(O).find(V=>this instanceof r[V]&&p in O[V]),U=O[C],T=()=>U[p].set.call(this,h);if(this instanceof HTMLScriptElement||e.realdom.domInterceptionNoRecurse.get(this)===p)return T();let E=[],S=[],H=this;if(["outerHTML","outerText"].includes(p)?(E=[this],H=this.parentNode):this instanceof f?(H=this.content,E=[...this.content.childNodes]):E=[...this.childNodes],["outerHTML","innerHTML"].includes(p)){let V=this.nodeName;if(p==="outerHTML"){if(!this.parentNode)return T();V=this.parentNode.nodeName}let j=i.createElement(V.includes("-")?"div":V);if(u(j,p,()=>j[p]=h),S=this instanceof f?[...j.content.childNodes]:[...j.childNodes],this instanceof f&&this.hasAttribute("src")||this instanceof ShadowRoot){let k=B=>B.reduce((N,D)=>D instanceof HTMLScriptElement?N.concat(D):D instanceof f?N.concat(k([D.content])):(N=N.concat(k([...D.querySelectorAll?.("template")||[]].map(le=>le.content))),N.concat(...D.querySelectorAll?.("script")||[])),[]);for(let B of k(S)){if(this instanceof ShadowRoot){B.setAttribute("data-handling","manual");continue}let N=i.createElement("script");[...B.attributes].forEach(D=>N.setAttribute(D.name,D.value)),N.textContent=B.textContent,u(B,"replaceWith",()=>B.replaceWith(N))}}p==="outerHTML"?(h=new a,u(h,"append",()=>h.append(...S)),T=()=>u(this,"replaceWith",()=>l.prototype.replaceWith.call(this,h))):this instanceof f?T=()=>u(this.content,"replaceChildren",()=>this.content.replaceChildren(...S)):T=()=>u(this,"replaceChildren",()=>l.prototype.replaceChildren.call(this,...S))}return d({target:H,entrants:S,exits:E,type:"interception",event:[this,p]},T)}}),m}function Jt(){Ae.call(this),Ce.call(this),Ee.call(this)}function Ae(){let n=this;n.CSS||(n.CSS={}),n.CSS.escape||(n.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}function Ce(){let n=this;"isConnected"in n.Node.prototype||Object.defineProperty(n.Node.prototype,"isConnected",{get:function(){return!this.ownerDocument||!(this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}function Ee(){let n=this;n.Element.prototype.matches||(n.Element.prototype.matches=n.Element.prototype.matchesSelector||n.Element.prototype.mozMatchesSelector||n.Element.prototype.msMatchesSelector||n.Element.prototype.oMatchesSelector||n.Element.prototype.webkitMatchesSelector||function(t){for(var r=(this.document||this.ownerDocument).querySelectorAll(t),e=r.length;--e>=0&&r.item(e)!==this;);return e>-1})}function Yt(){let n=this;if(n.webqit||(n.webqit={}),n.webqit.realdom)return n.webqit.realdom;n.webqit.realdom={},Jt.call(n),n.webqit.realdom.meta=(...r)=>Te.call(n,...r),n.webqit.realdom.ready=(...r)=>Et.call(n,...r),n.webqit.realdom.realtime=(r,e="dom")=>{if(e==="dom")return new nt(r,n);if(e==="attr")return new W(r,n)};let t=new et(n);return n.webqit.realdom.schedule=(r,...e)=>t[`on${r}`](...e),n.webqit.realdom.synthesizeWhile=(...r)=>t.synthesizeWhile(...r),n.webqit.realdom}function Et(...n){let t="interactive",r;Q(n[0])?(t=n[0],b(n[1])&&(r=n[1])):b(n[0])&&(r=n[0]);let e={interactive:["interactive","complete"],complete:["complete"]};if(!e[t])throw new Error(`Invalid ready-state timing: ${t}.`);let i=this;if(!r)return i.webqit.realdom.readyStatePromises||(i.webqit.realdom.readyStatePromises={interactive:new Promise(o=>Et.call(this,"interactive",o)),complete:new Promise(o=>Et.call(this,"complete",o))}),i.webqit.realdom.readyStatePromises[t];if(e[t].includes(i.document.readyState))return r(i);i.webqit.realdom.readyStateCallbacks||(i.webqit.realdom.readyStateCallbacks={interactive:[],complete:[]},i.document.addEventListener("readystatechange",()=>{let o=i.document.readyState;for(let s of i.webqit.realdom.readyStateCallbacks[o].splice(0))s(i)},!1)),i.webqit.realdom.readyStateCallbacks[t].push(r)}function Te(n){let t=this,r={},e;return(e=t.document.querySelector(`meta[name="${n}"]`))&&(r=(e.content||"").split(";").filter(i=>i).reduce((i,o)=>{let s=o.split("=").map(l=>l.trim());return St(i,s[0].split("."),s[1]==="true"?!0:s[1]==="false"?!1:I(s[1])?parseInt(s[1]):s[1]),i},{})),{get name(){return n},get content(){return e.content},json(){return JSON.parse(JSON.stringify(r))}}}function pt(n,t){return typeof n!="string"?n:n.replace(/\w\S*/g,function(r){return r.charAt(0).toUpperCase()+(typeof t!==void 0&&t?r.substr(1).toLowerCase():r.substr(1))})}var F=(...n)=>P("oohtml",...n),M={};function Pt(n,t,r){let e=this,i=Yt.call(e);M.window=e,e.webqitConfig||(e.webqitConfig=i.meta("webqit").json()),e.webqit||(e.webqit={}),e.webqit.oohtml||(e.webqit.oohtml={}),e.webqit.oohtml.configs||(e.webqit.oohtml.configs={});let o=n.toUpperCase().replace("-","_");if(!e.webqit.oohtml.configs[o]){e.webqit.oohtml.configs[o]={};let s=e.webqit.oohtml.configs[o];K(2,s,r,t,i.meta(n).json()),e.webqitConfig.prefix&&Object.keys(s).forEach(l=>{Object.keys(s[l]).forEach(c=>{l==="api"&&typeof s[l][c]=="string"?s[l][c]=`${e.webqitConfig.prefix}${pt(s[l][c])}`:["attr","elements"].includes(l)&&s[l][c]?.startsWith("data-")===!1&&(s[l][c]=`${e.webqitConfig.prefix}-${s[l][c]}`)})})}return{config:e.webqit.oohtml.configs[o],realdom:i,window:e}}function Kt(n,t){return[...n].reduce(([r,e,i],o)=>!r&&e===0&&(Array.isArray(t)?t:[t]).includes(o)?[r,e,[""].concat(i)]:(!r&&["(","[","{"].includes(o)&&!i[0].endsWith("\\")&&e++,!r&&[")","]","}"].includes(o)&&!i[0].endsWith("\\")&&e--,['"',"'","`"].includes(o)&&!i[0].endsWith("\\")&&(r=r===o?null:r||o),i[0]+=o,[r,e,i]),[null,0,[""]])[2].reverse()}var qe=()=>(0|Math.random()*9e6).toString(36),Tt=new Map;function ht(n){let t;return(t=Tt.get(n))||(t=qe(),Tt.set(n,t)),t}function te(n){let t;return Tt.forEach((r,e)=>{r===n&&(t=e)}),t}function ee(){let{window:n}=M,{webqit:t}=n;if(t.DOMContextRequestEvent)return t.DOMContextRequestEvent;class r extends n.Event{constructor(...i){let o=i.pop();if(typeof o!="function")throw new Error("Callback must be provided.");let s=i.pop();if(!s?.kind)throw new Error('"options.kind" must be specified.');let l=["contextrequest","contextclaim"],c=i.pop()||l[0];if(!l.includes(c))throw new Error(`Invalid event type. Must be one of: ${l.join(",")}`);let{kind:f,detail:a,targetContext:m,live:u,signal:d,diff:w,...O}=s;super(c,{...O,bubbles:O.bubbles!==!1}),Object.defineProperty(this,"callback",{get:()=>o}),Object.defineProperty(this,"kind",{get:()=>f}),Object.defineProperty(this,"targetContext",{get:()=>m}),Object.defineProperty(this,"detail",{get:()=>a}),Object.defineProperty(this,"live",{get:()=>u}),Object.defineProperty(this,"signal",{get:()=>d}),Object.defineProperty(this,"diff",{get:()=>w}),Object.defineProperty(this,"options",{get:()=>O}),Object.defineProperty(this,"meta",{value:{}})}get target(){return super.target||this.meta.target}get answered(){return this.meta.answered||!1}respondWith(i){if(this.meta.answered=!0,this.diff){if("_prevValue"in this&&this._prevValue===i)return;Object.defineProperty(this,"_prevValue",{value:i,configurable:!0})}return this.callback(i)}}return t.DOMContextRequestEvent=r,r}var it=class extends AbortController{constructor(t){super(),t(r=>{let{window:{webqit:{Observer:e}}}=M;e.defineProperty(this,"value",{value:r,configurable:!0,enumerable:!0})},this)}};var ot=class extends Error{};var st=new Map,lt=class{static instance(t){return F(t).get("contexts::instance")||new this(t)}constructor(t){F(t).get("contexts::instance")?.dispose(),F(t).set("contexts::instance",this);let r={host:t,contexts:new Set};Object.defineProperty(this,"#",{get:()=>r})}get[Symbol.iterator](){return this["#"].contexts[Symbol.iterator]}get length(){return this["#"].contexts.size}find(...t){return[...this["#"].contexts].find(r=>typeof t[0]=="function"?t[0](r):r.constructor.kind===t[0]&&(t.length===1||r.detail===t[1]))}attach(t){if(!(t instanceof z))throw new TypeError("Context is not a valid DOMContext instance.");if(this.find(t.constructor.kind,t.detail))throw new ot(`Context of same kind "${t.constructor.kind}"${t.detail?` and detail "${t.detail}"`:""} already exists.`);this["#"].contexts.add(t),t.initialize(this["#"].host)}detach(t){t.dispose(this["#"].host),this["#"].contexts.delete(t)}request(...t){return new it((r,e)=>{typeof t[t.length-1]!="function"&&(t[t.length-1]?t.push(r):t[t.length-1]=r);let i;(i=t.find(c=>typeof c=="object"&&c))&&i.live&&(i.signal&&i.signal.addEventListener("abort",()=>e.abort()),t[t.indexOf(i)]={...i,signal:e.signal});let o=new(ee())(...t);o.meta.target=this["#"].host;let s=this["#"].host.getRootNode(),l=c=>{if(c.stopImmediatePropagation(),c.meta.target=c.target,!c.answered){if(st.get(s)||st.set(s,new Set),c.type==="contextrequest"&&c.live)st.get(s).add(c);else if(c.type==="contextclaim"){let f=new Set;return st.get(s).forEach(a=>{!this["#"].host.contains(a.target)||!c.detail.matchEvent(a)||(st.get(s).delete(a),f.add(a))}),c.respondWith(f)}}};s.addEventListener(o.type,l),this["#"].host.dispatchEvent(o),s.removeEventListener(o.type,l)})}};var It=class{static createRequest(){return{kind:this.kind}}constructor(t=null){Object.defineProperty(this,"detail",{get:()=>t}),Object.defineProperty(this,"subscriptions",{value:new Set})}get configs(){let{window:{webqit:{oohtml:{configs:t}}}}=M;return t}get name(){return[M.window.Document,M.window.ShadowRoot].some(t=>this.host instanceof t)?1/0:this.host.getAttribute(this.configs.CONTEXT_API.attr.contextname)}subscribed(t){}handle(t){}unsubscribed(t){}matchEvent(t){return t.kind===this.constructor.kind&&(!t.targetContext||t.targetContext===this.name)}handleEvent(t){if(!(this.disposed||typeof t.respondWith!="function")){if(t.type==="contextclaim"){if(!(t.detail instanceof It)||t.target===this.host)return;let r=new Set;if(this.subscriptions.forEach(e=>{!t.target.contains(e.target)||!t.detail.matchEvent(e)||(this.subscriptions.delete(e),this.unsubscribed(e),r.add(e))}),r.size)return t.respondWith(r)}if(t.type==="contextrequest")return this.matchEvent(t)?(t.live&&(this.subscriptions.add(t),this.subscribed(t),t.signal?.addEventListener("abort",()=>{this.subscriptions.delete(t),this.unsubscribed(t)})),t.stopPropagation(),this.handle(t)):void 0}}initialize(t){this.host=t,this.disposed=!1,t.addEventListener("contextrequest",this),t.addEventListener("contextclaim",this);let{value:r}=lt.instance(t).request("contextclaim",{kind:this.constructor.kind,detail:this});return r?.forEach(e=>{this.subscriptions.add(e),this.subscribed(e),this.handle(e)}),this}dispose(t){return this.disposed=!0,t.removeEventListener("contextrequest",this),t.removeEventListener("contextclaim",this),this.subscriptions.forEach(r=>{this.subscriptions.delete(r),this.unsubscribed(r);let{target:e}=r;e.dispatchEvent(r)}),this}},z=It;gt(z,"kind");function je(n){let{lidrefPrefix:t,lidrefSeparator:r}=n.tokens;return{escape(e,i=1){return[...e].map(o=>/\w/.test(o)?o:i===2?`\\\\${o}`:`\\${o}`).join("")},lidrefPrefix(e=0){return e?this.escape(t,e):t},lidrefSeparator(e=0){return e?this.escape(r,e):r},isUuid(e,i=0){return e.startsWith(this.lidrefPrefix(i))&&e.includes(this.lidrefSeparator(i))},toUuid(e,i,o=0){return e.endsWith("-root")?i:`${this.lidrefPrefix(o)}${e}${this.lidrefSeparator(o)}${i}`},uuidToId(e,i=0){return this.isUuid(e)?e.split(this.lidrefSeparator(i))[1]:e},uuidToLidref(e,i=0){return this.isUuid(e)?`${this.lidrefPrefix(i)}${e.split(this.lidrefSeparator(i))[1]}`:e}}}function re(n,t,r=null,e=0){let i=this,{webqit:{oohtml:{configs:{NAMESPACED_HTML:o}}}}=i,s=je(o),l=new RegExp(`${r?":scope|":""}#(${s.lidrefPrefix(e+1)})?([\\w]+${s.lidrefSeparator(e+1)})?((?:[\\w-]|\\\\.)+)`,"g"),[c,f]=Kt(n,",").reduce(([m,u],d)=>{let w,O;return d=d.replace(l,(L,p,y,_,h)=>{if(w||(w=[...d.matchAll(/(["'])(?:(?=(\\?))\2.)*?\1/g)]),w.some(E=>h>E.index&&h+L.length<E.index+E[0].length))return L;if(L===":scope")return O=!0,r;let C=p&&!y;if(p&&y)return`#${s.escape(L.replace("#",""),1)}`;if(C&&o.attr.lid==="id"&&t&&!t.endsWith("-root"))return`#${s.toUuid(t,_,1)}`;let T;return o.attr.lid==="id"?T=`:is(#${_},[id^="${s.lidrefPrefix(e)}"][id$="${s.lidrefSeparator(e)}${_}"])`:T=`:is(#${_},[${i.CSS.escape(o.attr.lid)}="${_}"])`,C?`:is(${T}):not(${r?r+" ":""}${o.namespaceSelector} *)`:T}),O?[m,u.concat(d)]:[m.concat(d),u]},[[],[]]),a;return r&&c.length?a=[c.length>1?`${r} :is(${c.join(", ")})`:`${r} ${c[0]}`,f.join(", ")].filter(m=>m).join(", "):a=[...c,...f].join(", "),a}function $e(n){let t=this;if(!F(n).has("namespace")){let r=Object.create(null);F(n).set("namespace",r);let e=[t.Document,t.ShadowRoot].some(i=>n instanceof i);Object.defineProperty(r,Symbol.toStringTag,{get(){return e?"RootNamespaceRegistry":"NamespaceRegistry"}})}return F(n).get("namespace")}function ne(n,t=!1){let r=this,{webqit:{oohtml:{configs:{NAMESPACED_HTML:e}}}}=r,i=[r.Document,r.ShadowRoot].some(o=>n instanceof o);return $e.call(r,i?n:(t?n.parentNode:n)?.closest?.(e.namespaceSelector)||n.getRootNode())}function ie(n){let t=Object.prototype.toString.call(n)==="[object RootNamespaceRegistry]";return(te(n)||ht(n))+(t?"-root":"")}function jt({advanced:n={},...t}){let{config:r,window:e}=Pt.call(this,"scoped-css",t,{api:{styleSheets:"styleSheets"},style:{retention:"retain",mimeTypes:"text/css",strategy:null}});r.styleSelector=(Array.isArray(r.style.mimeTypes)?r.style.mimeTypes:r.style.mimeTypes.split("|")).concat("").reduce((i,o)=>{let s=o?`[type="${e.CSS.escape(o)}"]`:":not([type])";return i.concat(`style${s}`)},[]).join(","),e.webqit.oohtml.Style={compileCache:new Map},Me.call(e,r),Le.call(e,r)}function Me(n){let t=this,r=new Map;[t.Element.prototype].forEach(e=>{let i="Element";if(n.api.styleSheets in e)throw new Error(`The ${i} prototype already has a "${n.api.styleSheets}" API!`);Object.defineProperty(e,n.api.styleSheets,{get:function(){return r.has(this)||r.set(this,[]),r.get(this)}})}),Object.defineProperty(t.HTMLStyleElement.prototype,"scoped",{configurable:!0,get(){return this.hasAttribute("scoped")},set(e){this.toggleAttribute("scoped",e)}})}function Le(n){let t=this,{webqit:{oohtml:r,realdom:e}}=t,i=Object.getOwnPropertyDescriptor(globalThis,"window")?.get?.toString().includes("[native code]")??!1;t.CSS.supports||(t.CSS.supports=()=>!1);let o=new WeakSet;e.realtime(t.document).query(n.styleSelector,s=>{s.entrants.forEach(l=>{if(o.has(l))return;o.add(l);let c=ht(l.textContent),f=CSS.supports("selector(:has(a,b))"),a=l.scoped&&(f?`:has(> style[rand-${c}])`:`[rand-${c}]`),m=l.scoped&&t.CSSScopeRule&&!1,u=l.scoped&&l.parentNode||l.getRootNode();if(u instanceof t.Element){if(u[n.api.styleSheets].push(l),!i)return;(f?l:u).toggleAttribute(`rand-${c}`,!0)}if(!!i)if(l.scoped&&l.hasAttribute("shared")){let d;(d=r.Style.compileCache.get(c))||(d=Ne.call(t,l,null,m,a),r.Style.compileCache.set(c,d)),Object.defineProperty(l,"sheet",{value:d,configurable:!0}),l.textContent=`
|
|
1
|
+
(()=>{var le=Object.defineProperty;var ce=(n,t,r)=>t in n?le(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r;var ht=(n,t,r)=>(ce(n,typeof t!="symbol"?t+"":t,r),r);function x(n){return!Array.isArray(n)&&typeof n=="object"&&n}function g(n){return Array.isArray(n)}function gt(n,t,r=null){return g(t)?n.filter(e=>r?t.filter(i=>r(e,i)).length:t.indexOf(e)!==-1):[]}function P(n,...t){if(globalThis.webqit||(globalThis.webqit={}),globalThis.webqit.refs||Object.defineProperty(globalThis.webqit,"refs",{value:new J}),!arguments.length)return globalThis.webqit.refs;let r=globalThis.webqit.refs.get(n);r||(r=new J,globalThis.webqit.refs.set(n,r));let e,i;for(;e=t.shift();)(i=r)&&!(r=r.get(e))&&(r=new J,i.set(e,r));return r}var J=class extends Map{constructor(...t){super(...t),this.observers=new Set}set(t,r){let e=super.set(t,r);return this.fire("set",t,r,t),e}delete(t){let r=super.delete(t);return this.fire("delete",t),r}has(t){return this.fire("has",t),super.has(t)}get(t){return this.fire("get",t),super.get(t)}keyNames(){return Array.from(super.keys())}observe(t,r,e){let i={type:t,key:r,callback:e};return this.observers.add(i),()=>this.observers.delete(i)}unobserve(t,r,e){if(Array.isArray(t)||Array.isArray(r))throw new Error('The "type" and "key" arguments can only be strings.');for(let i of this.observers)!(ct([t,"*"],i.type)&&ct([r,"*"],i.key)&&i.callback===e)||this.observers.delete(i)}fire(t,r,...e){for(let i of this.observers)!(ct([t,"*"],i.type)&&ct([r,"*"],i.key))||i.callback(...e)}},ct=(n,t)=>Array.isArray(t)?gt(n,t).length:n.includes(t);function X(n){return typeof n=="function"}function Y(n){return n===null||n===""}function R(n){return arguments.length&&(n===void 0||typeof n>"u")}function S(n){return Array.isArray(n)||typeof n=="object"&&n||X(n)}function yt(n){return Y(n)||R(n)||n===!1||n===0||S(n)&&!Object.keys(n).length}function b(n){return X(n)||n&&{}.toString.call(n)==="[object function]"}function Z(n){return n instanceof Number||typeof n=="number"}function I(n){return Z(n)||n!==!0&&n!==!1&&n!==null&&n!==""&&!isNaN(n*1)}function Q(n){return n instanceof String||typeof n=="string"&&n!==null}function wt(n){return!Q(n)&&!R(n.length)}function at(n,...t){return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n}function bt(e,t){t=t||Object.prototype,t=t&&!g(t)?[t]:t;for(var r=[],e=e;e&&(!t||t.indexOf(e)<0)&&e.name!=="default";)r.push(e),e=e?Object.getPrototypeOf(e):null;return r}function _t(n,t){var r=[];return bt(n,t).forEach(e=>{at(r,...Object.getOwnPropertyNames(e))}),r}function $(n,t,r=!1,e=!1,i=!1){var o=0,s=n.shift();if((I(s)||s===!0||s===!1)&&(o=s,s=n.shift()),!n.length)throw new Error("_merge() requires two or more array/objects.");return n.forEach((l,c)=>{!S(l)&&!b(l)||(r?_t(l):Object.keys(l)).forEach(a=>{if(!!t(a,s,l,c)){var f=s[a],m=l[a];if((g(f)&&g(m)||x(f)&&x(m))&&(o===!0||o>0))s[a]=g(f)&&g(m)?[]:{},$([I(o)?o-1:o,s[a],f,m],t,r,e,i);else if(g(s)&&g(l))e?s[a]=m:s.push(m);else try{i?Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(l,a)):s[a]=l[a]}catch{}}})}),s}function K(...n){return $(n,(t,r,e)=>!0,!1,!1,!1)}function A(n,t=!0){return g(n)?n:!t&&x(n)?[n]:n!==!1&&n!==0&&yt(n)?[]:wt(n)?Array.prototype.slice.call(n):x(n)?Object.values(n):[n]}function tt(n,t,r={},e={}){t=A(t).slice();for(var i=n;!R(i)&&!Y(i)&&t.length;){var o=t.shift();if(!(r.get?r.get(i,o):S(i)?o in i:i[o])){e.exists=!1;return}i=r.get?r.get(i,o):i[o]}return e.exists=!0,i}function Ot(n,t,r,e={},i={}){let o=(f,m,u)=>i.set?i.set(f,m,u):(I(t[l])&&g(f)?f.push(u):f[m]=u,!0);t=A(t);for(var s=n,l=0;l<t.length;l++)if(l<t.length-1){if(!s||!S(s)&&!b(s))return!1;var c=tt(s,t[l],i);if(!S(c)){if(i.buildTree===!1)return!1;c=b(i.buildTree)?i.buildTree(l):I(t[l+1])?[]:{};var a=o(s,t[l],c);if(!a)return!1}s=c}else return o(s,t[l],r)}var et=class{constructor(t,r=!1){Object.defineProperty(this,"window",{value:t}),Object.defineProperty(this,"readCallbacks",{value:new Set}),Object.defineProperty(this,"writeCallbacks",{value:new Set}),Object.defineProperty(this,"_synthesis",{value:0,writable:!0}),!r&&this.window.requestAnimationFrame?this._loop():this._synthesis++}get synthesis(){return this._synthesis}async synthesizeWhile(t){this._synthesis++,this._fulfill();let r=await t();return this._synthesis--,r}_fulfill(){for(let t of this.readCallbacks)t(),this.readCallbacks.delete(t);for(let t of this.writeCallbacks)t(),this.writeCallbacks.delete(t)}_loop(){this.window.requestAnimationFrame(()=>{this._fulfill(),this._loop()})}onread(t,r=!1){if(r)return new Promise(e=>{this.synthesis?e(t()):this.readCallbacks.add(()=>{e(t())})});this.synthesis?Promise.resolve().then(t):this.readCallbacks.add(t)}onwrite(t,r=!1){if(r)return new Promise(e=>{this.synthesis?e(t()):this.writeCallbacks.add(()=>{e(t())})});this.synthesis?Promise.resolve().then(t):this.writeCallbacks.add(t)}cycle(t,r,e){this.onread(()=>{let i=t(e),o=s=>{s!==void 0&&this.onwrite(()=>{let l=r(s,e),c=a=>{a!==void 0&&this.cycle(t,r,a)};l instanceof Promise?l.then(c):c(l)})};i instanceof Promise?i.then(o):o(i)})}};function Rt(n){return(n=n.trim())&&n.startsWith("(")&&n.endsWith(")")}function ut(n,t,r,e=!0){r=(Array.isArray(r)?r:[r]).map(s=>(s+"").replace("(",e?"(.//":"(./")).join("|");let i=[],o;try{let s=n.document.evaluate(r,t,null,n.XPathResult.ANY_TYPE);for(;o=s.iterateNext();)i.push(o)}catch{}return i}function Ht(n,t,r){r=(Array.isArray(r)?r:[r]).map(e=>(e+"").replace("(","(self::")).join("|");try{return n.document.evaluate(`${r}`,t,null,n.XPathResult.BOOLEAN_TYPE).booleanValue}catch{}}function rt(n,t,r,e=!1,i=null){let o=i?.get(t)?.get(r);if(typeof o<"u")return o;let s=a=>(i?.has(t)||i?.set(t,new WeakMap),i?.get(t)?.set(r,a),a),l=t.getRootNode(),c=r.getRootNode();return l===c?s(t.contains(r)):e&&c instanceof n.ShadowRoot?s(rt(n,t,c.host,e,i)):s(!1)}function kt(n,t="|"){return[...n].reduce(([r,e,i,o],s)=>!r&&e===0&&(Array.isArray(t)?t:[t]).includes(s)?[r,e,[""].concat(i)]:(!r&&["(","[","{"].includes(s)&&!i[0].endsWith("\\")&&e++,!r&&[")","]","}"].includes(s)&&!i[0].endsWith("\\")&&e--,['"',"'","`"].includes(s)&&!i[0].endsWith("\\")&&(r=r===s?null:r||s),i[0]+=s,[r,e,i]),[null,0,[""]])[2].reverse()}var q=class{constructor(t){this.content=t,this.type=typeof t=="string"?"selector":"instance",this.kind=this.type==="instance"?null:Rt(t)?"xpath":"css",this.kind==="xpath"&&(this.isXpathAttr=kt(t.trim().slice(1,-1),"@").length>1)}toString(){return this.content}};var G=class{constructor(t,r,e){this.context=t,this.namespace=r,this.window=t.defaultView||t.ownerDocument?.defaultView||e,this.document=this.window.document,this.webqit=this.window.webqit,Object.defineProperty(this,"#",{value:{}})}resolveArgs(t){if(b(t[0])?t=[[],...t]:x(t[0])&&!(t[0]instanceof q)&&t.length===1?t=[[],void 0,t[0]]:x(t[1])&&t.length===2?t=[A(t[0],!1),void 0,t[1]]:t[0]=A(t[0],!1),t[0].filter(r=>typeof r!="string"&&!(r instanceof q)&&!(r instanceof this.window.Node)).length)throw new Error("Argument #2 must be either a string or a Node object, or a list of those.");return t[0]=t[0].map(r=>r instanceof q?r:new q(r)),t}registry(...t){return P("realdom.realtime",this.window,this.namespace,...t)}createSignalGenerator(){return{generate(){return this.lastController?.abort(),this.lastController=new AbortController,{signal:this.lastController.signal}},disconnect(){this.lastController?.abort()}}}forEachMatchingContext(t,r,e){let{window:i}=this,o=new Set,s=new WeakMap;for(let[l,c]of this.registry(t)){let a=[].concat(r).filter(m=>rt(i,l.context,m.target,l.params.subtree==="cross-roots",s));if(!a.length)continue;let f=[l,Array.isArray(r)?a:a[0]];c?o.add(f):e.call(i,...f)}for(let l of o)e.call(i,...l);o.clear()}disconnectables(t,...r){let e={disconnect(){r.forEach(i=>i&&b(i.disconnect)&&i.disconnect()||b(i)&&i()||x(i)&&(i.disconnected=!0))}};return t&&t.addEventListener("abort",()=>e.disconnect()),e}};var W=class extends G{type="attr";constructor(t,...r){super(t,"attr",...r)}get(t,r=void 0,e={}){let i=typeof t=="string"||t instanceof q;[t=[],r=void 0,e={}]=this.resolveArgs(arguments);let{context:o}=this,s=Vt(o,t);if(!r)return s;let l=e.lifecycleSignals&&this.createSignalGenerator();if(i)for(let c of s){let a=l?.generate()||{};r(c,a,o)}else{let c=l?.generate()||{};r(s,c,o)}if(e.live){l&&(e={...e,signalGenerator:l});let c=this.observe(i?t[0]:t,r,{newValue:!0,...e});return this.disconnectables(e.signal,c)}}observe(t,r,e={}){let i=typeof t=="string"||t instanceof q;if([t=[],r,e={}]=this.resolveArgs(arguments),["sync","intercept"].includes(e.timing))return this.observeSync(i?t[0]:t,r,e);if(e.timing&&e.timing!=="async")throw new Error(`Timing option "${e.timing}" invalid.`);let{context:o,window:s,webqit:l}=this;e.eventDetails&&!l.realdom.attrInterceptionHooks?.intercepting&&Ft.call(s,"intercept",()=>{});let c=new s.MutationObserver(u=>{u=Ut(u).map(d=>Bt.call(s,d)),Wt.call(s,m,u,o)}),a={attributes:!0,attributeOldValue:e.oldValue,subtree:e.subtree&&!0};t.length&&(a.attributeFilter=t.map(u=>u+"")),c.observe(o,a);let f=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),m={context:o,spec:t,callback:r,params:e,atomics:new Map,originalFilterIsString:i,signalGenerator:f,disconnectable:c};return this.disconnectables(e.signal,c,f)}observeSync(t,r,e={}){let i=typeof t=="string"||t instanceof q;[t,r,e={}]=this.resolveArgs(arguments);let{context:o,window:s}=this;if(e.timing&&!["sync","intercept"].includes(e.timing))throw new Error(`Timing option "${e.timing}" invalid.`);let l=e.timing==="intercept"?"intercept":"sync";this.registry(l).size||Ft.call(s,l,u=>{this.forEachMatchingContext(l,u,Wt)});let c={disconnect(){m.delete(f)}},a=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),f={context:o,spec:t,callback:r,params:e,atomics:new Map,originalFilterIsString:i,signalGenerator:a,disconnectable:c},m=this.registry(l);return m.set(f,!!f.params.deferred),this.disconnectables(e.signal,c,a)}};function Ut(n){return n.reduce((t,r,e)=>t[e-1]?.attributeName===r.attributeName||P(r.target,"internalAttrInteractions").get(r.attributeName)?t:t.concat(r),[])}function Wt(n,t){let{context:r,spec:e,callback:i,params:o,atomics:s,originalFilterIsString:l,signalGenerator:c}=n,a=e.map(u=>u+"");if(o.atomic&&!s.size?t=Vt(r,e,t):o.timing!=="async"&&e.length&&(t=t.filter(u=>a.includes(u.name))),!t.length)return;o.newValue===null&&o.oldValue===null&&o.eventDetails||(t=t.map(u=>{let d;return o.eventDetails||({event:d,...u}=u),!o.oldValue&&"oldValue"in u&&({oldValue:d,...u}=u),!o.newValue&&"value"in u?{value:d,...u}=u:o.newValue&&typeof u.value>"u"&&(u={...u,value:mt(u.target,u.name,()=>u.target.getAttribute(u.name))}),u})),o.atomic&&(t.forEach(u=>s.set(u.name,u)),t=Array.from(s.entries()).map(([,u])=>u));let f=l?t[0]:t,m=c?.generate()||{};i(f,m,r)}function mt(n,t,r){let e=P(n,"internalAttrInteractions").get(t);P(n,"internalAttrInteractions").set(t,!0);let i=r();return P(n,"internalAttrInteractions").set(t,e),i}function Vt(n,t,r=[]){let e={event:null,type:"attribute"};return t.length?t.map(o=>(o=o+"",r.find(s=>s.name===o)||{target:n,name:o,value:mt(n,o,()=>n.getAttribute(o)),...e})):Array.from(n.attributes).map(o=>r.find(s=>s.name===o.nodeName)||{target:n,name:o.nodeName,value:mt(n,o.nodeName,()=>o.nodeValue),...e})}function Bt({target:n,attributeName:t,value:r,oldValue:e}){let s=(this.webqit.realdom.attrInterceptionRecords?.get(n)||{})[t]?.[0]||"mutation";return{target:n,name:t,value:r,oldValue:e,type:"observation",event:s}}function Ft(n,t){let r=this,{webqit:e,document:i,Element:o}=r;e.realdom.attrInterceptionHooks||Object.defineProperty(e.realdom,"attrInterceptionHooks",{value:new Map}),e.realdom.attrInterceptionHooks.has(n)||e.realdom.attrInterceptionHooks.set(n,new Set),e.realdom.attrInterceptionHooks.get(n).add(t);let s=()=>e.realdom.attrInterceptionHooks.get(n).delete(t);if(e.realdom.attrInterceptionHooks?.intercepting)return s;console.warn("Attr mutation APIs are now being intercepted."),e.realdom.attrInterceptionHooks.intercepting=!0,Object.defineProperty(e.realdom,"attrInterceptionRecords",{value:new Map});let l=(f,m)=>{e.realdom.attrInterceptionRecords.has(f.target)||e.realdom.attrInterceptionRecords.set(f.target,{});let u=e.realdom.attrInterceptionRecords.get(f.target);if(u[f.name]=u[f.name]||[],u[f.name].unshift(f.event),P(f.target,"internalAttrInteractions").get(f.name))return m();e.realdom.attrInterceptionHooks.get("intercept")?.forEach(w=>w([f]));let d=m();return e.realdom.attrInterceptionHooks.get("sync")?.forEach(w=>w([f])),d};new r.MutationObserver(f=>{f=f.filter(m=>!(r.webqit.realdom.attrInterceptionRecords?.get(m.target)||{})[m.attributeName]?.shift()),f=Ut(f).map(m=>Bt.call(r,m)),f.length&&(e.realdom.attrInterceptionHooks.get("intercept")?.forEach(m=>m(f)),e.realdom.attrInterceptionHooks.get("sync")?.forEach(m=>m(f)))}).observe(i,{attributes:!0,subtree:!0,attributeOldValue:!0});let a=Object.create(null);return["setAttribute","removeAttribute","toggleAttribute"].forEach(f=>{a[f]=o.prototype[f],o.prototype[f]=function(...m){let u,d=mt(this,m[0],()=>this.getAttribute(m[0]));["setAttribute","toggleAttribute"].includes(f)&&(u=m[1]),f==="toggleAttribute"&&u===void 0&&(u=d===null);let w={target:this,name:m[0],value:u,oldValue:d,type:"interception",event:[this,f]};return l(w,()=>a[f].call(this,...m))}}),s}var nt=class extends G{constructor(t,...r){super(t,"tree",...r)}attr(t,r=void 0,e={}){let{context:i,window:o}=this;return new W(i,o).get(...arguments)}query(t,r=void 0,e={}){[t,r=void 0,e={}]=this.resolveArgs(arguments);let{context:i}=this,o=new Map,s=a=>(o.has(a)||o.set(a,{target:a,entrants:[],exits:[],type:"query",event:null}),o.get(a));if(!e.generation||e.generation==="entrants"){if(!t.length)[...i.children].forEach(a=>s(i).entrants.push(a));else if(t.every(a=>a.type==="selector")){let[a,f]=t.reduce(([u,d],w)=>w.kind==="xpath"?[u,d.concat(w)]:[u.concat(w),d],[[],[]]),m=[];e.subtree?(a.length&&m.push(...i.querySelectorAll(a.join(","))),f.length&&m.push(...ut(this.window,i,f))):(a.length&&m.push(...[...i.children].filter(u=>u.matches(a))),f.length&&m.push(...ut(this.window,i,f,!1))),m.forEach(u=>s(u.parentNode||i).entrants.push(u))}}if(!r)return o;let l={disconnected:!1},c=r&&e.lifecycleSignals&&this.createSignalGenerator();for(let[,a]of o){if(l.disconnected)break;let f=c?.generate()||{};r(a,f,i)}if(e.live){c&&(e={...e,signalGenerator:c});let a=this.observe(t,r,e);return this.disconnectables(e.signal,l,a)}return this.disconnectables(e.signal,l,c)}children(t,r=void 0,e={}){return[t,r=void 0,e={}]=this.resolveArgs(arguments),this.query(t,r,{...e,subtree:!1})}subtree(t,r=void 0,e={}){return[t,r=void 0,e={}]=this.resolveArgs(arguments),this.query(t,r,{...e,subtree:!0})}observe(t,r,e={}){if([t,r,e={}]=this.resolveArgs(arguments),["sync","intercept"].includes(e.timing))return this.observeSync(t,r,e);if(e.timing&&e.timing!=="async")throw new Error(`Timing option "${e.timing}" invalid.`);let{context:i,window:o,webqit:s,document:l}=this;e.eventDetails&&(s.realdom.domInterceptionRecordsAlwaysOn=!0),(l.readyState==="loading"||s.realdom.domInterceptionRecordsAlwaysOn)&&!s.realdom.domInterceptionHooks?.intercepting&&Xt.call(o,"sync",()=>{});let c=new o.MutationObserver(m=>m.forEach(u=>{At.call(o,f,zt.call(o,u),i)}));c.observe(i,{childList:!0,subtree:e.subtree&&!0});let a=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),f={context:i,spec:t,callback:r,params:e,signalGenerator:a,disconnectable:c};if(e.staticSensitivity){let m=Gt.call(o,f);return this.disconnectables(e.signal,c,a,m)}return this.disconnectables(e.signal,c,a)}observeSync(t,r,e={}){[t,r,e={}]=this.resolveArgs(arguments);let{context:i,window:o}=this;if(e.timing&&!["sync","intercept"].includes(e.timing))throw new Error(`Timing option "${e.timing}" invalid.`);let s=e.timing==="intercept"?"intercept":"sync";this.registry(s).size||Xt.call(o,s,u=>{this.forEachMatchingContext(s,u,At)});let l=new o.MutationObserver(u=>u.forEach(d=>{Array.isArray((d=zt.call(o,d)).event)||At.call(o,f,d,i)}));l.observe(i,{childList:!0,subtree:e.subtree&&!0});let c={disconnect(){m.delete(f),l.disconnect()}},a=e.signalGenerator||e.lifecycleSignals&&this.createSignalGenerator(),f={context:i,spec:t,callback:r,params:e,signalGenerator:a,disconnectable:c},m=this.registry(s);if(m.set(f,!!f.params.deferred),e.staticSensitivity){let u=Gt.call(o,f);return this.disconnectables(e.signal,c,a,u)}return this.disconnectables(e.signal,c,a)}track(t,r,e={}){return e={subtree:!0,...e},this.observe(t,i=>{i.entrants.length&&r(!0,Array.isArray(t)?i.entrants:i.entrants[0]),i.exits.length&&r(!1,Array.isArray(t)?i.exits:i.exits[0])},e)}};function Gt(n){let t=this,{context:r,spec:e,callback:i,params:o,signalGenerator:s}=n,l=e.filter(d=>d.kind==="css"),c=d=>d.match(/\.([\w-]+)/g)?.length?["class"]:[],a=d=>d.match(/#([\w-]+)/g)?.length?["id"]:[],f=d=>[...d.matchAll(/\[([^\=\]]+)(\=[^\]]+)?\]/g)].map(w=>w[1]).concat(c(d)).concat(a(d));if(!(n.$attrs=Array.from(new Set(l.filter(d=>(d+"").includes("[")).reduce((d,w)=>d.concat(f(w+"")),[])))).length)return;let m=new Set,u=new Set;return m.push=d=>(u.delete(d),m.add(d)),u.push=d=>(m.delete(d),u.add(d)),n.$deliveryCache={entrants:m,exits:u},new W(r,t).observe(n.$attrs,d=>{let w=new Map,O=y=>(w.has(y)||w.set(y,{target:y,entrants:[],exits:[],type:"static",event:null}),w.get(y)),L=new WeakMap,p=y=>(L.has(y)||L.set(y,l.some(_=>y.matches(_+""))),L.get(y));for(let y of d)["entrants","exits"].forEach(_=>{o.generation&&_!==o.generation||n.$deliveryCache[_].has(y.target)||(_==="entrants"?!p(y.target):p(y.target))||(n.$deliveryCache[_].push(y.target),O(y.target)[_].push(y.target),O(y.target).event=y.event)});for(let[,y]of w){let _=s?.generate()||{};i(y,_,r)}},{subtree:o.subtree,timing:o.timing,eventDetails:o.eventDetails})}function At(n,t){let{context:r,spec:e,callback:i,params:o,signalGenerator:s,$deliveryCache:l}=n,c={...t,entrants:[],exits:[]};if(o.eventDetails||delete c.event,["entrants","exits"].forEach(f=>{if(!(o.generation&&f!==o.generation)&&(e.length?c[f]=ve.call(this,e,o.subtree==="cross-roots",t[f],t.event!=="parse"):c[f]=[...t[f]],!!l))for(let m of c[f])l[f].push(m)}),!c.entrants.length&&!c.exits.length)return;let a=s?.generate()||{};i(c,a,r)}function ve(n,t,r,e){r=Array.isArray(r)?r:[...r];let i=(o,s)=>{if(s.type==="selector"){let l=s.isXpathAttr?[]:o.filter(c=>s.kind==="xpath"?Ht(this,c,s+""):c.matches&&c.matches(s+""));if((e||s.isXpathAttr)&&(l=o.reduce((c,a)=>s.kind==="xpath"?[...c,...ut(this,a,s,e)]:a.querySelectorAll?[...c,...a.querySelectorAll(s+"")]:c,l)),l.length)return l}else if(o.includes(s.content)||e&&o.some(l=>rt(this,l,s.content,t)))return[s.content]};return r.$$searchCache||(r.$$searchCache=new Map),n.reduce((o,s)=>{let l;return r.$$searchCache.has(s.content)?l=r.$$searchCache.get(s.content):(l=i(r,s)||[],s.type==="instance"&&r.$$searchCache.set(s.content,l)),o.concat(l)},[])}function zt({target:n,addedNodes:t,removedNodes:r}){let e=this,i;return i=A(t).reduce((o,s)=>o||e.webqit.realdom.domInterceptionRecords?.get(s),null),i=A(r).reduce((o,s)=>o||e.webqit.realdom.domInterceptionRecords?.get(s),i),i=i||e.document.readyState==="loading"&&"parse"||"mutation",{target:n,entrants:t,exits:r,type:"observation",event:i}}function Xt(n,t){let r=this,{webqit:e,document:i,Node:o,CharacterData:s,Element:l,HTMLElement:c,HTMLTemplateElement:a,DocumentFragment:f}=r;e.realdom.domInterceptionHooks||Object.defineProperty(e.realdom,"domInterceptionHooks",{value:new Map}),e.realdom.domInterceptionNoRecurse||Object.defineProperty(e.realdom,"domInterceptionNoRecurse",{value:new Map}),e.realdom.domInterceptionHooks.has(n)||e.realdom.domInterceptionHooks.set(n,new Set),e.realdom.domInterceptionHooks.get(n).add(t);let m=()=>e.realdom.domInterceptionHooks.get(n).delete(t);if(e.realdom.domInterceptionHooks?.intercepting)return m;console.warn("DOM mutation APIs are now being intercepted."),e.realdom.domInterceptionHooks.intercepting=!0,Object.defineProperty(e.realdom,"domInterceptionRecords",{value:new Map});let u=(p,y,_)=>{e.realdom.domInterceptionNoRecurse.set(p,y);let h=_();return e.realdom.domInterceptionNoRecurse.delete(p),h},d=(p,y)=>{p.entrants.concat(p.exits).forEach(h=>{clearTimeout(e.realdom.domInterceptionRecords.get(h)?.timeout),e.realdom.domInterceptionRecords.set(h,p.event);let C=setTimeout(()=>{e.realdom.domInterceptionRecords.delete(h)},0);Object.defineProperty(p.event,"timeout",{value:C,configurable:!0})}),e.realdom.domInterceptionHooks.get("intercept")?.forEach(h=>h(p));let _=y();return e.realdom.domInterceptionHooks.get("sync")?.forEach(h=>h(p)),_},w={ShadowRoot:["innerHTML","setHTMLUnsafe"],DocumentFragment:["replaceChildren","append","prepend"],Document:["replaceChildren","append","prepend"],HTMLElement:["outerText","innerText"],Element:["append","prepend","before","after","insertAdjacentElement","insertAdjacentHTML","remove","replaceChildren","replaceWith","setHTMLUnsafe","innerHTML","outerHTML"],CharacterData:["before","after","remove","replaceWith"],Node:["insertBefore","replaceChild","removeChild","appendChild","textContent","nodeValue"]},O={ShadowRoot:Object.create(null),DocumentFragment:Object.create(null),Document:Object.create(null),HTMLElement:Object.create(null),Element:Object.create(null),CharacterData:Object.create(null),Node:Object.create(null)};return new Set(Object.values(w).reduce((p,y)=>p.concat(y),[])).forEach(p=>{Object.keys(w).forEach(h=>{if(!w[h].includes(p))return;let C=Object.getOwnPropertyDescriptor(r[h].prototype,p);!C||(Object.defineProperty(r[h].prototype,p,"value"in C?{...C,value:y}:{...C,set:_}),O[h][p]=C)});function y(...h){let C=Object.keys(O).find(j=>this instanceof r[j]&&p in O[j]),U=O[C],T=()=>U[p].value.call(this,...h);if(e.realdom.domInterceptionNoRecurse.get(this)===p)return T();let E=[],v=[],H=this;["insertBefore"].includes(p)?v=[h[0]]:["insertAdjacentElement","insertAdjacentHTML"].includes(p)?(v=[h[1]],["beforebegin","afterend"].includes(h[0])&&(H=this.parentNode)):["setHTMLUnsafe","replaceChildren"].includes(p)?(E=[...this.childNodes],v=p==="replaceChildren"?[...h]:[h[0]]):["replaceWith","remove"].includes(p)?(E=[this],v=p==="replaceWith"?[...h]:[],H=this.parentNode):["replaceChild"].includes(p)?(E=[h[1]],v=[h[0]]):["removeChild"].includes(p)?E=[...h]:(v=[...h],["before","after"].includes(p)&&(H=this.parentNode));let lt=p;if(["insertAdjacentHTML","setHTMLUnsafe"].includes(p)){let j=this.nodeName;if(p==="insertAdjacentHTML"&&["beforebegin","afterend"].includes(h[0])){if(!this.parentNode)return U[p].value.call(this,...h);j=this.parentNode.nodeName}let k=i.createElement(j.includes("-")?"div":j);U.setHTMLUnsafe.value.call(k,v[0],p==="setHTMLUnsafe"?h[1]:{}),v=[...k.childNodes],p==="insertAdjacentHTML"?(lt="insertAdjacentElement",h[1]=new f,u(h[1],"append",()=>h[1].append(...k.childNodes))):(lt="replaceChildren",h=[...k.childNodes])}return d({target:H,entrants:v,exits:E,type:"interception",event:[this,p]},()=>U[lt].value.call(this,...h))}function _(h){let C=Object.keys(O).find(V=>this instanceof r[V]&&p in O[V]),U=O[C],T=()=>U[p].set.call(this,h);if(this instanceof HTMLScriptElement||e.realdom.domInterceptionNoRecurse.get(this)===p)return T();let E=[],v=[],H=this;if(["outerHTML","outerText"].includes(p)?(E=[this],H=this.parentNode):this instanceof a?(H=this.content,E=[...this.content.childNodes]):E=[...this.childNodes],["outerHTML","innerHTML"].includes(p)){let V=this.nodeName;if(p==="outerHTML"){if(!this.parentNode)return T();V=this.parentNode.nodeName}let j=i.createElement(V.includes("-")?"div":V);if(u(j,p,()=>j[p]=h),v=this instanceof a?[...j.content.childNodes]:[...j.childNodes],this instanceof a&&this.hasAttribute("src")||this instanceof ShadowRoot){let k=B=>B.reduce((D,N)=>N instanceof HTMLScriptElement?D.concat(N):N instanceof a?D.concat(k([N.content])):(D=D.concat(k([...N.querySelectorAll?.("template")||[]].map(se=>se.content))),D.concat(...N.querySelectorAll?.("script")||[])),[]);for(let B of k(v)){if(this instanceof ShadowRoot){B.setAttribute("data-handling","manual");continue}let D=i.createElement("script");[...B.attributes].forEach(N=>D.setAttribute(N.name,N.value)),D.textContent=B.textContent,u(B,"replaceWith",()=>B.replaceWith(D))}}p==="outerHTML"?(h=new f,u(h,"append",()=>h.append(...v)),T=()=>u(this,"replaceWith",()=>l.prototype.replaceWith.call(this,h))):this instanceof a?T=()=>u(this.content,"replaceChildren",()=>this.content.replaceChildren(...v)):T=()=>u(this,"replaceChildren",()=>l.prototype.replaceChildren.call(this,...v))}return d({target:H,entrants:v,exits:E,type:"interception",event:[this,p]},T)}}),m}function Qt(){Se.call(this),Ae.call(this),Ce.call(this)}function Se(){let n=this;n.CSS||(n.CSS={}),n.CSS.escape||(n.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}function Ae(){let n=this;"isConnected"in n.Node.prototype||Object.defineProperty(n.Node.prototype,"isConnected",{get:function(){return!this.ownerDocument||!(this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}function Ce(){let n=this;n.Element.prototype.matches||(n.Element.prototype.matches=n.Element.prototype.matchesSelector||n.Element.prototype.mozMatchesSelector||n.Element.prototype.msMatchesSelector||n.Element.prototype.oMatchesSelector||n.Element.prototype.webkitMatchesSelector||function(t){for(var r=(this.document||this.ownerDocument).querySelectorAll(t),e=r.length;--e>=0&&r.item(e)!==this;);return e>-1})}function Jt(){let n=this;if(n.webqit||(n.webqit={}),n.webqit.realdom)return n.webqit.realdom;n.webqit.realdom={},Qt.call(n),n.webqit.realdom.meta=(...r)=>Ee.call(n,...r),n.webqit.realdom.ready=(...r)=>Ct.call(n,...r),n.webqit.realdom.realtime=(r,e="dom")=>{if(e==="dom")return new nt(r,n);if(e==="attr")return new W(r,n)};let t=new et(n);return n.webqit.realdom.schedule=(r,...e)=>t[`on${r}`](...e),n.webqit.realdom.synthesizeWhile=(...r)=>t.synthesizeWhile(...r),n.webqit.realdom}function Ct(...n){let t="interactive",r;Q(n[0])?(t=n[0],b(n[1])&&(r=n[1])):b(n[0])&&(r=n[0]);let e={interactive:["interactive","complete"],complete:["complete"]};if(!e[t])throw new Error(`Invalid ready-state timing: ${t}.`);let i=this;if(!r)return i.webqit.realdom.readyStatePromises||(i.webqit.realdom.readyStatePromises={interactive:new Promise(o=>Ct.call(this,"interactive",o)),complete:new Promise(o=>Ct.call(this,"complete",o))}),i.webqit.realdom.readyStatePromises[t];if(e[t].includes(i.document.readyState))return r(i);i.webqit.realdom.readyStateCallbacks||(i.webqit.realdom.readyStateCallbacks={interactive:[],complete:[]},i.document.addEventListener("readystatechange",()=>{let o=i.document.readyState;for(let s of i.webqit.realdom.readyStateCallbacks[o].splice(0))s(i)},!1)),i.webqit.realdom.readyStateCallbacks[t].push(r)}function Ee(n){let t=this,r={},e;return(e=t.document.querySelector(`meta[name="${n}"]`))&&(r=(e.content||"").split(";").filter(i=>i).reduce((i,o)=>{let s=o.split("=").map(l=>l.trim());return Ot(i,s[0].split("."),s[1]==="true"?!0:s[1]==="false"?!1:I(s[1])?parseInt(s[1]):s[1]),i},{})),{get name(){return n},get content(){return e.content},json(){return JSON.parse(JSON.stringify(r))}}}function dt(n,t){return typeof n!="string"?n:n.replace(/\w\S*/g,function(r){return r.charAt(0).toUpperCase()+(typeof t!==void 0&&t?r.substr(1).toLowerCase():r.substr(1))})}var F=(...n)=>P("oohtml",...n),M={};function Tt(n,t,r){let e=this,i=Jt.call(e);M.window=e,e.webqitConfig||(e.webqitConfig=i.meta("webqit").json()),e.webqit||(e.webqit={}),e.webqit.oohtml||(e.webqit.oohtml={}),e.webqit.oohtml.configs||(e.webqit.oohtml.configs={});let o=n.toUpperCase().replace("-","_");if(!e.webqit.oohtml.configs[o]){e.webqit.oohtml.configs[o]={};let s=e.webqit.oohtml.configs[o];K(2,s,r,t,i.meta(n).json()),e.webqitConfig.prefix&&Object.keys(s).forEach(l=>{Object.keys(s[l]).forEach(c=>{l==="api"&&typeof s[l][c]=="string"?s[l][c]=`${e.webqitConfig.prefix}${dt(s[l][c])}`:["attr","elements"].includes(l)&&s[l][c]?.startsWith("data-")===!1&&(s[l][c]=`${e.webqitConfig.prefix}-${s[l][c]}`)})})}return{config:e.webqit.oohtml.configs[o],realdom:i,window:e}}function Zt(n,t){return[...n].reduce(([r,e,i],o)=>!r&&e===0&&(Array.isArray(t)?t:[t]).includes(o)?[r,e,[""].concat(i)]:(!r&&["(","[","{"].includes(o)&&!i[0].endsWith("\\")&&e++,!r&&[")","]","}"].includes(o)&&!i[0].endsWith("\\")&&e--,['"',"'","`"].includes(o)&&!i[0].endsWith("\\")&&(r=r===o?null:r||o),i[0]+=o,[r,e,i]),[null,0,[""]])[2].reverse()}var Ie=()=>(0|Math.random()*9e6).toString(36),Et=new Map;function pt(n){let t;return(t=Et.get(n))||(t=Ie(),Et.set(n,t)),t}function Kt(n){let t;return Et.forEach((r,e)=>{r===n&&(t=e)}),t}function te(){let{window:n}=M,{webqit:t}=n;if(t.DOMContextRequestEvent)return t.DOMContextRequestEvent;class r extends n.Event{constructor(...i){let o=i.pop();if(typeof o!="function")throw new Error("Callback must be provided.");let s=i.pop();if(!s?.kind)throw new Error('"options.kind" must be specified.');let l=["contextrequest","contextclaim"],c=i.pop()||l[0];if(!l.includes(c))throw new Error(`Invalid event type. Must be one of: ${l.join(",")}`);let{kind:a,detail:f,targetContext:m,live:u,signal:d,diff:w,...O}=s;super(c,{...O,bubbles:O.bubbles!==!1}),Object.defineProperty(this,"callback",{get:()=>o}),Object.defineProperty(this,"kind",{get:()=>a}),Object.defineProperty(this,"targetContext",{get:()=>m}),Object.defineProperty(this,"detail",{get:()=>f}),Object.defineProperty(this,"live",{get:()=>u}),Object.defineProperty(this,"signal",{get:()=>d}),Object.defineProperty(this,"diff",{get:()=>w}),Object.defineProperty(this,"options",{get:()=>O}),Object.defineProperty(this,"meta",{value:{}})}get target(){return super.target||this.meta.target}get answered(){return this.meta.answered||!1}respondWith(i){if(this.meta.answered=!0,this.diff){if("_prevValue"in this&&this._prevValue===i)return;Object.defineProperty(this,"_prevValue",{value:i,configurable:!0})}return this.callback(i)}}return t.DOMContextRequestEvent=r,r}var it=class extends AbortController{constructor(t){super(),t(r=>{let{window:{webqit:{Observer:e}}}=M;e.defineProperty(this,"value",{value:r,configurable:!0,enumerable:!0})},this)}};var ot=class extends Error{};var st=class{static instance(t){return F(t).get("contexts::instance")||new this(t)}constructor(t){F(t).get("contexts::instance")?.dispose(),F(t).set("contexts::instance",this);let r={host:t,contexts:new Set};Object.defineProperty(this,"#",{get:()=>r})}get[Symbol.iterator](){return this["#"].contexts[Symbol.iterator]}get length(){return this["#"].contexts.size}find(...t){return[...this["#"].contexts].find(r=>typeof t[0]=="function"?t[0](r):r.constructor.kind===t[0]&&(!t[1]||r.detail===t[1]))}attach(t){if(!(t instanceof z))throw new TypeError("Context is not a valid DOMContext instance.");if(this.find(t.constructor.kind,t.detail))throw new ot(`Context of same kind "${t.constructor.kind}"${t.detail?` and detail "${t.detail}"`:""} already exists.`);this["#"].contexts.add(t),t.initialize(this["#"].host)}detach(t){t.dispose(this["#"].host),this["#"].contexts.delete(t)}request(...t){return new it((r,e)=>{typeof t[t.length-1]!="function"&&(t[t.length-1]?t.push(r):t[t.length-1]=r);let i;(i=t.find(s=>typeof s=="object"&&s))&&i.live&&(i.signal&&i.signal.addEventListener("abort",()=>e.abort()),t[t.indexOf(i)]={...i,signal:e.signal});let o=new(te())(...t);this["#"].host.dispatchEvent(o)})}};var Pt=class{static createRequest(){return{kind:this.kind}}constructor(t=null){Object.defineProperty(this,"detail",{get:()=>t}),Object.defineProperty(this,"subscriptions",{value:new Set})}get configs(){let{window:{webqit:{oohtml:{configs:t}}}}=M;return t}get name(){return[M.window.Document,M.window.ShadowRoot].some(t=>this.host instanceof t)?1/0:this.host.getAttribute(this.configs.CONTEXT_API.attr.contextname)}subscribed(t){}handle(t){}unsubscribed(t){}matchEvent(t){return t.kind===this.constructor.kind&&(!t.targetContext||t.targetContext===this.name)}handleEvent(t){if(!(this.disposed||typeof t.respondWith!="function")){if(t.type==="contextclaim"){if(!(t.detail instanceof Pt)||t.target===this.host)return;let r=new Set;if(this.subscriptions.forEach(e=>{!t.target.contains(e.target)||!t.detail.matchEvent(e)||(this.subscriptions.delete(e),this.unsubscribed(e),r.add(e))}),r.size)return t.respondWith(r)}if(t.type==="contextrequest")return this.matchEvent(t)?(t.live&&(this.subscriptions.add(t),this.subscribed(t),t.signal?.addEventListener("abort",()=>{this.subscriptions.delete(t),this.unsubscribed(t)})),t.stopPropagation(),this.handle(t)):void 0}}initialize(t){this.host=t,this.disposed=!1,t.addEventListener("contextrequest",this),t.addEventListener("contextclaim",this);let{value:r}=st.instance(t).request("contextclaim",{kind:this.constructor.kind,detail:this});return r?.forEach(e=>{this.subscriptions.add(e),this.subscribed(e),this.handle(e)}),this}dispose(t){return this.disposed=!0,t.removeEventListener("contextrequest",this),t.removeEventListener("contextclaim",this),this.subscriptions.forEach(r=>{this.subscriptions.delete(r),this.unsubscribed(r);let{target:e}=r;r.meta.answered=!1,e.dispatchEvent(r)}),this}},z=Pt;ht(z,"kind");function qe(n){let{lidrefPrefix:t,lidrefSeparator:r}=n.tokens;return{escape(e,i=1){return[...e].map(o=>/\w/.test(o)?o:i===2?`\\\\${o}`:`\\${o}`).join("")},lidrefPrefix(e=0){return e?this.escape(t,e):t},lidrefSeparator(e=0){return e?this.escape(r,e):r},isUuid(e,i=0){return e.startsWith(this.lidrefPrefix(i))&&e.includes(this.lidrefSeparator(i))},toUuid(e,i,o=0){return e.endsWith("-root")?i:`${this.lidrefPrefix(o)}${e}${this.lidrefSeparator(o)}${i}`},uuidToId(e,i=0){return this.isUuid(e)?e.split(this.lidrefSeparator(i))[1]:e},uuidToLidref(e,i=0){return this.isUuid(e)?`${this.lidrefPrefix(i)}${e.split(this.lidrefSeparator(i))[1]}`:e}}}function ee(n,t,r=null,e=0){let i=this,{webqit:{oohtml:{configs:{NAMESPACED_HTML:o}}}}=i,s=qe(o),l=new RegExp(`${r?":scope|":""}#(${s.lidrefPrefix(e+1)})?([\\w]+${s.lidrefSeparator(e+1)})?((?:[\\w-]|\\\\.)+)`,"g"),[c,a]=Zt(n,",").reduce(([m,u],d)=>{let w,O;return d=d.replace(l,(L,p,y,_,h)=>{if(w||(w=[...d.matchAll(/(["'])(?:(?=(\\?))\2.)*?\1/g)]),w.some(E=>h>E.index&&h+L.length<E.index+E[0].length))return L;if(L===":scope")return O=!0,r;let C=p&&!y;if(p&&y)return`#${s.escape(L.replace("#",""),1)}`;if(C&&o.attr.lid==="id"&&t&&!t.endsWith("-root"))return`#${s.toUuid(t,_,1)}`;let T;return o.attr.lid==="id"?T=`:is(#${_},[id^="${s.lidrefPrefix(e)}"][id$="${s.lidrefSeparator(e)}${_}"])`:T=`:is(#${_},[${i.CSS.escape(o.attr.lid)}="${_}"])`,C?`:is(${T}):not(${r?r+" ":""}${o.namespaceSelector} *)`:T}),O?[m,u.concat(d)]:[m.concat(d),u]},[[],[]]),f;return r&&c.length?f=[c.length>1?`${r} :is(${c.join(", ")})`:`${r} ${c[0]}`,a.join(", ")].filter(m=>m).join(", "):f=[...c,...a].join(", "),f}function je(n){let t=this;if(!F(n).has("namespace")){let r=Object.create(null);F(n).set("namespace",r);let e=[t.Document,t.ShadowRoot].some(i=>n instanceof i);Object.defineProperty(r,Symbol.toStringTag,{get(){return e?"RootNamespaceRegistry":"NamespaceRegistry"}})}return F(n).get("namespace")}function re(n,t=!1){let r=this,{webqit:{oohtml:{configs:{NAMESPACED_HTML:e}}}}=r,i=[r.Document,r.ShadowRoot].some(o=>n instanceof o);return je.call(r,i?n:(t?n.parentNode:n)?.closest?.(e.namespaceSelector)||n.getRootNode())}function ne(n){let t=Object.prototype.toString.call(n)==="[object RootNamespaceRegistry]";return(Kt(n)||pt(n))+(t?"-root":"")}function qt({advanced:n={},...t}){let{config:r,window:e}=Tt.call(this,"scoped-css",t,{api:{styleSheets:"styleSheets"},style:{retention:"retain",mimeTypes:"text/css",strategy:null}});r.styleSelector=(Array.isArray(r.style.mimeTypes)?r.style.mimeTypes:r.style.mimeTypes.split("|")).concat("").reduce((i,o)=>{let s=o?`[type="${e.CSS.escape(o)}"]`:":not([type])";return i.concat(`style${s}`)},[]).join(","),e.webqit.oohtml.Style={compileCache:new Map},$e.call(e,r),Me.call(e,r)}function $e(n){let t=this,r=new Map;[t.Element.prototype].forEach(e=>{let i="Element";if(n.api.styleSheets in e)throw new Error(`The ${i} prototype already has a "${n.api.styleSheets}" API!`);Object.defineProperty(e,n.api.styleSheets,{get:function(){return r.has(this)||r.set(this,[]),r.get(this)}})}),Object.defineProperty(t.HTMLStyleElement.prototype,"scoped",{configurable:!0,get(){return this.hasAttribute("scoped")},set(e){this.toggleAttribute("scoped",e)}})}function Me(n){let t=this,{webqit:{oohtml:r,realdom:e}}=t,i=Object.getOwnPropertyDescriptor(globalThis,"window")?.get?.toString().includes("[native code]")??!1;t.CSS.supports||(t.CSS.supports=()=>!1);let o=new WeakSet;e.realtime(t.document).query(n.styleSelector,s=>{s.entrants.forEach(l=>{if(o.has(l))return;o.add(l);let c=pt(l.textContent),a=CSS.supports("selector(:has(a,b))"),f=l.scoped&&(a?`:has(> style[rand-${c}])`:`[rand-${c}]`),m=l.scoped&&t.CSSScopeRule&&!1,u=l.scoped&&l.parentNode||l.getRootNode();if(u instanceof t.Element){if(u[n.api.styleSheets].push(l),!i)return;(a?l:u).toggleAttribute(`rand-${c}`,!0)}if(!!i)if(l.scoped&&l.hasAttribute("shared")){let d;(d=r.Style.compileCache.get(c))||(d=Le.call(t,l,null,m,f),r.Style.compileCache.set(c,d)),Object.defineProperty(l,"sheet",{value:d,configurable:!0}),l.textContent=`
|
|
2
2
|
/*[ Shared style sheet ]*/
|
|
3
|
-
`}else{let d=()=>{let w=
|
|
3
|
+
`}else{let d=()=>{let w=ne(re.call(t,u));It.call(this,l.sheet,w,!m&&f)};l.isConnected?d():setTimeout(()=>{d()},0)}})},{id:"scoped-css",live:!0,subtree:"cross-roots",timing:"intercept",generation:"entrants"})}function Le(n,t,r,e){let i=this,o=n.textContent,s,l=r&&e?`@scope (${e}) {
|
|
4
4
|
${o.trim()}
|
|
5
|
-
}`:o.trim();try{s=new i.CSSStyleSheet,s.replaceSync(l),
|
|
5
|
+
}`:o.trim();try{s=new i.CSSStyleSheet,s.replaceSync(l),It.call(this,s,t,!r&&e);let c=()=>n.getRootNode().adoptedStyleSheets.push(s);n.isConnected?c():setTimeout(()=>{c()},0)}catch{let a=i.document.createElement("style");n.after(a),a.textContent=l,s=a.sheet,It.call(this,s,t,!r&&e)}return s}function It(n,t,r=null){let e=n?.cssRules.length||-1;for(let i=0;i<e;++i){let o=n.cssRules[i];o instanceof CSSImportRule||ie.call(this,o,t,r)}}function ie(n,t,r=null){if(n instanceof CSSStyleRule){oe.call(this,n,t,r);return}if([window.CSSScopeRule,window.CSSMediaRule,window.CSSContainerRule,window.CSSSupportsRule,window.CSSLayerBlockRule].some(e=>e&&n instanceof e)){let e=n.cssRules.length;for(let i=0;i<e;++i)ie.call(this,n.cssRules[i],t,r)}}function oe(n,t,r=null){let e=ee.call(this,n.selectorText,t,r,1);if(n.selectorText=e,n.cssRules){let i=n.cssRules.length;for(let o=0;o<i;++o)oe.call(this,n.cssRules[o],t)}}qt.call(window);})();
|
|
6
6
|
//# sourceMappingURL=scoped-css.js.map
|