@record-evolution/widget-scada 1.0.2
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/README.md +50 -0
- package/dist/scada_symbols/3-phase-voltage-relay-hp.svg +549 -0
- package/dist/scada_symbols/apartments-hp.svg +344 -0
- package/dist/scada_symbols/battery-hp.svg +473 -0
- package/dist/scada_symbols/bottom-flow-meter.svg +933 -0
- package/dist/scada_symbols/bottom-light-bulb-hp.svg +346 -0
- package/dist/scada_symbols/bottom-right-elbow-connector-hp.svg +233 -0
- package/dist/scada_symbols/bottom-right-elbow-pipe.svg +532 -0
- package/dist/scada_symbols/bottom-tee-connector-hp.svg +470 -0
- package/dist/scada_symbols/bottom-tee-pipe.svg +857 -0
- package/dist/scada_symbols/centrifugal-pump.svg +626 -0
- package/dist/scada_symbols/conical-tank.svg +1136 -0
- package/dist/scada_symbols/consumers-hp.svg +346 -0
- package/dist/scada_symbols/control-panel-hp.svg +332 -0
- package/dist/scada_symbols/crane-hp.svg +346 -0
- package/dist/scada_symbols/cross-connector-hp.svg +586 -0
- package/dist/scada_symbols/cross-pipe.svg +1051 -0
- package/dist/scada_symbols/curcuit-breaker-hp.svg +444 -0
- package/dist/scada_symbols/cylindrical-tank.svg +1332 -0
- package/dist/scada_symbols/drawwork-hp.svg +355 -0
- package/dist/scada_symbols/drill-hp.svg +354 -0
- package/dist/scada_symbols/drilling-line-hp.svg +361 -0
- package/dist/scada_symbols/drilling-rig-hp.svg +354 -0
- package/dist/scada_symbols/dynamic-horizontal-scale-hp.svg +605 -0
- package/dist/scada_symbols/dynamic-vertical-scale-hp.svg +598 -0
- package/dist/scada_symbols/electrical-distribution-board-hp.svg +332 -0
- package/dist/scada_symbols/electrical-engine-hp.svg +360 -0
- package/dist/scada_symbols/elevated-tank.svg +1564 -0
- package/dist/scada_symbols/energy-meter-hp.svg +488 -0
- package/dist/scada_symbols/extra-long-horizontal-pipe.svg +426 -0
- package/dist/scada_symbols/extra-long-vertical-pipe.svg +438 -0
- package/dist/scada_symbols/filter-hp.svg +287 -0
- package/dist/scada_symbols/four-rate-energy-meter-hp.svg +891 -0
- package/dist/scada_symbols/fuel-generator-hp.svg +359 -0
- package/dist/scada_symbols/gas-preventer-hp.svg +361 -0
- package/dist/scada_symbols/gas-wellhead-hp.svg +363 -0
- package/dist/scada_symbols/heat-exchanger-hp.svg +363 -0
- package/dist/scada_symbols/heat-pump-hp.svg +532 -0
- package/dist/scada_symbols/high-voltage-tower-hp.svg +297 -0
- package/dist/scada_symbols/hook-hp.svg +293 -0
- package/dist/scada_symbols/horizontal-ball-valve.svg +271 -0
- package/dist/scada_symbols/horizontal-broken-pipe.svg +97 -0
- package/dist/scada_symbols/horizontal-connector-hp.svg +268 -0
- package/dist/scada_symbols/horizontal-curcuit-breaker-hp.svg +439 -0
- package/dist/scada_symbols/horizontal-energy-system-controller-hp.svg +378 -0
- package/dist/scada_symbols/horizontal-inline-flow-meter.svg +913 -0
- package/dist/scada_symbols/horizontal-pipe.svg +422 -0
- package/dist/scada_symbols/horizontal-tank-hp.svg +524 -0
- package/dist/scada_symbols/horizontal-tank.svg +1343 -0
- package/dist/scada_symbols/horizontal-valve-hp.svg +392 -0
- package/dist/scada_symbols/horizontal-wheel-valve.svg +300 -0
- package/dist/scada_symbols/house-hp.svg +349 -0
- package/dist/scada_symbols/index.json +702 -0
- package/dist/scada_symbols/industrial-fuel-generator-hp.svg +358 -0
- package/dist/scada_symbols/inverter-hp.svg +578 -0
- package/dist/scada_symbols/large-conical-tank.svg +1146 -0
- package/dist/scada_symbols/large-cylindrical-tank.svg +1323 -0
- package/dist/scada_symbols/large-horizontal-separator-connector-hp.svg +342 -0
- package/dist/scada_symbols/large-horizontal-separator-hp.svg +350 -0
- package/dist/scada_symbols/large-inverter-hp.svg +578 -0
- package/dist/scada_symbols/large-stand-cylindrical-tank.svg +1384 -0
- package/dist/scada_symbols/large-stand-vertical-tank.svg +1386 -0
- package/dist/scada_symbols/large-vertical-separator-connector-hp.svg +350 -0
- package/dist/scada_symbols/large-vertical-separator-hp.svg +350 -0
- package/dist/scada_symbols/large-vertical-tank.svg +1325 -0
- package/dist/scada_symbols/leak-sensor.svg +158 -0
- package/dist/scada_symbols/left-analog-water-level-meter.svg +748 -0
- package/dist/scada_symbols/left-bottom-elbow-connector-hp.svg +233 -0
- package/dist/scada_symbols/left-bottom-elbow-pipe.svg +532 -0
- package/dist/scada_symbols/left-drain-pipe.svg +166 -0
- package/dist/scada_symbols/left-elbow-drain-pipe.svg +181 -0
- package/dist/scada_symbols/left-flow-meter.svg +911 -0
- package/dist/scada_symbols/left-heat-pump.svg +939 -0
- package/dist/scada_symbols/left-motor-pump.svg +541 -0
- package/dist/scada_symbols/left-tee-connector-hp.svg +470 -0
- package/dist/scada_symbols/left-tee-pipe.svg +869 -0
- package/dist/scada_symbols/left-top-elbow-connector-hp.svg +233 -0
- package/dist/scada_symbols/left-top-elbow-pipe.svg +532 -0
- package/dist/scada_symbols/long-bottom-filter.svg +88 -0
- package/dist/scada_symbols/long-horizontal-broken-pipe.svg +97 -0
- package/dist/scada_symbols/long-horizontal-connector-hp.svg +269 -0
- package/dist/scada_symbols/long-horizontal-pipe.svg +488 -0
- package/dist/scada_symbols/long-top-filter.svg +88 -0
- package/dist/scada_symbols/long-vertical-broken-pipe.svg +97 -0
- package/dist/scada_symbols/long-vertical-connector-hp.svg +267 -0
- package/dist/scada_symbols/long-vertical-pipe.svg +485 -0
- package/dist/scada_symbols/low-voltage-tower-hp.svg +278 -0
- package/dist/scada_symbols/low-voltage-transformer-tower-hp.svg +334 -0
- package/dist/scada_symbols/manufacture-hp.svg +344 -0
- package/dist/scada_symbols/meter.svg +751 -0
- package/dist/scada_symbols/oil-pump-hp.svg +357 -0
- package/dist/scada_symbols/platform-hp.svg +267 -0
- package/dist/scada_symbols/pool-hp.svg +523 -0
- package/dist/scada_symbols/pool.svg +998 -0
- package/dist/scada_symbols/power-socket-hp.svg +371 -0
- package/dist/scada_symbols/power-transformer-hp.svg +359 -0
- package/dist/scada_symbols/preventer-hp.svg +343 -0
- package/dist/scada_symbols/pump-hp.svg +368 -0
- package/dist/scada_symbols/right-analog-water-level-meter.svg +748 -0
- package/dist/scada_symbols/right-drain-pipe.svg +167 -0
- package/dist/scada_symbols/right-elbow-drain-pipe.svg +178 -0
- package/dist/scada_symbols/right-flow-meter.svg +911 -0
- package/dist/scada_symbols/right-heat-pump.svg +948 -0
- package/dist/scada_symbols/right-motor-pump.svg +541 -0
- package/dist/scada_symbols/right-tee-connector-hp.svg +470 -0
- package/dist/scada_symbols/right-tee-pipe.svg +857 -0
- package/dist/scada_symbols/rotor-hp.svg +346 -0
- package/dist/scada_symbols/sand-filter-hp.svg +652 -0
- package/dist/scada_symbols/sand-filter.svg +704 -0
- package/dist/scada_symbols/short-bottom-filter.svg +88 -0
- package/dist/scada_symbols/short-left-drain-pipe.svg +160 -0
- package/dist/scada_symbols/short-right-drain-pipe.svg +160 -0
- package/dist/scada_symbols/short-top-filter.svg +88 -0
- package/dist/scada_symbols/short-vertical-tank-hp.svg +522 -0
- package/dist/scada_symbols/simple-horizontal-scale-hp.svg +509 -0
- package/dist/scada_symbols/simple-vertical-scale-hp.svg +509 -0
- package/dist/scada_symbols/single-key-switch-hp.svg +373 -0
- package/dist/scada_symbols/small-cylindrical-tank.svg +1306 -0
- package/dist/scada_symbols/small-horizontal-separator-connector-hp.svg +342 -0
- package/dist/scada_symbols/small-horizontal-separator-hp.svg +342 -0
- package/dist/scada_symbols/small-left-meter.svg +725 -0
- package/dist/scada_symbols/small-left-motor-pump.svg +443 -0
- package/dist/scada_symbols/small-meter.svg +694 -0
- package/dist/scada_symbols/small-power-transformer-hp.svg +359 -0
- package/dist/scada_symbols/small-right-center.svg +725 -0
- package/dist/scada_symbols/small-right-motor-pump.svg +443 -0
- package/dist/scada_symbols/small-spherical-tank.svg +1362 -0
- package/dist/scada_symbols/small-vertical-separator-connector-hp.svg +342 -0
- package/dist/scada_symbols/small-vertical-separator-hp.svg +342 -0
- package/dist/scada_symbols/solar-panel-hp.svg +353 -0
- package/dist/scada_symbols/spherical-tank.svg +1392 -0
- package/dist/scada_symbols/stand-cylindrical-tank.svg +1393 -0
- package/dist/scada_symbols/stand-horizontal-tank.svg +1404 -0
- package/dist/scada_symbols/stand-solar-panel-hp.svg +357 -0
- package/dist/scada_symbols/stand-vertical-short-tank.svg +1366 -0
- package/dist/scada_symbols/stand-vertical-tank.svg +1386 -0
- package/dist/scada_symbols/three-rate-energy-meter-hp.svg +759 -0
- package/dist/scada_symbols/top-flow-meter.svg +927 -0
- package/dist/scada_symbols/top-light-bulb-hp.svg +346 -0
- package/dist/scada_symbols/top-right-elbow-connector-hp.svg +233 -0
- package/dist/scada_symbols/top-right-elbow-pipe.svg +532 -0
- package/dist/scada_symbols/top-tee-connector-hp.svg +470 -0
- package/dist/scada_symbols/top-tee-pipe.svg +857 -0
- package/dist/scada_symbols/turbine-hp.svg +377 -0
- package/dist/scada_symbols/two-key-switch-hp.svg +489 -0
- package/dist/scada_symbols/two-rate-energy-meter-hp.svg +627 -0
- package/dist/scada_symbols/vertical-ball-valve.svg +271 -0
- package/dist/scada_symbols/vertical-broken-pipe.svg +97 -0
- package/dist/scada_symbols/vertical-connector-hp.svg +269 -0
- package/dist/scada_symbols/vertical-energy-system-controller-hp.svg +378 -0
- package/dist/scada_symbols/vertical-inline-flow-meter.svg +913 -0
- package/dist/scada_symbols/vertical-pipe.svg +422 -0
- package/dist/scada_symbols/vertical-short-tank.svg +1305 -0
- package/dist/scada_symbols/vertical-tank-hp.svg +524 -0
- package/dist/scada_symbols/vertical-tank.svg +1326 -0
- package/dist/scada_symbols/vertical-valve-hp.svg +392 -0
- package/dist/scada_symbols/vertical-wheel-valve.svg +300 -0
- package/dist/scada_symbols/voltage-relay-hp.svg +440 -0
- package/dist/scada_symbols/voltage-stabilizer-hp.svg +584 -0
- package/dist/scada_symbols/waterstop.svg +276 -0
- package/dist/scada_symbols/wind-turbine-cluster-hp.svg +370 -0
- package/dist/scada_symbols/wind-turbine-hp.svg +360 -0
- package/dist/widget-scada.js +1331 -0
- package/dist/widget-scada.js.map +1 -0
- package/package.json +61 -0
- package/scada_symbols/3-phase-voltage-relay-hp.svg +549 -0
- package/scada_symbols/apartments-hp.svg +344 -0
- package/scada_symbols/battery-hp.svg +473 -0
- package/scada_symbols/bottom-flow-meter.svg +933 -0
- package/scada_symbols/bottom-light-bulb-hp.svg +346 -0
- package/scada_symbols/bottom-right-elbow-connector-hp.svg +233 -0
- package/scada_symbols/bottom-right-elbow-pipe.svg +532 -0
- package/scada_symbols/bottom-tee-connector-hp.svg +470 -0
- package/scada_symbols/bottom-tee-pipe.svg +857 -0
- package/scada_symbols/centrifugal-pump.svg +626 -0
- package/scada_symbols/conical-tank.svg +1136 -0
- package/scada_symbols/consumers-hp.svg +346 -0
- package/scada_symbols/control-panel-hp.svg +332 -0
- package/scada_symbols/crane-hp.svg +346 -0
- package/scada_symbols/cross-connector-hp.svg +586 -0
- package/scada_symbols/cross-pipe.svg +1051 -0
- package/scada_symbols/curcuit-breaker-hp.svg +444 -0
- package/scada_symbols/cylindrical-tank.svg +1332 -0
- package/scada_symbols/drawwork-hp.svg +355 -0
- package/scada_symbols/drill-hp.svg +354 -0
- package/scada_symbols/drilling-line-hp.svg +361 -0
- package/scada_symbols/drilling-rig-hp.svg +354 -0
- package/scada_symbols/dynamic-horizontal-scale-hp.svg +605 -0
- package/scada_symbols/dynamic-vertical-scale-hp.svg +598 -0
- package/scada_symbols/electrical-distribution-board-hp.svg +332 -0
- package/scada_symbols/electrical-engine-hp.svg +360 -0
- package/scada_symbols/elevated-tank.svg +1564 -0
- package/scada_symbols/energy-meter-hp.svg +488 -0
- package/scada_symbols/extra-long-horizontal-pipe.svg +426 -0
- package/scada_symbols/extra-long-vertical-pipe.svg +438 -0
- package/scada_symbols/filter-hp.svg +287 -0
- package/scada_symbols/four-rate-energy-meter-hp.svg +891 -0
- package/scada_symbols/fuel-generator-hp.svg +359 -0
- package/scada_symbols/gas-preventer-hp.svg +361 -0
- package/scada_symbols/gas-wellhead-hp.svg +363 -0
- package/scada_symbols/heat-exchanger-hp.svg +363 -0
- package/scada_symbols/heat-pump-hp.svg +532 -0
- package/scada_symbols/high-voltage-tower-hp.svg +297 -0
- package/scada_symbols/hook-hp.svg +293 -0
- package/scada_symbols/horizontal-ball-valve.svg +271 -0
- package/scada_symbols/horizontal-broken-pipe.svg +97 -0
- package/scada_symbols/horizontal-connector-hp.svg +268 -0
- package/scada_symbols/horizontal-curcuit-breaker-hp.svg +439 -0
- package/scada_symbols/horizontal-energy-system-controller-hp.svg +378 -0
- package/scada_symbols/horizontal-inline-flow-meter.svg +913 -0
- package/scada_symbols/horizontal-pipe.svg +422 -0
- package/scada_symbols/horizontal-tank-hp.svg +524 -0
- package/scada_symbols/horizontal-tank.svg +1343 -0
- package/scada_symbols/horizontal-valve-hp.svg +392 -0
- package/scada_symbols/horizontal-wheel-valve.svg +300 -0
- package/scada_symbols/house-hp.svg +349 -0
- package/scada_symbols/index.json +702 -0
- package/scada_symbols/industrial-fuel-generator-hp.svg +358 -0
- package/scada_symbols/inverter-hp.svg +578 -0
- package/scada_symbols/large-conical-tank.svg +1146 -0
- package/scada_symbols/large-cylindrical-tank.svg +1323 -0
- package/scada_symbols/large-horizontal-separator-connector-hp.svg +342 -0
- package/scada_symbols/large-horizontal-separator-hp.svg +350 -0
- package/scada_symbols/large-inverter-hp.svg +578 -0
- package/scada_symbols/large-stand-cylindrical-tank.svg +1384 -0
- package/scada_symbols/large-stand-vertical-tank.svg +1386 -0
- package/scada_symbols/large-vertical-separator-connector-hp.svg +350 -0
- package/scada_symbols/large-vertical-separator-hp.svg +350 -0
- package/scada_symbols/large-vertical-tank.svg +1325 -0
- package/scada_symbols/leak-sensor.svg +158 -0
- package/scada_symbols/left-analog-water-level-meter.svg +748 -0
- package/scada_symbols/left-bottom-elbow-connector-hp.svg +233 -0
- package/scada_symbols/left-bottom-elbow-pipe.svg +532 -0
- package/scada_symbols/left-drain-pipe.svg +166 -0
- package/scada_symbols/left-elbow-drain-pipe.svg +181 -0
- package/scada_symbols/left-flow-meter.svg +911 -0
- package/scada_symbols/left-heat-pump.svg +939 -0
- package/scada_symbols/left-motor-pump.svg +541 -0
- package/scada_symbols/left-tee-connector-hp.svg +470 -0
- package/scada_symbols/left-tee-pipe.svg +869 -0
- package/scada_symbols/left-top-elbow-connector-hp.svg +233 -0
- package/scada_symbols/left-top-elbow-pipe.svg +532 -0
- package/scada_symbols/long-bottom-filter.svg +88 -0
- package/scada_symbols/long-horizontal-broken-pipe.svg +97 -0
- package/scada_symbols/long-horizontal-connector-hp.svg +269 -0
- package/scada_symbols/long-horizontal-pipe.svg +488 -0
- package/scada_symbols/long-top-filter.svg +88 -0
- package/scada_symbols/long-vertical-broken-pipe.svg +97 -0
- package/scada_symbols/long-vertical-connector-hp.svg +267 -0
- package/scada_symbols/long-vertical-pipe.svg +485 -0
- package/scada_symbols/low-voltage-tower-hp.svg +278 -0
- package/scada_symbols/low-voltage-transformer-tower-hp.svg +334 -0
- package/scada_symbols/manufacture-hp.svg +344 -0
- package/scada_symbols/meter.svg +751 -0
- package/scada_symbols/oil-pump-hp.svg +357 -0
- package/scada_symbols/platform-hp.svg +267 -0
- package/scada_symbols/pool-hp.svg +523 -0
- package/scada_symbols/pool.svg +998 -0
- package/scada_symbols/power-socket-hp.svg +371 -0
- package/scada_symbols/power-transformer-hp.svg +359 -0
- package/scada_symbols/preventer-hp.svg +343 -0
- package/scada_symbols/pump-hp.svg +368 -0
- package/scada_symbols/right-analog-water-level-meter.svg +748 -0
- package/scada_symbols/right-drain-pipe.svg +167 -0
- package/scada_symbols/right-elbow-drain-pipe.svg +178 -0
- package/scada_symbols/right-flow-meter.svg +911 -0
- package/scada_symbols/right-heat-pump.svg +948 -0
- package/scada_symbols/right-motor-pump.svg +541 -0
- package/scada_symbols/right-tee-connector-hp.svg +470 -0
- package/scada_symbols/right-tee-pipe.svg +857 -0
- package/scada_symbols/rotor-hp.svg +346 -0
- package/scada_symbols/sand-filter-hp.svg +652 -0
- package/scada_symbols/sand-filter.svg +704 -0
- package/scada_symbols/short-bottom-filter.svg +88 -0
- package/scada_symbols/short-left-drain-pipe.svg +160 -0
- package/scada_symbols/short-right-drain-pipe.svg +160 -0
- package/scada_symbols/short-top-filter.svg +88 -0
- package/scada_symbols/short-vertical-tank-hp.svg +522 -0
- package/scada_symbols/simple-horizontal-scale-hp.svg +509 -0
- package/scada_symbols/simple-vertical-scale-hp.svg +509 -0
- package/scada_symbols/single-key-switch-hp.svg +373 -0
- package/scada_symbols/small-cylindrical-tank.svg +1306 -0
- package/scada_symbols/small-horizontal-separator-connector-hp.svg +342 -0
- package/scada_symbols/small-horizontal-separator-hp.svg +342 -0
- package/scada_symbols/small-left-meter.svg +725 -0
- package/scada_symbols/small-left-motor-pump.svg +443 -0
- package/scada_symbols/small-meter.svg +694 -0
- package/scada_symbols/small-power-transformer-hp.svg +359 -0
- package/scada_symbols/small-right-center.svg +725 -0
- package/scada_symbols/small-right-motor-pump.svg +443 -0
- package/scada_symbols/small-spherical-tank.svg +1362 -0
- package/scada_symbols/small-vertical-separator-connector-hp.svg +342 -0
- package/scada_symbols/small-vertical-separator-hp.svg +342 -0
- package/scada_symbols/solar-panel-hp.svg +353 -0
- package/scada_symbols/spherical-tank.svg +1392 -0
- package/scada_symbols/stand-cylindrical-tank.svg +1393 -0
- package/scada_symbols/stand-horizontal-tank.svg +1404 -0
- package/scada_symbols/stand-solar-panel-hp.svg +357 -0
- package/scada_symbols/stand-vertical-short-tank.svg +1366 -0
- package/scada_symbols/stand-vertical-tank.svg +1386 -0
- package/scada_symbols/three-rate-energy-meter-hp.svg +759 -0
- package/scada_symbols/top-flow-meter.svg +927 -0
- package/scada_symbols/top-light-bulb-hp.svg +346 -0
- package/scada_symbols/top-right-elbow-connector-hp.svg +233 -0
- package/scada_symbols/top-right-elbow-pipe.svg +532 -0
- package/scada_symbols/top-tee-connector-hp.svg +470 -0
- package/scada_symbols/top-tee-pipe.svg +857 -0
- package/scada_symbols/turbine-hp.svg +377 -0
- package/scada_symbols/two-key-switch-hp.svg +489 -0
- package/scada_symbols/two-rate-energy-meter-hp.svg +627 -0
- package/scada_symbols/vertical-ball-valve.svg +271 -0
- package/scada_symbols/vertical-broken-pipe.svg +97 -0
- package/scada_symbols/vertical-connector-hp.svg +269 -0
- package/scada_symbols/vertical-energy-system-controller-hp.svg +378 -0
- package/scada_symbols/vertical-inline-flow-meter.svg +913 -0
- package/scada_symbols/vertical-pipe.svg +422 -0
- package/scada_symbols/vertical-short-tank.svg +1305 -0
- package/scada_symbols/vertical-tank-hp.svg +524 -0
- package/scada_symbols/vertical-tank.svg +1326 -0
- package/scada_symbols/vertical-valve-hp.svg +392 -0
- package/scada_symbols/vertical-wheel-valve.svg +300 -0
- package/scada_symbols/voltage-relay-hp.svg +440 -0
- package/scada_symbols/voltage-stabilizer-hp.svg +584 -0
- package/scada_symbols/waterstop.svg +276 -0
- package/scada_symbols/wind-turbine-cluster-hp.svg +370 -0
- package/scada_symbols/wind-turbine-hp.svg +360 -0
- package/src/default-data.json +18 -0
- package/src/definition-schema.d.ts +1521 -0
- package/src/definition-schema.json +5228 -0
- package/src/scada-runtime.ts +1290 -0
- package/src/widget-scada.ts +269 -0
- package/thumbnail.png +0 -0
|
@@ -0,0 +1,1331 @@
|
|
|
1
|
+
const R = globalThis, G = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Y = /* @__PURE__ */ Symbol(), et = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let pt = class {
|
|
3
|
+
constructor(t, e, s) {
|
|
4
|
+
if (this._$cssResult$ = !0, s !== Y) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
|
+
this.cssText = t, this.t = e;
|
|
6
|
+
}
|
|
7
|
+
get styleSheet() {
|
|
8
|
+
let t = this.o;
|
|
9
|
+
const e = this.t;
|
|
10
|
+
if (G && t === void 0) {
|
|
11
|
+
const s = e !== void 0 && e.length === 1;
|
|
12
|
+
s && (t = et.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && et.set(e, t));
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return this.cssText;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const vt = (n) => new pt(typeof n == "string" ? n : n + "", void 0, Y), _t = (n, ...t) => {
|
|
21
|
+
const e = n.length === 1 ? n[0] : t.reduce((s, i, r) => s + ((o) => {
|
|
22
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
|
23
|
+
if (typeof o == "number") return o;
|
|
24
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
|
+
})(i) + n[r + 1], n[0]);
|
|
26
|
+
return new pt(e, n, Y);
|
|
27
|
+
}, St = (n, t) => {
|
|
28
|
+
if (G) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
29
|
+
else for (const e of t) {
|
|
30
|
+
const s = document.createElement("style"), i = R.litNonce;
|
|
31
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
|
|
32
|
+
}
|
|
33
|
+
}, st = G ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
34
|
+
let e = "";
|
|
35
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
36
|
+
return vt(e);
|
|
37
|
+
})(n) : n;
|
|
38
|
+
const { is: wt, defineProperty: Et, getOwnPropertyDescriptor: Ct, getOwnPropertyNames: xt, getOwnPropertySymbols: Tt, getPrototypeOf: Pt } = Object, j = globalThis, it = j.trustedTypes, kt = it ? it.emptyScript : "", Ot = j.reactiveElementPolyfillSupport, P = (n, t) => n, H = { toAttribute(n, t) {
|
|
39
|
+
switch (t) {
|
|
40
|
+
case Boolean:
|
|
41
|
+
n = n ? kt : null;
|
|
42
|
+
break;
|
|
43
|
+
case Object:
|
|
44
|
+
case Array:
|
|
45
|
+
n = n == null ? n : JSON.stringify(n);
|
|
46
|
+
}
|
|
47
|
+
return n;
|
|
48
|
+
}, fromAttribute(n, t) {
|
|
49
|
+
let e = n;
|
|
50
|
+
switch (t) {
|
|
51
|
+
case Boolean:
|
|
52
|
+
e = n !== null;
|
|
53
|
+
break;
|
|
54
|
+
case Number:
|
|
55
|
+
e = n === null ? null : Number(n);
|
|
56
|
+
break;
|
|
57
|
+
case Object:
|
|
58
|
+
case Array:
|
|
59
|
+
try {
|
|
60
|
+
e = JSON.parse(n);
|
|
61
|
+
} catch {
|
|
62
|
+
e = null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return e;
|
|
66
|
+
} }, X = (n, t) => !wt(n, t), rt = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: X };
|
|
67
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), j.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
|
+
let C = class extends HTMLElement {
|
|
69
|
+
static addInitializer(t) {
|
|
70
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
71
|
+
}
|
|
72
|
+
static get observedAttributes() {
|
|
73
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
74
|
+
}
|
|
75
|
+
static createProperty(t, e = rt) {
|
|
76
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
77
|
+
const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
|
78
|
+
i !== void 0 && Et(this.prototype, t, i);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
static getPropertyDescriptor(t, e, s) {
|
|
82
|
+
const { get: i, set: r } = Ct(this.prototype, t) ?? { get() {
|
|
83
|
+
return this[e];
|
|
84
|
+
}, set(o) {
|
|
85
|
+
this[e] = o;
|
|
86
|
+
} };
|
|
87
|
+
return { get: i, set(o) {
|
|
88
|
+
const h = i?.call(this);
|
|
89
|
+
r?.call(this, o), this.requestUpdate(t, h, s);
|
|
90
|
+
}, configurable: !0, enumerable: !0 };
|
|
91
|
+
}
|
|
92
|
+
static getPropertyOptions(t) {
|
|
93
|
+
return this.elementProperties.get(t) ?? rt;
|
|
94
|
+
}
|
|
95
|
+
static _$Ei() {
|
|
96
|
+
if (this.hasOwnProperty(P("elementProperties"))) return;
|
|
97
|
+
const t = Pt(this);
|
|
98
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
99
|
+
}
|
|
100
|
+
static finalize() {
|
|
101
|
+
if (this.hasOwnProperty(P("finalized"))) return;
|
|
102
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
103
|
+
const e = this.properties, s = [...xt(e), ...Tt(e)];
|
|
104
|
+
for (const i of s) this.createProperty(i, e[i]);
|
|
105
|
+
}
|
|
106
|
+
const t = this[Symbol.metadata];
|
|
107
|
+
if (t !== null) {
|
|
108
|
+
const e = litPropertyMetadata.get(t);
|
|
109
|
+
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
|
|
110
|
+
}
|
|
111
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
112
|
+
for (const [e, s] of this.elementProperties) {
|
|
113
|
+
const i = this._$Eu(e, s);
|
|
114
|
+
i !== void 0 && this._$Eh.set(i, e);
|
|
115
|
+
}
|
|
116
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
117
|
+
}
|
|
118
|
+
static finalizeStyles(t) {
|
|
119
|
+
const e = [];
|
|
120
|
+
if (Array.isArray(t)) {
|
|
121
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
122
|
+
for (const i of s) e.unshift(st(i));
|
|
123
|
+
} else t !== void 0 && e.push(st(t));
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
static _$Eu(t, e) {
|
|
127
|
+
const s = e.attribute;
|
|
128
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
129
|
+
}
|
|
130
|
+
constructor() {
|
|
131
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
132
|
+
}
|
|
133
|
+
_$Ev() {
|
|
134
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
|
|
135
|
+
}
|
|
136
|
+
addController(t) {
|
|
137
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
138
|
+
}
|
|
139
|
+
removeController(t) {
|
|
140
|
+
this._$EO?.delete(t);
|
|
141
|
+
}
|
|
142
|
+
_$E_() {
|
|
143
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
144
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
145
|
+
t.size > 0 && (this._$Ep = t);
|
|
146
|
+
}
|
|
147
|
+
createRenderRoot() {
|
|
148
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
149
|
+
return St(t, this.constructor.elementStyles), t;
|
|
150
|
+
}
|
|
151
|
+
connectedCallback() {
|
|
152
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
153
|
+
}
|
|
154
|
+
enableUpdating(t) {
|
|
155
|
+
}
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
this._$EO?.forEach((t) => t.hostDisconnected?.());
|
|
158
|
+
}
|
|
159
|
+
attributeChangedCallback(t, e, s) {
|
|
160
|
+
this._$AK(t, s);
|
|
161
|
+
}
|
|
162
|
+
_$ET(t, e) {
|
|
163
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
164
|
+
if (i !== void 0 && s.reflect === !0) {
|
|
165
|
+
const r = (s.converter?.toAttribute !== void 0 ? s.converter : H).toAttribute(e, s.type);
|
|
166
|
+
this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
_$AK(t, e) {
|
|
170
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
|
171
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
172
|
+
const r = s.getPropertyOptions(i), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : H;
|
|
173
|
+
this._$Em = i;
|
|
174
|
+
const h = o.fromAttribute(e, r.type);
|
|
175
|
+
this[i] = h ?? this._$Ej?.get(i) ?? h, this._$Em = null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
requestUpdate(t, e, s, i = !1, r) {
|
|
179
|
+
if (t !== void 0) {
|
|
180
|
+
const o = this.constructor;
|
|
181
|
+
if (i === !1 && (r = this[t]), s ??= o.getPropertyOptions(t), !((s.hasChanged ?? X)(r, e) || s.useDefault && s.reflect && r === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, s)))) return;
|
|
182
|
+
this.C(t, e, s);
|
|
183
|
+
}
|
|
184
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
185
|
+
}
|
|
186
|
+
C(t, e, { useDefault: s, reflect: i, wrapped: r }, o) {
|
|
187
|
+
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), r !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
188
|
+
}
|
|
189
|
+
async _$EP() {
|
|
190
|
+
this.isUpdatePending = !0;
|
|
191
|
+
try {
|
|
192
|
+
await this._$ES;
|
|
193
|
+
} catch (e) {
|
|
194
|
+
Promise.reject(e);
|
|
195
|
+
}
|
|
196
|
+
const t = this.scheduleUpdate();
|
|
197
|
+
return t != null && await t, !this.isUpdatePending;
|
|
198
|
+
}
|
|
199
|
+
scheduleUpdate() {
|
|
200
|
+
return this.performUpdate();
|
|
201
|
+
}
|
|
202
|
+
performUpdate() {
|
|
203
|
+
if (!this.isUpdatePending) return;
|
|
204
|
+
if (!this.hasUpdated) {
|
|
205
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
206
|
+
for (const [i, r] of this._$Ep) this[i] = r;
|
|
207
|
+
this._$Ep = void 0;
|
|
208
|
+
}
|
|
209
|
+
const s = this.constructor.elementProperties;
|
|
210
|
+
if (s.size > 0) for (const [i, r] of s) {
|
|
211
|
+
const { wrapped: o } = r, h = this[i];
|
|
212
|
+
o !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, r, h);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
let t = !1;
|
|
216
|
+
const e = this._$AL;
|
|
217
|
+
try {
|
|
218
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
|
|
219
|
+
} catch (s) {
|
|
220
|
+
throw t = !1, this._$EM(), s;
|
|
221
|
+
}
|
|
222
|
+
t && this._$AE(e);
|
|
223
|
+
}
|
|
224
|
+
willUpdate(t) {
|
|
225
|
+
}
|
|
226
|
+
_$AE(t) {
|
|
227
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
228
|
+
}
|
|
229
|
+
_$EM() {
|
|
230
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
231
|
+
}
|
|
232
|
+
get updateComplete() {
|
|
233
|
+
return this.getUpdateComplete();
|
|
234
|
+
}
|
|
235
|
+
getUpdateComplete() {
|
|
236
|
+
return this._$ES;
|
|
237
|
+
}
|
|
238
|
+
shouldUpdate(t) {
|
|
239
|
+
return !0;
|
|
240
|
+
}
|
|
241
|
+
update(t) {
|
|
242
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
243
|
+
}
|
|
244
|
+
updated(t) {
|
|
245
|
+
}
|
|
246
|
+
firstUpdated(t) {
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[P("elementProperties")] = /* @__PURE__ */ new Map(), C[P("finalized")] = /* @__PURE__ */ new Map(), Ot?.({ ReactiveElement: C }), (j.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
+
const J = globalThis, nt = (n) => n, I = J.trustedTypes, ot = I ? I.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, mt = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, gt = "?" + b, Nt = `<${gt}>`, S = document, O = () => S.createComment(""), N = (n) => n === null || typeof n != "object" && typeof n != "function", Z = Array.isArray, Mt = (n) => Z(n) || typeof n?.[Symbol.iterator] == "function", B = `[
|
|
251
|
+
\f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, at = /-->/g, ht = />/g, A = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), lt = /'/g, ct = /"/g, yt = /^(?:script|style|textarea|title)$/i, Lt = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), z = Lt(1), w = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), _ = S.createTreeWalker(S, 129);
|
|
253
|
+
function $t(n, t) {
|
|
254
|
+
if (!Z(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
|
+
return ot !== void 0 ? ot.createHTML(t) : t;
|
|
256
|
+
}
|
|
257
|
+
const Rt = (n, t) => {
|
|
258
|
+
const e = n.length - 1, s = [];
|
|
259
|
+
let i, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = T;
|
|
260
|
+
for (let h = 0; h < e; h++) {
|
|
261
|
+
const a = n[h];
|
|
262
|
+
let u, c, l = -1, p = 0;
|
|
263
|
+
for (; p < a.length && (o.lastIndex = p, c = o.exec(a), c !== null); ) p = o.lastIndex, o === T ? c[1] === "!--" ? o = at : c[1] !== void 0 ? o = ht : c[2] !== void 0 ? (yt.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = A) : c[3] !== void 0 && (o = A) : o === A ? c[0] === ">" ? (o = i ?? T, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, u = c[1], o = c[3] === void 0 ? A : c[3] === '"' ? ct : lt) : o === ct || o === lt ? o = A : o === at || o === ht ? o = T : (o = A, i = void 0);
|
|
264
|
+
const m = o === A && n[h + 1].startsWith("/>") ? " " : "";
|
|
265
|
+
r += o === T ? a + Nt : l >= 0 ? (s.push(u), a.slice(0, l) + mt + a.slice(l) + b + m) : a + b + (l === -2 ? h : m);
|
|
266
|
+
}
|
|
267
|
+
return [$t(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
268
|
+
};
|
|
269
|
+
class M {
|
|
270
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
271
|
+
let i;
|
|
272
|
+
this.parts = [];
|
|
273
|
+
let r = 0, o = 0;
|
|
274
|
+
const h = t.length - 1, a = this.parts, [u, c] = Rt(t, e);
|
|
275
|
+
if (this.el = M.createElement(u, s), _.currentNode = this.el.content, e === 2 || e === 3) {
|
|
276
|
+
const l = this.el.content.firstChild;
|
|
277
|
+
l.replaceWith(...l.childNodes);
|
|
278
|
+
}
|
|
279
|
+
for (; (i = _.nextNode()) !== null && a.length < h; ) {
|
|
280
|
+
if (i.nodeType === 1) {
|
|
281
|
+
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(mt)) {
|
|
282
|
+
const p = c[o++], m = i.getAttribute(l).split(b), y = /([.?@])?(.*)/.exec(p);
|
|
283
|
+
a.push({ type: 1, index: r, name: y[2], strings: m, ctor: y[1] === "." ? Ht : y[1] === "?" ? It : y[1] === "@" ? Dt : F }), i.removeAttribute(l);
|
|
284
|
+
} else l.startsWith(b) && (a.push({ type: 6, index: r }), i.removeAttribute(l));
|
|
285
|
+
if (yt.test(i.tagName)) {
|
|
286
|
+
const l = i.textContent.split(b), p = l.length - 1;
|
|
287
|
+
if (p > 0) {
|
|
288
|
+
i.textContent = I ? I.emptyScript : "";
|
|
289
|
+
for (let m = 0; m < p; m++) i.append(l[m], O()), _.nextNode(), a.push({ type: 2, index: ++r });
|
|
290
|
+
i.append(l[p], O());
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
} else if (i.nodeType === 8) if (i.data === gt) a.push({ type: 2, index: r });
|
|
294
|
+
else {
|
|
295
|
+
let l = -1;
|
|
296
|
+
for (; (l = i.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: r }), l += b.length - 1;
|
|
297
|
+
}
|
|
298
|
+
r++;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
static createElement(t, e) {
|
|
302
|
+
const s = S.createElement("template");
|
|
303
|
+
return s.innerHTML = t, s;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function x(n, t, e = n, s) {
|
|
307
|
+
if (t === w) return t;
|
|
308
|
+
let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
|
|
309
|
+
const r = N(t) ? void 0 : t._$litDirective$;
|
|
310
|
+
return i?.constructor !== r && (i?._$AO?.(!1), r === void 0 ? i = void 0 : (i = new r(n), i._$AT(n, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = x(n, i._$AS(n, t.values), i, s)), t;
|
|
311
|
+
}
|
|
312
|
+
class Ut {
|
|
313
|
+
constructor(t, e) {
|
|
314
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
315
|
+
}
|
|
316
|
+
get parentNode() {
|
|
317
|
+
return this._$AM.parentNode;
|
|
318
|
+
}
|
|
319
|
+
get _$AU() {
|
|
320
|
+
return this._$AM._$AU;
|
|
321
|
+
}
|
|
322
|
+
u(t) {
|
|
323
|
+
const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? S).importNode(e, !0);
|
|
324
|
+
_.currentNode = i;
|
|
325
|
+
let r = _.nextNode(), o = 0, h = 0, a = s[0];
|
|
326
|
+
for (; a !== void 0; ) {
|
|
327
|
+
if (o === a.index) {
|
|
328
|
+
let u;
|
|
329
|
+
a.type === 2 ? u = new L(r, r.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (u = new jt(r, this, t)), this._$AV.push(u), a = s[++h];
|
|
330
|
+
}
|
|
331
|
+
o !== a?.index && (r = _.nextNode(), o++);
|
|
332
|
+
}
|
|
333
|
+
return _.currentNode = S, i;
|
|
334
|
+
}
|
|
335
|
+
p(t) {
|
|
336
|
+
let e = 0;
|
|
337
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
class L {
|
|
341
|
+
get _$AU() {
|
|
342
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
343
|
+
}
|
|
344
|
+
constructor(t, e, s, i) {
|
|
345
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
346
|
+
}
|
|
347
|
+
get parentNode() {
|
|
348
|
+
let t = this._$AA.parentNode;
|
|
349
|
+
const e = this._$AM;
|
|
350
|
+
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
|
|
351
|
+
}
|
|
352
|
+
get startNode() {
|
|
353
|
+
return this._$AA;
|
|
354
|
+
}
|
|
355
|
+
get endNode() {
|
|
356
|
+
return this._$AB;
|
|
357
|
+
}
|
|
358
|
+
_$AI(t, e = this) {
|
|
359
|
+
t = x(this, t, e), N(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== w && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Mt(t) ? this.k(t) : this._(t);
|
|
360
|
+
}
|
|
361
|
+
O(t) {
|
|
362
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
363
|
+
}
|
|
364
|
+
T(t) {
|
|
365
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
366
|
+
}
|
|
367
|
+
_(t) {
|
|
368
|
+
this._$AH !== d && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
|
|
369
|
+
}
|
|
370
|
+
$(t) {
|
|
371
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = M.createElement($t(s.h, s.h[0]), this.options)), s);
|
|
372
|
+
if (this._$AH?._$AD === i) this._$AH.p(e);
|
|
373
|
+
else {
|
|
374
|
+
const r = new Ut(i, this), o = r.u(this.options);
|
|
375
|
+
r.p(e), this.T(o), this._$AH = r;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
_$AC(t) {
|
|
379
|
+
let e = ut.get(t.strings);
|
|
380
|
+
return e === void 0 && ut.set(t.strings, e = new M(t)), e;
|
|
381
|
+
}
|
|
382
|
+
k(t) {
|
|
383
|
+
Z(this._$AH) || (this._$AH = [], this._$AR());
|
|
384
|
+
const e = this._$AH;
|
|
385
|
+
let s, i = 0;
|
|
386
|
+
for (const r of t) i === e.length ? e.push(s = new L(this.O(O()), this.O(O()), this, this.options)) : s = e[i], s._$AI(r), i++;
|
|
387
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
388
|
+
}
|
|
389
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
390
|
+
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
|
|
391
|
+
const s = nt(t).nextSibling;
|
|
392
|
+
nt(t).remove(), t = s;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
setConnected(t) {
|
|
396
|
+
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
class F {
|
|
400
|
+
get tagName() {
|
|
401
|
+
return this.element.tagName;
|
|
402
|
+
}
|
|
403
|
+
get _$AU() {
|
|
404
|
+
return this._$AM._$AU;
|
|
405
|
+
}
|
|
406
|
+
constructor(t, e, s, i, r) {
|
|
407
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
|
|
408
|
+
}
|
|
409
|
+
_$AI(t, e = this, s, i) {
|
|
410
|
+
const r = this.strings;
|
|
411
|
+
let o = !1;
|
|
412
|
+
if (r === void 0) t = x(this, t, e, 0), o = !N(t) || t !== this._$AH && t !== w, o && (this._$AH = t);
|
|
413
|
+
else {
|
|
414
|
+
const h = t;
|
|
415
|
+
let a, u;
|
|
416
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) u = x(this, h[s + a], e, a), u === w && (u = this._$AH[a]), o ||= !N(u) || u !== this._$AH[a], u === d ? t = d : t !== d && (t += (u ?? "") + r[a + 1]), this._$AH[a] = u;
|
|
417
|
+
}
|
|
418
|
+
o && !i && this.j(t);
|
|
419
|
+
}
|
|
420
|
+
j(t) {
|
|
421
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
class Ht extends F {
|
|
425
|
+
constructor() {
|
|
426
|
+
super(...arguments), this.type = 3;
|
|
427
|
+
}
|
|
428
|
+
j(t) {
|
|
429
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
class It extends F {
|
|
433
|
+
constructor() {
|
|
434
|
+
super(...arguments), this.type = 4;
|
|
435
|
+
}
|
|
436
|
+
j(t) {
|
|
437
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
class Dt extends F {
|
|
441
|
+
constructor(t, e, s, i, r) {
|
|
442
|
+
super(t, e, s, i, r), this.type = 5;
|
|
443
|
+
}
|
|
444
|
+
_$AI(t, e = this) {
|
|
445
|
+
if ((t = x(this, t, e, 0) ?? d) === w) return;
|
|
446
|
+
const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== d && (s === d || i);
|
|
447
|
+
i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
448
|
+
}
|
|
449
|
+
handleEvent(t) {
|
|
450
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
class jt {
|
|
454
|
+
constructor(t, e, s) {
|
|
455
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
456
|
+
}
|
|
457
|
+
get _$AU() {
|
|
458
|
+
return this._$AM._$AU;
|
|
459
|
+
}
|
|
460
|
+
_$AI(t) {
|
|
461
|
+
x(this, t);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
const Ft = J.litHtmlPolyfillSupport;
|
|
465
|
+
Ft?.(M, L), (J.litHtmlVersions ??= []).push("3.3.2");
|
|
466
|
+
const Bt = (n, t, e) => {
|
|
467
|
+
const s = e?.renderBefore ?? t;
|
|
468
|
+
let i = s._$litPart$;
|
|
469
|
+
if (i === void 0) {
|
|
470
|
+
const r = e?.renderBefore ?? null;
|
|
471
|
+
s._$litPart$ = i = new L(t.insertBefore(O(), r), r, void 0, e ?? {});
|
|
472
|
+
}
|
|
473
|
+
return i._$AI(n), i;
|
|
474
|
+
};
|
|
475
|
+
const K = globalThis;
|
|
476
|
+
let k = class extends C {
|
|
477
|
+
constructor() {
|
|
478
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
479
|
+
}
|
|
480
|
+
createRenderRoot() {
|
|
481
|
+
const t = super.createRenderRoot();
|
|
482
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
483
|
+
}
|
|
484
|
+
update(t) {
|
|
485
|
+
const e = this.render();
|
|
486
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Bt(e, this.renderRoot, this.renderOptions);
|
|
487
|
+
}
|
|
488
|
+
connectedCallback() {
|
|
489
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
490
|
+
}
|
|
491
|
+
disconnectedCallback() {
|
|
492
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
|
+
}
|
|
494
|
+
render() {
|
|
495
|
+
return w;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
k._$litElement$ = !0, k.finalized = !0, K.litElementHydrateSupport?.({ LitElement: k });
|
|
499
|
+
const zt = K.litElementPolyfillSupport;
|
|
500
|
+
zt?.({ LitElement: k });
|
|
501
|
+
(K.litElementVersions ??= []).push("4.2.2");
|
|
502
|
+
const Wt = (n) => (t, e) => {
|
|
503
|
+
e !== void 0 ? e.addInitializer(() => {
|
|
504
|
+
customElements.define(n, t);
|
|
505
|
+
}) : customElements.define(n, t);
|
|
506
|
+
};
|
|
507
|
+
const qt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: X }, Vt = (n = qt, t, e) => {
|
|
508
|
+
const { kind: s, metadata: i } = e;
|
|
509
|
+
let r = globalThis.litPropertyMetadata.get(i);
|
|
510
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), s === "setter" && ((n = Object.create(n)).wrapped = !0), r.set(e.name, n), s === "accessor") {
|
|
511
|
+
const { name: o } = e;
|
|
512
|
+
return { set(h) {
|
|
513
|
+
const a = t.get.call(this);
|
|
514
|
+
t.set.call(this, h), this.requestUpdate(o, a, n, !0, h);
|
|
515
|
+
}, init(h) {
|
|
516
|
+
return h !== void 0 && this.C(o, void 0, n, h), h;
|
|
517
|
+
} };
|
|
518
|
+
}
|
|
519
|
+
if (s === "setter") {
|
|
520
|
+
const { name: o } = e;
|
|
521
|
+
return function(h) {
|
|
522
|
+
const a = this[o];
|
|
523
|
+
t.call(this, h), this.requestUpdate(o, a, n, !0, h);
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
throw Error("Unsupported decorator location: " + s);
|
|
527
|
+
};
|
|
528
|
+
function Q(n) {
|
|
529
|
+
return (t, e) => typeof e == "object" ? Vt(n, t, e) : ((s, i, r) => {
|
|
530
|
+
const o = i.hasOwnProperty(r);
|
|
531
|
+
return i.constructor.createProperty(r, s), o ? Object.getOwnPropertyDescriptor(i, r) : void 0;
|
|
532
|
+
})(n, t, e);
|
|
533
|
+
}
|
|
534
|
+
function tt(n) {
|
|
535
|
+
return Q({ ...n, state: !0, attribute: !1 });
|
|
536
|
+
}
|
|
537
|
+
const Gt = (n, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(n, t, e), e);
|
|
538
|
+
function Yt(n, t) {
|
|
539
|
+
return (e, s, i) => {
|
|
540
|
+
const r = (o) => o.renderRoot?.querySelector(n) ?? null;
|
|
541
|
+
return Gt(e, s, { get() {
|
|
542
|
+
return r(this);
|
|
543
|
+
} });
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
const Xt = { CHILD: 2 }, Jt = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
547
|
+
class Zt {
|
|
548
|
+
constructor(t) {
|
|
549
|
+
}
|
|
550
|
+
get _$AU() {
|
|
551
|
+
return this._$AM._$AU;
|
|
552
|
+
}
|
|
553
|
+
_$AT(t, e, s) {
|
|
554
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
555
|
+
}
|
|
556
|
+
_$AS(t, e) {
|
|
557
|
+
return this.update(t, e);
|
|
558
|
+
}
|
|
559
|
+
update(t, e) {
|
|
560
|
+
return this.render(...e);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
class q extends Zt {
|
|
564
|
+
constructor(t) {
|
|
565
|
+
if (super(t), this.it = d, t.type !== Xt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
566
|
+
}
|
|
567
|
+
render(t) {
|
|
568
|
+
if (t === d || t == null) return this._t = void 0, this.it = t;
|
|
569
|
+
if (t === w) return t;
|
|
570
|
+
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
571
|
+
if (t === this.it) return this._t;
|
|
572
|
+
this.it = t;
|
|
573
|
+
const e = [t];
|
|
574
|
+
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
q.directiveName = "unsafeHTML", q.resultType = 1;
|
|
578
|
+
class V extends q {
|
|
579
|
+
}
|
|
580
|
+
V.directiveName = "unsafeSVG", V.resultType = 2;
|
|
581
|
+
const Kt = Jt(V), ft = /* @__PURE__ */ new WeakMap();
|
|
582
|
+
function bt(n) {
|
|
583
|
+
let t = ft.get(n);
|
|
584
|
+
return t || (t = /* @__PURE__ */ new Map(), ft.set(n, t)), t;
|
|
585
|
+
}
|
|
586
|
+
const v = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap();
|
|
587
|
+
class Qt {
|
|
588
|
+
constructor(t, e, s) {
|
|
589
|
+
this.pathEl = null, this.lineWidth = 2, this.lineColor = "#fff", this.dashCap = "round", this.dashWidth = 10, this.dashGap = 10, this.dur = 1, this.dir = "forward", this.rafId = 0, this.rafActive = !1, this.rafLastTime = 0, this.offset = 0, this.tick = (i) => {
|
|
590
|
+
if (!this.rafActive) return;
|
|
591
|
+
this.rafLastTime || (this.rafLastTime = i);
|
|
592
|
+
const r = (i - this.rafLastTime) / 1e3;
|
|
593
|
+
this.rafLastTime = i;
|
|
594
|
+
const o = this.dashWidth + this.dashGap;
|
|
595
|
+
this.offset += o / this.dur * r, this.offset > o && (this.offset -= o), this.pathEl && (this.pathEl.style.strokeDashoffset = String(-this.offset)), this.rafId = requestAnimationFrame(this.tick);
|
|
596
|
+
}, this.container = t, this.forwardPath = e, this.reversedPath = s;
|
|
597
|
+
}
|
|
598
|
+
flowAppearance(t, e, s, i, r) {
|
|
599
|
+
return this.lineWidth = t ?? 2, this.lineColor = e ?? "#fff", this.dashCap = s ?? "round", this.dashWidth = i ?? 10, this.dashGap = r ?? 10, this.updatePathStyle(), this;
|
|
600
|
+
}
|
|
601
|
+
duration(t) {
|
|
602
|
+
return this.dur = typeof t == "number" && isFinite(t) && t > 0 ? t : 1, this;
|
|
603
|
+
}
|
|
604
|
+
direction(t) {
|
|
605
|
+
return this.dir = t, this.updatePathD(), this;
|
|
606
|
+
}
|
|
607
|
+
play() {
|
|
608
|
+
return this.ensurePath(), this.rafActive || (this.rafActive = !0, this.rafLastTime = 0, this.rafId = requestAnimationFrame(this.tick)), this;
|
|
609
|
+
}
|
|
610
|
+
finish() {
|
|
611
|
+
this.cancelRaf(), this.pathEl && this.pathEl.parentNode && this.pathEl.parentNode.removeChild(this.pathEl), this.pathEl = null, U.delete(this.container);
|
|
612
|
+
}
|
|
613
|
+
ensurePath() {
|
|
614
|
+
if (this.pathEl) return;
|
|
615
|
+
const t = "http://www.w3.org/2000/svg";
|
|
616
|
+
this.pathEl = document.createElementNS(t, "path"), this.updatePathD(), this.updatePathStyle(), this.container.appendChild(this.pathEl);
|
|
617
|
+
}
|
|
618
|
+
updatePathD() {
|
|
619
|
+
if (!this.pathEl) return;
|
|
620
|
+
const t = this.dir === "reverse" ? this.reversedPath : this.forwardPath;
|
|
621
|
+
this.pathEl.setAttribute("d", t);
|
|
622
|
+
}
|
|
623
|
+
updatePathStyle() {
|
|
624
|
+
this.pathEl && (this.pathEl.setAttribute("fill", "none"), this.pathEl.setAttribute("stroke", this.lineColor), this.pathEl.setAttribute("stroke-width", String(this.lineWidth)), this.pathEl.setAttribute("stroke-linecap", this.dashCap), this.pathEl.style.strokeDasharray = `${this.dashWidth} ${this.dashGap}`);
|
|
625
|
+
}
|
|
626
|
+
cancelRaf() {
|
|
627
|
+
this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = 0), this.rafActive = !1;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
let dt = !1;
|
|
631
|
+
function te() {
|
|
632
|
+
if (dt) return;
|
|
633
|
+
dt = !0;
|
|
634
|
+
const n = document.createElement("link");
|
|
635
|
+
n.rel = "stylesheet", n.href = "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200", document.head.appendChild(n);
|
|
636
|
+
}
|
|
637
|
+
class ee {
|
|
638
|
+
constructor(t, e) {
|
|
639
|
+
this.anim = null, this.keyframes = [], this.loopCount = 1, this.loopBounce = !1, this.playbackSpeed = 1, this.easingType = "ease", this.rafId = 0, this.rafActive = !1, this.rafPaused = !1, this.rafLastTime = 0, this.rafElapsed = 0, this.rafTick = null, this.rafPatternEl = null, this.rafOriginalTransform = "", this.el = t, this.duration = e;
|
|
640
|
+
}
|
|
641
|
+
/** Animate element by a relative offset (dx, dy). Used by pipe flow animations. */
|
|
642
|
+
relative(t, e) {
|
|
643
|
+
const s = typeof t == "number" && isFinite(t) ? t : 0, i = typeof e == "number" && isFinite(e) ? e : 0, r = this.el.parentElement;
|
|
644
|
+
if (r?.nodeName?.toLowerCase() === "pattern") {
|
|
645
|
+
this.cancelRaf(), this.rafPatternEl = r, this.rafOriginalTransform = r.getAttribute("patternTransform") || "", this.rafActive = !0, this.rafPaused = !1, this.rafElapsed = 0, this.rafLastTime = 0;
|
|
646
|
+
const o = this.rafOriginalTransform ? `${this.rafOriginalTransform} ` : "";
|
|
647
|
+
this.rafTick = (h) => {
|
|
648
|
+
if (!this.rafActive || this.rafPaused) return;
|
|
649
|
+
this.rafLastTime || (this.rafLastTime = h), this.rafElapsed += (h - this.rafLastTime) * this.playbackSpeed, this.rafLastTime = h;
|
|
650
|
+
const a = this.rafElapsed % this.duration / this.duration;
|
|
651
|
+
this.rafPatternEl.setAttribute(
|
|
652
|
+
"patternTransform",
|
|
653
|
+
`${o}translate(${s * a}, ${i * a})`
|
|
654
|
+
), this.rafId = requestAnimationFrame(this.rafTick);
|
|
655
|
+
}, this.rafId = requestAnimationFrame(this.rafTick);
|
|
656
|
+
} else
|
|
657
|
+
this.keyframes = [
|
|
658
|
+
{ transform: "translate(0, 0)" },
|
|
659
|
+
{ transform: `translate(${s}px, ${i}px)` }
|
|
660
|
+
], this.easingType = "linear", this.commit();
|
|
661
|
+
return this;
|
|
662
|
+
}
|
|
663
|
+
attr(t) {
|
|
664
|
+
const e = /* @__PURE__ */ new Set(["height", "width", "x", "y", "cx", "cy", "r", "rx", "ry"]), s = {}, i = {};
|
|
665
|
+
let r = !1;
|
|
666
|
+
for (const [o, h] of Object.entries(t)) {
|
|
667
|
+
const a = typeof h == "number" && !isFinite(h) ? 0 : h;
|
|
668
|
+
if (e.has(o))
|
|
669
|
+
this.el.style.transition = `all ${this.duration}ms ease`, this.el.setAttribute(o, String(a));
|
|
670
|
+
else {
|
|
671
|
+
const c = getComputedStyle(this.el).getPropertyValue(o) || this.el.getAttribute(o) || "";
|
|
672
|
+
s[o] = c, i[o] = a, r = !0;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return r && (this.keyframes = [s, i], this.easingType = "linear"), this;
|
|
676
|
+
}
|
|
677
|
+
transform(t) {
|
|
678
|
+
const e = [], s = (i) => typeof i == "number" && !isFinite(i) ? 0 : i ?? 0;
|
|
679
|
+
if ((t.translateX !== void 0 || t.translateY !== void 0) && e.push(`translate(${s(t.translateX)}, ${s(t.translateY)})`), t.rotate !== void 0) {
|
|
680
|
+
const i = this.el.getBBox?.(), r = t.originX !== void 0 ? s(t.originX) : i ? i.x + i.width / 2 : 0, o = t.originY !== void 0 ? s(t.originY) : i ? i.y + i.height / 2 : 0;
|
|
681
|
+
e.push(`rotate(${s(t.rotate)}, ${r}, ${o})`);
|
|
682
|
+
}
|
|
683
|
+
return t.scale !== void 0 && e.push(`scale(${s(t.scale)})`), e.length > 0 && (this.el.nodeName?.toLowerCase() === "pattern" ? this.el.setAttribute("patternTransform", e.join(" ")) : this.el.setAttribute("transform", e.join(" "))), this;
|
|
684
|
+
}
|
|
685
|
+
rotate(t) {
|
|
686
|
+
const e = this.el.getAttribute("transform") || "";
|
|
687
|
+
this.cancelRaf(), this.rafOriginalTransform = e;
|
|
688
|
+
const s = this.el.getBBox?.(), i = s ? s.x + s.width / 2 : 0, r = s ? s.y + s.height / 2 : 0;
|
|
689
|
+
return this.rafActive = !0, this.rafPaused = !1, this.rafElapsed = 0, this.rafLastTime = 0, this.rafTick = (o) => {
|
|
690
|
+
if (!this.rafActive || this.rafPaused) return;
|
|
691
|
+
this.rafLastTime || (this.rafLastTime = o), this.rafElapsed += (o - this.rafLastTime) * this.playbackSpeed, this.rafLastTime = o;
|
|
692
|
+
const h = this.rafElapsed % this.duration / this.duration, a = t * h;
|
|
693
|
+
this.el.setAttribute("transform", `${e} rotate(${a}, ${i}, ${r})`), this.rafId = requestAnimationFrame(this.rafTick);
|
|
694
|
+
}, this.rafId = requestAnimationFrame(this.rafTick), this;
|
|
695
|
+
}
|
|
696
|
+
ease(t) {
|
|
697
|
+
return this.easingType = t, this;
|
|
698
|
+
}
|
|
699
|
+
loop(t, e) {
|
|
700
|
+
return this.loopCount = t === 0 ? 1 / 0 : t ?? 1 / 0, this.loopBounce = e ?? !1, this.rafActive || this.commit(), this;
|
|
701
|
+
}
|
|
702
|
+
speed(t) {
|
|
703
|
+
return this.playbackSpeed = t, this.anim && (this.anim.playbackRate = t), this;
|
|
704
|
+
}
|
|
705
|
+
play() {
|
|
706
|
+
return this.rafActive && this.rafPaused && (this.rafPaused = !1, this.rafLastTime = 0, this.rafTick && (this.rafId = requestAnimationFrame(this.rafTick))), this.anim && this.anim.play(), this;
|
|
707
|
+
}
|
|
708
|
+
pause() {
|
|
709
|
+
return this.rafActive && (this.rafPaused = !0, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = 0)), this.anim && this.anim.pause(), this;
|
|
710
|
+
}
|
|
711
|
+
cancel() {
|
|
712
|
+
this.anim && (this.anim.cancel(), this.anim = null), this.cancelRaf(), this.el.style.transition = "";
|
|
713
|
+
}
|
|
714
|
+
finish() {
|
|
715
|
+
this.anim && (this.anim.finish(), this.anim = null), this.cancelRaf();
|
|
716
|
+
}
|
|
717
|
+
cancelRaf() {
|
|
718
|
+
this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = 0), this.rafActive = !1, this.rafTick = null, this.rafPatternEl ? (this.rafOriginalTransform ? this.rafPatternEl.setAttribute("patternTransform", this.rafOriginalTransform) : this.rafPatternEl.removeAttribute("patternTransform"), this.rafPatternEl = null, this.rafOriginalTransform = "") : this.rafOriginalTransform && (this.el.setAttribute("transform", this.rafOriginalTransform), this.rafOriginalTransform = "");
|
|
719
|
+
}
|
|
720
|
+
commit() {
|
|
721
|
+
if (this.keyframes.length !== 0) {
|
|
722
|
+
this.anim && this.anim.cancel();
|
|
723
|
+
try {
|
|
724
|
+
this.anim = this.el.animate(this.keyframes, {
|
|
725
|
+
duration: this.duration,
|
|
726
|
+
iterations: this.loopCount,
|
|
727
|
+
direction: this.loopBounce ? "alternate" : "normal",
|
|
728
|
+
fill: "forwards",
|
|
729
|
+
easing: this.easingType
|
|
730
|
+
}), this.anim.playbackRate = this.playbackSpeed;
|
|
731
|
+
} catch {
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
class f {
|
|
737
|
+
constructor(t) {
|
|
738
|
+
this.el = t;
|
|
739
|
+
}
|
|
740
|
+
/** Sanitize a value for SVG attributes: coerce NaN/Infinity to 0 */
|
|
741
|
+
safe(t) {
|
|
742
|
+
return typeof t == "number" && !isFinite(t) ? 0 : t;
|
|
743
|
+
}
|
|
744
|
+
/** Get or set attributes. With object: set multiple. With string: get one. */
|
|
745
|
+
attr(t, e) {
|
|
746
|
+
if (typeof t == "string")
|
|
747
|
+
return e !== void 0 ? (this.el.setAttribute(t, String(this.safe(e))), this) : this.el.getAttribute(t);
|
|
748
|
+
if (t)
|
|
749
|
+
for (const [s, i] of Object.entries(t))
|
|
750
|
+
this.el.setAttribute(s, String(this.safe(i)));
|
|
751
|
+
return this;
|
|
752
|
+
}
|
|
753
|
+
fill(t) {
|
|
754
|
+
return this.el.setAttribute("fill", t), this;
|
|
755
|
+
}
|
|
756
|
+
stroke(t) {
|
|
757
|
+
return typeof t == "string" ? this.el.setAttribute("stroke", t) : (t.color && this.el.setAttribute("stroke", t.color), t.width !== void 0 && this.el.setAttribute("stroke-width", String(this.safe(t.width))), t.dasharray && this.el.setAttribute("stroke-dasharray", t.dasharray)), this;
|
|
758
|
+
}
|
|
759
|
+
show() {
|
|
760
|
+
return this.el.style.display = "", this.el.style.visibility = "visible", this;
|
|
761
|
+
}
|
|
762
|
+
hide() {
|
|
763
|
+
return this.el.style.display = "none", this;
|
|
764
|
+
}
|
|
765
|
+
transform(t) {
|
|
766
|
+
const e = (i) => typeof i == "number" && !isFinite(i) ? 0 : i ?? 0, s = [];
|
|
767
|
+
if ((t.translateX !== void 0 || t.translateY !== void 0) && s.push(`translate(${e(t.translateX)}, ${e(t.translateY)})`), t.rotate !== void 0) {
|
|
768
|
+
const i = this.el.getBBox?.(), r = t.originX !== void 0 ? e(t.originX) : i ? i.x + i.width / 2 : 0, o = t.originY !== void 0 ? e(t.originY) : i ? i.y + i.height / 2 : 0;
|
|
769
|
+
s.push(`rotate(${e(t.rotate)}, ${r}, ${o})`);
|
|
770
|
+
}
|
|
771
|
+
return t.scale !== void 0 && s.push(`scale(${e(t.scale)})`), s.length > 0 && (this.el.nodeName?.toLowerCase() === "pattern" ? this.el.setAttribute("patternTransform", s.join(" ")) : this.el.setAttribute("transform", s.join(" "))), this;
|
|
772
|
+
}
|
|
773
|
+
/** Store or retrieve per-element state */
|
|
774
|
+
remember(t, e) {
|
|
775
|
+
const s = bt(this.el);
|
|
776
|
+
return e !== void 0 ? (s.set(t, e), this) : s.get(t);
|
|
777
|
+
}
|
|
778
|
+
/** Query children */
|
|
779
|
+
find(t) {
|
|
780
|
+
return Array.from(this.el.querySelectorAll(t)).map((e) => new f(e));
|
|
781
|
+
}
|
|
782
|
+
/** Query first matching child */
|
|
783
|
+
findOne(t) {
|
|
784
|
+
const e = this.el.querySelector(t);
|
|
785
|
+
return e ? new f(e) : null;
|
|
786
|
+
}
|
|
787
|
+
/** First child element */
|
|
788
|
+
first() {
|
|
789
|
+
const t = this.el.firstElementChild;
|
|
790
|
+
return t ? new f(t) : this;
|
|
791
|
+
}
|
|
792
|
+
/** Remove all children */
|
|
793
|
+
clear() {
|
|
794
|
+
for (; this.el.firstChild; ) this.el.removeChild(this.el.firstChild);
|
|
795
|
+
return this;
|
|
796
|
+
}
|
|
797
|
+
/** Append child (accepts ScadaElement or raw Element) */
|
|
798
|
+
add(t) {
|
|
799
|
+
const e = t instanceof f ? t.native : t;
|
|
800
|
+
return this.el.appendChild(e), this;
|
|
801
|
+
}
|
|
802
|
+
/** Get referenced element from an attribute (e.g., fill url(#id)) */
|
|
803
|
+
reference(t) {
|
|
804
|
+
const e = this.el.getAttribute(t);
|
|
805
|
+
if (e) {
|
|
806
|
+
const s = e.match(/url\(#([^)]+)\)/);
|
|
807
|
+
if (s) {
|
|
808
|
+
const r = this.el.getRootNode().getElementById(s[1]);
|
|
809
|
+
if (r) return new f(r);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return this;
|
|
813
|
+
}
|
|
814
|
+
/** ForEach for SVG.js compatibility when used on collections */
|
|
815
|
+
forEach(t) {
|
|
816
|
+
t(this, 0);
|
|
817
|
+
}
|
|
818
|
+
/** Get bounding box width */
|
|
819
|
+
width() {
|
|
820
|
+
return this.el.getBBox?.()?.width ?? 0;
|
|
821
|
+
}
|
|
822
|
+
/** Get bounding box height */
|
|
823
|
+
height() {
|
|
824
|
+
return this.el.getBBox?.()?.height ?? 0;
|
|
825
|
+
}
|
|
826
|
+
/** Get child elements as ScadaElement array */
|
|
827
|
+
children() {
|
|
828
|
+
return Array.from(this.el.children).map((t) => new f(t));
|
|
829
|
+
}
|
|
830
|
+
/** Get underlying DOM element */
|
|
831
|
+
get native() {
|
|
832
|
+
return this.el;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
class D {
|
|
836
|
+
constructor(t) {
|
|
837
|
+
typeof t == "string" ? (this.settings = { type: "constant", color: t }, this.color = t) : (this.settings = t, this.color = t.color ?? "#000000");
|
|
838
|
+
}
|
|
839
|
+
update(t) {
|
|
840
|
+
switch (this.settings.type) {
|
|
841
|
+
case "constant":
|
|
842
|
+
break;
|
|
843
|
+
case "gradient": {
|
|
844
|
+
const e = this.settings.gradient;
|
|
845
|
+
if (e && e.gradient.length >= 2) {
|
|
846
|
+
const s = e.minValue ?? 0, i = e.maxValue ?? 100, r = Math.max(0, Math.min(1, (t - s) / (i - s || 1)));
|
|
847
|
+
this.color = se(e.gradient[0], e.gradient[e.gradient.length - 1], r);
|
|
848
|
+
}
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
case "range": {
|
|
852
|
+
const e = this.settings.rangeList;
|
|
853
|
+
if (e?.range) {
|
|
854
|
+
for (const s of e.range)
|
|
855
|
+
if (t >= s.from && t <= s.to) {
|
|
856
|
+
this.color = s.color;
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function se(n, t, e) {
|
|
866
|
+
const s = (m) => {
|
|
867
|
+
const y = m.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
868
|
+
if (y) return [+y[1], +y[2], +y[3]];
|
|
869
|
+
const g = m.replace("#", "");
|
|
870
|
+
return g.length === 3 ? [
|
|
871
|
+
parseInt(g[0] + g[0], 16),
|
|
872
|
+
parseInt(g[1] + g[1], 16),
|
|
873
|
+
parseInt(g[2] + g[2], 16)
|
|
874
|
+
] : [
|
|
875
|
+
parseInt(g.slice(0, 2), 16),
|
|
876
|
+
parseInt(g.slice(2, 4), 16),
|
|
877
|
+
parseInt(g.slice(4, 6), 16)
|
|
878
|
+
];
|
|
879
|
+
}, [i, r, o] = s(n), [h, a, u] = s(t), c = Math.round(i + (h - i) * e), l = Math.round(r + (a - r) * e), p = Math.round(o + (u - o) * e);
|
|
880
|
+
return `rgb(${c},${l},${p})`;
|
|
881
|
+
}
|
|
882
|
+
function ie(n) {
|
|
883
|
+
const t = "http://www.w3.org/2000/svg";
|
|
884
|
+
return {
|
|
885
|
+
line(e, s, i, r) {
|
|
886
|
+
const o = document.createElementNS(t, "line");
|
|
887
|
+
return o.setAttribute("x1", String(e)), o.setAttribute("y1", String(s)), o.setAttribute("x2", String(i)), o.setAttribute("y2", String(r)), new f(o);
|
|
888
|
+
},
|
|
889
|
+
text(e) {
|
|
890
|
+
const s = document.createElementNS(t, "text"), i = document.createElementNS(t, "tspan");
|
|
891
|
+
return i.textContent = e, s.appendChild(i), new f(s);
|
|
892
|
+
},
|
|
893
|
+
rect(e, s, i, r) {
|
|
894
|
+
const o = document.createElementNS(t, "rect");
|
|
895
|
+
return e !== void 0 && o.setAttribute("x", String(e)), s !== void 0 && o.setAttribute("y", String(s)), i !== void 0 && o.setAttribute("width", String(i)), r !== void 0 && o.setAttribute("height", String(r)), new f(o);
|
|
896
|
+
},
|
|
897
|
+
circle(e, s, i) {
|
|
898
|
+
const r = document.createElementNS(t, "circle");
|
|
899
|
+
return e !== void 0 && r.setAttribute("cx", String(e)), s !== void 0 && r.setAttribute("cy", String(s)), i !== void 0 && r.setAttribute("r", String(i)), new f(r);
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
const re = {
|
|
904
|
+
celsius: "°C",
|
|
905
|
+
fahrenheit: "°F",
|
|
906
|
+
kelvin: "K",
|
|
907
|
+
liters: "L",
|
|
908
|
+
gallons: "gal",
|
|
909
|
+
cubicMeters: "m³",
|
|
910
|
+
cubicFeet: "ft³",
|
|
911
|
+
milliliters: "mL",
|
|
912
|
+
barrels: "bbl",
|
|
913
|
+
watts: "W",
|
|
914
|
+
kilowatts: "kW",
|
|
915
|
+
megawatts: "MW",
|
|
916
|
+
horsepower: "hp",
|
|
917
|
+
wattHours: "Wh",
|
|
918
|
+
kilowattHours: "kWh",
|
|
919
|
+
megawattHours: "MWh",
|
|
920
|
+
volts: "V",
|
|
921
|
+
millivolts: "mV",
|
|
922
|
+
kilovolts: "kV",
|
|
923
|
+
amperes: "A",
|
|
924
|
+
milliamperes: "mA",
|
|
925
|
+
hertz: "Hz",
|
|
926
|
+
kilohertz: "kHz",
|
|
927
|
+
psi: "psi",
|
|
928
|
+
bar: "bar",
|
|
929
|
+
pascal: "Pa",
|
|
930
|
+
kilopascal: "kPa",
|
|
931
|
+
atm: "atm",
|
|
932
|
+
meters: "m",
|
|
933
|
+
centimeters: "cm",
|
|
934
|
+
millimeters: "mm",
|
|
935
|
+
kilometers: "km",
|
|
936
|
+
feet: "ft",
|
|
937
|
+
inches: "in",
|
|
938
|
+
yards: "yd",
|
|
939
|
+
metersPerSecond: "m/s",
|
|
940
|
+
kilometersPerHour: "km/h",
|
|
941
|
+
milesPerHour: "mph",
|
|
942
|
+
kilograms: "kg",
|
|
943
|
+
grams: "g",
|
|
944
|
+
pounds: "lb",
|
|
945
|
+
tonnes: "t",
|
|
946
|
+
percent: "%",
|
|
947
|
+
rpm: "rpm",
|
|
948
|
+
decibels: "dB",
|
|
949
|
+
lux: "lx",
|
|
950
|
+
lumens: "lm",
|
|
951
|
+
ohms: "Ω",
|
|
952
|
+
kilohms: "kΩ"
|
|
953
|
+
};
|
|
954
|
+
function At(n) {
|
|
955
|
+
return re[n] ?? n ?? "";
|
|
956
|
+
}
|
|
957
|
+
function ne(n, t, e, s) {
|
|
958
|
+
if (n == null || n === "") return "";
|
|
959
|
+
const i = Number(n);
|
|
960
|
+
if (isNaN(i)) return String(n);
|
|
961
|
+
let r = 0, o = "", h = !1;
|
|
962
|
+
typeof t == "object" && t !== null ? (r = t.decimals ?? 0, o = t.units ?? "", h = t.ignoreUnitSymbol ?? !1) : (r = t ?? 0, o = e ?? "", h = s === !0);
|
|
963
|
+
let a = i.toFixed(r);
|
|
964
|
+
return !h && o && (a += " " + At(o)), a;
|
|
965
|
+
}
|
|
966
|
+
function oe(n, t) {
|
|
967
|
+
return n;
|
|
968
|
+
}
|
|
969
|
+
function ae(n) {
|
|
970
|
+
return {
|
|
971
|
+
cssAnimate(t, e) {
|
|
972
|
+
const s = t instanceof f ? t.native : t, i = v.get(s);
|
|
973
|
+
i && i.cancel();
|
|
974
|
+
const r = new ee(s, e);
|
|
975
|
+
return v.set(s, r), r;
|
|
976
|
+
},
|
|
977
|
+
cssAnimation(t) {
|
|
978
|
+
const e = t instanceof f ? t.native : t;
|
|
979
|
+
return v.get(e) ?? null;
|
|
980
|
+
},
|
|
981
|
+
resetCssAnimation(t) {
|
|
982
|
+
const e = t instanceof f ? t.native : t, s = v.get(e);
|
|
983
|
+
s && (s.cancel(), v.delete(e));
|
|
984
|
+
},
|
|
985
|
+
finishCssAnimation(t) {
|
|
986
|
+
const e = t instanceof f ? t.native : t, s = v.get(e);
|
|
987
|
+
s && (s.finish(), v.delete(e));
|
|
988
|
+
},
|
|
989
|
+
font(t, e, s) {
|
|
990
|
+
if (Array.isArray(t)) {
|
|
991
|
+
for (const r of t) this.font(r, e, s);
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
const i = t instanceof f ? t.native : t;
|
|
995
|
+
if (e && typeof e == "object" && e.size) {
|
|
996
|
+
const r = e.family || "Roboto", o = /\b(sans-serif|serif|monospace|cursive|fantasy)\b/.test(r);
|
|
997
|
+
i.style.fontSize = e.size + (e.sizeUnit || "px"), i.style.fontFamily = o ? r : r + ", sans-serif", i.style.fontWeight = e.weight || "400", i.style.fontStyle = e.style || "normal";
|
|
998
|
+
}
|
|
999
|
+
if (s) {
|
|
1000
|
+
const r = s instanceof D ? s.color : String(s);
|
|
1001
|
+
i.setAttribute("fill", r);
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
text(t, e) {
|
|
1005
|
+
const s = t instanceof f ? t.native : t, i = s.querySelector("tspan");
|
|
1006
|
+
i ? i.textContent = e : s.textContent = e;
|
|
1007
|
+
},
|
|
1008
|
+
formatValue: ne,
|
|
1009
|
+
unitSymbol: At,
|
|
1010
|
+
convertUnitValue: oe,
|
|
1011
|
+
callAction(t, e, s, i) {
|
|
1012
|
+
if (i?.next)
|
|
1013
|
+
try {
|
|
1014
|
+
i.next();
|
|
1015
|
+
} catch {
|
|
1016
|
+
}
|
|
1017
|
+
n.onAction(t, e, s, i);
|
|
1018
|
+
},
|
|
1019
|
+
setValue(t, e) {
|
|
1020
|
+
n.onSetValue(t, e);
|
|
1021
|
+
},
|
|
1022
|
+
disable(t) {
|
|
1023
|
+
const e = Array.isArray(t) ? t : [t];
|
|
1024
|
+
for (const s of e) {
|
|
1025
|
+
const i = s instanceof f ? s.native : s;
|
|
1026
|
+
i.style.pointerEvents = "none", i.style.opacity = "0.5";
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
enable(t) {
|
|
1030
|
+
const e = Array.isArray(t) ? t : [t];
|
|
1031
|
+
for (const s of e) {
|
|
1032
|
+
const i = s instanceof f ? s.native : s;
|
|
1033
|
+
i.style.pointerEvents = "", i.style.opacity = "";
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
icon(t, e, s, i, r) {
|
|
1037
|
+
const o = t instanceof f ? t.native : t;
|
|
1038
|
+
te();
|
|
1039
|
+
const h = s ?? 14, a = i instanceof D ? i.color : typeof i == "string" ? i : "#000000";
|
|
1040
|
+
let u = o.querySelector("text.__scada-icon");
|
|
1041
|
+
u || (o.textContent = "", u = document.createElementNS("http://www.w3.org/2000/svg", "text"), u.classList.add("__scada-icon"), u.setAttribute("dominant-baseline", "central"), u.setAttribute("text-anchor", "middle"), o.appendChild(u)), u.setAttribute("font-family", "Material Symbols Outlined"), u.setAttribute("font-size", String(h)), u.setAttribute("fill", a), u.textContent = e;
|
|
1042
|
+
},
|
|
1043
|
+
transform(t, e) {
|
|
1044
|
+
t instanceof f ? t.transform(e) : new f(t).transform(e);
|
|
1045
|
+
},
|
|
1046
|
+
connectorAnimate(t, e, s) {
|
|
1047
|
+
const i = t instanceof f ? t.native : t, r = U.get(i);
|
|
1048
|
+
r && r.finish();
|
|
1049
|
+
const o = new Qt(i, e, s);
|
|
1050
|
+
return U.set(i, o), o;
|
|
1051
|
+
},
|
|
1052
|
+
connectorAnimation(t) {
|
|
1053
|
+
const e = t instanceof f ? t.native : t;
|
|
1054
|
+
return U.get(e) ?? null;
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
function he(n, t, e, s, i) {
|
|
1059
|
+
const r = {};
|
|
1060
|
+
for (const [c, l] of Object.entries(s))
|
|
1061
|
+
l && typeof l == "object" && l.type && (l.type === "constant" || l.type === "gradient" || l.type === "range" || l.type === "function") && "color" in l ? r[c] = new D(l) : r[c] = l;
|
|
1062
|
+
for (const c of t.properties)
|
|
1063
|
+
if (r[c.id] === void 0 && c.default !== void 0) {
|
|
1064
|
+
const l = c.default;
|
|
1065
|
+
c.type === "color_settings" && l && typeof l == "object" ? r[c.id] = new D(l) : r[c.id] = l;
|
|
1066
|
+
}
|
|
1067
|
+
for (const c of t.behavior)
|
|
1068
|
+
c.type === "value" && e[c.id] === void 0 && (c.valueType === "BOOLEAN" ? e[c.id] = !1 : (c.valueType === "DOUBLE" || c.valueType === "INTEGER") && (e[c.id] = 0));
|
|
1069
|
+
const o = ae(i), h = ie(), a = {}, u = new Proxy(a, {
|
|
1070
|
+
get(c, l) {
|
|
1071
|
+
if (!(l in a)) {
|
|
1072
|
+
const p = n.querySelectorAll(`[tb\\:tag="${l}"]`);
|
|
1073
|
+
a[l] = Array.from(p).map((m) => new f(m));
|
|
1074
|
+
}
|
|
1075
|
+
return a[l];
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
return { values: e, properties: r, tags: u, svg: h, api: o };
|
|
1079
|
+
}
|
|
1080
|
+
function le(n, t, e) {
|
|
1081
|
+
try {
|
|
1082
|
+
new Function("element", "ctx", "console", n)(t, e, console);
|
|
1083
|
+
} catch (s) {
|
|
1084
|
+
console.warn("[scada-runtime] stateRenderFunction error:", s);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
function ce(n, t, e, s) {
|
|
1088
|
+
try {
|
|
1089
|
+
new Function("element", "ctx", "event", n)(t, e, s);
|
|
1090
|
+
} catch {
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
function ue(n, t, e) {
|
|
1094
|
+
if (t.stateRenderFunction)
|
|
1095
|
+
try {
|
|
1096
|
+
const s = new Function("ctx", "svg", "console", t.stateRenderFunction);
|
|
1097
|
+
s(e, e.svg, console), s(e, e.svg, console);
|
|
1098
|
+
} catch (s) {
|
|
1099
|
+
console.warn("[scada-runtime] top-level stateRenderFunction error:", s);
|
|
1100
|
+
}
|
|
1101
|
+
for (const s of t.tags) {
|
|
1102
|
+
const i = n.querySelectorAll(`[tb\\:tag="${s.tag}"]`);
|
|
1103
|
+
if (i.length && s.stateRenderFunction)
|
|
1104
|
+
for (const r of i) {
|
|
1105
|
+
const o = new f(r), h = bt(r);
|
|
1106
|
+
if (!h.has("__origDisplay"))
|
|
1107
|
+
h.set("__origDisplay", r.style.display), h.set("__origVisibility", r.style.visibility), h.set("__origTransform", r.getAttribute("transform") ?? "");
|
|
1108
|
+
else {
|
|
1109
|
+
r.style.display = h.get("__origDisplay"), r.style.visibility = h.get("__origVisibility");
|
|
1110
|
+
const a = h.get("__origTransform");
|
|
1111
|
+
a ? r.setAttribute("transform", a) : r.removeAttribute("transform");
|
|
1112
|
+
}
|
|
1113
|
+
for (const a of h.keys())
|
|
1114
|
+
a.startsWith("__") || h.delete(a);
|
|
1115
|
+
le(s.stateRenderFunction, o, e);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
function fe(n, t, e) {
|
|
1120
|
+
const s = [];
|
|
1121
|
+
for (const i of t.tags) {
|
|
1122
|
+
if (!i.actions) continue;
|
|
1123
|
+
const r = n.querySelectorAll(`[tb\\:tag="${i.tag}"]`);
|
|
1124
|
+
for (const o of r) {
|
|
1125
|
+
o.style.cursor = "pointer";
|
|
1126
|
+
for (const [h, a] of Object.entries(i.actions))
|
|
1127
|
+
if (h === "click" && a.actionFunction) {
|
|
1128
|
+
const u = (c) => {
|
|
1129
|
+
const l = new f(o);
|
|
1130
|
+
ce(a.actionFunction, l, e, c);
|
|
1131
|
+
};
|
|
1132
|
+
o.addEventListener("click", u), s.push(() => o.removeEventListener("click", u));
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return s;
|
|
1137
|
+
}
|
|
1138
|
+
function W(n) {
|
|
1139
|
+
const t = {}, e = {}, s = {}, i = /* @__PURE__ */ new Set(["color", "color_settings", "font"]);
|
|
1140
|
+
for (const r of n.properties)
|
|
1141
|
+
r.default !== void 0 && (i.has(r.type) ? e[r.id] = r.default : t[r.id] = r.default);
|
|
1142
|
+
for (const r of n.behavior)
|
|
1143
|
+
r.type === "value" && (r.valueType === "BOOLEAN" ? s[r.id] = !1 : r.valueType === "DOUBLE" || r.valueType === "INTEGER" ? s[r.id] = 0 : s[r.id] = "");
|
|
1144
|
+
return Object.keys(e).length > 0 && (t.styling = e), Object.keys(s).length > 0 && (t.bindings = s), t;
|
|
1145
|
+
}
|
|
1146
|
+
var de = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, E = (n, t, e, s) => {
|
|
1147
|
+
for (var i = s > 1 ? void 0 : s ? pe(t, e) : t, r = n.length - 1, o; r >= 0; r--)
|
|
1148
|
+
(o = n[r]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
1149
|
+
return s && i && de(t, e, i), i;
|
|
1150
|
+
};
|
|
1151
|
+
let $ = class extends k {
|
|
1152
|
+
constructor() {
|
|
1153
|
+
super(), this.svgContent = "", this.version = "1.0.2", this.svgModules = /* @__PURE__ */ new Map(), this.actionCleanups = [], this.resizeObserver = new ResizeObserver(() => this.requestUpdate()), this.resizeObserver.observe(this);
|
|
1154
|
+
}
|
|
1155
|
+
disconnectedCallback() {
|
|
1156
|
+
super.disconnectedCallback(), this.resizeObserver?.disconnect(), this.cleanupActions();
|
|
1157
|
+
}
|
|
1158
|
+
cleanupActions() {
|
|
1159
|
+
for (const n of this.actionCleanups) n();
|
|
1160
|
+
this.actionCleanups = [];
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Returns the default property values from the currently loaded SVG metadata.
|
|
1164
|
+
*/
|
|
1165
|
+
getDefaults() {
|
|
1166
|
+
if (this.metadata)
|
|
1167
|
+
return W(this.metadata);
|
|
1168
|
+
}
|
|
1169
|
+
dispatchDefaults() {
|
|
1170
|
+
this.metadata && this.dispatchEvent(
|
|
1171
|
+
new CustomEvent("widget-defaults", {
|
|
1172
|
+
detail: W(this.metadata),
|
|
1173
|
+
bubbles: !0,
|
|
1174
|
+
composed: !0
|
|
1175
|
+
})
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
updated(n) {
|
|
1179
|
+
if (n.has("inputData")) {
|
|
1180
|
+
const t = this.inputData?.symbol;
|
|
1181
|
+
t && t !== this.currentSymbol ? (this.currentSymbol = t, this.loadSymbol(t)) : t === this.currentSymbol && this.applyState();
|
|
1182
|
+
}
|
|
1183
|
+
n.has("theme") && this.registerTheme();
|
|
1184
|
+
}
|
|
1185
|
+
registerTheme() {
|
|
1186
|
+
const n = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
|
|
1187
|
+
this.themeBgColor = n || this.theme?.theme_object?.backgroundColor;
|
|
1188
|
+
}
|
|
1189
|
+
getSymbolUrl(n) {
|
|
1190
|
+
const e = import.meta.url.split("/");
|
|
1191
|
+
return e.pop(), e.pop(), e.join("/") + "/scada_symbols/" + n + ".svg";
|
|
1192
|
+
}
|
|
1193
|
+
async loadSymbol(n) {
|
|
1194
|
+
const t = this.svgModules.get(n);
|
|
1195
|
+
if (t) {
|
|
1196
|
+
this.svgContent = t.svg, this.metadata = t.metadata, await this.updateComplete, this.applyState(), this.dispatchDefaults();
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
try {
|
|
1200
|
+
const e = this.getSymbolUrl(n), s = await fetch(e);
|
|
1201
|
+
if (!s.ok) {
|
|
1202
|
+
this.svgContent = "", this.metadata = void 0;
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
const i = await s.text(), r = i.match(/<tb:metadata[^>]*><!\[CDATA\[([\s\S]*?)\]\]>/);
|
|
1206
|
+
let o;
|
|
1207
|
+
if (r)
|
|
1208
|
+
try {
|
|
1209
|
+
o = JSON.parse(r[1]);
|
|
1210
|
+
} catch {
|
|
1211
|
+
}
|
|
1212
|
+
const h = i.replace(/<tb:metadata[\s\S]*?<\/tb:metadata>/, "");
|
|
1213
|
+
this.svgModules.set(n, { svg: h, metadata: o }), this.svgContent = h, this.metadata = o, await this.updateComplete, this.applyState();
|
|
1214
|
+
} catch {
|
|
1215
|
+
this.svgContent = "", this.metadata = void 0;
|
|
1216
|
+
}
|
|
1217
|
+
this.dispatchDefaults();
|
|
1218
|
+
}
|
|
1219
|
+
applyState() {
|
|
1220
|
+
!this.metadata || !this.inputData || !this.svgContainer || requestAnimationFrame(() => {
|
|
1221
|
+
const n = this.svgContainer?.querySelector("svg");
|
|
1222
|
+
if (!n) return;
|
|
1223
|
+
const t = {}, e = this.inputData?.bindings ?? {};
|
|
1224
|
+
for (const [c, l] of Object.entries(e))
|
|
1225
|
+
t[c] = l;
|
|
1226
|
+
const s = this.inputData, i = W(this.metadata), { styling: r, bindings: o, ...h } = i, a = { ...h, ...s };
|
|
1227
|
+
delete a.symbol, delete a.bindings, delete a.actions, delete a.styling, Object.assign(a, r ?? {}, s?.styling ?? {});
|
|
1228
|
+
const u = {
|
|
1229
|
+
onAction: (c, l, p, m) => {
|
|
1230
|
+
this.dispatchEvent(
|
|
1231
|
+
new CustomEvent("action-submit", {
|
|
1232
|
+
detail: {
|
|
1233
|
+
actionName: l,
|
|
1234
|
+
args: p,
|
|
1235
|
+
actionApp: s?.actions?.actionApp,
|
|
1236
|
+
actionDevice: s?.actions?.actionDevice,
|
|
1237
|
+
actionTopic: s?.actions?.actionTopic
|
|
1238
|
+
},
|
|
1239
|
+
bubbles: !1,
|
|
1240
|
+
composed: !1
|
|
1241
|
+
})
|
|
1242
|
+
);
|
|
1243
|
+
},
|
|
1244
|
+
onSetValue: (c, l) => {
|
|
1245
|
+
this.ctx && (this.ctx.values[c] = l), this.applyState();
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
this.ctx = he(n, this.metadata, t, a, u), this.cleanupActions(), ue(n, this.metadata, this.ctx), this.actionCleanups = fe(n, this.metadata, this.ctx);
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
render() {
|
|
1252
|
+
return z`
|
|
1253
|
+
<div class="wrapper" style="background-color: ${this.themeBgColor ?? ""}">
|
|
1254
|
+
${this.svgContent ? z`<div class="svg-container">${Kt(this.svgContent)}</div>` : z`<div class="no-symbol">
|
|
1255
|
+
${this.inputData?.symbol ? "Loading..." : "Select a SCADA symbol"}
|
|
1256
|
+
</div>`}
|
|
1257
|
+
</div>
|
|
1258
|
+
`;
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
$.styles = _t`
|
|
1262
|
+
:host {
|
|
1263
|
+
display: block;
|
|
1264
|
+
box-sizing: border-box;
|
|
1265
|
+
position: relative;
|
|
1266
|
+
margin: auto;
|
|
1267
|
+
overflow: hidden;
|
|
1268
|
+
width: 100%;
|
|
1269
|
+
height: 100%;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
.wrapper {
|
|
1273
|
+
display: flex;
|
|
1274
|
+
align-items: center;
|
|
1275
|
+
justify-content: center;
|
|
1276
|
+
height: 100%;
|
|
1277
|
+
width: 100%;
|
|
1278
|
+
box-sizing: border-box;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.svg-container {
|
|
1282
|
+
width: 100%;
|
|
1283
|
+
height: 100%;
|
|
1284
|
+
display: flex;
|
|
1285
|
+
justify-content: center;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.svg-container svg {
|
|
1289
|
+
max-width: 100%;
|
|
1290
|
+
max-height: 100%;
|
|
1291
|
+
width: auto;
|
|
1292
|
+
height: auto;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
.no-symbol {
|
|
1296
|
+
font-size: 16px;
|
|
1297
|
+
color: #999;
|
|
1298
|
+
display: flex;
|
|
1299
|
+
height: 100%;
|
|
1300
|
+
width: 100%;
|
|
1301
|
+
text-align: center;
|
|
1302
|
+
align-items: center;
|
|
1303
|
+
justify-content: center;
|
|
1304
|
+
font-family: sans-serif;
|
|
1305
|
+
}
|
|
1306
|
+
`;
|
|
1307
|
+
E([
|
|
1308
|
+
Q({ type: Object })
|
|
1309
|
+
], $.prototype, "inputData", 2);
|
|
1310
|
+
E([
|
|
1311
|
+
Q({ type: Object })
|
|
1312
|
+
], $.prototype, "theme", 2);
|
|
1313
|
+
E([
|
|
1314
|
+
tt()
|
|
1315
|
+
], $.prototype, "svgContent", 2);
|
|
1316
|
+
E([
|
|
1317
|
+
tt()
|
|
1318
|
+
], $.prototype, "metadata", 2);
|
|
1319
|
+
E([
|
|
1320
|
+
tt()
|
|
1321
|
+
], $.prototype, "themeBgColor", 2);
|
|
1322
|
+
E([
|
|
1323
|
+
Yt(".svg-container")
|
|
1324
|
+
], $.prototype, "svgContainer", 2);
|
|
1325
|
+
$ = E([
|
|
1326
|
+
Wt("widget-scada-1.0.2")
|
|
1327
|
+
], $);
|
|
1328
|
+
export {
|
|
1329
|
+
$ as WidgetScada
|
|
1330
|
+
};
|
|
1331
|
+
//# sourceMappingURL=widget-scada.js.map
|