@vibe-flags/core 0.1.0 → 0.1.1
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/index.d.ts +28 -8
- package/dist/vibe-flags.cdn.js +73 -32
- package/dist/vibe-flags.cdn.mjs +534 -405
- package/dist/vibe-flags.js +268 -139
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,14 +8,12 @@ export declare type FlagConfig = FlagConfigBoolean | FlagConfigSelect;
|
|
|
8
8
|
export declare interface FlagConfigBoolean {
|
|
9
9
|
key: string;
|
|
10
10
|
type: 'boolean';
|
|
11
|
-
default: boolean;
|
|
12
11
|
label?: string;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export declare interface FlagConfigSelect {
|
|
16
15
|
key: string;
|
|
17
16
|
type: 'select';
|
|
18
|
-
default: string;
|
|
19
17
|
options: string[];
|
|
20
18
|
label?: string;
|
|
21
19
|
}
|
|
@@ -47,36 +45,56 @@ export declare const flagStore: FlagStore;
|
|
|
47
45
|
|
|
48
46
|
export declare type FlagValue = boolean | string;
|
|
49
47
|
|
|
50
|
-
export declare class
|
|
48
|
+
export declare class VibeFlagBoolean extends LitElement {
|
|
51
49
|
key: string;
|
|
52
50
|
description: string;
|
|
53
|
-
type: 'boolean' | 'select';
|
|
54
51
|
value: string;
|
|
55
|
-
defaultValue: string;
|
|
56
|
-
options: string;
|
|
57
52
|
private isMatch;
|
|
58
|
-
private
|
|
53
|
+
private ready;
|
|
59
54
|
connectedCallback(): void;
|
|
60
55
|
disconnectedCallback(): void;
|
|
61
56
|
protected willUpdate(changed: Map<string, unknown>): void;
|
|
62
57
|
private registerFlag;
|
|
63
|
-
private parseOptions;
|
|
64
58
|
private onFlagChange;
|
|
65
59
|
private evaluate;
|
|
66
60
|
protected render(): TemplateResult<1> | typeof nothing;
|
|
67
61
|
}
|
|
68
62
|
|
|
63
|
+
export declare class VibeFlagOption extends LitElement {
|
|
64
|
+
value: string;
|
|
65
|
+
active: boolean;
|
|
66
|
+
protected render(): TemplateResult<1> | typeof nothing;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
69
|
export declare class VibeFlags extends LitElement {
|
|
70
70
|
protected render(): TemplateResult<1>;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
export declare class VibeFlagSelect extends LitElement {
|
|
74
|
+
key: string;
|
|
75
|
+
description: string;
|
|
76
|
+
private ready;
|
|
77
|
+
connectedCallback(): void;
|
|
78
|
+
disconnectedCallback(): void;
|
|
79
|
+
protected willUpdate(changed: Map<string, unknown>): void;
|
|
80
|
+
private getOptions;
|
|
81
|
+
private registerFlag;
|
|
82
|
+
private onFlagChange;
|
|
83
|
+
private syncOptions;
|
|
84
|
+
protected render(): TemplateResult<1>;
|
|
85
|
+
}
|
|
86
|
+
|
|
73
87
|
export declare class VibeToolbar extends LitElement {
|
|
74
88
|
static styles: CSSResult[];
|
|
75
89
|
private open;
|
|
76
90
|
private flags;
|
|
77
91
|
private configs;
|
|
92
|
+
private darkMode;
|
|
78
93
|
connectedCallback(): void;
|
|
79
94
|
disconnectedCallback(): void;
|
|
95
|
+
private loadTheme;
|
|
96
|
+
private toggleTheme;
|
|
97
|
+
private applyTheme;
|
|
80
98
|
private onFlagChange;
|
|
81
99
|
private syncFromStore;
|
|
82
100
|
private toggleSidebar;
|
|
@@ -87,6 +105,8 @@ export declare class VibeToolbar extends LitElement {
|
|
|
87
105
|
private renderFlagIcon;
|
|
88
106
|
private renderCloseIcon;
|
|
89
107
|
private renderChevronDown;
|
|
108
|
+
private renderSunIcon;
|
|
109
|
+
private renderMoonIcon;
|
|
90
110
|
private renderBooleanFlag;
|
|
91
111
|
private renderSelectFlag;
|
|
92
112
|
protected render(): TemplateResult<1>;
|
package/dist/vibe-flags.cdn.js
CHANGED
|
@@ -1,34 +1,58 @@
|
|
|
1
|
-
var VibeFlags=(function(
|
|
1
|
+
var VibeFlags=(function(l){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const R=globalThis,q=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),te=new WeakMap;let se=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(q&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=te.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&te.set(t,e))}return e}toString(){return this.cssText}};const ye=r=>new se(typeof r=="string"?r:r+"",void 0,W),K=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);return new se(t,r,W)},$e=(r,e)=>{if(q)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=R.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},ie=q?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ye(t)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:me,defineProperty:_e,getOwnPropertyDescriptor:xe,getOwnPropertyNames:we,getOwnPropertySymbols:Se,getPrototypeOf:Ae}=Object,j=globalThis,re=j.trustedTypes,ke=re?re.emptyScript:"",Ee=j.reactiveElementPolyfillSupport,O=(r,e)=>r,B={toAttribute(r,e){switch(e){case Boolean:r=r?ke:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},J=(r,e)=>!me(r,e),oe={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:J};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;let A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&_e(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:o}=xe(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:i,set(n){const h=i?.call(this);o?.call(this,n),this.requestUpdate(e,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oe}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const e=Ae(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const t=this.properties,s=[...we(t),...Se(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(ie(i))}else e!==void 0&&t.push(ie(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $e(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:B).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:B;this._$Em=i;const h=n.fromAttribute(t,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(e,t,s,i=!1,o){if(e!==void 0){const n=this.constructor;if(i===!1&&(o=this[e]),s??=n.getPropertyOptions(e),!((s.hasChanged??J)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),o!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,o]of s){const{wrapped:n}=o,h=this[i];n!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[O("elementProperties")]=new Map,A[O("finalized")]=new Map,Ee?.({ReactiveElement:A}),(j.reactiveElementVersions??=[]).push("2.1.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const X=globalThis,ne=r=>r,I=X.trustedTypes,ae=I?I.createPolicy("lit-html",{createHTML:r=>r}):void 0,le="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,he="?"+y,Ce=`<${he}>`,_=document,P=()=>_.createComment(""),F=r=>r===null||typeof r!="object"&&typeof r!="function",Y=Array.isArray,Oe=r=>Y(r)||typeof r?.[Symbol.iterator]=="function",Z=`[
|
|
14
|
+
\f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ce=/-->/g,de=/>/g,x=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pe=/'/g,fe=/"/g,ge=/^(?:script|style|textarea|title)$/i,Pe=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),g=Pe(1),k=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ue=new WeakMap,w=_.createTreeWalker(_,129);function ve(r,e){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ae!==void 0?ae.createHTML(e):e}const Fe=(r,e)=>{const t=r.length-1,s=[];let i,o=e===2?"<svg>":e===3?"<math>":"",n=M;for(let h=0;h<t;h++){const a=r[h];let p,f,c=-1,b=0;for(;b<a.length&&(n.lastIndex=b,f=n.exec(a),f!==null);)b=n.lastIndex,n===M?f[1]==="!--"?n=ce:f[1]!==void 0?n=de:f[2]!==void 0?(ge.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=x):f[3]!==void 0&&(n=x):n===x?f[0]===">"?(n=i??M,c=-1):f[1]===void 0?c=-2:(c=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?x:f[3]==='"'?fe:pe):n===fe||n===pe?n=x:n===ce||n===de?n=M:(n=x,i=void 0);const m=n===x&&r[h+1].startsWith("/>")?" ":"";o+=n===M?a+Ce:c>=0?(s.push(p),a.slice(0,c)+le+a.slice(c)+y+m):a+y+(c===-2?h:m)}return[ve(r,o+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class T{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let o=0,n=0;const h=e.length-1,a=this.parts,[p,f]=Fe(e,t);if(this.el=T.createElement(p,s),w.currentNode=this.el.content,t===2||t===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=w.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const c of i.getAttributeNames())if(c.endsWith(le)){const b=f[n++],m=i.getAttribute(c).split(y),L=/([.?@])?(.*)/.exec(b);a.push({type:1,index:o,name:L[2],strings:m,ctor:L[1]==="."?Te:L[1]==="?"?Ve:L[1]==="@"?Ue:D}),i.removeAttribute(c)}else c.startsWith(y)&&(a.push({type:6,index:o}),i.removeAttribute(c));if(ge.test(i.tagName)){const c=i.textContent.split(y),b=c.length-1;if(b>0){i.textContent=I?I.emptyScript:"";for(let m=0;m<b;m++)i.append(c[m],P()),w.nextNode(),a.push({type:2,index:++o});i.append(c[b],P())}}}else if(i.nodeType===8)if(i.data===he)a.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(y,c+1))!==-1;)a.push({type:7,index:o}),c+=y.length-1}o++}}static createElement(e,t){const s=_.createElement("template");return s.innerHTML=e,s}}function E(r,e,t=r,s){if(e===k)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const o=F(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=E(r,i._$AS(r,e.values),i,s)),e}class Me{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??_).importNode(t,!0);w.currentNode=i;let o=w.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new V(o,o.nextSibling,this,e):a.type===1?p=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(p=new Ne(o,this,e)),this._$AV.push(p),a=s[++h]}n!==a?.index&&(o=w.nextNode(),n++)}return w.currentNode=_,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class V{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=E(this,e,t),F(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==k&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Oe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&F(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=T.createElement(ve(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const o=new Me(i,this),n=o.u(this.options);o.p(t),this.T(n),this._$AH=o}}_$AC(e){let t=ue.get(e.strings);return t===void 0&&ue.set(e.strings,t=new T(e)),t}k(e){Y(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const o of e)i===t.length?t.push(s=new V(this.O(P()),this.O(P()),this,this.options)):s=t[i],s._$AI(o),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=ne(e).nextSibling;ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class D{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(e,t=this,s,i){const o=this.strings;let n=!1;if(o===void 0)e=E(this,e,t,0),n=!F(e)||e!==this._$AH&&e!==k,n&&(this._$AH=e);else{const h=e;let a,p;for(e=o[0],a=0;a<o.length-1;a++)p=E(this,h[s+a],t,a),p===k&&(p=this._$AH[a]),n||=!F(p)||p!==this._$AH[a],p===d?e=d:e!==d&&(e+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Te extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}}class Ve extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}}class Ue extends D{constructor(e,t,s,i,o){super(e,t,s,i,o),this.type=5}_$AI(e,t=this){if((e=E(this,e,t,0)??d)===k)return;const s=this._$AH,i=e===d&&s!==d||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Ne{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){E(this,e)}}const He=X.litHtmlPolyfillSupport;He?.(T,V),(X.litHtmlVersions??=[]).push("3.3.2");const Re=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const o=t?.renderBefore??null;s._$litPart$=i=new V(e.insertBefore(P(),o),o,void 0,t??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const
|
|
19
|
+
*/const G=globalThis;class v extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Re(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return k}}v._$litElement$=!0,v.finalized=!0,G.litElementHydrateSupport?.({LitElement:v});const je=G.litElementPolyfillSupport;je?.({LitElement:v}),(G.litElementVersions??=[]).push("4.2.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const U=r=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const Be={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:J},Ie=(r=Be,e,t)=>{const{kind:s,metadata:i}=t;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(t.name,r),s==="accessor"){const{name:n}=t;return{set(h){const a=e.get.call(this);e.set.call(this,h),this.requestUpdate(n,a,r,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,r,h),h}}}if(s==="setter"){const{name:n}=t;return function(h){const a=this[n];e.call(this,h),this.requestUpdate(n,a,r,!0,h)}}throw Error("Unsupported decorator location: "+s)};function S(r){return(e,t)=>typeof t=="object"?Ie(r,e,t):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,e,t)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function
|
|
31
|
+
*/function $(r){return S({...r,state:!0,attribute:!1})}var De=Object.getOwnPropertyDescriptor,ze=(r,e,t,s)=>{for(var i=s>1?void 0:s?De(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(i)||i);return i};l.VibeFlags=class extends v{render(){return g`<slot></slot>`}},l.VibeFlags=ze([U("vibe-flags")],l.VibeFlags);const N="vibe-flags:";function Q(r){return r.type==="boolean"?!1:r.options[0]||""}class Le extends EventTarget{constructor(){super(...arguments),this.configs=new Map,this.state={},this.listening=!1,this.onStorageEvent=e=>{if(!e.key?.startsWith(N))return;const t=e.key.slice(N.length),s=this.configs.get(t);if(s)try{const i=e.newValue?JSON.parse(e.newValue):Q(s);this.state[t]=i,this.dispatch(t)}catch{}}}register(e){this.configs.set(e.key,e);const t=this.readFromStorage(e.key);this.state[e.key]=t??Q(e),this.listening||(this.listening=!0,typeof window<"u"&&window.addEventListener("storage",this.onStorageEvent)),this.dispatch(e.key)}unregister(e){this.configs.delete(e),delete this.state[e],this.dispatch()}get(e){return this.state[e]}set(e,t){const s=this.configs.get(e);s&&(s.type==="boolean"&&typeof t!="boolean"||s.type==="select"&&(typeof t!="string"||!s.options.includes(t))||(this.state[e]=t,this.writeToStorage(e,t),this.dispatch(e)))}getAll(){return{...this.state}}getConfig(){return Array.from(this.configs.values())}getConfigForKey(e){return this.configs.get(e)}reset(){for(const[e,t]of this.configs)this.state[e]=Q(t),this.removeFromStorage(e);this.dispatch()}readFromStorage(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(N+e);return t===null?null:JSON.parse(t)}catch{return null}}writeToStorage(e,t){if(!(typeof window>"u"))try{localStorage.setItem(N+e,JSON.stringify(t))}catch{}}removeFromStorage(e){if(!(typeof window>"u"))try{localStorage.removeItem(N+e)}catch{}}dispatch(e){const t={key:e,state:this.getAll()},s=new CustomEvent("vibe-flags-changed",{detail:t,bubbles:!0});this.dispatchEvent(s),typeof window<"u"&&window.dispatchEvent(new CustomEvent("vibe-flags-changed",{detail:t}))}}const u=new Le;var qe=Object.defineProperty,We=Object.getOwnPropertyDescriptor,C=(r,e,t,s)=>{for(var i=s>1?void 0:s?We(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&qe(e,t,i),i};if(typeof document<"u"&&!document.getElementById("vibe-flag-fouc")){const r=document.createElement("style");r.id="vibe-flag-fouc",r.textContent="vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{visibility:hidden}",document.head.appendChild(r)}l.VibeFlagBoolean=class extends v{constructor(){super(...arguments),this.key="",this.description="",this.value="",this.isMatch=!1,this.ready=!1,this.onFlagChange=()=>{this.evaluate()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),this.registerFlag()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}willUpdate(e){(e.has("key")||e.has("description"))&&this.registerFlag()}registerFlag(){this.key&&(u.getConfigForKey(this.key)||u.register({key:this.key,type:"boolean",label:this.description||void 0}),this.evaluate())}evaluate(){const e=u.get(this.key);e===void 0?this.isMatch=!1:this.value===""?this.isMatch=!0:this.isMatch=String(e)===this.value,this.ready||(this.ready=!0,this.style.visibility="visible")}render(){return this.isMatch?g`<slot></slot>`:d}},C([S({type:String})],l.VibeFlagBoolean.prototype,"key",2),C([S({type:String})],l.VibeFlagBoolean.prototype,"description",2),C([S({type:String})],l.VibeFlagBoolean.prototype,"value",2),C([$()],l.VibeFlagBoolean.prototype,"isMatch",2),C([$()],l.VibeFlagBoolean.prototype,"ready",2),l.VibeFlagBoolean=C([U("vibe-flag-boolean")],l.VibeFlagBoolean);var Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,z=(r,e,t,s)=>{for(var i=s>1?void 0:s?Je(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Ke(e,t,i),i};l.VibeFlagSelect=class extends v{constructor(){super(...arguments),this.key="",this.description="",this.ready=!1,this.onFlagChange=()=>{this.syncOptions()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),queueMicrotask(()=>this.registerFlag())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}willUpdate(e){(e.has("key")||e.has("description"))&&this.registerFlag()}getOptions(){return Array.from(this.querySelectorAll("vibe-flag-option"))}registerFlag(){if(!this.key)return;const e=this.getOptions().map(t=>t.value).filter(Boolean);e.length!==0&&(u.getConfigForKey(this.key)||u.register({key:this.key,type:"select",options:e,label:this.description||void 0}),this.syncOptions())}syncOptions(){const e=u.get(this.key);for(const t of this.getOptions())t.active=t.value===e;this.ready||(this.ready=!0,this.style.visibility="visible")}render(){return g`<slot></slot>`}},z([S({type:String})],l.VibeFlagSelect.prototype,"key",2),z([S({type:String})],l.VibeFlagSelect.prototype,"description",2),z([$()],l.VibeFlagSelect.prototype,"ready",2),l.VibeFlagSelect=z([U("vibe-flag-select")],l.VibeFlagSelect);var Xe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,ee=(r,e,t,s)=>{for(var i=s>1?void 0:s?Ye(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Xe(e,t,i),i};l.VibeFlagOption=class extends v{constructor(){super(...arguments),this.value="",this.active=!1}render(){return this.active?g`<slot></slot>`:d}},ee([S({type:String})],l.VibeFlagOption.prototype,"value",2),ee([$()],l.VibeFlagOption.prototype,"active",2),l.VibeFlagOption=ee([U("vibe-flag-option")],l.VibeFlagOption);const Ze=K`
|
|
32
|
+
:host {
|
|
33
|
+
--vf-bg: #0a0a0a;
|
|
34
|
+
--vf-bg-muted: #171717;
|
|
35
|
+
--vf-bg-hover: #262626;
|
|
36
|
+
--vf-border: #2e2e2e;
|
|
37
|
+
--vf-text: #fafafa;
|
|
38
|
+
--vf-text-muted: #a3a3a3;
|
|
39
|
+
--vf-primary: #fafafa;
|
|
40
|
+
--vf-primary-fg: #0a0a0a;
|
|
41
|
+
--vf-accent: #818cf8;
|
|
42
|
+
--vf-accent-fg: #ffffff;
|
|
43
|
+
--vf-destructive: #ef4444;
|
|
44
|
+
--vf-radius: 6px;
|
|
45
|
+
--vf-radius-lg: 8px;
|
|
46
|
+
--vf-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
47
|
+
'Helvetica Neue', Arial, sans-serif;
|
|
48
|
+
--vf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4),
|
|
49
|
+
0 1px 2px -1px rgba(0, 0, 0, 0.4);
|
|
50
|
+
--vf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
|
|
51
|
+
0 4px 6px -4px rgba(0, 0, 0, 0.5);
|
|
52
|
+
--vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
|
|
53
|
+
0 8px 10px -6px rgba(0, 0, 0, 0.6);
|
|
54
|
+
}
|
|
55
|
+
`,Ge=K`
|
|
32
56
|
:host {
|
|
33
57
|
--vf-bg: #ffffff;
|
|
34
58
|
--vf-bg-muted: #f5f5f5;
|
|
@@ -52,38 +76,38 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
52
76
|
--vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
53
77
|
0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
54
78
|
}
|
|
55
|
-
`;var
|
|
79
|
+
`;var Qe=Object.defineProperty,et=Object.getOwnPropertyDescriptor,H=(r,e,t,s)=>{for(var i=s>1?void 0:s?et(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Qe(e,t,i),i};const be="vibeFlagsTheme";return l.VibeToolbar=class extends v{constructor(){super(...arguments),this.open=!1,this.flags={},this.configs=[],this.darkMode=!0,this.onFlagChange=()=>{this.syncFromStore()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),this.syncFromStore(),this.loadTheme()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}loadTheme(){if(typeof window>"u")return;const e=localStorage.getItem(be);this.darkMode=e?e==="dark":!0,this.applyTheme()}toggleTheme(){this.darkMode=!this.darkMode,localStorage.setItem(be,this.darkMode?"dark":"light"),this.applyTheme()}applyTheme(){const e=this.darkMode?Ze:Ge,t=new CSSStyleSheet;t.replaceSync(e.cssText),this.shadowRoot.adoptedStyleSheets=[...l.VibeToolbar.elementStyles.map(s=>s.styleSheet),t]}syncFromStore(){this.configs=u.getConfig(),this.flags=u.getAll()}toggleSidebar(){this.open=!this.open}closeSidebar(){this.open=!1}onToggle(e){const t=this.flags[e];u.set(e,!t)}onSelect(e,t){const s=t.target;u.set(e,s.value)}onReset(){u.reset()}renderFlagIcon(){return g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" y1="22" x2="4" y2="15"/></svg>`}renderCloseIcon(){return g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>`}renderChevronDown(){return g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>`}renderSunIcon(){return g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>`}renderMoonIcon(){return g`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>`}renderBooleanFlag(e){const t=this.flags[e.key]===!0;return g`
|
|
56
80
|
<div class="flag-item">
|
|
57
81
|
<div class="flag-row">
|
|
58
82
|
<div class="flag-info">
|
|
59
|
-
<div class="flag-label">${
|
|
60
|
-
<div class="flag-key">${
|
|
83
|
+
<div class="flag-label">${e.label||e.key}</div>
|
|
84
|
+
<div class="flag-key">${e.key}</div>
|
|
61
85
|
</div>
|
|
62
86
|
<label class="toggle">
|
|
63
87
|
<input
|
|
64
88
|
type="checkbox"
|
|
65
|
-
.checked=${
|
|
66
|
-
@change=${()=>this.onToggle(
|
|
89
|
+
.checked=${t}
|
|
90
|
+
@change=${()=>this.onToggle(e.key)}
|
|
67
91
|
/>
|
|
68
92
|
<span class="toggle-track"></span>
|
|
69
93
|
<span class="toggle-thumb"></span>
|
|
70
94
|
</label>
|
|
71
95
|
</div>
|
|
72
96
|
</div>
|
|
73
|
-
`}renderSelectFlag(
|
|
97
|
+
`}renderSelectFlag(e){if(e.type!=="select")return d;const t=this.flags[e.key];return g`
|
|
74
98
|
<div class="flag-item">
|
|
75
99
|
<div class="flag-row">
|
|
76
100
|
<div class="flag-info">
|
|
77
|
-
<div class="flag-label">${
|
|
78
|
-
<div class="flag-key">${
|
|
101
|
+
<div class="flag-label">${e.label||e.key}</div>
|
|
102
|
+
<div class="flag-key">${e.key}</div>
|
|
79
103
|
</div>
|
|
80
104
|
<div class="select-wrapper">
|
|
81
105
|
<select
|
|
82
106
|
class="select"
|
|
83
|
-
.value=${
|
|
84
|
-
@change=${s=>this.onSelect(
|
|
107
|
+
.value=${t}
|
|
108
|
+
@change=${s=>this.onSelect(e.key,s)}
|
|
85
109
|
>
|
|
86
|
-
${
|
|
110
|
+
${e.options.map(s=>g`<option value=${s} ?selected=${s===t}>
|
|
87
111
|
${s}
|
|
88
112
|
</option>`)}
|
|
89
113
|
</select>
|
|
@@ -91,8 +115,8 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
91
115
|
</div>
|
|
92
116
|
</div>
|
|
93
117
|
</div>
|
|
94
|
-
`}render(){return
|
|
95
|
-
${this.open?d:
|
|
118
|
+
`}render(){return g`
|
|
119
|
+
${this.open?d:g`
|
|
96
120
|
<button class="fab" @click=${this.toggleSidebar} aria-label="Toggle feature flags">
|
|
97
121
|
${this.renderFlagIcon()}
|
|
98
122
|
</button>
|
|
@@ -107,13 +131,18 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
107
131
|
VibeFlags
|
|
108
132
|
<span class="badge">${this.configs.length}</span>
|
|
109
133
|
</h2>
|
|
110
|
-
<
|
|
111
|
-
${this.
|
|
112
|
-
|
|
134
|
+
<div class="header-actions">
|
|
135
|
+
<button class="icon-btn" @click=${this.toggleTheme} aria-label="Toggle theme" title="${this.darkMode?"Switch to light theme":"Switch to dark theme"}">
|
|
136
|
+
${this.darkMode?this.renderSunIcon():this.renderMoonIcon()}
|
|
137
|
+
</button>
|
|
138
|
+
<button class="icon-btn" @click=${this.closeSidebar} aria-label="Close">
|
|
139
|
+
${this.renderCloseIcon()}
|
|
140
|
+
</button>
|
|
141
|
+
</div>
|
|
113
142
|
</div>
|
|
114
143
|
|
|
115
144
|
<div class="flags">
|
|
116
|
-
${this.configs.length===0?
|
|
145
|
+
${this.configs.length===0?g`<div class="empty">No flags configured</div>`:this.configs.map(e=>e.type==="boolean"?this.renderBooleanFlag(e):this.renderSelectFlag(e))}
|
|
117
146
|
</div>
|
|
118
147
|
|
|
119
148
|
<div class="footer">
|
|
@@ -122,7 +151,7 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
122
151
|
</button>
|
|
123
152
|
</div>
|
|
124
153
|
</div>
|
|
125
|
-
`}},
|
|
154
|
+
`}},l.VibeToolbar.styles=[K`
|
|
126
155
|
* {
|
|
127
156
|
box-sizing: border-box;
|
|
128
157
|
margin: 0;
|
|
@@ -209,6 +238,12 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
209
238
|
flex-shrink: 0;
|
|
210
239
|
}
|
|
211
240
|
|
|
241
|
+
.header-left {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 8px;
|
|
245
|
+
}
|
|
246
|
+
|
|
212
247
|
.header h2 {
|
|
213
248
|
font-size: 16px;
|
|
214
249
|
font-weight: 600;
|
|
@@ -224,6 +259,12 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
224
259
|
color: var(--vf-accent);
|
|
225
260
|
}
|
|
226
261
|
|
|
262
|
+
.header-actions {
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: 4px;
|
|
266
|
+
}
|
|
267
|
+
|
|
227
268
|
.badge {
|
|
228
269
|
font-size: 11px;
|
|
229
270
|
font-weight: 500;
|
|
@@ -234,7 +275,7 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
234
275
|
border: 1px solid var(--vf-border);
|
|
235
276
|
}
|
|
236
277
|
|
|
237
|
-
.
|
|
278
|
+
.icon-btn {
|
|
238
279
|
width: 32px;
|
|
239
280
|
height: 32px;
|
|
240
281
|
border: none;
|
|
@@ -248,12 +289,12 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
248
289
|
transition: all 0.15s ease;
|
|
249
290
|
}
|
|
250
291
|
|
|
251
|
-
.
|
|
292
|
+
.icon-btn:hover {
|
|
252
293
|
background: var(--vf-bg-muted);
|
|
253
294
|
color: var(--vf-text);
|
|
254
295
|
}
|
|
255
296
|
|
|
256
|
-
.
|
|
297
|
+
.icon-btn svg {
|
|
257
298
|
width: 16px;
|
|
258
299
|
height: 16px;
|
|
259
300
|
}
|
|
@@ -424,4 +465,4 @@ var VibeFlags=(function(c){"use strict";/**
|
|
|
424
465
|
color: var(--vf-text-muted);
|
|
425
466
|
font-size: 13px;
|
|
426
467
|
}
|
|
427
|
-
`],
|
|
468
|
+
`],H([$()],l.VibeToolbar.prototype,"open",2),H([$()],l.VibeToolbar.prototype,"flags",2),H([$()],l.VibeToolbar.prototype,"configs",2),H([$()],l.VibeToolbar.prototype,"darkMode",2),l.VibeToolbar=H([U("vibe-toolbar")],l.VibeToolbar),l.flagStore=u,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),l})({});
|