@neptune3d/dom 0.0.12 → 0.0.13
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 +148 -29
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -804,6 +804,16 @@ declare abstract class BaseStyle {
|
|
|
804
804
|
* @return This instance for chaining.
|
|
805
805
|
*/
|
|
806
806
|
bbr(value: Property.BorderBottom | Property.BorderRight | undefined): this;
|
|
807
|
+
/**
|
|
808
|
+
* Sets the `border-collapse` style of the element.
|
|
809
|
+
* Controls whether table borders are collapsed or separated.
|
|
810
|
+
* Accepts values like `"collapse"`, `"separate"`, or CSS variables.
|
|
811
|
+
* Passing `undefined` removes the border-collapse style.
|
|
812
|
+
*
|
|
813
|
+
* @param value - The border-collapse behavior to apply, or `undefined` to remove it.
|
|
814
|
+
* @return This instance for chaining.
|
|
815
|
+
*/
|
|
816
|
+
bCollapse(value: Property.BorderCollapse | undefined): this;
|
|
807
817
|
/**
|
|
808
818
|
* Sets the `overflow` style of the element.
|
|
809
819
|
* Controls how content that exceeds the element's bounds is handled on both axes.
|
|
@@ -1289,15 +1299,35 @@ declare abstract class BaseStyle {
|
|
|
1289
1299
|
*/
|
|
1290
1300
|
resize(value: Property.Resize | undefined): this;
|
|
1291
1301
|
/**
|
|
1292
|
-
* Sets the `
|
|
1293
|
-
* Controls
|
|
1294
|
-
* Accepts values like `"
|
|
1295
|
-
* Passing `undefined` removes the
|
|
1302
|
+
* Sets the CSS `fill` style of the element.
|
|
1303
|
+
* Controls the paint used to fill the interior of SVG shapes or text.
|
|
1304
|
+
* Accepts values like color strings (`"red"`, `"#000"`, `"currentColor"`), gradients, or CSS variables.
|
|
1305
|
+
* Passing `undefined` removes the fill style.
|
|
1296
1306
|
*
|
|
1297
|
-
* @param value - The
|
|
1307
|
+
* @param value - The fill style to apply, or `undefined` to remove it.
|
|
1308
|
+
* @return This instance for chaining.
|
|
1309
|
+
*/
|
|
1310
|
+
fill(value: Property.Fill | undefined): this;
|
|
1311
|
+
/**
|
|
1312
|
+
* Sets the CSS `stroke` style of the element.
|
|
1313
|
+
* Controls the color used to outline SVG shapes or text.
|
|
1314
|
+
* Accepts values like color strings (`"black"`, `"none"`, `"currentColor"`), gradients, or CSS variables.
|
|
1315
|
+
* Passing `undefined` removes the stroke style.
|
|
1316
|
+
*
|
|
1317
|
+
* @param value - The stroke style to apply, or `undefined` to remove it.
|
|
1318
|
+
* @return This instance for chaining.
|
|
1319
|
+
*/
|
|
1320
|
+
stroke(value: Property.Stroke | undefined): this;
|
|
1321
|
+
/**
|
|
1322
|
+
* Sets the CSS `stroke-width` style of the element.
|
|
1323
|
+
* Controls the thickness of the stroke used to outline SVG shapes or text.
|
|
1324
|
+
* Accepts values like `"1px"`, `"0.5em"`, numeric values, or CSS variables.
|
|
1325
|
+
* Passing `undefined` removes the stroke-width style.
|
|
1326
|
+
*
|
|
1327
|
+
* @param value - The stroke-width style to apply, or `undefined` to remove it.
|
|
1298
1328
|
* @return This instance for chaining.
|
|
1299
1329
|
*/
|
|
1300
|
-
|
|
1330
|
+
strokeWidth(value: Property.StrokeWidth | number | undefined): this;
|
|
1301
1331
|
/**
|
|
1302
1332
|
* Applies CSS styles to truncate overflowing text with an ellipsis.
|
|
1303
1333
|
* Ensures the text stays on a single line and hides overflow.
|
|
@@ -1853,11 +1883,15 @@ declare function $a(): AnchorElement;
|
|
|
1853
1883
|
*/
|
|
1854
1884
|
declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends DomElement<T$1> {
|
|
1855
1885
|
/**
|
|
1856
|
-
* Sets the `fill`
|
|
1857
|
-
*
|
|
1886
|
+
* Sets the `fill` attribute on the SVG element.
|
|
1887
|
+
* Controls the paint used to fill the interior of shapes.
|
|
1888
|
+
* Accepts values like color strings (`"red"`, `"#000"`, `"currentColor"`), gradients, or CSS variables.
|
|
1889
|
+
* Passing `undefined` removes the attribute.
|
|
1890
|
+
*
|
|
1891
|
+
* @param value - The fill value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1858
1892
|
* @return This instance for chaining.
|
|
1859
1893
|
*/
|
|
1860
|
-
|
|
1894
|
+
fill(value: string | undefined): this;
|
|
1861
1895
|
/**
|
|
1862
1896
|
* Sets the `fill-rule` property.
|
|
1863
1897
|
* Determines how the interior of a shape is determined when paths intersect.
|
|
@@ -1867,17 +1901,36 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1867
1901
|
*/
|
|
1868
1902
|
fillRule(rule: "nonzero" | "evenodd"): this;
|
|
1869
1903
|
/**
|
|
1870
|
-
* Sets the `
|
|
1871
|
-
*
|
|
1904
|
+
* Sets the `fill-opacity` attribute on the SVG element.
|
|
1905
|
+
* Controls the transparency of the fill independently from the overall element opacity.
|
|
1906
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1907
|
+
* Useful for layering visual effects or emphasizing fill contrast without affecting stroke or children.
|
|
1908
|
+
* Passing `undefined` removes the attribute.
|
|
1909
|
+
*
|
|
1910
|
+
* @param value - The fill opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1872
1911
|
* @return This instance for chaining.
|
|
1873
1912
|
*/
|
|
1874
|
-
|
|
1913
|
+
fillOpacity(value: string | number | undefined): this;
|
|
1875
1914
|
/**
|
|
1876
|
-
* Sets the `stroke
|
|
1877
|
-
*
|
|
1915
|
+
* Sets the `stroke` attribute on the SVG element.
|
|
1916
|
+
* Controls the color used to outline shapes.
|
|
1917
|
+
* Accepts values like color strings (`"black"`, `"none"`, `"currentColor"`), gradients, or CSS variables.
|
|
1918
|
+
* Passing `undefined` removes the attribute.
|
|
1919
|
+
*
|
|
1920
|
+
* @param value - The stroke value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1878
1921
|
* @return This instance for chaining.
|
|
1879
1922
|
*/
|
|
1880
|
-
|
|
1923
|
+
stroke(value: string | undefined): this;
|
|
1924
|
+
/**
|
|
1925
|
+
* Sets the `stroke-width` attribute on the SVG element.
|
|
1926
|
+
* Controls the thickness of the stroke used to outline shapes.
|
|
1927
|
+
* Accepts values like `"1"`, `"0.5"`, `"2px"`, or CSS variables.
|
|
1928
|
+
* Passing `undefined` removes the attribute.
|
|
1929
|
+
*
|
|
1930
|
+
* @param value - The stroke-width value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1931
|
+
* @return This instance for chaining.
|
|
1932
|
+
*/
|
|
1933
|
+
strokeWidth(value: string | number | undefined): this;
|
|
1881
1934
|
/**
|
|
1882
1935
|
* Sets the `stroke-linejoin` style.
|
|
1883
1936
|
* Controls how two connected segments in a stroke join.
|
|
@@ -1903,19 +1956,56 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1903
1956
|
*/
|
|
1904
1957
|
strokeMiterlimit(value: number): this;
|
|
1905
1958
|
/**
|
|
1906
|
-
* Sets the `opacity`
|
|
1907
|
-
*
|
|
1959
|
+
* Sets the `stroke-opacity` attribute on the SVG element.
|
|
1960
|
+
* Controls the transparency of the stroke independently from the overall element opacity.
|
|
1961
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1962
|
+
* Passing `undefined` removes the attribute.
|
|
1963
|
+
*
|
|
1964
|
+
* @param value - The stroke opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1965
|
+
* @return This instance for chaining.
|
|
1966
|
+
*/
|
|
1967
|
+
strokeOpacity(value: string | number | undefined): this;
|
|
1968
|
+
/**
|
|
1969
|
+
* Sets the `stroke-dasharray` attribute on the SVG element.
|
|
1970
|
+
* Defines the pattern of dashes and gaps used to render the stroke.
|
|
1971
|
+
* Accepts a space- or comma-separated list of lengths (e.g. `"5 2"` or `"5,2"`), numeric values, or CSS variables.
|
|
1972
|
+
* Passing `undefined` removes the attribute.
|
|
1973
|
+
*
|
|
1974
|
+
* @param value - The dash pattern to apply as an SVG attribute, or `undefined` to remove it.
|
|
1975
|
+
* @return This instance for chaining.
|
|
1976
|
+
*/
|
|
1977
|
+
strokeDasharray(value: string | number | undefined): this;
|
|
1978
|
+
/**
|
|
1979
|
+
* Sets the `stroke-dashoffset` attribute on the SVG element.
|
|
1980
|
+
* Specifies how far into the dash pattern the stroke should start.
|
|
1981
|
+
* Useful for animating dashed strokes or offsetting patterns.
|
|
1982
|
+
* Accepts numeric values, length strings (e.g. `"4px"`), or CSS variables.
|
|
1983
|
+
* Passing `undefined` removes the attribute.
|
|
1984
|
+
*
|
|
1985
|
+
* @param value - The dash offset to apply as an SVG attribute, or `undefined` to remove it.
|
|
1908
1986
|
* @return This instance for chaining.
|
|
1909
1987
|
*/
|
|
1910
|
-
|
|
1988
|
+
strokeDashoffset(value: string | number | undefined): this;
|
|
1911
1989
|
/**
|
|
1912
|
-
* Sets the `
|
|
1913
|
-
*
|
|
1990
|
+
* Sets the `opacity` attribute on the SVG element.
|
|
1991
|
+
* Controls the overall transparency of the element.
|
|
1992
|
+
* Accepts values from `0` (fully transparent) to `1` (fully opaque), or CSS variables.
|
|
1993
|
+
* Passing `undefined` removes the attribute.
|
|
1914
1994
|
*
|
|
1915
|
-
* @param value -
|
|
1995
|
+
* @param value - The opacity value to apply as an SVG attribute, or `undefined` to remove it.
|
|
1916
1996
|
* @return This instance for chaining.
|
|
1917
1997
|
*/
|
|
1918
|
-
|
|
1998
|
+
opacity(value: string | number | undefined): this;
|
|
1999
|
+
/**
|
|
2000
|
+
* Sets the `transform` attribute on the SVG element.
|
|
2001
|
+
* Controls geometric transformations like translation, rotation, scaling, and skewing.
|
|
2002
|
+
* Accepts values like `"translate(10, 20)"`, `"rotate(45)"`, `"scale(2)"`, or composed transforms.
|
|
2003
|
+
* Passing `undefined` removes the attribute.
|
|
2004
|
+
*
|
|
2005
|
+
* @param value - The transform string to apply as an SVG attribute, or `undefined` to remove it.
|
|
2006
|
+
* @return This instance for chaining.
|
|
2007
|
+
*/
|
|
2008
|
+
transform(value: string | undefined): this;
|
|
1919
2009
|
/**
|
|
1920
2010
|
* Applies a `translate(x, y)` transform to the element.
|
|
1921
2011
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1924,7 +2014,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1924
2014
|
* @param y - Vertical translation in user units.
|
|
1925
2015
|
* @return This instance for chaining.
|
|
1926
2016
|
*/
|
|
1927
|
-
|
|
2017
|
+
translate(x: number, y: number): this;
|
|
1928
2018
|
/**
|
|
1929
2019
|
* Applies a horizontal `translate(x, 0)` transform to the element.
|
|
1930
2020
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1932,7 +2022,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1932
2022
|
* @param x - Horizontal translation in user units.
|
|
1933
2023
|
* @return This instance for chaining.
|
|
1934
2024
|
*/
|
|
1935
|
-
|
|
2025
|
+
translateX(x: number): this;
|
|
1936
2026
|
/**
|
|
1937
2027
|
* Applies a vertical `translate(0, y)` transform to the element.
|
|
1938
2028
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1940,7 +2030,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1940
2030
|
* @param y - Vertical translation in user units.
|
|
1941
2031
|
* @return This instance for chaining.
|
|
1942
2032
|
*/
|
|
1943
|
-
|
|
2033
|
+
translateY(y: number): this;
|
|
1944
2034
|
/**
|
|
1945
2035
|
* Applies a `rotate(angle)` or `rotate(angle, cx, cy)` transform to the element.
|
|
1946
2036
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1950,7 +2040,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1950
2040
|
* @param cy - Optional y coordinate of the rotation center.
|
|
1951
2041
|
* @return This instance for chaining.
|
|
1952
2042
|
*/
|
|
1953
|
-
|
|
2043
|
+
rotate(angle: number, cx?: number, cy?: number): this;
|
|
1954
2044
|
/**
|
|
1955
2045
|
* Applies a uniform `scale(s)` transform to the element.
|
|
1956
2046
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1958,7 +2048,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1958
2048
|
* @param s - Uniform scale factor for both x and y axes.
|
|
1959
2049
|
* @return This instance for chaining.
|
|
1960
2050
|
*/
|
|
1961
|
-
|
|
2051
|
+
scale(s: number): this;
|
|
1962
2052
|
/**
|
|
1963
2053
|
* Applies a horizontal `scale(sx, 1)` transform to the element.
|
|
1964
2054
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1966,7 +2056,7 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1966
2056
|
* @param sx - Horizontal scale factor.
|
|
1967
2057
|
* @return This instance for chaining.
|
|
1968
2058
|
*/
|
|
1969
|
-
|
|
2059
|
+
scaleX(sx: number): this;
|
|
1970
2060
|
/**
|
|
1971
2061
|
* Applies a vertical `scale(1, sy)` transform to the element.
|
|
1972
2062
|
* Sets the `transform` attribute, replacing any existing value.
|
|
@@ -1974,7 +2064,36 @@ declare class BaseSvgElement<T$1 extends keyof SvgElementTagNameMap> extends Dom
|
|
|
1974
2064
|
* @param sy - Vertical scale factor.
|
|
1975
2065
|
* @return This instance for chaining.
|
|
1976
2066
|
*/
|
|
1977
|
-
|
|
2067
|
+
scaleY(sy: number): this;
|
|
2068
|
+
/**
|
|
2069
|
+
* Applies a horizontal skew transform to the SVG element.
|
|
2070
|
+
* Sets the `transform` attribute to `skewX(angle)`, replacing any existing transform.
|
|
2071
|
+
* Skewing distorts the element along the X-axis by the specified angle.
|
|
2072
|
+
*
|
|
2073
|
+
* @param angle - Skew angle in degrees. Positive values skew right, negative values skew left.
|
|
2074
|
+
* @return This instance for chaining.
|
|
2075
|
+
*/
|
|
2076
|
+
skewX(angle: number): this;
|
|
2077
|
+
/**
|
|
2078
|
+
* Applies a vertical skew transform to the SVG element.
|
|
2079
|
+
* Sets the `transform` attribute to `skewY(angle)`, replacing any existing transform.
|
|
2080
|
+
* Skewing distorts the element along the Y-axis by the specified angle.
|
|
2081
|
+
*
|
|
2082
|
+
* @param angle - Skew angle in degrees. Positive values skew downward, negative values skew upward.
|
|
2083
|
+
* @return This instance for chaining.
|
|
2084
|
+
*/
|
|
2085
|
+
skewY(angle: number): this;
|
|
2086
|
+
/**
|
|
2087
|
+
* Sets the `vector-effect` attribute on the SVG element.
|
|
2088
|
+
* Controls how stroke rendering behaves under geometric transformations.
|
|
2089
|
+
* Commonly used to preserve stroke width when scaling with `transform`.
|
|
2090
|
+
*
|
|
2091
|
+
* @param value - One of:
|
|
2092
|
+
* - `"none"`: Stroke scales with the element.
|
|
2093
|
+
* - `"non-scaling-stroke"`: Stroke width remains constant regardless of scale.
|
|
2094
|
+
* @return This instance for chaining.
|
|
2095
|
+
*/
|
|
2096
|
+
vectorEffect(value: "none" | "non-scaling-stroke"): this;
|
|
1978
2097
|
}
|
|
1979
2098
|
//#endregion
|
|
1980
2099
|
//#region src/Button.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=class{p(e){return this.setStyleProp(`padding`,e)}pt(e){return this.setStyleProp(`paddingTop`,e)}pr(e){return this.setStyleProp(`paddingRight`,e)}pb(e){return this.setStyleProp(`paddingBottom`,e)}pl(e){return this.setStyleProp(`paddingLeft`,e)}px(e){return this.pl(e).pr(e)}py(e){return this.pt(e).pb(e)}m(e){return this.setStyleProp(`margin`,e)}mt(e){return this.setStyleProp(`marginTop`,e)}mr(e){return this.setStyleProp(`marginRight`,e)}mb(e){return this.setStyleProp(`marginBottom`,e)}ml(e){return this.setStyleProp(`marginLeft`,e)}radius(e){return this.setStyleProp(`borderRadius`,e)}radiusTopLeft(e){return this.setStyleProp(`borderTopLeftRadius`,e)}radiusTopRight(e){return this.setStyleProp(`borderTopRightRadius`,e)}radiusBottomLeft(e){return this.setStyleProp(`borderBottomLeftRadius`,e)}radiusBottomRight(e){return this.setStyleProp(`borderBottomRightRadius`,e)}radiusTop(e){return this.radiusTopLeft(e).radiusTopRight(e)}radiusBottom(e){return this.radiusBottomLeft(e).radiusBottomRight(e)}radiusLeft(e){return this.radiusTopLeft(e).radiusBottomLeft(e)}radiusRight(e){return this.radiusTopRight(e).radiusBottomRight(e)}radiusX(e){return this.radiusLeft(e).radiusRight(e)}radiusY(e){return this.radiusTop(e).radiusBottom(e)}display(e){return this.setStyleProp(`display`,e)}flexShrink(e){return this.setStyleProp(`flexShrink`,e)}flex(e){return this.setStyleProp(`flex`,e)}bgColor(e){return this.setStyleProp(`backgroundColor`,e)}color(e){return this.setStyleProp(`color`,e)}w(e){return this.setStyleProp(`width`,e)}h(e){return this.setStyleProp(`height`,e)}minW(e){return this.setStyleProp(`minWidth`,e)}maxW(e){return this.setStyleProp(`maxWidth`,e)}minH(e){return this.setStyleProp(`minHeight`,e)}maxH(e){return this.setStyleProp(`maxHeight`,e)}b(e){return this.setStyleProp(`border`,e)}bWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderWidth`,t)}bStyle(e){return this.setStyleProp(`borderStyle`,e)}bColor(e){return this.setStyleProp(`borderColor`,e)}bt(e){return this.setStyleProp(`borderTop`,e)}btWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderTopWidth`,t)}btStyle(e){return this.setStyleProp(`borderTopStyle`,e)}btColor(e){return this.setStyleProp(`borderTopColor`,e)}br(e){return this.setStyleProp(`borderRight`,e)}brWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderRightWidth`,t)}brStyle(e){return this.setStyleProp(`borderRightStyle`,e)}brColor(e){return this.setStyleProp(`borderRightColor`,e)}bb(e){return this.setStyleProp(`borderBottom`,e)}bbWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderBottomWidth`,t)}bbStyle(e){return this.setStyleProp(`borderBottomStyle`,e)}bbColor(e){return this.setStyleProp(`borderBottomColor`,e)}bl(e){return this.setStyleProp(`borderLeft`,e)}blWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderLeftWidth`,t)}blStyle(e){return this.setStyleProp(`borderLeftStyle`,e)}blColor(e){return this.setStyleProp(`borderLeftColor`,e)}bx(e){return this.setStyleProp(`borderLeft`,e),this.setStyleProp(`borderRight`,e),this}by(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderBottom`,e),this}btl(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderLeft`,e),this}btr(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderRight`,e),this}bbl(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderLeft`,e),this}bbr(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderRight`,e),this}overflow(e){return this.setStyleProp(`overflow`,e)}overflowY(e){return this.setStyleProp(`overflowY`,e)}overflowX(e){return this.setStyleProp(`overflowX`,e)}fontSize(e){return this.setStyleProp(`fontSize`,e)}fontWeight(e){return this.setStyleProp(`fontWeight`,e)}fontFamily(e){return this.setStyleProp(`fontFamily`,e)}fontStyle(e){return this.setStyleProp(`fontStyle`,e)}textAlign(e){return this.setStyleProp(`textAlign`,e)}textDecoration(e){return this.setStyleProp(`textDecoration`,e)}pos(e){return this.setStyleProp(`position`,e)}top(e){return this.setStyleProp(`top`,e)}bottom(e){return this.setStyleProp(`bottom`,e)}left(e){return this.setStyleProp(`left`,e)}right(e){return this.setStyleProp(`right`,e)}cursor(e){return this.setStyleProp(`cursor`,e)}alignItems(e){return this.setStyleProp(`alignItems`,e)}justifyContent(e){return this.setStyleProp(`justifyContent`,e)}gap(e){return this.setStyleProp(`gap`,e)}flexDirection(e){return this.setStyleProp(`flexDirection`,e)}templateColumns(e){return this.setStyleProp(`gridTemplateColumns`,e)}templateRows(e){return this.setStyleProp(`gridTemplateRows`,e)}appearance(e){return this.setStyleProp(`appearance`,e)}userSelect(e){return this.setStyleProp(`userSelect`,e)}verticalAlign(e){return this.setStyleProp(`verticalAlign`,e)}whiteSpace(e){return this.setStyleProp(`whiteSpace`,e)}textOverflow(e){return this.setStyleProp(`textOverflow`,e)}zIndex(e){return this.setStyleProp(`zIndex`,e)}opacity(e){return this.setStyleProp(`opacity`,e)}transform(e){return this.setStyleProp(`transform`,e)}translate(e,t){let n=typeof e==`number`?`${e}px`:e,r=typeof t==`number`?`${t}px`:t;return this.setStyleProp(`transform`,`translate(${n}, ${r})`)}translateX(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateX(${t})`)}translateY(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateY(${t})`)}scale(e,t){let n=typeof e==`number`?e.toString():e,r=typeof t==`number`?t.toString():t;return this.setStyleProp(`transform`,`scale(${n}, ${r})`)}scaleX(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleX(${t})`)}scaleY(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleY(${t})`)}rotate(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotate(${t})`)}rotateX(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateX(${t})`)}rotateY(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateY(${t})`)}rotateZ(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateZ(${t})`)}transformOrigin(e){return this.setStyleProp(`transformOrigin`,e)}transition(e){return this.setStyleProp(`transition`,e)}willChange(e){return this.setStyleProp(`willChange`,e)}boxShadow(e){return this.setStyleProp(`boxShadow`,e)}boxSizing(e){return this.setStyleProp(`boxSizing`,e)}background(e){return this.setStyleProp(`background`,e)}outline(e){return this.setStyleProp(`outline`,e)}outlineWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`outlineWidth`,t)}outlineStyle(e){return this.setStyleProp(`outlineStyle`,e)}outlineColor(e){return this.setStyleProp(`outlineColor`,e)}outlineOffset(e){return this.setStyleProp(`outlineOffset`,e)}lineHeight(e){return this.setStyleProp(`lineHeight`,e)}wordWrap(e){return this.setStyleProp(`wordWrap`,e)}tabSize(e){return this.setStyleProp(`tabSize`,e)}resize(e){return this.setStyleProp(`resize`,e)}borderCollapse(e){return this.setStyleProp(`borderCollapse`,e)}overflowEllipsis(){return this.overflow(`hidden`).whiteSpace(`nowrap`).textOverflow(`ellipsis`)}linearGradient(e,...t){let n=`linear-gradient(${e}, ${t.join(`, `)})`;return this.setStyleProp(`background`,n)}style(e){for(let t of Object.keys(e))this.setStyleProp(t,e[t]);return this}};const t={opacity:1,zIndex:1,fontWeight:1,lineHeight:1,flexGrow:1,flexShrink:1,order:1,zoom:1,scale:1,counterIncrement:1,counterReset:1,tabSize:1,orphans:1,widows:1,columns:1,columnCount:1,gridRow:1,gridColumn:1},n={WebkitAppearance:1},r=`svg.svgA.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),i={svgA:`a`};function a(){return`${Date.now().toString(36)}-${(o++).toString(36)}`}let o=0;function s(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function c(e,n){return typeof n==`number`?t[e]?String(n):`${n}px`:n}const l=Symbol(`BaseDomIdentity`);var u=class t extends e{[l]=!0;getClientWidth(){return this.dom.clientWidth??0}getClientHeight(){return this.dom.clientHeight??0}getRect(){return this.dom.getBoundingClientRect()}getComputedStyle(){return window.getComputedStyle(this.dom)}getChildAt(e){return this.dom.children.item(e)}getNodeAt(e){return this.dom.childNodes.item(e)}getChildren(){return Array.from(this.dom.children)}getNodes(){return Array.from(this.dom.childNodes)}getText(){return this.dom.textContent}getAttr(e){return this.dom.getAttribute(e)}getProp(e){return this.dom[e]}hasClass(e){return this.dom.classList.contains(e)}text(e){return this.dom.textContent=e==null?``:String(e),this}html(e){return this.dom.innerHTML=e,this}id(e){return this.dom.id=e??``,this}attr(e,t){return t===void 0||t===!1?this.dom.removeAttribute(e):t===!0?this.dom.setAttribute(e,``):this.dom.setAttribute(e,String(t)),this}attrs(e){for(let[t,n]of Object.entries(e))this.attr(t,n);return this}toggleAttr(e,t){return this.dom.toggleAttribute(e,t),this}prop(e,t){return this.dom[e]=t,this}props(e){for(let[t,n]of Object.entries(e))this.prop(t,n);return this}className(e){return e==null?this.dom.removeAttribute(`class`):this.dom.setAttribute(`class`,e),this}tabIndex(e){return this.attr(`tabindex`,e)}toggleClass(e,t){return this.dom.classList.toggle(e,t),this}on(e,t,n){return this.dom.addEventListener(e,t,n),this}off(e,t,n){return this.dom.removeEventListener(e,t,n),this}add(...e){return this.dom.append(...e.map(e=>this.resolveNode(e))),this}insertAtIndex(e,...t){let n=Array.from(this.dom.children),r=Math.max(0,Math.min(e,n.length));for(let e of t){let t=n[r]??null;this.dom.insertBefore(this.resolveNode(e),t),r++}return this}setChildren(...e){return this.clear().add(...e)}setChildrenFromIndex(e,...t){let n=Array.from(this.dom.children),r=n.length,i=Math.max(0,Math.min(e,r));for(let e=i;e<r;e++)this.dom.removeChild(n[e]);let a=this.dom.children[i]??null;for(let e of t)this.dom.insertBefore(this.resolveNode(e),a);return this}clear(){return this.dom.textContent=``,this}clearRange(e,t){let n=Array.from(this.dom.children),r=Math.max(0,e??0),i=Math.min(n.length,t??n.length);for(let e=r;e<i;e++)this.dom.removeChild(n[e]);return this}contains(e){let n=e instanceof t?e.dom:e;return this.dom.contains(n)}query(e){let t=this.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}ref(e){return e(this),this}resolveNode(e){return typeof e==`string`||typeof e==`number`?document.createTextNode(String(e)):t.isBaseDom(e)?e.dom:e}setStyleProp(e,t){return t===void 0?(this.dom.style.removeProperty(s(e)),this):(this.dom.style.setProperty(s(e),c(e,t)),this)}static isBaseDom(e){return typeof e!=`object`||!e?!1:Object.getOwnPropertySymbols(e).includes(l)}},d=class extends u{constructor(e,t){super(),this._tag=i[e]??e,this._isSvg=r.includes(this._tag),this._dom=t??(this._isSvg?document.createElementNS(`http://www.w3.org/2000/svg`,this._tag):document.createElement(this._tag))}_tag;_isSvg;_dom;get tag(){return this._tag}get isSvg(){return this._isSvg}get dom(){return this._dom}remove(){this.dom.remove()}htmlFor(e){return this.tag===`label`&&(this.dom.htmlFor=e??``),this}title(e){return this.attr(`title`,e)}disabled(e){return this.attr(`disabled`,e)}disable(){return this.disabled(!0)}enable(){return this.disabled(!1)}focus(){return this.dom.focus(),this}blur(){return this.dom.blur(),this}click(){return this.isSvg||this.dom.click(),this}popover(e){return this.attr(`popover`,e)}popoverTarget(e){return this.attr(`popovertarget`,e)}popoverTargetAction(e){return this.attr(`popovertargetaction`,e)}showPopover(e){return this.dom.showPopover({source:e}),this}hidePopover(){return this.dom.hidePopover(),this}togglePopover(e,t){return this.dom.togglePopover({force:e,source:t}),this}};function f(e){return new d(e)}function p(e){let t=document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}var m=class extends d{constructor(){super(`a`)}href(e){return this.dom.href=e,this}};function h(){return new m}var g=class extends d{svgFill(e){return this.attr(`fill`,e)}fillRule(e){return this.attr(`fill-rule`,e)}svgStroke(e){return this.attr(`stroke`,e)}svgStrokeWidth(e){return this.attr(`stroke-width`,e.toString())}strokeLinejoin(e){return this.attr(`stroke-linejoin`,e)}strokeLinecap(e){return this.attr(`stroke-linecap`,e)}strokeMiterlimit(e){return this.attr(`stroke-miterlimit`,e.toString())}svgOpacity(e){return this.attr(`opacity`,e.toString())}svgTransform(e){return this.attr(`transform`,e)}svgTranslate(e,t){return this.attr(`transform`,`translate(${e} ${t})`)}svgTranslateX(e){return this.attr(`transform`,`translate(${e} 0)`)}svgTranslateY(e){return this.attr(`transform`,`translate(0 ${e})`)}svgRotate(e,t,n){let r=t!==void 0&&n!==void 0?`rotate(${e} ${t} ${n})`:`rotate(${e})`;return this.attr(`transform`,r)}svgScale(e){return this.attr(`transform`,`scale(${e})`)}svgScaleX(e){return this.attr(`transform`,`scale(${e} 1)`)}svgScaleY(e){return this.attr(`transform`,`scale(1 ${e})`)}},_=class extends d{constructor(){super(`button`)}type(e){return this.dom.type=e,this}};function ee(){return new _}var v=class extends d{constructor(e){super(`canvas`,e)}_size={width:this.dom.width,height:this.dom.height};getWidth(){return this.dom.width}getHeight(){return this.dom.height}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.dom.width=e,this.dom.height=t,this}getSize(){return this._size.width=this.dom.width,this._size.height=this.dom.height,this._size}getAspect(){return this.dom.width/this.dom.height}getAspectScale(e){let t=this.dom.width/this.dom.height,n,r,i;return t>=1?(n=1/t,r=1,i=1):(n=1,r=t,i=1),e.x=n,e.y=r,e.z=i,e}};function y(){return new v}var b=class extends e{constructor(e,t,n){super(),this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get selectorText(){return this._rule.selectorText}remove(){this._sheet.removeRule(this)}extend(e){return this.sheet.cssRule(`${this.selectorText}${e}`)}hover(){return this.extend(`:hover`)}focus(){return this.extend(`:focus`)}focusWithin(){return this.extend(`:focus-within`)}active(){return this.extend(`:active`)}disabled(){return this.extend(`:disabled`)}setStyleProp(e,t){return t===void 0?(this.rule.style.removeProperty(s(e)),this):(this.rule.style.setProperty(s(e),c(e,t)),this)}},x=class extends u{constructor(e){super(),this._body=e}_body;get dom(){return this._body}};function S(e){return new x(e??document.body)}var C=class extends u{constructor(e){super(),this._head=e}_head;get dom(){return this._head}title(e){let t=this.dom.querySelector(`title`);return t||(t=this.dom.ownerDocument.createElement(`title`),this.dom.appendChild(t)),t.textContent=e,this}charset(e){let t=this.dom.querySelector(`meta[charset]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),this.dom.insertBefore(t,this.dom.firstChild)),t.setAttribute(`charset`,e),this}viewport(e){let t=this.dom.querySelector(`meta[name="viewport"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`viewport`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}httpEquiv(e,t){let n=this.dom.querySelector(`meta[http-equiv="${e}"]`);return n||(n=this.dom.ownerDocument.createElement(`meta`),n.setAttribute(`http-equiv`,e),this.dom.appendChild(n)),n.setAttribute(`content`,t),this}csp(e){let t=Object.entries(e).map(([e,t])=>`${e} ${t}`).join(`; `);return this.httpEquiv(`Content-Security-Policy`,t)}description(e){let t=this.dom.querySelector(`meta[name="description"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`description`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}keywords(e){let t=this.dom.querySelector(`meta[name="keywords"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`keywords`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}link(e,t,n={}){let r=this.dom.querySelector(`link[rel="${e}"]`);r||(r=this.dom.ownerDocument.createElement(`link`),r.setAttribute(`rel`,e),this.dom.appendChild(r)),r.setAttribute(`href`,t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return this}};function w(e){return new C(e??document.head)}var T=class{constructor(e=window.document){this._document=e}_document;get dom(){return this._document}getBody(){return new x(this._document.body)}getHead(){return new C(this._document.head)}on(e,t,n){return this._document.addEventListener(e,t,n),this}off(e,t,n){return this._document.removeEventListener(e,t,n),this}dispatch(e){return this._document.dispatchEvent(e),this}query(e){let t=this._document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}};function E(){return new T}var D=class{constructor(e=window){this._window=e}_window;get dom(){return this._window}getDocument(){return new T(this._window.document)}on(e,t,n){return this._window.addEventListener(e,t,n),this}off(e,t,n){return this._window.removeEventListener(e,t,n),this}dispatch(e){return this._window.dispatchEvent(e),this}postMessage(e,t){return this._window.postMessage(e,t),this}};function O(e){return new D(e)}var k=class extends d{constructor(){super(`iframe`)}getContentWindow(){let e=this.dom.contentWindow;return e?new D(e):null}getContentDocument(){let e=this.dom.contentDocument;return e?new T(e):null}getBody(){let e=this.getContentDocument();return e?e.getBody():null}getHead(){let e=this.getContentDocument();return e?e.getHead():null}isSameOrigin(){try{return this.dom.contentWindow?.location.href,!0}catch{return!1}}src(e){return this.dom.src=e,this}allowFullscreen(e=!0){return this.dom.allowFullscreen=e,this}width(e){return this.dom.width=c(`width`,e),this}height(e){return this.dom.height=c(`height`,e),this}size(e,t){return this.width(e).height(t)}sandbox(e){let t=e?.join(` `);return this.attr(`sandbox`,t)}referrerPolicy(e){return this.dom.referrerPolicy=e,this}loading(e){return this.dom.loading=e,this}reloadViaSrc(){return this.dom.src&&(this.dom.src=this.dom.src),this}reloadViaLocation(){return this.dom.contentWindow?.location.reload(),this}reload(){try{this.dom.contentWindow?.location.reload()}catch{this.dom.src&&(this.dom.src=this.dom.src)}return this}queryInside(e){let t=this.getContentDocument()?.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}postMessage(e,t){let n=this.getContentWindow();return n&&n.postMessage(e,t),this}};function A(){return new k}var j=class extends d{constructor(){super(`img`)}getNaturalWidth(){return this.dom.naturalWidth??0}getNaturalHeight(){return this.dom.naturalHeight??0}src(e){return this.dom.src=e,this}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.width(e).height(t)}alt(e){return this.dom.alt=e,this}};function te(){return new j}var M=class extends d{constructor(){super(`input`),this.dom.type=`checkbox`}name(e){return this.dom.name=e,this}checked(e){return this.prop(`checked`,e),this}isChecked(){return this.getProp(`checked`)}},N=class extends d{constructor(){super(`input`),this._dom.type=`color`}_rgb={r:1,g:1,b:1};name(e){return this._dom.name=e,this}value(e){return this._dom.value=e,this}getValue(){return this._dom.value}getRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t,this._rgb.g=n,this._rgb.b=r,this._rgb}getNormalizedRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t/255,this._rgb.g=n/255,this._rgb.b=r/255,this._rgb}},P=class extends d{constructor(){super(`input`),this.dom.type=`number`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return Number(this.dom.value)}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}placeholder(e){return this.dom.placeholder=e,this}},F=class extends d{constructor(){super(`input`),this.dom.type=`range`}getValue(){return Number(this.dom.value)}getMin(){return Number(this.dom.min)}getMax(){return Number(this.dom.max)}getStep(){return Number(this.dom.step)}getRatio(){let e=this.getMin(),t=this.getMax(),n=this.getValue(),r=t-e;return r>0?Math.max(0,Math.min(1,(n-e)/r)):0}getPercent(){return this.getRatio()*100}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}bounds(e,t,n){return this.min(e).max(t).step(n)}ratio(e){let t=this.getMin(),n=this.getMax()-t,r=Math.max(0,Math.min(1,e));return this.value(t+r*n)}percent(e){return this.ratio(e/100)}trackFillColors(e,t){let n=this.getPercent();return this.linearGradient(`to right`,`${e} ${n}%`,`${t} ${n}%`)}},I=class extends d{constructor(){super(`input`),this.dom.type=`text`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}};function ne(e){switch(e){case`text`:return new I;case`number`:return new P;case`checkbox`:return new M;case`color`:return new N;case`range`:return new F}}var L=class{constructor(e,t,n){this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get length(){return this._rule.cssRules.length}get mediaText(){return this._rule.media.mediaText}cssRule(e){let t=this.length;return this.rule.insertRule(`${e}{}`,t),new b(this.sheet,t,this.rule.cssRules.item(t))}remove(){this.sheet.removeRule(this)}removeRule(e){this.rule.deleteRule(e.index)}},R=class extends d{constructor(){super(`option`)}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function re(){return new R}var z=class extends d{constructor(){super(`progress`)}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}max(e){return this.dom.max=e,this}getMax(){return this.dom.max}indeterminate(){return this.dom.removeAttribute(`value`),this}};function B(){return new z}var V=class extends d{constructor(){super(`select`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function H(){return new V}var U=class e{constructor(e){this._dom=e}_dom;get dom(){return this._dom}get sheet(){return this.dom.sheet}get length(){return this.sheet.cssRules.length}cssRule(e){let t=this.length;return this.sheet.insertRule(`${e}{}`,t),new b(this,t,this.sheet.cssRules.item(t))}mediaRule(e){let t=this.length;return this.sheet.insertRule(`@media(${e}){}`,t),new L(this,t,this.sheet.cssRules.item(t))}mediaMinWidth(e){return this.mediaRule(`min-width: ${c(`min-width`,e)}`)}mediaMaxWidth(e){return this.mediaRule(`max-width: ${c(`max-width`,e)}`)}removeRule(e){this.sheet.deleteRule(e.index)}static getSheet(t=e.DEFAULT_STYLE_ID){let n=document.head.querySelector(`#${t}`);if(n)return new e(n);{let n=document.createElement(`style`);return n.id=t,n.setAttribute(`type`,`text/css`),document.head.append(n),new e(n)}}static DEFAULT_STYLE_ID=`__neptune-style__`},W=class extends g{constructor(){super(`circle`)}cx(e){return this.attr(`cx`,e.toString())}cy(e){return this.attr(`cy`,e.toString())}r(e){return this.attr(`r`,e.toString())}};function G(){return new W}var K=class extends g{constructor(){super(`svg`)}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}viewBox(e,t,n,r){return this.attr(`viewBox`,`${e} ${t} ${n} ${r}`)}};function q(){return new K}var J=class extends g{constructor(){super(`g`)}};function Y(){return new J}var X=class extends g{constructor(){super(`path`)}d(e){let t=typeof e==`string`?e:e.toString();return this.attr(`d`,t)}};function ie(){return new X}var Z=class{_segments=[];m(e,t,n=!1){let r=n?`m`:`M`;return this._segments.push(`${r}${e} ${t}`),this}l(e,t,n=!1){let r=n?`l`:`L`;return this._segments.push(`${r}${e} ${t}`),this}h(e,t=!1){let n=t?`h`:`H`;return this._segments.push(`${n}${e}`),this}v(e,t=!1){let n=t?`v`:`V`;return this._segments.push(`${n}${e}`),this}c(e,t,n,r,i,a,o=!1){let s=o?`c`:`C`;return this._segments.push(`${s}${e} ${t}, ${n} ${r}, ${i} ${a}`),this}q(e,t,n,r,i=!1){let a=i?`q`:`Q`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}a(e,t,n,r,i,a,o,s=!1){let c=s?`a`:`A`;return this._segments.push(`${c}${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o}`),this}t(e,t,n=!1){let r=n?`t`:`T`;return this._segments.push(`${r}${e} ${t}`),this}s(e,t,n,r,i=!1){let a=i?`s`:`S`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}close(){return this._segments.push(`Z`),this}rect(e,t,n,r,i=!1){return i?this.m(e,t,!0).h(n,!0).v(r,!0).h(-n,!0).close():this.m(e,t).h(e+n).v(t+r).h(e).close()}roundedRect(e,t,n,r,i){let a=e+n,o=t+r;return this.m(e+i,t).h(a-i).a(i,i,0,!1,!0,a,t+i).v(o-i).a(i,i,0,!1,!0,a-i,o).h(e+i).a(i,i,0,!1,!0,e,o-i).v(t+i).a(i,i,0,!1,!0,e+i,t).close()}circle(e,t,n,r=!1){let i=e+n,a=t;return r?this.m(i,a,!0).a(n,n,0,!0,!1,-2*n,0,!0).a(n,n,0,!0,!1,2*n,0,!0):this.m(i,a).a(n,n,0,!0,!1,e-n,t).a(n,n,0,!0,!1,i,a)}ellipse(e,t,n,r,i=!1){let a=e+n,o=t;return i?this.m(a,o,!0).a(n,r,0,!0,!1,-2*n,0,!0).a(n,r,0,!0,!1,2*n,0,!0):this.m(a,o).a(n,r,0,!0,!1,e-n,t).a(n,r,0,!0,!1,a,o)}star(e,t,n,r,i=.5,a=!1){if(n<2)return this;let o=Math.PI/n,s=r*i;for(let i=0;i<n*2;i++){let n=i%2==0?r:s,c=i*o-Math.PI/2,l=e+n*Math.cos(c),u=t+n*Math.sin(c);if(a){let e=n*Math.cos(c),t=n*Math.sin(c);i===0?this.m(e,t,!0):this.l(e,t,!0)}else i===0?this.m(l,u):this.l(l,u)}return this.close()}polygon(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this.close()}polyline(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this}spline(e,t=.5,n=!1){let r=e.length;if(r<2)return this;let[i,a]=e[0];this.m(i,a,n);for(let o=0;o<r-1;o++){let[r,s]=e[o-1]??e[o],[c,l]=e[o],[u,d]=e[o+1],[f,p]=e[o+2]??e[o+1],m=(u-r)*t/6,h=(d-s)*t/6,g=(f-c)*t/6,_=(p-l)*t/6;if(n){let e=c+m-i,t=l+h-a,n=u-g-i,r=d-_-a,o=u-i,s=d-a;this.c(e,t,n,r,o,s,!0)}else this.c(c+m,l+h,u-g,d-_,u,d);[i,a]=[u,d]}return this}pathFrom(e,t=!1,n=!1){if(e.length<2)return this;let[r,i]=e[0];this.m(r,i,n);for(let t=1,r=e.length;t<r;t++){let[r,i]=e[t];this.l(r,i,n)}return t&&this.close(),this}polyBezier(e,t=!1){if(e.length<4||(e.length-1)%3!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=3){let[a,o]=e[i],[s,c]=e[i+1],[l,u]=e[i+2];if(t){let e=a-n,t=o-r,i=s-n,d=c-r,f=l-n,p=u-r;this.c(e,t,i,d,f,p,!0)}else this.c(a,o,s,c,l,u);[n,r]=[l,u]}return this}polyQuadratic(e,t=!1){if(e.length<3||(e.length-1)%2!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=2){let[a,o]=e[i],[s,c]=e[i+1];if(t){let e=a-n,t=o-r,i=s-n,l=c-r;this.q(e,t,i,l,!0)}else this.q(a,o,s,c);[n,r]=[s,c]}return this}polyArc(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1,a=e.length;i<a;i++){let[a,o,s,c,l,u,d]=e[i];if(t){let e=u-n,t=d-r;this.a(a,o,s,c,l,e,t,!0)}else this.a(a,o,s,c,l,u,d);[n,r]=[u,d]}return this}toString(){return this._segments.join(` `)}};function ae(){return new Z}var Q=class extends g{constructor(){super(`rect`)}x(e){return this.attr(`x`,e.toString())}y(e){return this.attr(`y`,e.toString())}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}rx(e){return this.attr(`rx`,e.toString())}ry(e){return this.attr(`ry`,e.toString())}};function oe(){return new Q}var $=class extends d{constructor(){super(`textarea`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}rows(e){return this.dom.rows=e,this}cols(e){return this.dom.cols=e,this}wrap(e){return this.dom.wrap=e,this}maxLength(e){return this.dom.maxLength=e,this}};function se(){return new $}export{f as $,h as $a,S as $body,ee as $btn,y as $canvas,G as $circle,ae as $d,E as $document,Y as $group,w as $head,A as $iframe,te as $img,ne as $input,re as $option,ie as $path,B as $progress,p as $query,oe as $rect,H as $select,q as $svg,se as $textarea,O as $window,m as AnchorElement,u as BaseDom,e as BaseStyle,g as BaseSvgElement,_ as Button,v as Canvas,b as CssRule,x as DomBody,T as DomDocument,d as DomElement,C as DomHead,D as DomWindow,k as IFrame,j as ImageElement,M as InputCheckbox,N as InputColor,P as InputNumber,F as InputRange,I as InputText,L as MediaRule,R as OptionElement,z as ProgressElement,r as SVG_TAGS,V as SelectElement,U as StyleSheet,W as SvgCircle,K as SvgElement,J as SvgGroup,X as SvgPath,Z as SvgPathData,Q as SvgRect,i as TAG_ALIAS,$ as TextArea,t as UNITLESS_CSS_PROPS,n as VENDOR_CSS_PROPS,s as camelToKebab,c as getStyleValue,a as uniqueId};
|
|
1
|
+
var e=class{p(e){return this.setStyleProp(`padding`,e)}pt(e){return this.setStyleProp(`paddingTop`,e)}pr(e){return this.setStyleProp(`paddingRight`,e)}pb(e){return this.setStyleProp(`paddingBottom`,e)}pl(e){return this.setStyleProp(`paddingLeft`,e)}px(e){return this.pl(e).pr(e)}py(e){return this.pt(e).pb(e)}m(e){return this.setStyleProp(`margin`,e)}mt(e){return this.setStyleProp(`marginTop`,e)}mr(e){return this.setStyleProp(`marginRight`,e)}mb(e){return this.setStyleProp(`marginBottom`,e)}ml(e){return this.setStyleProp(`marginLeft`,e)}radius(e){return this.setStyleProp(`borderRadius`,e)}radiusTopLeft(e){return this.setStyleProp(`borderTopLeftRadius`,e)}radiusTopRight(e){return this.setStyleProp(`borderTopRightRadius`,e)}radiusBottomLeft(e){return this.setStyleProp(`borderBottomLeftRadius`,e)}radiusBottomRight(e){return this.setStyleProp(`borderBottomRightRadius`,e)}radiusTop(e){return this.radiusTopLeft(e).radiusTopRight(e)}radiusBottom(e){return this.radiusBottomLeft(e).radiusBottomRight(e)}radiusLeft(e){return this.radiusTopLeft(e).radiusBottomLeft(e)}radiusRight(e){return this.radiusTopRight(e).radiusBottomRight(e)}radiusX(e){return this.radiusLeft(e).radiusRight(e)}radiusY(e){return this.radiusTop(e).radiusBottom(e)}display(e){return this.setStyleProp(`display`,e)}flexShrink(e){return this.setStyleProp(`flexShrink`,e)}flex(e){return this.setStyleProp(`flex`,e)}bgColor(e){return this.setStyleProp(`backgroundColor`,e)}color(e){return this.setStyleProp(`color`,e)}w(e){return this.setStyleProp(`width`,e)}h(e){return this.setStyleProp(`height`,e)}minW(e){return this.setStyleProp(`minWidth`,e)}maxW(e){return this.setStyleProp(`maxWidth`,e)}minH(e){return this.setStyleProp(`minHeight`,e)}maxH(e){return this.setStyleProp(`maxHeight`,e)}b(e){return this.setStyleProp(`border`,e)}bWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderWidth`,t)}bStyle(e){return this.setStyleProp(`borderStyle`,e)}bColor(e){return this.setStyleProp(`borderColor`,e)}bt(e){return this.setStyleProp(`borderTop`,e)}btWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderTopWidth`,t)}btStyle(e){return this.setStyleProp(`borderTopStyle`,e)}btColor(e){return this.setStyleProp(`borderTopColor`,e)}br(e){return this.setStyleProp(`borderRight`,e)}brWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderRightWidth`,t)}brStyle(e){return this.setStyleProp(`borderRightStyle`,e)}brColor(e){return this.setStyleProp(`borderRightColor`,e)}bb(e){return this.setStyleProp(`borderBottom`,e)}bbWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderBottomWidth`,t)}bbStyle(e){return this.setStyleProp(`borderBottomStyle`,e)}bbColor(e){return this.setStyleProp(`borderBottomColor`,e)}bl(e){return this.setStyleProp(`borderLeft`,e)}blWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`borderLeftWidth`,t)}blStyle(e){return this.setStyleProp(`borderLeftStyle`,e)}blColor(e){return this.setStyleProp(`borderLeftColor`,e)}bx(e){return this.setStyleProp(`borderLeft`,e),this.setStyleProp(`borderRight`,e),this}by(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderBottom`,e),this}btl(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderLeft`,e),this}btr(e){return this.setStyleProp(`borderTop`,e),this.setStyleProp(`borderRight`,e),this}bbl(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderLeft`,e),this}bbr(e){return this.setStyleProp(`borderBottom`,e),this.setStyleProp(`borderRight`,e),this}bCollapse(e){return this.setStyleProp(`borderCollapse`,e)}overflow(e){return this.setStyleProp(`overflow`,e)}overflowY(e){return this.setStyleProp(`overflowY`,e)}overflowX(e){return this.setStyleProp(`overflowX`,e)}fontSize(e){return this.setStyleProp(`fontSize`,e)}fontWeight(e){return this.setStyleProp(`fontWeight`,e)}fontFamily(e){return this.setStyleProp(`fontFamily`,e)}fontStyle(e){return this.setStyleProp(`fontStyle`,e)}textAlign(e){return this.setStyleProp(`textAlign`,e)}textDecoration(e){return this.setStyleProp(`textDecoration`,e)}pos(e){return this.setStyleProp(`position`,e)}top(e){return this.setStyleProp(`top`,e)}bottom(e){return this.setStyleProp(`bottom`,e)}left(e){return this.setStyleProp(`left`,e)}right(e){return this.setStyleProp(`right`,e)}cursor(e){return this.setStyleProp(`cursor`,e)}alignItems(e){return this.setStyleProp(`alignItems`,e)}justifyContent(e){return this.setStyleProp(`justifyContent`,e)}gap(e){return this.setStyleProp(`gap`,e)}flexDirection(e){return this.setStyleProp(`flexDirection`,e)}templateColumns(e){return this.setStyleProp(`gridTemplateColumns`,e)}templateRows(e){return this.setStyleProp(`gridTemplateRows`,e)}appearance(e){return this.setStyleProp(`appearance`,e)}userSelect(e){return this.setStyleProp(`userSelect`,e)}verticalAlign(e){return this.setStyleProp(`verticalAlign`,e)}whiteSpace(e){return this.setStyleProp(`whiteSpace`,e)}textOverflow(e){return this.setStyleProp(`textOverflow`,e)}zIndex(e){return this.setStyleProp(`zIndex`,e)}opacity(e){return this.setStyleProp(`opacity`,e)}transform(e){return this.setStyleProp(`transform`,e)}translate(e,t){let n=typeof e==`number`?`${e}px`:e,r=typeof t==`number`?`${t}px`:t;return this.setStyleProp(`transform`,`translate(${n}, ${r})`)}translateX(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateX(${t})`)}translateY(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`transform`,`translateY(${t})`)}scale(e,t){let n=typeof e==`number`?e.toString():e,r=typeof t==`number`?t.toString():t;return this.setStyleProp(`transform`,`scale(${n}, ${r})`)}scaleX(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleX(${t})`)}scaleY(e){let t=typeof e==`number`?e.toString():e;return this.setStyleProp(`transform`,`scaleY(${t})`)}rotate(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotate(${t})`)}rotateX(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateX(${t})`)}rotateY(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateY(${t})`)}rotateZ(e){let t=typeof e==`number`?`${e}deg`:e;return this.setStyleProp(`transform`,`rotateZ(${t})`)}transformOrigin(e){return this.setStyleProp(`transformOrigin`,e)}transition(e){return this.setStyleProp(`transition`,e)}willChange(e){return this.setStyleProp(`willChange`,e)}boxShadow(e){return this.setStyleProp(`boxShadow`,e)}boxSizing(e){return this.setStyleProp(`boxSizing`,e)}background(e){return this.setStyleProp(`background`,e)}outline(e){return this.setStyleProp(`outline`,e)}outlineWidth(e){let t=typeof e==`number`?`${e}px`:e;return this.setStyleProp(`outlineWidth`,t)}outlineStyle(e){return this.setStyleProp(`outlineStyle`,e)}outlineColor(e){return this.setStyleProp(`outlineColor`,e)}outlineOffset(e){return this.setStyleProp(`outlineOffset`,e)}lineHeight(e){return this.setStyleProp(`lineHeight`,e)}wordWrap(e){return this.setStyleProp(`wordWrap`,e)}tabSize(e){return this.setStyleProp(`tabSize`,e)}resize(e){return this.setStyleProp(`resize`,e)}fill(e){return this.setStyleProp(`fill`,e)}stroke(e){return this.setStyleProp(`stroke`,e)}strokeWidth(e){return this.setStyleProp(`strokeWidth`,e)}overflowEllipsis(){return this.overflow(`hidden`).whiteSpace(`nowrap`).textOverflow(`ellipsis`)}linearGradient(e,...t){let n=`linear-gradient(${e}, ${t.join(`, `)})`;return this.setStyleProp(`background`,n)}style(e){for(let t of Object.keys(e))this.setStyleProp(t,e[t]);return this}};const t={opacity:1,zIndex:1,fontWeight:1,lineHeight:1,flexGrow:1,flexShrink:1,order:1,zoom:1,scale:1,counterIncrement:1,counterReset:1,tabSize:1,orphans:1,widows:1,columns:1,columnCount:1,gridRow:1,gridColumn:1},n={WebkitAppearance:1},r=`svg.svgA.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),i={svgA:`a`};function a(){return`${Date.now().toString(36)}-${(o++).toString(36)}`}let o=0;function s(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function c(e,n){return typeof n==`number`?t[e]?String(n):`${n}px`:n}const l=Symbol(`BaseDomIdentity`);var u=class t extends e{[l]=!0;getClientWidth(){return this.dom.clientWidth??0}getClientHeight(){return this.dom.clientHeight??0}getRect(){return this.dom.getBoundingClientRect()}getComputedStyle(){return window.getComputedStyle(this.dom)}getChildAt(e){return this.dom.children.item(e)}getNodeAt(e){return this.dom.childNodes.item(e)}getChildren(){return Array.from(this.dom.children)}getNodes(){return Array.from(this.dom.childNodes)}getText(){return this.dom.textContent}getAttr(e){return this.dom.getAttribute(e)}getProp(e){return this.dom[e]}hasClass(e){return this.dom.classList.contains(e)}text(e){return this.dom.textContent=e==null?``:String(e),this}html(e){return this.dom.innerHTML=e,this}id(e){return this.dom.id=e??``,this}attr(e,t){return t===void 0||t===!1?this.dom.removeAttribute(e):t===!0?this.dom.setAttribute(e,``):this.dom.setAttribute(e,String(t)),this}attrs(e){for(let[t,n]of Object.entries(e))this.attr(t,n);return this}toggleAttr(e,t){return this.dom.toggleAttribute(e,t),this}prop(e,t){return this.dom[e]=t,this}props(e){for(let[t,n]of Object.entries(e))this.prop(t,n);return this}className(e){return e==null?this.dom.removeAttribute(`class`):this.dom.setAttribute(`class`,e),this}tabIndex(e){return this.attr(`tabindex`,e)}toggleClass(e,t){return this.dom.classList.toggle(e,t),this}on(e,t,n){return this.dom.addEventListener(e,t,n),this}off(e,t,n){return this.dom.removeEventListener(e,t,n),this}add(...e){return this.dom.append(...e.map(e=>this.resolveNode(e))),this}insertAtIndex(e,...t){let n=Array.from(this.dom.children),r=Math.max(0,Math.min(e,n.length));for(let e of t){let t=n[r]??null;this.dom.insertBefore(this.resolveNode(e),t),r++}return this}setChildren(...e){return this.clear().add(...e)}setChildrenFromIndex(e,...t){let n=Array.from(this.dom.children),r=n.length,i=Math.max(0,Math.min(e,r));for(let e=i;e<r;e++)this.dom.removeChild(n[e]);let a=this.dom.children[i]??null;for(let e of t)this.dom.insertBefore(this.resolveNode(e),a);return this}clear(){return this.dom.textContent=``,this}clearRange(e,t){let n=Array.from(this.dom.children),r=Math.max(0,e??0),i=Math.min(n.length,t??n.length);for(let e=r;e<i;e++)this.dom.removeChild(n[e]);return this}contains(e){let n=e instanceof t?e.dom:e;return this.dom.contains(n)}query(e){let t=this.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}ref(e){return e(this),this}resolveNode(e){return typeof e==`string`||typeof e==`number`?document.createTextNode(String(e)):t.isBaseDom(e)?e.dom:e}setStyleProp(e,t){return t===void 0?(this.dom.style.removeProperty(s(e)),this):(this.dom.style.setProperty(s(e),c(e,t)),this)}static isBaseDom(e){return typeof e!=`object`||!e?!1:Object.getOwnPropertySymbols(e).includes(l)}},d=class extends u{constructor(e,t){super(),this._tag=i[e]??e,this._isSvg=r.includes(this._tag),this._dom=t??(this._isSvg?document.createElementNS(`http://www.w3.org/2000/svg`,this._tag):document.createElement(this._tag))}_tag;_isSvg;_dom;get tag(){return this._tag}get isSvg(){return this._isSvg}get dom(){return this._dom}remove(){this.dom.remove()}htmlFor(e){return this.tag===`label`&&(this.dom.htmlFor=e??``),this}title(e){return this.attr(`title`,e)}disabled(e){return this.attr(`disabled`,e)}disable(){return this.disabled(!0)}enable(){return this.disabled(!1)}focus(){return this.dom.focus(),this}blur(){return this.dom.blur(),this}click(){return this.isSvg||this.dom.click(),this}popover(e){return this.attr(`popover`,e)}popoverTarget(e){return this.attr(`popovertarget`,e)}popoverTargetAction(e){return this.attr(`popovertargetaction`,e)}showPopover(e){return this.dom.showPopover({source:e}),this}hidePopover(){return this.dom.hidePopover(),this}togglePopover(e,t){return this.dom.togglePopover({force:e,source:t}),this}};function f(e){return new d(e)}function p(e){let t=document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}var m=class extends d{constructor(){super(`a`)}href(e){return this.dom.href=e,this}};function h(){return new m}var g=class extends d{fill(e){return this.attr(`fill`,e)}fillRule(e){return this.attr(`fill-rule`,e)}fillOpacity(e){return this.attr(`fill-opacity`,e)}stroke(e){return this.attr(`stroke`,e)}strokeWidth(e){return this.attr(`stroke-width`,e)}strokeLinejoin(e){return this.attr(`stroke-linejoin`,e)}strokeLinecap(e){return this.attr(`stroke-linecap`,e)}strokeMiterlimit(e){return this.attr(`stroke-miterlimit`,e.toString())}strokeOpacity(e){return this.attr(`stroke-opacity`,e)}strokeDasharray(e){return this.attr(`stroke-dasharray`,e)}strokeDashoffset(e){return this.attr(`stroke-dashoffset`,e)}opacity(e){return this.attr(`opacity`,e)}transform(e){return this.attr(`transform`,e)}translate(e,t){return this.attr(`transform`,`translate(${e} ${t})`)}translateX(e){return this.attr(`transform`,`translate(${e} 0)`)}translateY(e){return this.attr(`transform`,`translate(0 ${e})`)}rotate(e,t,n){let r=t!==void 0&&n!==void 0?`rotate(${e} ${t} ${n})`:`rotate(${e})`;return this.attr(`transform`,r)}scale(e){return this.attr(`transform`,`scale(${e})`)}scaleX(e){return this.attr(`transform`,`scale(${e} 1)`)}scaleY(e){return this.attr(`transform`,`scale(1 ${e})`)}skewX(e){return this.attr(`transform`,`skewX(${e})`)}skewY(e){return this.attr(`transform`,`skewY(${e})`)}vectorEffect(e){return this.attr(`vector-effect`,e)}},_=class extends d{constructor(){super(`button`)}type(e){return this.dom.type=e,this}};function ee(){return new _}var v=class extends d{constructor(e){super(`canvas`,e)}_size={width:this.dom.width,height:this.dom.height};getWidth(){return this.dom.width}getHeight(){return this.dom.height}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.dom.width=e,this.dom.height=t,this}getSize(){return this._size.width=this.dom.width,this._size.height=this.dom.height,this._size}getAspect(){return this.dom.width/this.dom.height}getAspectScale(e){let t=this.dom.width/this.dom.height,n,r,i;return t>=1?(n=1/t,r=1,i=1):(n=1,r=t,i=1),e.x=n,e.y=r,e.z=i,e}};function y(){return new v}var b=class extends e{constructor(e,t,n){super(),this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get selectorText(){return this._rule.selectorText}remove(){this._sheet.removeRule(this)}extend(e){return this.sheet.cssRule(`${this.selectorText}${e}`)}hover(){return this.extend(`:hover`)}focus(){return this.extend(`:focus`)}focusWithin(){return this.extend(`:focus-within`)}active(){return this.extend(`:active`)}disabled(){return this.extend(`:disabled`)}setStyleProp(e,t){return t===void 0?(this.rule.style.removeProperty(s(e)),this):(this.rule.style.setProperty(s(e),c(e,t)),this)}},x=class extends u{constructor(e){super(),this._body=e}_body;get dom(){return this._body}};function S(e){return new x(e??document.body)}var C=class extends u{constructor(e){super(),this._head=e}_head;get dom(){return this._head}title(e){let t=this.dom.querySelector(`title`);return t||(t=this.dom.ownerDocument.createElement(`title`),this.dom.appendChild(t)),t.textContent=e,this}charset(e){let t=this.dom.querySelector(`meta[charset]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),this.dom.insertBefore(t,this.dom.firstChild)),t.setAttribute(`charset`,e),this}viewport(e){let t=this.dom.querySelector(`meta[name="viewport"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`viewport`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}httpEquiv(e,t){let n=this.dom.querySelector(`meta[http-equiv="${e}"]`);return n||(n=this.dom.ownerDocument.createElement(`meta`),n.setAttribute(`http-equiv`,e),this.dom.appendChild(n)),n.setAttribute(`content`,t),this}csp(e){let t=Object.entries(e).map(([e,t])=>`${e} ${t}`).join(`; `);return this.httpEquiv(`Content-Security-Policy`,t)}description(e){let t=this.dom.querySelector(`meta[name="description"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`description`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}keywords(e){let t=this.dom.querySelector(`meta[name="keywords"]`);return t||(t=this.dom.ownerDocument.createElement(`meta`),t.setAttribute(`name`,`keywords`),this.dom.appendChild(t)),t.setAttribute(`content`,e),this}link(e,t,n={}){let r=this.dom.querySelector(`link[rel="${e}"]`);r||(r=this.dom.ownerDocument.createElement(`link`),r.setAttribute(`rel`,e),this.dom.appendChild(r)),r.setAttribute(`href`,t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return this}};function w(e){return new C(e??document.head)}var T=class{constructor(e=window.document){this._document=e}_document;get dom(){return this._document}getBody(){return new x(this._document.body)}getHead(){return new C(this._document.head)}on(e,t,n){return this._document.addEventListener(e,t,n),this}off(e,t,n){return this._document.removeEventListener(e,t,n),this}dispatch(e){return this._document.dispatchEvent(e),this}query(e){let t=this._document.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}};function E(){return new T}var D=class{constructor(e=window){this._window=e}_window;get dom(){return this._window}getDocument(){return new T(this._window.document)}on(e,t,n){return this._window.addEventListener(e,t,n),this}off(e,t,n){return this._window.removeEventListener(e,t,n),this}dispatch(e){return this._window.dispatchEvent(e),this}postMessage(e,t){return this._window.postMessage(e,t),this}};function O(e){return new D(e)}var k=class extends d{constructor(){super(`iframe`)}getContentWindow(){let e=this.dom.contentWindow;return e?new D(e):null}getContentDocument(){let e=this.dom.contentDocument;return e?new T(e):null}getBody(){let e=this.getContentDocument();return e?e.getBody():null}getHead(){let e=this.getContentDocument();return e?e.getHead():null}isSameOrigin(){try{return this.dom.contentWindow?.location.href,!0}catch{return!1}}src(e){return this.dom.src=e,this}allowFullscreen(e=!0){return this.dom.allowFullscreen=e,this}width(e){return this.dom.width=c(`width`,e),this}height(e){return this.dom.height=c(`height`,e),this}size(e,t){return this.width(e).height(t)}sandbox(e){let t=e?.join(` `);return this.attr(`sandbox`,t)}referrerPolicy(e){return this.dom.referrerPolicy=e,this}loading(e){return this.dom.loading=e,this}reloadViaSrc(){return this.dom.src&&(this.dom.src=this.dom.src),this}reloadViaLocation(){return this.dom.contentWindow?.location.reload(),this}reload(){try{this.dom.contentWindow?.location.reload()}catch{this.dom.src&&(this.dom.src=this.dom.src)}return this}queryInside(e){let t=this.getContentDocument()?.dom.querySelector(e);return t?new d(t.tagName.toLowerCase(),t):null}postMessage(e,t){let n=this.getContentWindow();return n&&n.postMessage(e,t),this}};function A(){return new k}var j=class extends d{constructor(){super(`img`)}getNaturalWidth(){return this.dom.naturalWidth??0}getNaturalHeight(){return this.dom.naturalHeight??0}src(e){return this.dom.src=e,this}width(e){return this.dom.width=e,this}height(e){return this.dom.height=e,this}setSize(e,t){return this.width(e).height(t)}alt(e){return this.dom.alt=e,this}};function te(){return new j}var M=class extends d{constructor(){super(`input`),this.dom.type=`checkbox`}name(e){return this.dom.name=e,this}checked(e){return this.prop(`checked`,e),this}isChecked(){return this.getProp(`checked`)}},N=class extends d{constructor(){super(`input`),this._dom.type=`color`}_rgb={r:1,g:1,b:1};name(e){return this._dom.name=e,this}value(e){return this._dom.value=e,this}getValue(){return this._dom.value}getRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t,this._rgb.g=n,this._rgb.b=r,this._rgb}getNormalizedRGB(){let e=this._dom.value,t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return this._rgb.r=t/255,this._rgb.g=n/255,this._rgb.b=r/255,this._rgb}},P=class extends d{constructor(){super(`input`),this.dom.type=`number`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return Number(this.dom.value)}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}placeholder(e){return this.dom.placeholder=e,this}},F=class extends d{constructor(){super(`input`),this.dom.type=`range`}getValue(){return Number(this.dom.value)}getMin(){return Number(this.dom.min)}getMax(){return Number(this.dom.max)}getStep(){return Number(this.dom.step)}getRatio(){let e=this.getMin(),t=this.getMax(),n=this.getValue(),r=t-e;return r>0?Math.max(0,Math.min(1,(n-e)/r)):0}getPercent(){return this.getRatio()*100}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}min(e){return this.dom.min=String(e),this}max(e){return this.dom.max=String(e),this}step(e){return this.dom.step=String(e),this}bounds(e,t,n){return this.min(e).max(t).step(n)}ratio(e){let t=this.getMin(),n=this.getMax()-t,r=Math.max(0,Math.min(1,e));return this.value(t+r*n)}percent(e){return this.ratio(e/100)}trackFillColors(e,t){let n=this.getPercent();return this.linearGradient(`to right`,`${e} ${n}%`,`${t} ${n}%`)}},I=class extends d{constructor(){super(`input`),this.dom.type=`text`}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}};function ne(e){switch(e){case`text`:return new I;case`number`:return new P;case`checkbox`:return new M;case`color`:return new N;case`range`:return new F}}var L=class{constructor(e,t,n){this._sheet=e,this._index=t,this._rule=n}_sheet;_index;_rule;get sheet(){return this._sheet}get index(){return this._index}get rule(){return this._rule}get length(){return this._rule.cssRules.length}get mediaText(){return this._rule.media.mediaText}cssRule(e){let t=this.length;return this.rule.insertRule(`${e}{}`,t),new b(this.sheet,t,this.rule.cssRules.item(t))}remove(){this.sheet.removeRule(this)}removeRule(e){this.rule.deleteRule(e.index)}},R=class extends d{constructor(){super(`option`)}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function re(){return new R}var z=class extends d{constructor(){super(`progress`)}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}max(e){return this.dom.max=e,this}getMax(){return this.dom.max}indeterminate(){return this.dom.removeAttribute(`value`),this}};function B(){return new z}var V=class extends d{constructor(){super(`select`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=String(e),this}getValue(){return this.dom.value}};function H(){return new V}var U=class e{constructor(e){this._dom=e}_dom;get dom(){return this._dom}get sheet(){return this.dom.sheet}get length(){return this.sheet.cssRules.length}cssRule(e){let t=this.length;return this.sheet.insertRule(`${e}{}`,t),new b(this,t,this.sheet.cssRules.item(t))}mediaRule(e){let t=this.length;return this.sheet.insertRule(`@media(${e}){}`,t),new L(this,t,this.sheet.cssRules.item(t))}mediaMinWidth(e){return this.mediaRule(`min-width: ${c(`min-width`,e)}`)}mediaMaxWidth(e){return this.mediaRule(`max-width: ${c(`max-width`,e)}`)}removeRule(e){this.sheet.deleteRule(e.index)}static getSheet(t=e.DEFAULT_STYLE_ID){let n=document.head.querySelector(`#${t}`);if(n)return new e(n);{let n=document.createElement(`style`);return n.id=t,n.setAttribute(`type`,`text/css`),document.head.append(n),new e(n)}}static DEFAULT_STYLE_ID=`__neptune-style__`},W=class extends g{constructor(){super(`circle`)}cx(e){return this.attr(`cx`,e.toString())}cy(e){return this.attr(`cy`,e.toString())}r(e){return this.attr(`r`,e.toString())}};function G(){return new W}var K=class extends g{constructor(){super(`svg`)}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}viewBox(e,t,n,r){return this.attr(`viewBox`,`${e} ${t} ${n} ${r}`)}};function q(){return new K}var J=class extends g{constructor(){super(`g`)}};function Y(){return new J}var X=class extends g{constructor(){super(`path`)}d(e){let t=typeof e==`string`?e:e.toString();return this.attr(`d`,t)}};function ie(){return new X}var Z=class{_segments=[];m(e,t,n=!1){let r=n?`m`:`M`;return this._segments.push(`${r}${e} ${t}`),this}l(e,t,n=!1){let r=n?`l`:`L`;return this._segments.push(`${r}${e} ${t}`),this}h(e,t=!1){let n=t?`h`:`H`;return this._segments.push(`${n}${e}`),this}v(e,t=!1){let n=t?`v`:`V`;return this._segments.push(`${n}${e}`),this}c(e,t,n,r,i,a,o=!1){let s=o?`c`:`C`;return this._segments.push(`${s}${e} ${t}, ${n} ${r}, ${i} ${a}`),this}q(e,t,n,r,i=!1){let a=i?`q`:`Q`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}a(e,t,n,r,i,a,o,s=!1){let c=s?`a`:`A`;return this._segments.push(`${c}${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o}`),this}t(e,t,n=!1){let r=n?`t`:`T`;return this._segments.push(`${r}${e} ${t}`),this}s(e,t,n,r,i=!1){let a=i?`s`:`S`;return this._segments.push(`${a}${e} ${t}, ${n} ${r}`),this}close(){return this._segments.push(`Z`),this}rect(e,t,n,r,i=!1){return i?this.m(e,t,!0).h(n,!0).v(r,!0).h(-n,!0).close():this.m(e,t).h(e+n).v(t+r).h(e).close()}roundedRect(e,t,n,r,i){let a=e+n,o=t+r;return this.m(e+i,t).h(a-i).a(i,i,0,!1,!0,a,t+i).v(o-i).a(i,i,0,!1,!0,a-i,o).h(e+i).a(i,i,0,!1,!0,e,o-i).v(t+i).a(i,i,0,!1,!0,e+i,t).close()}circle(e,t,n,r=!1){let i=e+n,a=t;return r?this.m(i,a,!0).a(n,n,0,!0,!1,-2*n,0,!0).a(n,n,0,!0,!1,2*n,0,!0):this.m(i,a).a(n,n,0,!0,!1,e-n,t).a(n,n,0,!0,!1,i,a)}ellipse(e,t,n,r,i=!1){let a=e+n,o=t;return i?this.m(a,o,!0).a(n,r,0,!0,!1,-2*n,0,!0).a(n,r,0,!0,!1,2*n,0,!0):this.m(a,o).a(n,r,0,!0,!1,e-n,t).a(n,r,0,!0,!1,a,o)}star(e,t,n,r,i=.5,a=!1){if(n<2)return this;let o=Math.PI/n,s=r*i;for(let i=0;i<n*2;i++){let n=i%2==0?r:s,c=i*o-Math.PI/2,l=e+n*Math.cos(c),u=t+n*Math.sin(c);if(a){let e=n*Math.cos(c),t=n*Math.sin(c);i===0?this.m(e,t,!0):this.l(e,t,!0)}else i===0?this.m(l,u):this.l(l,u)}return this.close()}polygon(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this.close()}polyline(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let n=1,r=e.length;n<r;n++){let[r,i]=e[n];this.l(r,i,t)}return this}spline(e,t=.5,n=!1){let r=e.length;if(r<2)return this;let[i,a]=e[0];this.m(i,a,n);for(let o=0;o<r-1;o++){let[r,s]=e[o-1]??e[o],[c,l]=e[o],[u,d]=e[o+1],[f,p]=e[o+2]??e[o+1],m=(u-r)*t/6,h=(d-s)*t/6,g=(f-c)*t/6,_=(p-l)*t/6;if(n){let e=c+m-i,t=l+h-a,n=u-g-i,r=d-_-a,o=u-i,s=d-a;this.c(e,t,n,r,o,s,!0)}else this.c(c+m,l+h,u-g,d-_,u,d);[i,a]=[u,d]}return this}pathFrom(e,t=!1,n=!1){if(e.length<2)return this;let[r,i]=e[0];this.m(r,i,n);for(let t=1,r=e.length;t<r;t++){let[r,i]=e[t];this.l(r,i,n)}return t&&this.close(),this}polyBezier(e,t=!1){if(e.length<4||(e.length-1)%3!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=3){let[a,o]=e[i],[s,c]=e[i+1],[l,u]=e[i+2];if(t){let e=a-n,t=o-r,i=s-n,d=c-r,f=l-n,p=u-r;this.c(e,t,i,d,f,p,!0)}else this.c(a,o,s,c,l,u);[n,r]=[l,u]}return this}polyQuadratic(e,t=!1){if(e.length<3||(e.length-1)%2!=0)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1;i<e.length;i+=2){let[a,o]=e[i],[s,c]=e[i+1];if(t){let e=a-n,t=o-r,i=s-n,l=c-r;this.q(e,t,i,l,!0)}else this.q(a,o,s,c);[n,r]=[s,c]}return this}polyArc(e,t=!1){if(e.length<2)return this;let[n,r]=e[0];this.m(n,r,t);for(let i=1,a=e.length;i<a;i++){let[a,o,s,c,l,u,d]=e[i];if(t){let e=u-n,t=d-r;this.a(a,o,s,c,l,e,t,!0)}else this.a(a,o,s,c,l,u,d);[n,r]=[u,d]}return this}toString(){return this._segments.join(` `)}};function ae(){return new Z}var Q=class extends g{constructor(){super(`rect`)}x(e){return this.attr(`x`,e.toString())}y(e){return this.attr(`y`,e.toString())}width(e){return this.attr(`width`,e.toString())}height(e){return this.attr(`height`,e.toString())}rx(e){return this.attr(`rx`,e.toString())}ry(e){return this.attr(`ry`,e.toString())}};function oe(){return new Q}var $=class extends d{constructor(){super(`textarea`)}name(e){return this.dom.name=e,this}value(e){return this.dom.value=e,this}getValue(){return this.dom.value}placeholder(e){return this.dom.placeholder=e,this}rows(e){return this.dom.rows=e,this}cols(e){return this.dom.cols=e,this}wrap(e){return this.dom.wrap=e,this}maxLength(e){return this.dom.maxLength=e,this}};function se(){return new $}export{f as $,h as $a,S as $body,ee as $btn,y as $canvas,G as $circle,ae as $d,E as $document,Y as $group,w as $head,A as $iframe,te as $img,ne as $input,re as $option,ie as $path,B as $progress,p as $query,oe as $rect,H as $select,q as $svg,se as $textarea,O as $window,m as AnchorElement,u as BaseDom,e as BaseStyle,g as BaseSvgElement,_ as Button,v as Canvas,b as CssRule,x as DomBody,T as DomDocument,d as DomElement,C as DomHead,D as DomWindow,k as IFrame,j as ImageElement,M as InputCheckbox,N as InputColor,P as InputNumber,F as InputRange,I as InputText,L as MediaRule,R as OptionElement,z as ProgressElement,r as SVG_TAGS,V as SelectElement,U as StyleSheet,W as SvgCircle,K as SvgElement,J as SvgGroup,X as SvgPath,Z as SvgPathData,Q as SvgRect,i as TAG_ALIAS,$ as TextArea,t as UNITLESS_CSS_PROPS,n as VENDOR_CSS_PROPS,s as camelToKebab,c as getStyleValue,a as uniqueId};
|