godown 3.8.2 → 3.9.0
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/build/godown+lit.iife.js +12 -12
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +12 -12
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +12 -12
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +10 -10
- package/build/godown.js +10 -10
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +10 -10
- package/build/godown.umd.js.map +1 -1
- package/components/alert.d.ts +1 -0
- package/components/alert.d.ts.map +1 -1
- package/components/alert.js +1 -1
- package/components/alert.js.map +1 -1
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +1 -1
- package/components/avatar.js.map +1 -1
- package/components/button.d.ts +4 -4
- package/components/button.d.ts.map +1 -1
- package/components/button.js +1 -1
- package/components/button.js.map +1 -1
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js.map +1 -1
- package/components/input.d.ts +1 -0
- package/components/input.d.ts.map +1 -1
- package/components/input.js +1 -1
- package/components/input.js.map +1 -1
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -1
- package/components/range.js.map +1 -1
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -1
- package/components/select.js.map +1 -1
- package/components/split.d.ts +1 -0
- package/components/split.d.ts.map +1 -1
- package/components/split.js +1 -1
- package/components/split.js.map +1 -1
- package/components/tabs.d.ts +1 -0
- package/components/tabs.d.ts.map +1 -1
- package/components/tabs.js +1 -1
- package/components/tabs.js.map +1 -1
- package/core/global-style.d.ts +3 -1
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +1 -1
- package/core/global-style.js.map +1 -1
- package/core/outline.d.ts +7 -9
- package/core/outline.d.ts.map +1 -1
- package/core/outline.js +1 -1
- package/core/outline.js.map +1 -1
- package/core/super-input.d.ts +1 -1
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +1 -1
- package/core/super-input.js.map +1 -1
- package/custom-elements.json +1 -1
- package/package.json +4 -5
- package/src/components/alert.ts +33 -25
- package/src/components/avatar.ts +1 -2
- package/src/components/button.ts +89 -68
- package/src/components/carousel.ts +2 -1
- package/src/components/input.ts +12 -5
- package/src/components/range.ts +14 -3
- package/src/components/select.ts +1 -0
- package/src/components/split.ts +12 -2
- package/src/components/tabs.ts +58 -64
- package/src/core/global-style.ts +20 -7
- package/src/core/outline.ts +35 -40
- package/src/core/super-input.ts +2 -11
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/core/global-style.d.ts
CHANGED
@@ -15,7 +15,9 @@ export declare const cssGlobalVars: {
|
|
15
15
|
white: CSSResult;
|
16
16
|
black: CSSResult;
|
17
17
|
color: CSSResult;
|
18
|
-
|
18
|
+
radius: CSSResult;
|
19
|
+
outlineWidth: CSSResult;
|
20
|
+
outlineColor: CSSResult;
|
19
21
|
};
|
20
22
|
type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
|
21
23
|
//# sourceMappingURL=global-style.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,
|
1
|
+
{"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAA0B,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,cAAc,EAAE,SAAS,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,SAAS,CAAC;IACxB,YAAY,EAAE,SAAS,CAAC;CAazB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
package/core/global-style.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as t,
|
1
|
+
import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as t,joinDeclarations as e,GodownElement as l}from"@godown/element";import{unsafeCSS as i,css as n}from"lit";class GlobalStyle extends l{}const s=t(GlobalStyle.godownConfig.prefix,"-");function a(o,r=1){return c(s+"-".repeat(r)+o)}function c(o){return i(`--${o}`)}const d={clipBackground:a("clip-background",2),active:a("active",2),passive:a("passive",2),_colors:{},input:a("input",2),white:a("color-white",2),black:a("color-black",2),color:a("color",2),radius:a("radius",2),outlineWidth:a("outline-width",2),outlineColor:a("outline-color",2)};GlobalStyle.styles=[i(`:host{${d.black}:rgb(0 0 0);${d.white}:rgb(255 255 255);`+r(((o,r,t)=>{d._colors[o]||=[],d._colors[o].push(i(d.color+"-"+o+"-"+r));const e=`-${o}-${r}`;return`${d.color+e}:rgb(${t});`}),o).join("")+e([[d.active,`var(${d._colors.blue[5]})`],[d.passive,`var(${d._colors.darkgray[5]})`],[d.clipBackground,`linear-gradient(to bottom, var(${d._colors.lightgray[0]}), var(${d._colors.darkgray[0]}))`],[d.outlineColor,`var(${d._colors.darkgray[4]})`],[d.outlineWidth,".075em"]])+"}"),n`button,dialog,input{border:0;outline:0}*{box-sizing:border-box;font-size:100%;font-style:normal;margin:0;padding:0}:host{border-style:none;box-sizing:border-box;outline-style:none}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}[part=root]{height:100%;width:100%}:host([contents]) [part=root]{height:inherit;width:inherit}:where(:host([contents]) [part=root]){all:inherit;display:revert}`,n`:host{${d.radius}:0.2em;border-radius:var(${d.radius})}`];export{GlobalStyle,d as cssGlobalVars,GlobalStyle as default,a as scopePrefix,c as variablePrefix};
|
2
2
|
//# sourceMappingURL=global-style.js.map
|
package/core/global-style.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","clipBackground","active","passive","_colors","input","white","black","color","
|
1
|
+
{"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","clipBackground","active","passive","_colors","input","white","black","color","radius","outlineWidth","outlineColor","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinDeclarations","blue","darkgray","lightgray","css"],"mappings":"sOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ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ult;
|
4
|
+
color?: string | CSSResult;
|
5
|
+
selector?: string;
|
6
|
+
outlineType?: OutlineType;
|
5
7
|
};
|
6
8
|
/**
|
7
9
|
* The `OutlineBuilder` class is responsible for generating CSS styles for various types of outlines.
|
8
10
|
*/
|
9
11
|
export declare class OutlineBuilder {
|
10
|
-
css:
|
11
|
-
|
12
|
-
* @param vars.width The width variable of the outline.
|
13
|
-
* @param vars.color The color variable of the outline.
|
14
|
-
*/
|
15
|
-
constructor(vars: OutlineVars);
|
12
|
+
css: string;
|
13
|
+
constructor({ selector, width, color, outlineType, }?: OutlineOptions);
|
16
14
|
get styleSheet(): CSSStyleSheet;
|
17
15
|
}
|
18
16
|
export type OutlineType = "outline" | "outline-inset" | "box-shadow" | "box-shadow-inset" | "border" | "none" | undefined;
|
package/core/outline.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../src/core/outline.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../src/core/outline.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhD,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAcF;;GAEG;AACH,qBAAa,cAAc;IACzB,GAAG,EAAE,MAAM,CAAC;gBAEA,EACV,QAAkB,EAClB,KAAkC,EAClC,KAAkC,EAClC,WAAW,GACZ,GAAE,cAAmB;IAUtB,IAAI,UAAU,IAAI,aAAa,CAE9B;CACF;AAED,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,eAAe,GACf,YAAY,GACZ,kBAAkB,GAClB,QAAQ,GACR,MAAM,GACN,SAAS,CAAC;AAEd,eAAO,MAAM,MAAM,SAAU,WAAW,KAAG,OAAmC,CAAC"}
|
package/core/outline.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{
|
1
|
+
import{cssGlobalVars as o}from"./global-style.js";import{unsafeCSS as t}from"lit";class OutlineBuilder{constructor({selector:t=":host",width:e=o.outlineWidth,color:r=o.outlineColor,outlineType:s}={}){const l=((o,t)=>{const e=`outline-color:var(${t});border-color:var(${t});`,r=`${e}outline-width:var(${o});outline-style:solid;`;return{outline:r,"outline-inset":`${r}outline-offset:calc(-1 * var(${o}));`,"box-shadow":`box-shadow:0 0 0 var(${o}) var(${t});`,"box-shadow-inset":`box-shadow:inset 0 0 0 var(${o}) var(${t});`,border:`${e}border-width:var(${o});border-style:solid;`}})(e,r);if(s&&s in l){const o=l[s];this.css=`${t}{${o}}`}else this.css=""}get styleSheet(){return t(this.css).styleSheet}}const e=o=>!o||"none"===o;export{OutlineBuilder,e as isNone};
|
2
2
|
//# sourceMappingURL=outline.js.map
|
package/core/outline.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"outline.js","sources":["../src/core/outline.ts"],"sourcesContent":null,"names":["OutlineBuilder","constructor","
|
1
|
+
{"version":3,"file":"outline.js","sources":["../src/core/outline.ts"],"sourcesContent":null,"names":["OutlineBuilder","constructor","selector","width","cssGlobalVars","outlineWidth","color","outlineColor","outlineType","styles","colors","outline","border","getOutlineStyles","style","this","css","styleSheet","unsafeCSS","isNone","type"],"mappings":"wFAyBaA,eAGX,WAAAC,EAAYC,SACVA,EAAW,QAAOC,MAClBA,EAAQC,EAAcC,aAAYC,MAClCA,EAAQF,EAAcG,aAAYC,YAClCA,GACkB,CAAA,GAClB,MAAMC,EAxBe,EAACN,EAA2BG,KACnD,MAAMI,EAAS,qBAAqBJ,uBAA2BA,MACzDK,EAAU,GAAGD,sBAA2BP,0BAC9C,MAAO,CACLQ,UACA,gBAAiB,GAAGA,iCAAuCR,OAC3D,aAAc,wBAAwBA,UAAcG,MACpD,mBAAoB,8BAA8BH,UAAcG,MAChEM,OAAQ,GAAGF,qBAA0BP,yBACtC,EAegBU,CAAiBV,EAAOG,GACvC,GAAIE,GAAeA,KAAeC,EAAQ,CACxC,MAAMK,EAAQL,EAAOD,GACrBO,KAAKC,IAAM,GAAGd,KAAYY,UAE1BC,KAAKC,IAAM,GAIf,cAAIC,GACF,OAAOC,EAAUH,KAAKC,KAAKC,YAaxB,MAAME,EAAUC,IAAgCA,GAAiB,SAATA"}
|
package/core/super-input.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type HandlerEvent } from "@godown/element";
|
2
2
|
import { type TemplateResult } from "lit";
|
3
3
|
import { GlobalStyle } from "./global-style.js";
|
4
|
-
import {
|
4
|
+
import type { OutlineType } from "./outline.js";
|
5
5
|
declare class SuperInput<V = string> extends GlobalStyle {
|
6
6
|
autofocus: boolean;
|
7
7
|
autocomplete: string | boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.d.ts","sourceRoot":"","sources":["../src/core/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAgC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,
|
1
|
+
{"version":3,"file":"super-input.d.ts","sourceRoot":"","sources":["../src/core/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAgC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhD,cACM,UAAU,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,WAAW;IAC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C,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAG7C;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,KAAK,SAAS,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,CAAC"}
|
package/core/super-input.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{part as e,styles as i,omit as o,htmlSlot as n}from"@godown/element";import{css as r,html as
|
1
|
+
import{__decorate as t}from"tslib";import{part as e,styles as i,omit as o,htmlSlot as n}from"@godown/element";import{css as r,html as s}from"lit";import{property as a}from"lit/decorators.js";import{cssGlobalVars as p,GlobalStyle as l}from"./global-style.js";const u=r`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:none;color:inherit;height:100%;padding:var(${p.input}-space);width:100%}.input-field [part=icon]{align-items:center;color:var(${p.input}-icon-color);display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(${p.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${p.input}-space)}`,d=r`:host{${p.input}-width:10em;${p.input}-height:1.6em;${p.input}-space:0.2em;${p.input}-control:currentColor;${p.input}-icon-color:var(${p._colors.darkgray[4]})}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host(:focus-within){${p.input}-icon-color:currentColor}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let h=class SuperInput extends l{constructor(){super(...arguments),this.autofocus=!1,this.outlineType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return o(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchCustomEvent("input",this.value,{bubbles:!0}))}_handleChange(t){this.dispatchCustomEvent("change",this.value)}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return s`<label for="${this.makeId}" part="prefix">${n("prefix")}</label>`}_renderSuffix(){return s`<label for="${this.makeId}" part="suffix">${n("suffix")}</label>`}};t([a()],h.prototype,"autocomplete",void 0),t([a({attribute:"outline-type"})],h.prototype,"outlineType",void 0),t([a({type:Boolean,reflect:!0})],h.prototype,"disabled",void 0),t([a({reflect:!0})],h.prototype,"type",void 0),t([a({reflect:!0})],h.prototype,"placeholder",void 0),t([a({reflect:!0})],h.prototype,"name",void 0),t([a()],h.prototype,"value",void 0),t([a()],h.prototype,"default",void 0),t([e("input")],h.prototype,"_input",void 0),h=t([i(u,d)],h);var c=h;export{h as SuperInput,c as default};
|
2
2
|
//# sourceMappingURL=super-input.js.map
|
package/core/super-input.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","_colors","darkgray","SuperInput","GlobalStyle","constructor","this","autofocus","outlineType","disabled","compositing","makeId","Math","random","toString","slice","nameValue","namevalue","observedRecord","omit","super","defaultValue","value","default","name","reset","_input","_handleInput","e","stopPropagation","target","trim","dispatchCustomEvent","bubbles","_handleChange","connectedCallback","_connectedInit","_compositionInit","events","add","_changeInputType","t","type","focus","options","firstUpdated","_renderPrefix","html","htmlSlot","_renderSuffix","__decorate","property","prototype","attribute","Boolean","reflect","part","styles","
|
1
|
+
{"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","_colors","darkgray","SuperInput","GlobalStyle","constructor","this","autofocus","outlineType","disabled","compositing","makeId","Math","random","toString","slice","nameValue","namevalue","observedRecord","omit","super","defaultValue","value","default","name","reset","_input","_handleInput","e","stopPropagation","target","trim","dispatchCustomEvent","bubbles","_handleChange","connectedCallback","_connectedInit","_compositionInit","events","add","_changeInputType","t","type","focus","options","firstUpdated","_renderPrefix","html","htmlSlot","_renderSuffix","__decorate","property","prototype","attribute","Boolean","reflect","part","styles","SuperInput$1"],"mappings":"kQAOA,MAAMA,EAAaC,CAAG,uLAAuLC,EAAcC,iFAAiFD,EAAcC,sMAAsMD,EAAcC,gFAAgFD,EAAcC,gBAEtmBC,EAAaH,CAAG,SAASC,EAAcC,oBAAoBD,EAAcC,sBAAsBD,EAAcC,qBAAqBD,EAAcC,8BAA8BD,EAAcC,wBAAwBD,EAAcG,QAAQC,SAAS,wFAAwFJ,EAAcC,+GAG/V,IAAMI,EAAN,MAAMA,mBAA+BC,EAArC,WAAAC,uBACEC,KAASC,WAAG,EAKZD,KAAWE,YAAgB,SAG3BF,KAAQG,UAAG,EA8BXH,KAAWI,aAAG,EAUJJ,KAAAK,OAAiBC,KAAKC,SAASC,SAAS,IAAIC,MAAM,GAM5DT,KAAAU,UAAiCV,KAAKW,UAhCtC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,UAAW,SAiB/C,gBAAIG,CAAaC,GACfhB,KAAKiB,QAAUD,EAGjB,gBAAID,GACF,OAAOf,KAAKiB,QAKd,SAAAN,GACE,MAAO,CAACX,KAAKkB,KAAMlB,KAAKgB,OAK1B,KAAAG,GACEnB,KAAKgB,MAA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