physical-quantity 1.1.28 → 1.1.29
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 -54
- package/dist/pq.es.js +1 -373
- package/dist/pq.umd.js +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -97,60 +97,56 @@ The physical-quantity component supports the following attributes:
|
|
|
97
97
|
|
|
98
98
|
### Supported Units
|
|
99
99
|
Currently, the component supports the following categories and units:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- MA
|
|
151
|
-
- esu/s"
|
|
152
|
-
- ... (more to update.)
|
|
153
|
-
|
|
100
|
+
| Category | Unit | Description |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| Length | m |meter|
|
|
103
|
+
| |km |kilometers|
|
|
104
|
+
| |mm |millimeter|
|
|
105
|
+
| |cm |centimeter|
|
|
106
|
+
| |in |inch|
|
|
107
|
+
| |ft |foot|
|
|
108
|
+
| Mass | kg |kilogram|
|
|
109
|
+
| | g |gram|
|
|
110
|
+
| |lbm |pound mass|
|
|
111
|
+
| Pressure/Stress | Pa ||
|
|
112
|
+
| | kPa ||
|
|
113
|
+
| | MPa ||
|
|
114
|
+
| | GPa ||
|
|
115
|
+
| | bar ||
|
|
116
|
+
| | mbar||
|
|
117
|
+
| | atm||
|
|
118
|
+
| | mm HG||
|
|
119
|
+
| | cm HG||
|
|
120
|
+
| | in HG||
|
|
121
|
+
| | mm W.C.||
|
|
122
|
+
| | m W.C.||
|
|
123
|
+
| | in W.C.||
|
|
124
|
+
| | psf| pound per square foot|
|
|
125
|
+
| | psi| pound per square foot|
|
|
126
|
+
| | ksi| kilo-pound per square foot|
|
|
127
|
+
| | ksi[kip/in²]||
|
|
128
|
+
| Density | kg/m³||
|
|
129
|
+
| | kg/L||
|
|
130
|
+
| | g/cm³||
|
|
131
|
+
| | g/mm³||
|
|
132
|
+
| | lbm/ft³||
|
|
133
|
+
| | lbm/in³||
|
|
134
|
+
| Time | s[second] ||
|
|
135
|
+
| | s||
|
|
136
|
+
| | minute||
|
|
137
|
+
| | h||
|
|
138
|
+
| | h[hour]||
|
|
139
|
+
| | day||
|
|
140
|
+
| | week||
|
|
141
|
+
| ElectricalCurrent | A ||
|
|
142
|
+
| | Ampere[amp]||
|
|
143
|
+
| | mA||
|
|
144
|
+
| | µA||
|
|
145
|
+
| | kA||
|
|
146
|
+
| | MA||
|
|
147
|
+
| | esu/s |
|
|
148
|
+
| more to update. | (feel free to send your request for other units) ||
|
|
149
|
+
|
|
154
150
|
## License
|
|
155
151
|
This project is licensed under the MIT License. See the LICENSE file for more details.
|
|
156
152
|
|
package/dist/pq.es.js
CHANGED
|
@@ -1,373 +1 @@
|
|
|
1
|
-
function _0x1f76() {
|
|
2
|
-
const _0x102e4b = [
|
|
3
|
-
"<option\x20value=\x22",
|
|
4
|
-
"selected",
|
|
5
|
-
"SELECT",
|
|
6
|
-
"\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>",
|
|
7
|
-
"mm\x20W.C.",
|
|
8
|
-
"MPa",
|
|
9
|
-
"e3dLogoUrl",
|
|
10
|
-
"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22",
|
|
11
|
-
"disconnectedCallback",
|
|
12
|
-
"unitCategory",
|
|
13
|
-
"toString",
|
|
14
|
-
"select",
|
|
15
|
-
"in\x20HG",
|
|
16
|
-
"getUnitCategory",
|
|
17
|
-
"lbm/in³",
|
|
18
|
-
"day",
|
|
19
|
-
"</option>",
|
|
20
|
-
"ksi",
|
|
21
|
-
"kPa",
|
|
22
|
-
"isInteger",
|
|
23
|
-
"mbar",
|
|
24
|
-
"Length",
|
|
25
|
-
"\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20",
|
|
26
|
-
"5586031gXaKwN",
|
|
27
|
-
"open",
|
|
28
|
-
"handleArrowClick",
|
|
29
|
-
"toPrecision",
|
|
30
|
-
"none",
|
|
31
|
-
"m\x20W.C.",
|
|
32
|
-
"1052112JyJynC",
|
|
33
|
-
"esu/s",
|
|
34
|
-
"shadowRoot",
|
|
35
|
-
"includes",
|
|
36
|
-
"decimal-places",
|
|
37
|
-
"change",
|
|
38
|
-
"kg/L",
|
|
39
|
-
"in\x20W.C.",
|
|
40
|
-
"h[hour]",
|
|
41
|
-
"display",
|
|
42
|
-
"bar",
|
|
43
|
-
"3639132yqLVJT",
|
|
44
|
-
"1662FoCryp",
|
|
45
|
-
"616eqDTxh",
|
|
46
|
-
"555BnxWir",
|
|
47
|
-
"3lSKTpX",
|
|
48
|
-
"week",
|
|
49
|
-
"lbm/ft³",
|
|
50
|
-
"define",
|
|
51
|
-
"243wuNgTe",
|
|
52
|
-
"minute",
|
|
53
|
-
"removeEventListener",
|
|
54
|
-
"pow",
|
|
55
|
-
"render",
|
|
56
|
-
"formatValue",
|
|
57
|
-
"unit",
|
|
58
|
-
"kg/m³",
|
|
59
|
-
"550qSUYFW",
|
|
60
|
-
"addEventListener",
|
|
61
|
-
"tagName",
|
|
62
|
-
"style",
|
|
63
|
-
"mouseout",
|
|
64
|
-
"tooltipTimeout",
|
|
65
|
-
"ksi[kip/in²]",
|
|
66
|
-
"lbm",
|
|
67
|
-
"bind",
|
|
68
|
-
"replace",
|
|
69
|
-
"connectedCallback",
|
|
70
|
-
"Ampere[amp]",
|
|
71
|
-
"decimalPlaces",
|
|
72
|
-
"s[second]",
|
|
73
|
-
"map",
|
|
74
|
-
"19686ZRCLXs",
|
|
75
|
-
"g/cm³",
|
|
76
|
-
"psi",
|
|
77
|
-
"querySelector",
|
|
78
|
-
"block",
|
|
79
|
-
".unit-container",
|
|
80
|
-
"986410YDaVbP",
|
|
81
|
-
"unitConversion",
|
|
82
|
-
"observedAttributes",
|
|
83
|
-
"join",
|
|
84
|
-
"value",
|
|
85
|
-
"GPa",
|
|
86
|
-
"uc-qty",
|
|
87
|
-
"floor",
|
|
88
|
-
"units",
|
|
89
|
-
"target",
|
|
90
|
-
"handleUnitChange",
|
|
91
|
-
"focus",
|
|
92
|
-
"g/mm³",
|
|
93
|
-
"physical-quantity",
|
|
94
|
-
];
|
|
95
|
-
_0x1f76 = function () {
|
|
96
|
-
return _0x102e4b;
|
|
97
|
-
};
|
|
98
|
-
return _0x1f76();
|
|
99
|
-
}
|
|
100
|
-
const _0x4b6c41 = _0x4250;
|
|
101
|
-
function _0x4250(_0x17483a, _0x249ee0) {
|
|
102
|
-
const _0x1f76b8 = _0x1f76();
|
|
103
|
-
return (
|
|
104
|
-
(_0x4250 = function (_0x4250f4, _0x4dc54e) {
|
|
105
|
-
_0x4250f4 = _0x4250f4 - 0xfb;
|
|
106
|
-
let _0x50e178 = _0x1f76b8[_0x4250f4];
|
|
107
|
-
return _0x50e178;
|
|
108
|
-
}),
|
|
109
|
-
_0x4250(_0x17483a, _0x249ee0)
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
(function (_0x2decea, _0x2c8163) {
|
|
113
|
-
const _0x333bb7 = _0x4250,
|
|
114
|
-
_0x50ea67 = _0x2decea();
|
|
115
|
-
while (!![]) {
|
|
116
|
-
try {
|
|
117
|
-
const _0x257bd9 =
|
|
118
|
-
(-parseInt(_0x333bb7(0x10c)) / 0x1) *
|
|
119
|
-
(-parseInt(_0x333bb7(0xfd)) / 0x2) +
|
|
120
|
-
(parseInt(_0x333bb7(0x100)) / 0x3) *
|
|
121
|
-
(parseInt(_0x333bb7(0x14c)) / 0x4) +
|
|
122
|
-
(-parseInt(_0x333bb7(0xff)) / 0x5) *
|
|
123
|
-
(parseInt(_0x333bb7(0x11b)) / 0x6) +
|
|
124
|
-
parseInt(_0x333bb7(0xfc)) / 0x7 +
|
|
125
|
-
(-parseInt(_0x333bb7(0xfe)) / 0x8) *
|
|
126
|
-
(parseInt(_0x333bb7(0x104)) / 0x9) +
|
|
127
|
-
-parseInt(_0x333bb7(0x121)) / 0xa +
|
|
128
|
-
-parseInt(_0x333bb7(0x146)) / 0xb;
|
|
129
|
-
if (_0x257bd9 === _0x2c8163) break;
|
|
130
|
-
else _0x50ea67["push"](_0x50ea67["shift"]());
|
|
131
|
-
} catch (_0x10108e) {
|
|
132
|
-
_0x50ea67["push"](_0x50ea67["shift"]());
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
})(_0x1f76, 0x413d6);
|
|
136
|
-
const s = 0.45359237,
|
|
137
|
-
o = 25.4 / 0x3e8,
|
|
138
|
-
n = 0xc * o,
|
|
139
|
-
c = 0x18bcd,
|
|
140
|
-
a = 133.322387415;
|
|
141
|
-
class r extends HTMLElement {
|
|
142
|
-
constructor() {
|
|
143
|
-
const _0x431f05 = _0x4250;
|
|
144
|
-
super(),
|
|
145
|
-
this["attachShadow"]({ mode: _0x431f05(0x147) }),
|
|
146
|
-
(this["value"] = 0x0),
|
|
147
|
-
(this["unit"] = "mm"),
|
|
148
|
-
(this[_0x431f05(0x138)] = _0x431f05(0x144)),
|
|
149
|
-
(this[_0x431f05(0x111)] = null),
|
|
150
|
-
(this[_0x431f05(0x118)] = 0x3),
|
|
151
|
-
(this["e3dLogoUrl"] =
|
|
152
|
-
"https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492"),
|
|
153
|
-
(this[_0x431f05(0x129)] = {
|
|
154
|
-
Length: ["m", "km", "cm", "mm", "in", "ft"],
|
|
155
|
-
Mass: ["g", "kg", _0x431f05(0x113)],
|
|
156
|
-
Pressure: [
|
|
157
|
-
"Pa",
|
|
158
|
-
_0x431f05(0x141),
|
|
159
|
-
_0x431f05(0x134),
|
|
160
|
-
_0x431f05(0x126),
|
|
161
|
-
_0x431f05(0xfb),
|
|
162
|
-
_0x431f05(0x143),
|
|
163
|
-
"atm",
|
|
164
|
-
"mm\x20HG",
|
|
165
|
-
"cm\x20HG",
|
|
166
|
-
_0x431f05(0x13b),
|
|
167
|
-
_0x431f05(0x133),
|
|
168
|
-
_0x431f05(0x14b),
|
|
169
|
-
_0x431f05(0x153),
|
|
170
|
-
"psf",
|
|
171
|
-
_0x431f05(0x11d),
|
|
172
|
-
_0x431f05(0x140),
|
|
173
|
-
_0x431f05(0x112),
|
|
174
|
-
],
|
|
175
|
-
Density: [
|
|
176
|
-
_0x431f05(0x10b),
|
|
177
|
-
_0x431f05(0x152),
|
|
178
|
-
_0x431f05(0x11c),
|
|
179
|
-
_0x431f05(0x12d),
|
|
180
|
-
_0x431f05(0x102),
|
|
181
|
-
_0x431f05(0x13d),
|
|
182
|
-
],
|
|
183
|
-
Time: [
|
|
184
|
-
_0x431f05(0x119),
|
|
185
|
-
"s",
|
|
186
|
-
_0x431f05(0x105),
|
|
187
|
-
"h",
|
|
188
|
-
_0x431f05(0x154),
|
|
189
|
-
_0x431f05(0x13e),
|
|
190
|
-
_0x431f05(0x101),
|
|
191
|
-
],
|
|
192
|
-
ElectricalCurrent: [
|
|
193
|
-
"A",
|
|
194
|
-
_0x431f05(0x117),
|
|
195
|
-
"mA",
|
|
196
|
-
"µA",
|
|
197
|
-
"kA",
|
|
198
|
-
"MA",
|
|
199
|
-
_0x431f05(0x14d),
|
|
200
|
-
],
|
|
201
|
-
}),
|
|
202
|
-
(this[_0x431f05(0x122)] = {
|
|
203
|
-
Length: { m: 0x1, km: 0x3e8, cm: 0.01, mm: 0.001, in: o, ft: n },
|
|
204
|
-
Mass: { kg: 0x1, g: 0.001, lbm: s },
|
|
205
|
-
Pressure: {
|
|
206
|
-
Pa: 0x1,
|
|
207
|
-
kPa: 0x3e8,
|
|
208
|
-
MPa: 0xf4240,
|
|
209
|
-
GPa: 0x3b9aca00,
|
|
210
|
-
bar: 0x64 * 0x3e8,
|
|
211
|
-
mbar: 0x64,
|
|
212
|
-
atm: c,
|
|
213
|
-
"mm\x20HG": a,
|
|
214
|
-
"cm\x20HG": a * 0xa,
|
|
215
|
-
"in\x20HG": a * 25.4,
|
|
216
|
-
"mm\x20W.C.": (0x1 / 0x3e8) * 0x3e8 * 9.80665,
|
|
217
|
-
"m\x20W.C.": 0x1 * 0x3e8 * 9.80665,
|
|
218
|
-
"in\x20W.C.": o * 0x3e8 * 9.80665,
|
|
219
|
-
psf: (s * 9.80665) / Math[_0x431f05(0x107)](n, 0x2),
|
|
220
|
-
psi: (s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2),
|
|
221
|
-
ksi: ((s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2)) * 0x3e8,
|
|
222
|
-
"ksi[kip/in²]":
|
|
223
|
-
((s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2)) * 0x3e8,
|
|
224
|
-
},
|
|
225
|
-
Density: {
|
|
226
|
-
"kg/m³": 0x1,
|
|
227
|
-
"kg/L": 0x3e8,
|
|
228
|
-
"g/cm³": 0x1 / 0x3e8 / Math[_0x431f05(0x107)](0.01, 0x3),
|
|
229
|
-
"g/mm³": 0x1 / 0x3e8 / Math["pow"](0.001, 0x3),
|
|
230
|
-
"lbm/ft³": s / Math[_0x431f05(0x107)](n, 0x3),
|
|
231
|
-
"lbm/in³": s / Math["pow"](o, 0x3),
|
|
232
|
-
},
|
|
233
|
-
Time: {
|
|
234
|
-
"s[second]": 0x1,
|
|
235
|
-
s: 0x1,
|
|
236
|
-
minute: 0x3c,
|
|
237
|
-
h: 0xe10,
|
|
238
|
-
"h[hour]": 0xe10,
|
|
239
|
-
day: 0xe10 * 0x18,
|
|
240
|
-
week: 0xe10 * 0x18 * 0x7,
|
|
241
|
-
},
|
|
242
|
-
ElectricalCurrent: {
|
|
243
|
-
A: 0x1,
|
|
244
|
-
"Ampere[amp]": 0x1,
|
|
245
|
-
mA: 0.001,
|
|
246
|
-
µA: 0.000001,
|
|
247
|
-
kA: 0x3e8,
|
|
248
|
-
MA: 0xf4240,
|
|
249
|
-
"esu/s": 0x1 / 0xb2d05e00,
|
|
250
|
-
},
|
|
251
|
-
}),
|
|
252
|
-
this[_0x431f05(0x108)]();
|
|
253
|
-
}
|
|
254
|
-
static get [_0x4b6c41(0x123)]() {
|
|
255
|
-
const _0x2066cc = _0x4b6c41;
|
|
256
|
-
return ["value", "unit", _0x2066cc(0x150)];
|
|
257
|
-
}
|
|
258
|
-
["attributeChangedCallback"](_0x78cea2, _0x143b0f, _0x7aeeca) {
|
|
259
|
-
const _0x30da38 = _0x4b6c41;
|
|
260
|
-
_0x78cea2 === _0x30da38(0x125)
|
|
261
|
-
? (this[_0x30da38(0x125)] = parseFloat(_0x7aeeca))
|
|
262
|
-
: _0x78cea2 === _0x30da38(0x10a)
|
|
263
|
-
? ((this[_0x30da38(0x10a)] = _0x7aeeca),
|
|
264
|
-
(this["unitCategory"] = this[_0x30da38(0x13c)](_0x7aeeca)))
|
|
265
|
-
: _0x78cea2 === _0x30da38(0x150) &&
|
|
266
|
-
(this["decimalPlaces"] = parseInt(_0x7aeeca) || 0x3),
|
|
267
|
-
this[_0x30da38(0x108)]();
|
|
268
|
-
}
|
|
269
|
-
["getUnitCategory"](_0x3f966e) {
|
|
270
|
-
const _0x45f4bc = _0x4b6c41;
|
|
271
|
-
for (const _0x26ef1e in this["units"])
|
|
272
|
-
if (this[_0x45f4bc(0x129)][_0x26ef1e][_0x45f4bc(0x14f)](_0x3f966e))
|
|
273
|
-
return _0x26ef1e;
|
|
274
|
-
return null;
|
|
275
|
-
}
|
|
276
|
-
[_0x4b6c41(0x116)]() {
|
|
277
|
-
const _0xe2203a = _0x4b6c41;
|
|
278
|
-
this[_0xe2203a(0x14e)][_0xe2203a(0x10d)](
|
|
279
|
-
_0xe2203a(0x151),
|
|
280
|
-
this[_0xe2203a(0x12b)]["bind"](this)
|
|
281
|
-
),
|
|
282
|
-
this[_0xe2203a(0x108)]();
|
|
283
|
-
}
|
|
284
|
-
[_0x4b6c41(0x137)]() {
|
|
285
|
-
const _0x4b95a5 = _0x4b6c41;
|
|
286
|
-
this[_0x4b95a5(0x14e)][_0x4b95a5(0x106)](
|
|
287
|
-
_0x4b95a5(0x151),
|
|
288
|
-
this[_0x4b95a5(0x12b)][_0x4b95a5(0x114)](this)
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
[_0x4b6c41(0x148)](_0x51979d) {
|
|
292
|
-
const _0x2d6b88 = _0x4b6c41;
|
|
293
|
-
if (_0x51979d["target"]["closest"](_0x2d6b88(0x120))) {
|
|
294
|
-
const _0x2b867f = this[_0x2d6b88(0x14e)][_0x2d6b88(0x11e)](
|
|
295
|
-
_0x2d6b88(0x13a)
|
|
296
|
-
);
|
|
297
|
-
_0x2b867f && (_0x2b867f[_0x2d6b88(0x12c)](), _0x2b867f["click"]());
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
[_0x4b6c41(0x12b)](_0x33c451) {
|
|
301
|
-
const _0x278602 = _0x4b6c41;
|
|
302
|
-
if (_0x33c451[_0x278602(0x12a)][_0x278602(0x10e)] === _0x278602(0x131)) {
|
|
303
|
-
const _0x12ed75 = _0x33c451[_0x278602(0x12a)][_0x278602(0x125)],
|
|
304
|
-
_0x970344 =
|
|
305
|
-
this[_0x278602(0x122)][this[_0x278602(0x138)]][
|
|
306
|
-
this[_0x278602(0x10a)]
|
|
307
|
-
] / this[_0x278602(0x122)][this[_0x278602(0x138)]][_0x12ed75];
|
|
308
|
-
(this[_0x278602(0x125)] = this[_0x278602(0x125)] * _0x970344),
|
|
309
|
-
(this[_0x278602(0x10a)] = _0x12ed75),
|
|
310
|
-
this["render"]();
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
["formatValue"](_0x5b4c11) {
|
|
314
|
-
const _0x1924fb = _0x4b6c41;
|
|
315
|
-
return Number[_0x1924fb(0x142)](_0x5b4c11)
|
|
316
|
-
? _0x5b4c11[_0x1924fb(0x139)]()
|
|
317
|
-
: Math[_0x1924fb(0x128)](_0x5b4c11) !== 0x0
|
|
318
|
-
? _0x5b4c11["toFixed"](this[_0x1924fb(0x118)])
|
|
319
|
-
[_0x1924fb(0x115)](/0+$/, "")
|
|
320
|
-
[_0x1924fb(0x115)](/\.$/, "")
|
|
321
|
-
: _0x5b4c11[_0x1924fb(0x149)](0x3);
|
|
322
|
-
}
|
|
323
|
-
["render"]() {
|
|
324
|
-
const _0x52b9bf = _0x4b6c41;
|
|
325
|
-
this[_0x52b9bf(0x14e)]["innerHTML"] =
|
|
326
|
-
_0x52b9bf(0x132) +
|
|
327
|
-
this[_0x52b9bf(0x109)](this[_0x52b9bf(0x125)]) +
|
|
328
|
-
"</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" +
|
|
329
|
-
this["units"][this["unitCategory"]]
|
|
330
|
-
[_0x52b9bf(0x11a)](
|
|
331
|
-
(_0x2b379b) =>
|
|
332
|
-
_0x52b9bf(0x12f) +
|
|
333
|
-
_0x2b379b +
|
|
334
|
-
"\x22\x20" +
|
|
335
|
-
(_0x2b379b === this[_0x52b9bf(0x10a)] ? _0x52b9bf(0x130) : "") +
|
|
336
|
-
">\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" +
|
|
337
|
-
_0x2b379b +
|
|
338
|
-
_0x52b9bf(0x13f)
|
|
339
|
-
)
|
|
340
|
-
[_0x52b9bf(0x124)]("") +
|
|
341
|
-
_0x52b9bf(0x136) +
|
|
342
|
-
this[_0x52b9bf(0x135)] +
|
|
343
|
-
_0x52b9bf(0x145);
|
|
344
|
-
const _0x1ed17b =
|
|
345
|
-
this[_0x52b9bf(0x14e)]["querySelector"](".unit-container"),
|
|
346
|
-
_0x5dd3f8 = this[_0x52b9bf(0x14e)]["querySelectorAll"](".tooltip")[0x0];
|
|
347
|
-
_0x1ed17b[_0x52b9bf(0x10d)]("mouseover", () => {
|
|
348
|
-
const _0x5b79b5 = _0x52b9bf;
|
|
349
|
-
this[_0x5b79b5(0x111)] = setTimeout(() => {
|
|
350
|
-
const _0x3b827c = _0x5b79b5;
|
|
351
|
-
_0x5dd3f8[_0x3b827c(0x10f)]["display"] = _0x3b827c(0x11f);
|
|
352
|
-
}, 0x3e8);
|
|
353
|
-
}),
|
|
354
|
-
_0x1ed17b[_0x52b9bf(0x10d)](_0x52b9bf(0x110), () => {
|
|
355
|
-
const _0xc2a862 = _0x52b9bf;
|
|
356
|
-
setTimeout(() => {
|
|
357
|
-
const _0x5d5cff = _0x4250;
|
|
358
|
-
_0x5dd3f8[_0x5d5cff(0x10f)][_0x5d5cff(0x155)] = _0x5d5cff(0x14a);
|
|
359
|
-
}, 0x7d0),
|
|
360
|
-
clearTimeout(this[_0xc2a862(0x111)]);
|
|
361
|
-
}),
|
|
362
|
-
_0x5dd3f8[_0x52b9bf(0x10d)](_0x52b9bf(0x110), () => {
|
|
363
|
-
setTimeout(() => {
|
|
364
|
-
const _0x5aeb71 = _0x4250;
|
|
365
|
-
_0x5dd3f8[_0x5aeb71(0x10f)][_0x5aeb71(0x155)] = _0x5aeb71(0x14a);
|
|
366
|
-
}, 0x7d0);
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
customElements[_0x4b6c41(0x103)](_0x4b6c41(0x12e), r);
|
|
371
|
-
class m extends r {}
|
|
372
|
-
customElements[_0x4b6c41(0x103)](_0x4b6c41(0x127), m);
|
|
373
|
-
export { r as default };
|
|
1
|
+
const _0x4fd7ec=_0x1b6d;(function(_0x3fbde2,_0x199991){const _0xbdd86b=_0x1b6d,_0x3f11ad=_0x3fbde2();while(!![]){try{const _0x56a199=-parseInt(_0xbdd86b(0xae))/0x1*(-parseInt(_0xbdd86b(0x91))/0x2)+parseInt(_0xbdd86b(0x7c))/0x3+-parseInt(_0xbdd86b(0xb2))/0x4*(-parseInt(_0xbdd86b(0x8b))/0x5)+-parseInt(_0xbdd86b(0x81))/0x6+-parseInt(_0xbdd86b(0x75))/0x7+-parseInt(_0xbdd86b(0xb5))/0x8+parseInt(_0xbdd86b(0xbb))/0x9*(-parseInt(_0xbdd86b(0x80))/0xa);if(_0x56a199===_0x199991)break;else _0x3f11ad['push'](_0x3f11ad['shift']());}catch(_0x40fb3b){_0x3f11ad['push'](_0x3f11ad['shift']());}}}(_0x182e,0xb7833));const s=0.45359237,o=25.4/0x3e8,n=0xc*o,c=0x18bcd,a=133.322387415;class r extends HTMLElement{constructor(){const _0xbce791=_0x1b6d;super(),this['attachShadow']({'mode':_0xbce791(0xa8)}),this['value']=0x0,this[_0xbce791(0x82)]='mm',this[_0xbce791(0x7a)]=_0xbce791(0x72),this[_0xbce791(0x92)]=null,this['decimalPlaces']=0x3,this[_0xbce791(0xa6)]='https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492',this[_0xbce791(0xac)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0xbce791(0x97)],'Pressure':['Pa',_0xbce791(0x8e),_0xbce791(0xa9),'GPa',_0xbce791(0x73),_0xbce791(0x6e),_0xbce791(0x89),'mm\x20HG',_0xbce791(0x6f),_0xbce791(0x9e),_0xbce791(0x71),'m\x20W.C.','in\x20W.C.',_0xbce791(0xad),_0xbce791(0x79),_0xbce791(0xab),_0xbce791(0xbc)],'Density':[_0xbce791(0x90),_0xbce791(0x6a),_0xbce791(0x95),_0xbce791(0xbd),'lbm/ft³','lbm/in³'],'Time':[_0xbce791(0x99),'s',_0xbce791(0xa2),'h',_0xbce791(0xa4),_0xbce791(0x98),'week'],'ElectricalCurrent':['A','Ampere[amp]','mA','µA','kA','MA',_0xbce791(0xa5)]},this[_0xbce791(0x77)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':o,'ft':n},'Mass':{'kg':0x1,'g':0.001,'lbm':s},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':c,'mm\x20HG':a,'cm\x20HG':a*0xa,'in\x20HG':a*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':o*0x3e8*9.80665,'psf':s*9.80665/Math['pow'](n,0x2),'psi':s*9.80665/Math['pow'](o,0x2),'ksi':s*9.80665/Math[_0xbce791(0x87)](o,0x2)*0x3e8,'ksi[kip/in²]':s*9.80665/Math[_0xbce791(0x87)](o,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0xbce791(0x87)](0.01,0x3),'g/mm³':0x1/0x3e8/Math[_0xbce791(0x87)](0.001,0x3),'lbm/ft³':s/Math[_0xbce791(0x87)](n,0x3),'lbm/in³':s/Math[_0xbce791(0x87)](o,0x3)},'Time':{'s[second]':0x1,'s':0x1,'minute':0x3c,'h':0xe10,'h[hour]':0xe10,'day':0xe10*0x18,'week':0xe10*0x18*0x7},'ElectricalCurrent':{'A':0x1,'Ampere[amp]':0x1,'mA':0.001,'µA':0.000001,'kA':0x3e8,'MA':0xf4240,'esu/s':0x1/0xb2d05e00}},this['render']();}static get['observedAttributes'](){const _0x47429e=_0x1b6d;return[_0x47429e(0x88),'unit',_0x47429e(0xb0)];}['attributeChangedCallback'](_0x4047e5,_0xbe338d,_0x48d991){const _0x5cc497=_0x1b6d;_0x4047e5===_0x5cc497(0x88)?this['value']=parseFloat(_0x48d991):_0x4047e5===_0x5cc497(0x82)?(this[_0x5cc497(0x82)]=_0x48d991,this[_0x5cc497(0x7a)]=this['getUnitCategory'](_0x48d991)):_0x4047e5==='decimal-places'&&(this['decimalPlaces']=parseInt(_0x48d991)||0x3),this['render']();}[_0x4fd7ec(0xb3)](_0x4a7478){const _0x44e3a6=_0x4fd7ec;for(const _0x8ec474 in this[_0x44e3a6(0xac)])if(this['units'][_0x8ec474][_0x44e3a6(0x8a)](_0x4a7478))return _0x8ec474;return null;}[_0x4fd7ec(0x6b)](){const _0x5ee318=_0x4fd7ec;this[_0x5ee318(0x9f)]['addEventListener'](_0x5ee318(0x6c),this[_0x5ee318(0x7d)][_0x5ee318(0x7e)](this)),this[_0x5ee318(0xb6)]();}[_0x4fd7ec(0xba)](){const _0x483598=_0x4fd7ec;this[_0x483598(0x9f)][_0x483598(0x7f)](_0x483598(0x6c),this['handleUnitChange'][_0x483598(0x7e)](this));}[_0x4fd7ec(0x8c)](_0x3a510f){const _0x46fcd4=_0x4fd7ec;if(_0x3a510f['target'][_0x46fcd4(0x7b)](_0x46fcd4(0x70))){const _0x18d6d6=this[_0x46fcd4(0x9f)][_0x46fcd4(0x85)]('select');_0x18d6d6&&(_0x18d6d6[_0x46fcd4(0xa1)](),_0x18d6d6[_0x46fcd4(0xaf)]());}}['handleUnitChange'](_0x12f77b){const _0x466b4d=_0x4fd7ec;if(_0x12f77b[_0x466b4d(0x8d)]['tagName']===_0x466b4d(0x83)){const _0x33ac3f=_0x12f77b[_0x466b4d(0x8d)]['value'],_0x31f6cd=this[_0x466b4d(0x77)][this['unitCategory']][this['unit']]/this[_0x466b4d(0x77)][this[_0x466b4d(0x7a)]][_0x33ac3f];this['value']=this['value']*_0x31f6cd,this[_0x466b4d(0x82)]=_0x33ac3f,this['render']();}}['formatValue'](_0x1bc8cc){const _0x1a8d71=_0x4fd7ec;return Number[_0x1a8d71(0xbe)](_0x1bc8cc)?_0x1bc8cc[_0x1a8d71(0xb7)]():Math[_0x1a8d71(0x74)](_0x1bc8cc)!==0x0?_0x1bc8cc[_0x1a8d71(0xa3)](this['decimalPlaces'])['replace'](/0+$/,'')['replace'](/\.$/,''):_0x1bc8cc['toPrecision'](0x3);}[_0x4fd7ec(0xb6)](){const _0x1d0dfc=_0x4fd7ec;this['shadowRoot'][_0x1d0dfc(0xb1)]=_0x1d0dfc(0x9b)+this[_0x1d0dfc(0x78)](this[_0x1d0dfc(0x88)])+_0x1d0dfc(0x76)+this[_0x1d0dfc(0xac)][this[_0x1d0dfc(0x7a)]][_0x1d0dfc(0x96)](_0x976724=>'<option\x20value=\x22'+_0x976724+'\x22\x20'+(_0x976724===this[_0x1d0dfc(0x82)]?_0x1d0dfc(0x6d):'')+_0x1d0dfc(0xb4)+_0x976724+'</option>')[_0x1d0dfc(0xb8)]('')+_0x1d0dfc(0xa7)+this[_0x1d0dfc(0xa6)]+_0x1d0dfc(0x84);const _0x552928=this[_0x1d0dfc(0x9f)][_0x1d0dfc(0x85)](_0x1d0dfc(0x70)),_0x382205=this['shadowRoot']['querySelectorAll']('.tooltip')[0x0];_0x552928[_0x1d0dfc(0xb9)](_0x1d0dfc(0xa0),()=>{const _0x5269dd=_0x1d0dfc;this[_0x5269dd(0x92)]=setTimeout(()=>{const _0x1d7add=_0x5269dd;_0x382205[_0x1d7add(0x9c)]['display']=_0x1d7add(0x86);},0x3e8);}),_0x552928[_0x1d0dfc(0xb9)]('mouseout',()=>{setTimeout(()=>{const _0x576516=_0x1b6d;_0x382205[_0x576516(0x9c)][_0x576516(0x8f)]=_0x576516(0x9a);},0x7d0),clearTimeout(this['tooltipTimeout']);}),_0x382205['addEventListener'](_0x1d0dfc(0xaa),()=>{setTimeout(()=>{const _0x56a795=_0x1b6d;_0x382205[_0x56a795(0x9c)]['display']=_0x56a795(0x9a);},0x7d0);});}}customElements[_0x4fd7ec(0x94)](_0x4fd7ec(0x9d),r);function _0x1b6d(_0x1906bf,_0x2f6ee7){const _0x182e48=_0x182e();return _0x1b6d=function(_0x1b6dbe,_0x25bad8){_0x1b6dbe=_0x1b6dbe-0x6a;let _0x362035=_0x182e48[_0x1b6dbe];return _0x362035;},_0x1b6d(_0x1906bf,_0x2f6ee7);}class m extends r{}customElements[_0x4fd7ec(0x94)](_0x4fd7ec(0x93),m);export{r as default};function _0x182e(){const _0x563983=['define','g/cm³','map','lbm','day','s[second]','none','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','style','physical-quantity','in\x20HG','shadowRoot','mouseover','focus','minute','toFixed','h[hour]','esu/s','e3dLogoUrl','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','open','MPa','mouseout','ksi','units','psf','46vBXVcc','click','decimal-places','innerHTML','8LdCFxq','getUnitCategory','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4777032PBuUCB','render','toString','join','addEventListener','disconnectedCallback','117siuMjv','ksi[kip/in²]','g/mm³','isInteger','kg/L','connectedCallback','change','selected','mbar','cm\x20HG','.unit-container','mm\x20W.C.','Length','bar','floor','6469785WFDLBL','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unitConversion','formatValue','psi','unitCategory','closest','3797292KMIQxD','handleUnitChange','bind','removeEventListener','132960rQpBoP','1862586Cgvbrj','unit','SELECT','\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','querySelector','block','pow','value','atm','includes','840835YEedRb','handleArrowClick','target','kPa','display','kg/m³','50184wDRjPa','tooltipTimeout','uc-qty'];_0x182e=function(){return _0x563983;};return _0x182e();}
|
package/dist/pq.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2f97(){const _0x504d43=['g/mm³','focus','in\x20HG','\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','selected','formatValue','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','psf','lbm/in³','display','kPa','MPa','.unit-container','style','isInteger','map','function','bind','toPrecision','exports','https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492','decimal-places','block','kg/L','126jmeyhb','handleArrowClick','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','133fBFcPE','kg/m³','attributeChangedCallback','join','render','esu/s','ksi','toFixed','Length','closest','tooltipTimeout','target','define','m\x20W.C.','23204zulCMR','minute','unitConversion','uc-qty','removeEventListener','mouseout','unit','handleUnitChange','lbm','140053nBMkkZ','floor','toString','addEventListener','50802TDhjkm','object','10794112qiExsm','e3dLogoUrl','12ZITUhQ','pow','change','Ampere[amp]','decimalPlaces','replace','mouseover','1050970dWjBzI','</option>','amd','units','4080005bYMzSP','1135152IfbEOQ','select','observedAttributes','unitCategory','s[second]','atm','bar','getUnitCategory','attachShadow','week','innerHTML','includes','psi','g/cm³','PhysicalQuantity','value','cm\x20HG','shadowRoot','connectedCallback'];_0x2f97=function(){return _0x504d43;};return _0x2f97();}function _0x39ba(_0x470944,_0x14dee2){const _0x2f97be=_0x2f97();return _0x39ba=function(_0x39baef,_0x1e377d){_0x39baef=_0x39baef-0x1e2;let _0x22f67c=_0x2f97be[_0x39baef];return _0x22f67c;},_0x39ba(_0x470944,_0x14dee2);}(function(_0x4b6a67,_0x271ceb){const _0x4e8d2f=_0x39ba,_0x448f46=_0x4b6a67();while(!![]){try{const _0x33e414=-parseInt(_0x4e8d2f(0x1e3))/0x1+-parseInt(_0x4e8d2f(0x233))/0x2*(-parseInt(_0x4e8d2f(0x1eb))/0x3)+parseInt(_0x4e8d2f(0x1f7))/0x4+parseInt(_0x4e8d2f(0x1f6))/0x5+-parseInt(_0x4e8d2f(0x1e7))/0x6*(parseInt(_0x4e8d2f(0x225))/0x7)+parseInt(_0x4e8d2f(0x1e9))/0x8+parseInt(_0x4e8d2f(0x222))/0x9*(-parseInt(_0x4e8d2f(0x1f2))/0xa);if(_0x33e414===_0x271ceb)break;else _0x448f46['push'](_0x448f46['shift']());}catch(_0x205fb5){_0x448f46['push'](_0x448f46['shift']());}}}(_0x2f97,0xb08e9),function(_0x61a185,_0x4ecb5e){const _0x386f16=_0x39ba;typeof exports==_0x386f16(0x1e8)&&typeof module<'u'?module[_0x386f16(0x21d)]=_0x4ecb5e():typeof define==_0x386f16(0x21a)&&define[_0x386f16(0x1f4)]?define(_0x4ecb5e):(_0x61a185=typeof globalThis<'u'?globalThis:_0x61a185||self,_0x61a185[_0x386f16(0x205)]=_0x4ecb5e());}(this,function(){'use strict';const _0x153a09=_0x39ba;const _0x50ca24=0.45359237,_0x4c3494=25.4/0x3e8,_0x2c3907=0xc*_0x4c3494,_0x25ec30=0x18bcd,_0x5d0dac=133.322387415;class _0x265891 extends HTMLElement{constructor(){const _0x5a5051=_0x39ba;super(),this[_0x5a5051(0x1ff)]({'mode':'open'}),this[_0x5a5051(0x206)]=0x0,this['unit']='mm',this[_0x5a5051(0x1fa)]=_0x5a5051(0x22d),this[_0x5a5051(0x22f)]=null,this[_0x5a5051(0x1ef)]=0x3,this[_0x5a5051(0x1ea)]=_0x5a5051(0x21e),this['units']={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x5a5051(0x1e2)],'Pressure':['Pa',_0x5a5051(0x214),_0x5a5051(0x215),'GPa',_0x5a5051(0x1fd),'mbar',_0x5a5051(0x1fc),'mm\x20HG',_0x5a5051(0x207),_0x5a5051(0x20c),'mm\x20W.C.',_0x5a5051(0x232),'in\x20W.C.',_0x5a5051(0x211),_0x5a5051(0x203),_0x5a5051(0x22b),'ksi[kip/in²]'],'Density':[_0x5a5051(0x226),_0x5a5051(0x221),_0x5a5051(0x204),_0x5a5051(0x20a),'lbm/ft³',_0x5a5051(0x212)],'Time':[_0x5a5051(0x1fb),'s',_0x5a5051(0x234),'h','h[hour]','day',_0x5a5051(0x200)],'ElectricalCurrent':['A',_0x5a5051(0x1ee),'mA','µA','kA','MA',_0x5a5051(0x22a)]},this[_0x5a5051(0x235)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x4c3494,'ft':_0x2c3907},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x50ca24},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x25ec30,'mm\x20HG':_0x5d0dac,'cm\x20HG':_0x5d0dac*0xa,'in\x20HG':_0x5d0dac*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x4c3494*0x3e8*9.80665,'psf':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x2c3907,0x2),'psi':_0x50ca24*9.80665/Math['pow'](_0x4c3494,0x2),'ksi':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x4c3494,0x2)*0x3e8,'ksi[kip/in²]':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x4c3494,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x5a5051(0x1ec)](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':_0x50ca24/Math[_0x5a5051(0x1ec)](_0x2c3907,0x3),'lbm/in³':_0x50ca24/Math[_0x5a5051(0x1ec)](_0x4c3494,0x3)},'Time':{'s[second]':0x1,'s':0x1,'minute':0x3c,'h':0xe10,'h[hour]':0xe10,'day':0xe10*0x18,'week':0xe10*0x18*0x7},'ElectricalCurrent':{'A':0x1,'Ampere[amp]':0x1,'mA':0.001,'µA':0.000001,'kA':0x3e8,'MA':0xf4240,'esu/s':0x1/0xb2d05e00}},this[_0x5a5051(0x229)]();}static get[_0x153a09(0x1f9)](){const _0x28209e=_0x153a09;return[_0x28209e(0x206),'unit',_0x28209e(0x21f)];}[_0x153a09(0x227)](_0x4d3c9c,_0x4ca1cb,_0x3c83a7){const _0x3da4b5=_0x153a09;_0x4d3c9c===_0x3da4b5(0x206)?this[_0x3da4b5(0x206)]=parseFloat(_0x3c83a7):_0x4d3c9c===_0x3da4b5(0x239)?(this[_0x3da4b5(0x239)]=_0x3c83a7,this[_0x3da4b5(0x1fa)]=this[_0x3da4b5(0x1fe)](_0x3c83a7)):_0x4d3c9c==='decimal-places'&&(this[_0x3da4b5(0x1ef)]=parseInt(_0x3c83a7)||0x3),this[_0x3da4b5(0x229)]();}[_0x153a09(0x1fe)](_0x23271b){const _0x188331=_0x153a09;for(const _0x2e326d in this[_0x188331(0x1f5)])if(this[_0x188331(0x1f5)][_0x2e326d][_0x188331(0x202)](_0x23271b))return _0x2e326d;return null;}[_0x153a09(0x209)](){const _0x52b68b=_0x153a09;this[_0x52b68b(0x208)][_0x52b68b(0x1e6)](_0x52b68b(0x1ed),this[_0x52b68b(0x23a)][_0x52b68b(0x21b)](this)),this[_0x52b68b(0x229)]();}['disconnectedCallback'](){const _0x10e55f=_0x153a09;this[_0x10e55f(0x208)][_0x10e55f(0x237)](_0x10e55f(0x1ed),this['handleUnitChange'][_0x10e55f(0x21b)](this));}[_0x153a09(0x223)](_0x1bd387){const _0x303c82=_0x153a09;if(_0x1bd387['target'][_0x303c82(0x22e)]('.unit-container')){const _0x4d0178=this[_0x303c82(0x208)]['querySelector'](_0x303c82(0x1f8));_0x4d0178&&(_0x4d0178[_0x303c82(0x20b)](),_0x4d0178['click']());}}[_0x153a09(0x23a)](_0x2429c8){const _0x47edde=_0x153a09;if(_0x2429c8[_0x47edde(0x230)]['tagName']==='SELECT'){const _0x4226ff=_0x2429c8[_0x47edde(0x230)][_0x47edde(0x206)],_0x55554b=this[_0x47edde(0x235)][this[_0x47edde(0x1fa)]][this[_0x47edde(0x239)]]/this[_0x47edde(0x235)][this[_0x47edde(0x1fa)]][_0x4226ff];this['value']=this[_0x47edde(0x206)]*_0x55554b,this[_0x47edde(0x239)]=_0x4226ff,this['render']();}}[_0x153a09(0x20f)](_0x44f266){const _0x291355=_0x153a09;return Number[_0x291355(0x218)](_0x44f266)?_0x44f266[_0x291355(0x1e5)]():Math[_0x291355(0x1e4)](_0x44f266)!==0x0?_0x44f266[_0x291355(0x22c)](this['decimalPlaces'])['replace'](/0+$/,'')[_0x291355(0x1f0)](/\.$/,''):_0x44f266[_0x291355(0x21c)](0x3);}['render'](){const _0xa612ba=_0x153a09;this[_0xa612ba(0x208)][_0xa612ba(0x201)]=_0xa612ba(0x224)+this[_0xa612ba(0x20f)](this[_0xa612ba(0x206)])+_0xa612ba(0x210)+this[_0xa612ba(0x1f5)][this[_0xa612ba(0x1fa)]][_0xa612ba(0x219)](_0x1edad3=>'<option\x20value=\x22'+_0x1edad3+'\x22\x20'+(_0x1edad3===this[_0xa612ba(0x239)]?_0xa612ba(0x20e):'')+'>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1edad3+_0xa612ba(0x1f3))[_0xa612ba(0x228)]('')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22'+this[_0xa612ba(0x1ea)]+_0xa612ba(0x20d);const _0x1efaa0=this['shadowRoot']['querySelector'](_0xa612ba(0x216)),_0x329502=this[_0xa612ba(0x208)]['querySelectorAll']('.tooltip')[0x0];_0x1efaa0[_0xa612ba(0x1e6)](_0xa612ba(0x1f1),()=>{const _0x3095a7=_0xa612ba;this[_0x3095a7(0x22f)]=setTimeout(()=>{const _0x38fd36=_0x3095a7;_0x329502[_0x38fd36(0x217)][_0x38fd36(0x213)]=_0x38fd36(0x220);},0x3e8);}),_0x1efaa0[_0xa612ba(0x1e6)](_0xa612ba(0x238),()=>{const _0x896d24=_0xa612ba;setTimeout(()=>{const _0x396d10=_0x39ba;_0x329502[_0x396d10(0x217)]['display']='none';},0x7d0),clearTimeout(this[_0x896d24(0x22f)]);}),_0x329502[_0xa612ba(0x1e6)](_0xa612ba(0x238),()=>{setTimeout(()=>{const _0x4ea2d9=_0x39ba;_0x329502[_0x4ea2d9(0x217)]['display']='none';},0x7d0);});}}customElements[_0x153a09(0x231)]('physical-quantity',_0x265891);class _0x4f025e extends _0x265891{}return customElements['define'](_0x153a09(0x236),_0x4f025e),_0x265891;}));
|
|
1
|
+
function _0x34e1(_0x2fb2b6,_0x4ada79){const _0x1c2b5b=_0x1c2b();return _0x34e1=function(_0x34e1b5,_0x144c49){_0x34e1b5=_0x34e1b5-0xe8;let _0x3258bf=_0x1c2b5b[_0x34e1b5];return _0x3258bf;},_0x34e1(_0x2fb2b6,_0x4ada79);}function _0x1c2b(){const _0x1ec738=['shadowRoot','display','includes','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','addEventListener','toString','in\x20W.C.','973qAvxkG','g/cm³','amd','attachShadow','minute','lbm','disconnectedCallback','esu/s','s[second]','replace','GPa','decimal-places','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','<option\x20value=\x22','https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492','render','click','style','tooltipTimeout','handleArrowClick','e3dLogoUrl','select','411770llglws','4797051muDyfj','mouseout','kPa','open','MPa','5218670mbiJIn','decimalPlaces','observedAttributes','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','bind','toPrecision','3082390Shugiw','focus','querySelector','m\x20W.C.','Length','none','43784yZTRdY','646697RxUbZd','g/mm³','mbar','formatValue','querySelectorAll','selected','atm','36gIUMNo','removeEventListener','day','bar','units','innerHTML','define','value','unitCategory','closest','Ampere[amp]','.unit-container','unitConversion','change','week','attributeChangedCallback','block','tagName','join','6mMiXUb','map','pow','floor','toFixed','handleUnitChange','function','connectedCallback','unit','3855200KFBIOZ','object','PhysicalQuantity','target','psf','in\x20HG','lbm/ft³'];_0x1c2b=function(){return _0x1ec738;};return _0x1c2b();}(function(_0x481959,_0x5301d1){const _0x168898=_0x34e1,_0x4a007a=_0x481959();while(!![]){try{const _0x5131e0=parseInt(_0x168898(0xf6))/0x1+parseInt(_0x168898(0x13d))/0x2+parseInt(_0x168898(0x13e))/0x3+-parseInt(_0x168898(0x119))/0x4+-parseInt(_0x168898(0xe9))/0x5*(parseInt(_0x168898(0x110))/0x6)+parseInt(_0x168898(0x127))/0x7*(-parseInt(_0x168898(0xf5))/0x8)+parseInt(_0x168898(0xfd))/0x9*(parseInt(_0x168898(0xef))/0xa);if(_0x5131e0===_0x5301d1)break;else _0x4a007a['push'](_0x4a007a['shift']());}catch(_0x349a9){_0x4a007a['push'](_0x4a007a['shift']());}}}(_0x1c2b,0xdfb32),function(_0x3d707b,_0x5809f2){const _0x114ff0=_0x34e1;typeof exports==_0x114ff0(0x11a)&&typeof module<'u'?module['exports']=_0x5809f2():typeof define==_0x114ff0(0x116)&&define[_0x114ff0(0x129)]?define(_0x5809f2):(_0x3d707b=typeof globalThis<'u'?globalThis:_0x3d707b||self,_0x3d707b[_0x114ff0(0x11b)]=_0x5809f2());}(this,function(){'use strict';const _0x31bf6f=_0x34e1;const _0x235a09=0.45359237,_0x570759=25.4/0x3e8,_0x58de78=0xc*_0x570759,_0x5b6f10=0x18bcd,_0x344972=133.322387415;class _0x183773 extends HTMLElement{constructor(){const _0x42af98=_0x34e1;super(),this[_0x42af98(0x12a)]({'mode':_0x42af98(0x141)}),this[_0x42af98(0x104)]=0x0,this[_0x42af98(0x118)]='mm',this[_0x42af98(0x105)]=_0x42af98(0xf3),this['tooltipTimeout']=null,this[_0x42af98(0xea)]=0x3,this['e3dLogoUrl']=_0x42af98(0x135),this[_0x42af98(0x101)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x42af98(0x12c)],'Pressure':['Pa',_0x42af98(0x140),_0x42af98(0xe8),_0x42af98(0x131),_0x42af98(0x100),_0x42af98(0xf8),_0x42af98(0xfc),'mm\x20HG','cm\x20HG',_0x42af98(0x11e),'mm\x20W.C.',_0x42af98(0xf2),_0x42af98(0x126),_0x42af98(0x11d),'psi','ksi','ksi[kip/in²]'],'Density':['kg/m³','kg/L',_0x42af98(0x128),_0x42af98(0xf7),_0x42af98(0x11f),'lbm/in³'],'Time':[_0x42af98(0x12f),'s',_0x42af98(0x12b),'h','h[hour]',_0x42af98(0xff),_0x42af98(0x10b)],'ElectricalCurrent':['A',_0x42af98(0x107),'mA','µA','kA','MA',_0x42af98(0x12e)]},this[_0x42af98(0x109)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x570759,'ft':_0x58de78},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x235a09},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x5b6f10,'mm\x20HG':_0x344972,'cm\x20HG':_0x344972*0xa,'in\x20HG':_0x344972*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x570759*0x3e8*9.80665,'psf':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x58de78,0x2),'psi':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2),'ksi':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2)*0x3e8,'ksi[kip/in²]':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x42af98(0x112)](0.01,0x3),'g/mm³':0x1/0x3e8/Math[_0x42af98(0x112)](0.001,0x3),'lbm/ft³':_0x235a09/Math['pow'](_0x58de78,0x3),'lbm/in³':_0x235a09/Math[_0x42af98(0x112)](_0x570759,0x3)},'Time':{'s[second]':0x1,'s':0x1,'minute':0x3c,'h':0xe10,'h[hour]':0xe10,'day':0xe10*0x18,'week':0xe10*0x18*0x7},'ElectricalCurrent':{'A':0x1,'Ampere[amp]':0x1,'mA':0.001,'µA':0.000001,'kA':0x3e8,'MA':0xf4240,'esu/s':0x1/0xb2d05e00}},this[_0x42af98(0x136)]();}static get[_0x31bf6f(0xeb)](){const _0x112392=_0x31bf6f;return[_0x112392(0x104),'unit',_0x112392(0x132)];}[_0x31bf6f(0x10c)](_0x56f047,_0x2018a5,_0x3270c1){const _0x2859e2=_0x31bf6f;_0x56f047===_0x2859e2(0x104)?this['value']=parseFloat(_0x3270c1):_0x56f047==='unit'?(this[_0x2859e2(0x118)]=_0x3270c1,this[_0x2859e2(0x105)]=this['getUnitCategory'](_0x3270c1)):_0x56f047==='decimal-places'&&(this['decimalPlaces']=parseInt(_0x3270c1)||0x3),this[_0x2859e2(0x136)]();}['getUnitCategory'](_0xb5e736){const _0x3cbdd7=_0x31bf6f;for(const _0x29b5d9 in this[_0x3cbdd7(0x101)])if(this[_0x3cbdd7(0x101)][_0x29b5d9][_0x3cbdd7(0x122)](_0xb5e736))return _0x29b5d9;return null;}[_0x31bf6f(0x117)](){const _0x536de5=_0x31bf6f;this['shadowRoot'][_0x536de5(0x124)]('change',this['handleUnitChange']['bind'](this)),this[_0x536de5(0x136)]();}[_0x31bf6f(0x12d)](){const _0xa3c4e6=_0x31bf6f;this[_0xa3c4e6(0x120)][_0xa3c4e6(0xfe)](_0xa3c4e6(0x10a),this[_0xa3c4e6(0x115)][_0xa3c4e6(0xed)](this));}[_0x31bf6f(0x13a)](_0x140b15){const _0x389778=_0x31bf6f;if(_0x140b15['target'][_0x389778(0x106)](_0x389778(0x108))){const _0x223cc7=this[_0x389778(0x120)][_0x389778(0xf1)](_0x389778(0x13c));_0x223cc7&&(_0x223cc7[_0x389778(0xf0)](),_0x223cc7[_0x389778(0x137)]());}}['handleUnitChange'](_0xf8a45a){const _0x45c223=_0x31bf6f;if(_0xf8a45a[_0x45c223(0x11c)][_0x45c223(0x10e)]==='SELECT'){const _0x11def9=_0xf8a45a[_0x45c223(0x11c)][_0x45c223(0x104)],_0x17e89f=this[_0x45c223(0x109)][this[_0x45c223(0x105)]][this[_0x45c223(0x118)]]/this[_0x45c223(0x109)][this[_0x45c223(0x105)]][_0x11def9];this['value']=this['value']*_0x17e89f,this[_0x45c223(0x118)]=_0x11def9,this[_0x45c223(0x136)]();}}[_0x31bf6f(0xf9)](_0x206c93){const _0x2ceb0c=_0x31bf6f;return Number['isInteger'](_0x206c93)?_0x206c93[_0x2ceb0c(0x125)]():Math[_0x2ceb0c(0x113)](_0x206c93)!==0x0?_0x206c93[_0x2ceb0c(0x114)](this['decimalPlaces'])[_0x2ceb0c(0x130)](/0+$/,'')[_0x2ceb0c(0x130)](/\.$/,''):_0x206c93[_0x2ceb0c(0xee)](0x3);}[_0x31bf6f(0x136)](){const _0x4a3914=_0x31bf6f;this[_0x4a3914(0x120)][_0x4a3914(0x102)]=_0x4a3914(0x133)+this[_0x4a3914(0xf9)](this[_0x4a3914(0x104)])+_0x4a3914(0x123)+this[_0x4a3914(0x101)][this['unitCategory']][_0x4a3914(0x111)](_0x423dcc=>_0x4a3914(0x134)+_0x423dcc+'\x22\x20'+(_0x423dcc===this[_0x4a3914(0x118)]?_0x4a3914(0xfb):'')+'>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x423dcc+'</option>')[_0x4a3914(0x10f)]('')+_0x4a3914(0xec)+this[_0x4a3914(0x13b)]+'\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20';const _0x18d2ca=this['shadowRoot'][_0x4a3914(0xf1)](_0x4a3914(0x108)),_0x4c514c=this[_0x4a3914(0x120)][_0x4a3914(0xfa)]('.tooltip')[0x0];_0x18d2ca['addEventListener']('mouseover',()=>{const _0x3e423f=_0x4a3914;this[_0x3e423f(0x139)]=setTimeout(()=>{const _0x148602=_0x3e423f;_0x4c514c[_0x148602(0x138)][_0x148602(0x121)]=_0x148602(0x10d);},0x3e8);}),_0x18d2ca[_0x4a3914(0x124)](_0x4a3914(0x13f),()=>{setTimeout(()=>{const _0x3f59df=_0x34e1;_0x4c514c['style'][_0x3f59df(0x121)]=_0x3f59df(0xf4);},0x7d0),clearTimeout(this['tooltipTimeout']);}),_0x4c514c['addEventListener'](_0x4a3914(0x13f),()=>{setTimeout(()=>{const _0x51ef7a=_0x34e1;_0x4c514c[_0x51ef7a(0x138)]['display']=_0x51ef7a(0xf4);},0x7d0);});}}customElements['define']('physical-quantity',_0x183773);class _0x101b8c extends _0x183773{}return customElements[_0x31bf6f(0x103)]('uc-qty',_0x101b8c),_0x183773;}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "physical-quantity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.29",
|
|
4
4
|
"description": "A web component to represent a physical quantity with unit conversion.",
|
|
5
5
|
"main": "dist/pq.umd.js",
|
|
6
6
|
"module": "dist/pq.es.js",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"web-component",
|
|
24
|
-
"physical-quantity"
|
|
24
|
+
"physical-quantity",
|
|
25
|
+
"unit conversion",
|
|
26
|
+
"unit converter"
|
|
25
27
|
],
|
|
26
28
|
"author": "E3d - Don Wen <don.wen@yahoo.com>",
|
|
27
29
|
"license": "MIT",
|