physical-quantity 1.1.22 → 1.1.25
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 +3 -3
- package/dist/pq.es.js +1 -184
- package/dist/pq.umd.js +1 -63
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,7 @@ It is a new HTML element for expressing physical quantities, featuring self-cont
|
|
|
13
13
|
- Easy to integrate into any web project.
|
|
14
14
|
|
|
15
15
|
## Demo: Physical Quantity element - No Unit Converter or Dual Units Needed
|
|
16
|
-
[Live Demo on JS Fiddle](https://jsfiddle.net/hithere/tz8ym4fh/
|
|
17
|
-
|
|
18
|
-
<iframe width="100%" height="300" src="https://jsfiddle.net/hithere/tz8ym4fh/132/embedded/result" allowfullscreen="true" frameborder="0"></iframe>
|
|
16
|
+
[Live Demo on JS Fiddle](https://jsfiddle.net/hithere/tz8ym4fh/134/embedded/result)
|
|
19
17
|
|
|
20
18
|
[](https://jsfiddle.net/hithere/tz8ym4fh/100/embedded/result)
|
|
21
19
|
|
|
@@ -127,6 +125,8 @@ Currently, the component supports the following categories and units:
|
|
|
127
125
|
- kg/L
|
|
128
126
|
- g/cm³
|
|
129
127
|
- g/mm³
|
|
128
|
+
- lbm/ft³
|
|
129
|
+
- lbm/in³
|
|
130
130
|
- ... (more to update.)
|
|
131
131
|
|
|
132
132
|
## License
|
package/dist/pq.es.js
CHANGED
|
@@ -1,184 +1 @@
|
|
|
1
|
-
const o = 0.45359237, s = 25.4 / 1e3, a = 12 * s, h = 101325, n = 133.322387415;
|
|
2
|
-
class r extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }), this.value = 0, this.unit = "mm", this.unitCategory = "Length", this.tooltipTimeout = null, this.decimalPlaces = 3, this.units = {
|
|
5
|
-
Length: ["m", "km", "cm", "mm", "in", "ft"],
|
|
6
|
-
Mass: ["g", "kg", "lbm"],
|
|
7
|
-
Pressure: [
|
|
8
|
-
"Pa",
|
|
9
|
-
"kPa",
|
|
10
|
-
"MPa",
|
|
11
|
-
"GPa",
|
|
12
|
-
"bar",
|
|
13
|
-
"mbar",
|
|
14
|
-
"atm",
|
|
15
|
-
"mm HG",
|
|
16
|
-
"cm HG",
|
|
17
|
-
"in HG",
|
|
18
|
-
"mm W.C.",
|
|
19
|
-
"m W.C.",
|
|
20
|
-
"in W.C.",
|
|
21
|
-
"psf",
|
|
22
|
-
"psi",
|
|
23
|
-
"ksi",
|
|
24
|
-
"ksi[kip/in²]"
|
|
25
|
-
],
|
|
26
|
-
Density: ["kg/m³", "kg/L", "g/cm³", "g/mm³"]
|
|
27
|
-
// Add other categories and units as needed
|
|
28
|
-
}, this.unitConversion = {
|
|
29
|
-
Length: {
|
|
30
|
-
m: 1,
|
|
31
|
-
km: 1e3,
|
|
32
|
-
cm: 0.01,
|
|
33
|
-
mm: 1e-3,
|
|
34
|
-
in: s,
|
|
35
|
-
ft: a
|
|
36
|
-
// Add more conversion factors as needed
|
|
37
|
-
},
|
|
38
|
-
// Add other category conversion factors as needed
|
|
39
|
-
Mass: {
|
|
40
|
-
kg: 1,
|
|
41
|
-
g: 1e-3,
|
|
42
|
-
lbm: o
|
|
43
|
-
// Add more conversion factors as needed
|
|
44
|
-
},
|
|
45
|
-
Pressure: {
|
|
46
|
-
Pa: 1,
|
|
47
|
-
kPa: 1e3,
|
|
48
|
-
MPa: 1e6,
|
|
49
|
-
GPa: 1e9,
|
|
50
|
-
bar: 100 * 1e3,
|
|
51
|
-
mbar: 100,
|
|
52
|
-
atm: h,
|
|
53
|
-
"mm HG": n,
|
|
54
|
-
"cm HG": n * 10,
|
|
55
|
-
"in HG": n * 25.4,
|
|
56
|
-
"mm W.C.": 1 / 1e3 * 1e3 * 9.80665,
|
|
57
|
-
"m W.C.": 1 * 1e3 * 9.80665,
|
|
58
|
-
"in W.C.": s * 1e3 * 9.80665,
|
|
59
|
-
psf: o * 9.80665 / Math.pow(a, 2),
|
|
60
|
-
psi: o * 9.80665 / Math.pow(s, 2),
|
|
61
|
-
ksi: o * 9.80665 / Math.pow(s, 2) * 1e3,
|
|
62
|
-
"ksi[kip/in²]": o * 9.80665 / Math.pow(s, 2) * 1e3
|
|
63
|
-
},
|
|
64
|
-
Density: {
|
|
65
|
-
"kg/m³": 1,
|
|
66
|
-
"kg/L": 1e3,
|
|
67
|
-
"g/cm³": 1 / 1e3 / Math.pow(0.01, 3),
|
|
68
|
-
"g/mm³": 1 / 1e3 / Math.pow(1e-3, 3)
|
|
69
|
-
}
|
|
70
|
-
}, this.render();
|
|
71
|
-
}
|
|
72
|
-
static get observedAttributes() {
|
|
73
|
-
return ["value", "unit", "decimal-places"];
|
|
74
|
-
}
|
|
75
|
-
attributeChangedCallback(t, e, i) {
|
|
76
|
-
t === "value" ? this.value = parseFloat(i) : t === "unit" ? (this.unit = i, this.unitCategory = this.getUnitCategory(i)) : t === "decimal-places" && (this.decimalPlaces = parseInt(i) || 3), this.render();
|
|
77
|
-
}
|
|
78
|
-
getUnitCategory(t) {
|
|
79
|
-
for (const e in this.units)
|
|
80
|
-
if (this.units[e].includes(t))
|
|
81
|
-
return e;
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
connectedCallback() {
|
|
85
|
-
this.shadowRoot.addEventListener("change", this.handleUnitChange.bind(this)), this.shadowRoot.addEventListener("mouseover", this.handleMouseOver.bind(this)), this.shadowRoot.addEventListener("mouseout", this.handleMouseOut.bind(this)), this.render();
|
|
86
|
-
}
|
|
87
|
-
disconnectedCallback() {
|
|
88
|
-
this.shadowRoot.removeEventListener("change", this.handleUnitChange.bind(this)), this.shadowRoot.removeEventListener("mouseover", this.handleMouseOver.bind(this)), this.shadowRoot.removeEventListener("mouseout", this.handleMouseOut.bind(this));
|
|
89
|
-
}
|
|
90
|
-
handleArrowClick(t) {
|
|
91
|
-
if (t.target.closest(".unit-container")) {
|
|
92
|
-
const e = this.shadowRoot.querySelector("select");
|
|
93
|
-
e && (e.focus(), e.click());
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
handleUnitChange(t) {
|
|
97
|
-
if (t.target.tagName === "SELECT") {
|
|
98
|
-
const e = t.target.value, i = this.unitConversion[this.unitCategory][this.unit] / this.unitConversion[this.unitCategory][e];
|
|
99
|
-
this.value = this.value * i, this.unit = e, this.render();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
handleMouseOver() {
|
|
103
|
-
const t = this.shadowRoot.querySelector(".tooltip");
|
|
104
|
-
t.style.display = "block", clearTimeout(this.tooltipTimeout);
|
|
105
|
-
}
|
|
106
|
-
handleMouseOut() {
|
|
107
|
-
const t = this.shadowRoot.querySelector(".tooltip");
|
|
108
|
-
this.tooltipTimeout = setTimeout(() => {
|
|
109
|
-
t.style.display = "none";
|
|
110
|
-
}, 1e3);
|
|
111
|
-
}
|
|
112
|
-
formatValue(t) {
|
|
113
|
-
return Number.isInteger(t) ? t.toString() : Math.floor(t) !== 0 ? t.toFixed(this.decimalPlaces).replace(/0+$/, "").replace(/\.$/, "") : t.toPrecision(3);
|
|
114
|
-
}
|
|
115
|
-
render() {
|
|
116
|
-
this.shadowRoot.innerHTML = `
|
|
117
|
-
<style>
|
|
118
|
-
:host {
|
|
119
|
-
display: inline-block;
|
|
120
|
-
}
|
|
121
|
-
.quantity {
|
|
122
|
-
display: flex;
|
|
123
|
-
align-items: center;
|
|
124
|
-
}
|
|
125
|
-
.value {
|
|
126
|
-
margin-left: 0.25em;
|
|
127
|
-
margin-right: 0.25em;
|
|
128
|
-
}
|
|
129
|
-
.unit-container select {
|
|
130
|
-
position: relative;
|
|
131
|
-
display: inline-flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
color: blue;
|
|
134
|
-
background-color: lightgray;
|
|
135
|
-
border-radius: 0.25em;
|
|
136
|
-
border: none;
|
|
137
|
-
margin: 0.25em;
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.tooltip {
|
|
142
|
-
display: none; /* Set display to block for initial positioning */
|
|
143
|
-
visibility: hidden; /* Initially hide the tooltip */
|
|
144
|
-
opacity: 50; /* Start with zero opacity */
|
|
145
|
-
transition: opacity 0.3s ease-in-out; /* Smooth transition */
|
|
146
|
-
position: absolute;
|
|
147
|
-
bottom: 100%;
|
|
148
|
-
left: 50%;
|
|
149
|
-
transform: translateX(-50%);
|
|
150
|
-
background-color: black;
|
|
151
|
-
color: red;
|
|
152
|
-
padding: 5px;
|
|
153
|
-
border-radius: 3px;
|
|
154
|
-
font-size: 0.8em;
|
|
155
|
-
white-space: nowrap;
|
|
156
|
-
z-index: 10;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.tooltip a {
|
|
160
|
-
color: cyan;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
</style>
|
|
164
|
-
|
|
165
|
-
<div class="quantity">
|
|
166
|
-
<span class="value">${this.formatValue(this.value)}</span>
|
|
167
|
-
<div class="unit-container">
|
|
168
|
-
<select>
|
|
169
|
-
${this.units[this.unitCategory].map((t) => `<option value="${t}" ${t === this.unit ? "selected" : ""}>
|
|
170
|
-
${t}</option>`).join("")}
|
|
171
|
-
</select>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
<div class="tooltip">
|
|
175
|
-
Powered by <a href="https://v2.donwen.com" target="_blank">AutoCalcs</a>
|
|
176
|
-
</div>
|
|
177
|
-
|
|
178
|
-
`;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
customElements.define("physical-quantity", r);
|
|
182
|
-
class c extends r {
|
|
183
|
-
}
|
|
184
|
-
customElements.define("uc-qty", c);
|
|
1
|
+
function _0x338d(_0x4e209f,_0x19f8e7){const _0x2dae66=_0x2dae();return _0x338d=function(_0x338d70,_0x3a2071){_0x338d70=_0x338d70-0x1ae;let _0x336365=_0x2dae66[_0x338d70];return _0x336365;},_0x338d(_0x4e209f,_0x19f8e7);}const _0x1df461=_0x338d;function _0x2dae(){const _0x3763b7=['value','</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','open','lbm','3aOYPph','innerHTML','ksi','unitConversion','9jWsjId','units','style','mm\x20HG','24DFLHTa','1127192TvfcpP','kg/L','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','e3dLogoUrl','mbar','querySelectorAll','lbm/in³','bar','display','formatValue','\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\x20cursor:\x20pointer;\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.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>','5254470rAYyRH','join','mouseout','1481008lCZyjy','tooltipTimeout','.unit-container','change','unitCategory','render','in\x20W.C.','898848qUBbql','bind','attachShadow','in\x20HG','MPa','handleUnitChange','\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/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','tagName','38699zqYuzB','m\x20W.C.','addEventListener','g/mm³','block','attributeChangedCallback','getUnitCategory','querySelector','cm\x20HG','atm','psf','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','isInteger','none','GPa','pow','observedAttributes','decimal-places','uc-qty','decimalPlaces','1046328liSOlG','select','define','shadowRoot','</option>','target','toPrecision','35nqrvde','includes','closest','ksi[kip/in²]','toFixed','focus','removeEventListener','4qONgQl','1142670vacfQy','connectedCallback','\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','kPa','disconnectedCallback','unit'];_0x2dae=function(){return _0x3763b7;};return _0x2dae();}(function(_0x51bef8,_0x5874c5){const _0x3762fc=_0x338d,_0x2285d0=_0x51bef8();while(!![]){try{const _0x4f0926=-parseInt(_0x3762fc(0x1e0))/0x1*(parseInt(_0x3762fc(0x1af))/0x2)+-parseInt(_0x3762fc(0x1ba))/0x3*(-parseInt(_0x3762fc(0x1d1))/0x4)+parseInt(_0x3762fc(0x1ce))/0x5+parseInt(_0x3762fc(0x1f4))/0x6+parseInt(_0x3762fc(0x1fb))/0x7*(-parseInt(_0x3762fc(0x1d8))/0x8)+parseInt(_0x3762fc(0x1be))/0x9*(-parseInt(_0x3762fc(0x1b0))/0xa)+parseInt(_0x3762fc(0x1c3))/0xb*(-parseInt(_0x3762fc(0x1c2))/0xc);if(_0x4f0926===_0x5874c5)break;else _0x2285d0['push'](_0x2285d0['shift']());}catch(_0x397162){_0x2285d0['push'](_0x2285d0['shift']());}}}(_0x2dae,0x9b8d9));const s=0.45359237,o=25.4/0x3e8,n=0xc*o,c=0x18bcd,a=133.322387415;class r extends HTMLElement{constructor(){const _0x9513e9=_0x338d;super(),this[_0x9513e9(0x1da)]({'mode':_0x9513e9(0x1b8)}),this[_0x9513e9(0x1b6)]=0x0,this[_0x9513e9(0x1b5)]='mm',this[_0x9513e9(0x1d5)]='Length',this[_0x9513e9(0x1d2)]=null,this[_0x9513e9(0x1f3)]=0x3,this[_0x9513e9(0x1c6)]=_0x9513e9(0x1c5),this[_0x9513e9(0x1bf)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x9513e9(0x1b9)],'Pressure':['Pa',_0x9513e9(0x1b3),_0x9513e9(0x1dc),_0x9513e9(0x1ee),_0x9513e9(0x1ca),_0x9513e9(0x1c7),_0x9513e9(0x1e9),_0x9513e9(0x1c1),_0x9513e9(0x1e8),_0x9513e9(0x1db),'mm\x20W.C.',_0x9513e9(0x1e1),_0x9513e9(0x1d7),_0x9513e9(0x1ea),'psi',_0x9513e9(0x1bc),_0x9513e9(0x1fe)],'Density':['kg/m³',_0x9513e9(0x1c4),'g/cm³',_0x9513e9(0x1e3),'lbm/ft³',_0x9513e9(0x1c9)]},this['unitConversion']={'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[_0x9513e9(0x1ef)](n,0x2),'psi':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2),'ksi':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2)*0x3e8,'ksi[kip/in²]':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x9513e9(0x1ef)](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':s/Math[_0x9513e9(0x1ef)](n,0x3),'lbm/in³':s/Math[_0x9513e9(0x1ef)](o,0x3)}},this[_0x9513e9(0x1d6)]();}static get[_0x1df461(0x1f0)](){const _0x1326ba=_0x1df461;return[_0x1326ba(0x1b6),_0x1326ba(0x1b5),'decimal-places'];}[_0x1df461(0x1e5)](_0x311bdc,_0x530dc6,_0x341d11){const _0x126fbe=_0x1df461;_0x311bdc===_0x126fbe(0x1b6)?this['value']=parseFloat(_0x341d11):_0x311bdc==='unit'?(this['unit']=_0x341d11,this[_0x126fbe(0x1d5)]=this[_0x126fbe(0x1e6)](_0x341d11)):_0x311bdc===_0x126fbe(0x1f1)&&(this['decimalPlaces']=parseInt(_0x341d11)||0x3),this['render']();}[_0x1df461(0x1e6)](_0x469fd7){const _0x3c2c07=_0x1df461;for(const _0x240839 in this[_0x3c2c07(0x1bf)])if(this[_0x3c2c07(0x1bf)][_0x240839][_0x3c2c07(0x1fc)](_0x469fd7))return _0x240839;return null;}[_0x1df461(0x1b1)](){const _0xb1589e=_0x1df461;this[_0xb1589e(0x1f7)]['addEventListener'](_0xb1589e(0x1d4),this[_0xb1589e(0x1dd)][_0xb1589e(0x1d9)](this)),this[_0xb1589e(0x1d6)]();}[_0x1df461(0x1b4)](){const _0x1450f7=_0x1df461;this['shadowRoot'][_0x1450f7(0x1ae)](_0x1450f7(0x1d4),this[_0x1450f7(0x1dd)][_0x1450f7(0x1d9)](this));}['handleArrowClick'](_0x22f153){const _0x2610e9=_0x1df461;if(_0x22f153[_0x2610e9(0x1f9)][_0x2610e9(0x1fd)](_0x2610e9(0x1d3))){const _0x574b5b=this[_0x2610e9(0x1f7)][_0x2610e9(0x1e7)](_0x2610e9(0x1f5));_0x574b5b&&(_0x574b5b[_0x2610e9(0x200)](),_0x574b5b['click']());}}[_0x1df461(0x1dd)](_0x418ce7){const _0x387f6f=_0x1df461;if(_0x418ce7[_0x387f6f(0x1f9)][_0x387f6f(0x1df)]==='SELECT'){const _0x4f46e5=_0x418ce7[_0x387f6f(0x1f9)]['value'],_0xedf0ea=this['unitConversion'][this['unitCategory']][this[_0x387f6f(0x1b5)]]/this[_0x387f6f(0x1bd)][this['unitCategory']][_0x4f46e5];this[_0x387f6f(0x1b6)]=this['value']*_0xedf0ea,this[_0x387f6f(0x1b5)]=_0x4f46e5,this[_0x387f6f(0x1d6)]();}}[_0x1df461(0x1cc)](_0xa74156){const _0x44d984=_0x1df461;return Number[_0x44d984(0x1ec)](_0xa74156)?_0xa74156['toString']():Math['floor'](_0xa74156)!==0x0?_0xa74156[_0x44d984(0x1ff)](this[_0x44d984(0x1f3)])['replace'](/0+$/,'')['replace'](/\.$/,''):_0xa74156[_0x44d984(0x1fa)](0x3);}[_0x1df461(0x1d6)](){const _0x313fb2=_0x1df461;this['shadowRoot'][_0x313fb2(0x1bb)]=_0x313fb2(0x1cd)+this[_0x313fb2(0x1cc)](this[_0x313fb2(0x1b6)])+_0x313fb2(0x1b7)+this[_0x313fb2(0x1bf)][this[_0x313fb2(0x1d5)]]['map'](_0x4d62bc=>'<option\x20value=\x22'+_0x4d62bc+'\x22\x20'+(_0x4d62bc===this[_0x313fb2(0x1b5)]?'selected':'')+_0x313fb2(0x1eb)+_0x4d62bc+_0x313fb2(0x1f8))[_0x313fb2(0x1cf)]('')+_0x313fb2(0x1de)+this['e3dLogoUrl']+_0x313fb2(0x1b2);const _0x3fefb8=this['shadowRoot']['querySelector'](_0x313fb2(0x1d3)),_0x11ba32=this[_0x313fb2(0x1f7)][_0x313fb2(0x1c8)]('.tooltip')[0x0];_0x3fefb8[_0x313fb2(0x1e2)]('mouseover',()=>{const _0x18adad=_0x313fb2;this[_0x18adad(0x1d2)]=setTimeout(()=>{const _0x5665cf=_0x18adad;_0x11ba32[_0x5665cf(0x1c0)][_0x5665cf(0x1cb)]=_0x5665cf(0x1e4);},0x3e8);}),_0x3fefb8[_0x313fb2(0x1e2)](_0x313fb2(0x1d0),()=>{const _0x5df9fc=_0x313fb2;setTimeout(()=>{const _0x330c34=_0x338d;_0x11ba32[_0x330c34(0x1c0)][_0x330c34(0x1cb)]=_0x330c34(0x1ed);},0x3e8),clearTimeout(this[_0x5df9fc(0x1d2)]);}),_0x11ba32['addEventListener'](_0x313fb2(0x1d0),()=>{setTimeout(()=>{const _0x5639f7=_0x338d;_0x11ba32[_0x5639f7(0x1c0)][_0x5639f7(0x1cb)]=_0x5639f7(0x1ed);},0x3e8);});}}customElements[_0x1df461(0x1f6)]('physical-quantity',r);class h extends r{}customElements[_0x1df461(0x1f6)](_0x1df461(0x1f2),h);
|
package/dist/pq.umd.js
CHANGED
|
@@ -1,63 +1 @@
|
|
|
1
|
-
(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict";const o=.45359237,i=25.4/1e3,r=12*i,h=101325,a=133.322387415;class l extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.value=0,this.unit="mm",this.unitCategory="Length",this.tooltipTimeout=null,this.decimalPlaces=3,this.units={Length:["m","km","cm","mm","in","ft"],Mass:["g","kg","lbm"],Pressure:["Pa","kPa","MPa","GPa","bar","mbar","atm","mm HG","cm HG","in HG","mm W.C.","m W.C.","in W.C.","psf","psi","ksi","ksi[kip/in²]"],Density:["kg/m³","kg/L","g/cm³","g/mm³"]},this.unitConversion={Length:{m:1,km:1e3,cm:.01,mm:.001,in:i,ft:r},Mass:{kg:1,g:.001,lbm:o},Pressure:{Pa:1,kPa:1e3,MPa:1e6,GPa:1e9,bar:100*1e3,mbar:100,atm:h,"mm HG":a,"cm HG":a*10,"in HG":a*25.4,"mm W.C.":1/1e3*1e3*9.80665,"m W.C.":1*1e3*9.80665,"in W.C.":i*1e3*9.80665,psf:o*9.80665/Math.pow(r,2),psi:o*9.80665/Math.pow(i,2),ksi:o*9.80665/Math.pow(i,2)*1e3,"ksi[kip/in²]":o*9.80665/Math.pow(i,2)*1e3},Density:{"kg/m³":1,"kg/L":1e3,"g/cm³":1/1e3/Math.pow(.01,3),"g/mm³":1/1e3/Math.pow(.001,3)}},this.render()}static get observedAttributes(){return["value","unit","decimal-places"]}attributeChangedCallback(t,e,s){t==="value"?this.value=parseFloat(s):t==="unit"?(this.unit=s,this.unitCategory=this.getUnitCategory(s)):t==="decimal-places"&&(this.decimalPlaces=parseInt(s)||3),this.render()}getUnitCategory(t){for(const e in this.units)if(this.units[e].includes(t))return e;return null}connectedCallback(){this.shadowRoot.addEventListener("change",this.handleUnitChange.bind(this)),this.shadowRoot.addEventListener("mouseover",this.handleMouseOver.bind(this)),this.shadowRoot.addEventListener("mouseout",this.handleMouseOut.bind(this)),this.render()}disconnectedCallback(){this.shadowRoot.removeEventListener("change",this.handleUnitChange.bind(this)),this.shadowRoot.removeEventListener("mouseover",this.handleMouseOver.bind(this)),this.shadowRoot.removeEventListener("mouseout",this.handleMouseOut.bind(this))}handleArrowClick(t){if(t.target.closest(".unit-container")){const e=this.shadowRoot.querySelector("select");e&&(e.focus(),e.click())}}handleUnitChange(t){if(t.target.tagName==="SELECT"){const e=t.target.value,s=this.unitConversion[this.unitCategory][this.unit]/this.unitConversion[this.unitCategory][e];this.value=this.value*s,this.unit=e,this.render()}}handleMouseOver(){const t=this.shadowRoot.querySelector(".tooltip");t.style.display="block",clearTimeout(this.tooltipTimeout)}handleMouseOut(){const t=this.shadowRoot.querySelector(".tooltip");this.tooltipTimeout=setTimeout(()=>{t.style.display="none"},1e3)}formatValue(t){return Number.isInteger(t)?t.toString():Math.floor(t)!==0?t.toFixed(this.decimalPlaces).replace(/0+$/,"").replace(/\.$/,""):t.toPrecision(3)}render(){this.shadowRoot.innerHTML=`
|
|
2
|
-
<style>
|
|
3
|
-
:host {
|
|
4
|
-
display: inline-block;
|
|
5
|
-
}
|
|
6
|
-
.quantity {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
.value {
|
|
11
|
-
margin-left: 0.25em;
|
|
12
|
-
margin-right: 0.25em;
|
|
13
|
-
}
|
|
14
|
-
.unit-container select {
|
|
15
|
-
position: relative;
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
color: blue;
|
|
19
|
-
background-color: lightgray;
|
|
20
|
-
border-radius: 0.25em;
|
|
21
|
-
border: none;
|
|
22
|
-
margin: 0.25em;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.tooltip {
|
|
27
|
-
display: none; /* Set display to block for initial positioning */
|
|
28
|
-
visibility: hidden; /* Initially hide the tooltip */
|
|
29
|
-
opacity: 50; /* Start with zero opacity */
|
|
30
|
-
transition: opacity 0.3s ease-in-out; /* Smooth transition */
|
|
31
|
-
position: absolute;
|
|
32
|
-
bottom: 100%;
|
|
33
|
-
left: 50%;
|
|
34
|
-
transform: translateX(-50%);
|
|
35
|
-
background-color: black;
|
|
36
|
-
color: red;
|
|
37
|
-
padding: 5px;
|
|
38
|
-
border-radius: 3px;
|
|
39
|
-
font-size: 0.8em;
|
|
40
|
-
white-space: nowrap;
|
|
41
|
-
z-index: 10;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tooltip a {
|
|
45
|
-
color: cyan;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
</style>
|
|
49
|
-
|
|
50
|
-
<div class="quantity">
|
|
51
|
-
<span class="value">${this.formatValue(this.value)}</span>
|
|
52
|
-
<div class="unit-container">
|
|
53
|
-
<select>
|
|
54
|
-
${this.units[this.unitCategory].map(t=>`<option value="${t}" ${t===this.unit?"selected":""}>
|
|
55
|
-
${t}</option>`).join("")}
|
|
56
|
-
</select>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="tooltip">
|
|
60
|
-
Powered by <a href="https://v2.donwen.com" target="_blank">AutoCalcs</a>
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
`}}customElements.define("physical-quantity",l);class c extends l{}customElements.define("uc-qty",c)});
|
|
1
|
+
function _0x5594(_0x2fdfb1,_0x287d37){const _0xddf3e5=_0xddf3();return _0x5594=function(_0x5594ee,_0x2dac99){_0x5594ee=_0x5594ee-0x18f;let _0x21454f=_0xddf3e5[_0x5594ee];return _0x21454f;},_0x5594(_0x2fdfb1,_0x287d37);}(function(_0x5af819,_0xa6293a){const _0x3cde88=_0x5594,_0x5b2fbd=_0x5af819();while(!![]){try{const _0x429cbb=parseInt(_0x3cde88(0x1b2))/0x1*(parseInt(_0x3cde88(0x1e3))/0x2)+parseInt(_0x3cde88(0x1b8))/0x3+parseInt(_0x3cde88(0x1c1))/0x4*(-parseInt(_0x3cde88(0x1e1))/0x5)+parseInt(_0x3cde88(0x1bb))/0x6*(-parseInt(_0x3cde88(0x1e8))/0x7)+parseInt(_0x3cde88(0x1bf))/0x8+-parseInt(_0x3cde88(0x193))/0x9*(parseInt(_0x3cde88(0x1c9))/0xa)+-parseInt(_0x3cde88(0x1ba))/0xb*(-parseInt(_0x3cde88(0x1dc))/0xc);if(_0x429cbb===_0xa6293a)break;else _0x5b2fbd['push'](_0x5b2fbd['shift']());}catch(_0x53496f){_0x5b2fbd['push'](_0x5b2fbd['shift']());}}}(_0xddf3,0x7fed9),function(_0x33f870){const _0x5c52e5=_0x5594;typeof define==_0x5c52e5(0x198)&&define[_0x5c52e5(0x1c7)]?define(_0x33f870):_0x33f870();}(function(){'use strict';const _0x406ae4=_0x5594;const _0x2c5a78=0.45359237,_0x4eaaf9=25.4/0x3e8,_0x4660ab=0xc*_0x4eaaf9,_0x161bfa=0x18bcd,_0x5ae5f4=133.322387415;class _0x1e6783 extends HTMLElement{constructor(){const _0x49b087=_0x5594;super(),this[_0x49b087(0x1da)]({'mode':_0x49b087(0x1d7)}),this[_0x49b087(0x1e6)]=0x0,this['unit']='mm',this[_0x49b087(0x19d)]='Length',this[_0x49b087(0x1de)]=null,this[_0x49b087(0x1be)]=0x3,this[_0x49b087(0x190)]=_0x49b087(0x1b3),this[_0x49b087(0x1d4)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg','lbm'],'Pressure':['Pa',_0x49b087(0x1af),_0x49b087(0x1cd),_0x49b087(0x1b9),_0x49b087(0x197),_0x49b087(0x1cc),'atm',_0x49b087(0x1e0),_0x49b087(0x1d0),_0x49b087(0x1a0),'mm\x20W.C.',_0x49b087(0x1a5),_0x49b087(0x1c3),_0x49b087(0x1e2),'psi',_0x49b087(0x1df),_0x49b087(0x1a3)],'Density':[_0x49b087(0x19b),_0x49b087(0x1a8),_0x49b087(0x1aa),_0x49b087(0x192),_0x49b087(0x1d8),_0x49b087(0x1dd)]},this[_0x49b087(0x1b6)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x4eaaf9,'ft':_0x4660ab},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x2c5a78},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x161bfa,'mm\x20HG':_0x5ae5f4,'cm\x20HG':_0x5ae5f4*0xa,'in\x20HG':_0x5ae5f4*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x4eaaf9*0x3e8*9.80665,'psf':_0x2c5a78*9.80665/Math[_0x49b087(0x1ad)](_0x4660ab,0x2),'psi':_0x2c5a78*9.80665/Math['pow'](_0x4eaaf9,0x2),'ksi':_0x2c5a78*9.80665/Math[_0x49b087(0x1ad)](_0x4eaaf9,0x2)*0x3e8,'ksi[kip/in²]':_0x2c5a78*9.80665/Math['pow'](_0x4eaaf9,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math['pow'](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':_0x2c5a78/Math['pow'](_0x4660ab,0x3),'lbm/in³':_0x2c5a78/Math[_0x49b087(0x1ad)](_0x4eaaf9,0x3)}},this['render']();}static get[_0x406ae4(0x1b4)](){const _0x5236f5=_0x406ae4;return[_0x5236f5(0x1e6),_0x5236f5(0x19a),_0x5236f5(0x199)];}[_0x406ae4(0x1bc)](_0x3f9129,_0x4788a7,_0x5b0287){const _0x5d020d=_0x406ae4;_0x3f9129===_0x5d020d(0x1e6)?this['value']=parseFloat(_0x5b0287):_0x3f9129==='unit'?(this[_0x5d020d(0x19a)]=_0x5b0287,this[_0x5d020d(0x19d)]=this['getUnitCategory'](_0x5b0287)):_0x3f9129===_0x5d020d(0x199)&&(this[_0x5d020d(0x1be)]=parseInt(_0x5b0287)||0x3),this[_0x5d020d(0x1d1)]();}[_0x406ae4(0x191)](_0x190f02){const _0x2280c5=_0x406ae4;for(const _0x38fa80 in this[_0x2280c5(0x1d4)])if(this[_0x2280c5(0x1d4)][_0x38fa80][_0x2280c5(0x1bd)](_0x190f02))return _0x38fa80;return null;}[_0x406ae4(0x1d5)](){const _0xed4911=_0x406ae4;this[_0xed4911(0x196)]['addEventListener'](_0xed4911(0x1e5),this['handleUnitChange'][_0xed4911(0x1a9)](this)),this[_0xed4911(0x1d1)]();}[_0x406ae4(0x19f)](){const _0x4e2cd2=_0x406ae4;this[_0x4e2cd2(0x196)][_0x4e2cd2(0x1ab)]('change',this[_0x4e2cd2(0x195)][_0x4e2cd2(0x1a9)](this));}[_0x406ae4(0x1a1)](_0x5d1caf){const _0x9b8815=_0x406ae4;if(_0x5d1caf['target']['closest'](_0x9b8815(0x1ae))){const _0x2a1c1f=this[_0x9b8815(0x196)][_0x9b8815(0x1b0)](_0x9b8815(0x1d2));_0x2a1c1f&&(_0x2a1c1f['focus'](),_0x2a1c1f['click']());}}[_0x406ae4(0x195)](_0x98c1a8){const _0x90427e=_0x406ae4;if(_0x98c1a8[_0x90427e(0x1e7)][_0x90427e(0x1ca)]==='SELECT'){const _0x3bfb88=_0x98c1a8[_0x90427e(0x1e7)][_0x90427e(0x1e6)],_0x2b6ac1=this[_0x90427e(0x1b6)][this['unitCategory']][this[_0x90427e(0x19a)]]/this[_0x90427e(0x1b6)][this['unitCategory']][_0x3bfb88];this[_0x90427e(0x1e6)]=this[_0x90427e(0x1e6)]*_0x2b6ac1,this[_0x90427e(0x19a)]=_0x3bfb88,this['render']();}}[_0x406ae4(0x1db)](_0x24f9c1){const _0x235fa7=_0x406ae4;return Number[_0x235fa7(0x1a4)](_0x24f9c1)?_0x24f9c1[_0x235fa7(0x1d3)]():Math[_0x235fa7(0x1c2)](_0x24f9c1)!==0x0?_0x24f9c1[_0x235fa7(0x18f)](this[_0x235fa7(0x1be)])[_0x235fa7(0x19e)](/0+$/,'')[_0x235fa7(0x19e)](/\.$/,''):_0x24f9c1[_0x235fa7(0x1a6)](0x3);}[_0x406ae4(0x1d1)](){const _0x5b6aaa=_0x406ae4;this[_0x5b6aaa(0x196)]['innerHTML']=_0x5b6aaa(0x1a2)+this[_0x5b6aaa(0x1db)](this[_0x5b6aaa(0x1e6)])+_0x5b6aaa(0x1b7)+this[_0x5b6aaa(0x1d4)][this[_0x5b6aaa(0x19d)]][_0x5b6aaa(0x1e9)](_0xaf4f3d=>_0x5b6aaa(0x1b5)+_0xaf4f3d+'\x22\x20'+(_0xaf4f3d===this[_0x5b6aaa(0x19a)]?_0x5b6aaa(0x1cb):'')+_0x5b6aaa(0x1c6)+_0xaf4f3d+_0x5b6aaa(0x1ce))[_0x5b6aaa(0x19c)]('')+_0x5b6aaa(0x1c0)+this['e3dLogoUrl']+_0x5b6aaa(0x1ac);const _0x1e332a=this[_0x5b6aaa(0x196)][_0x5b6aaa(0x1b0)](_0x5b6aaa(0x1ae)),_0x5e6d35=this[_0x5b6aaa(0x196)][_0x5b6aaa(0x1c5)](_0x5b6aaa(0x194))[0x0];_0x1e332a[_0x5b6aaa(0x1c4)](_0x5b6aaa(0x1b1),()=>{this['tooltipTimeout']=setTimeout(()=>{const _0x47303c=_0x5594;_0x5e6d35[_0x47303c(0x1c8)][_0x47303c(0x1e4)]=_0x47303c(0x1d6);},0x3e8);}),_0x1e332a['addEventListener']('mouseout',()=>{setTimeout(()=>{const _0x524eb8=_0x5594;_0x5e6d35[_0x524eb8(0x1c8)][_0x524eb8(0x1e4)]='none';},0x3e8),clearTimeout(this['tooltipTimeout']);}),_0x5e6d35[_0x5b6aaa(0x1c4)]('mouseout',()=>{setTimeout(()=>{const _0x572be8=_0x5594;_0x5e6d35[_0x572be8(0x1c8)][_0x572be8(0x1e4)]=_0x572be8(0x1cf);},0x3e8);});}}customElements[_0x406ae4(0x1d9)]('physical-quantity',_0x1e6783);class _0x4cc7df extends _0x1e6783{}customElements['define'](_0x406ae4(0x1a7),_0x4cc7df);}));function _0xddf3(){const _0x588241=['getUnitCategory','g/mm³','666NsoRpO','.tooltip','handleUnitChange','shadowRoot','bar','function','decimal-places','unit','kg/m³','join','unitCategory','replace','disconnectedCallback','in\x20HG','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\x20cursor:\x20pointer;\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.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>','ksi[kip/in²]','isInteger','m\x20W.C.','toPrecision','uc-qty','kg/L','bind','g/cm³','removeEventListener','\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','pow','.unit-container','kPa','querySelector','mouseover','6990wsbRrL','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','observedAttributes','<option\x20value=\x22','unitConversion','</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','1868178XlunYr','GPa','552266XgwrOt','2258184DubyPr','attributeChangedCallback','includes','decimalPlaces','5851792UKQXSH','\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/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','22412kVvdyQ','floor','in\x20W.C.','addEventListener','querySelectorAll','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','amd','style','9820qsFEAP','tagName','selected','mbar','MPa','</option>','none','cm\x20HG','render','select','toString','units','connectedCallback','block','open','lbm/ft³','define','attachShadow','formatValue','24JryJvO','lbm/in³','tooltipTimeout','ksi','mm\x20HG','805SJnUAs','psf','228YhDVKh','display','change','value','target','14cAnVZi','map','toFixed','e3dLogoUrl'];_0xddf3=function(){return _0x588241;};return _0xddf3();}
|