domquery-com 1.0.0 → 1.0.1
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/domquery.js +119 -141
- package/domquery.min.js +58 -58
- package/package.json +1 -1
package/domquery.js
CHANGED
|
@@ -5303,9 +5303,9 @@ q,x,c)}`;
|
|
|
5303
5303
|
let a = null;
|
|
5304
5304
|
if (window.decryptKeyForLanguageJS) a = window.decryptKeyForLanguageJS;
|
|
5305
5305
|
else try {
|
|
5306
|
-
|
|
5306
|
+
const b = await DomQuery.prototype._decryptFetchLicense.call(this);
|
|
5307
5307
|
if (b) {
|
|
5308
|
-
|
|
5308
|
+
const c = DomQuery.prototype._decryptParseLicense.call(this, b);
|
|
5309
5309
|
if (c) {
|
|
5310
5310
|
const d = DomQuery.prototype._decryptCalculateSeed.call(this, new Date(c.createdAt)),
|
|
5311
5311
|
e = DomQuery.prototype._decryptCalculateOrder.call(this, d, 5),
|
|
@@ -5318,33 +5318,9 @@ q,x,c)}`;
|
|
|
5318
5318
|
window._decryptKeyCleanup = !0
|
|
5319
5319
|
}
|
|
5320
5320
|
}
|
|
5321
|
-
} catch (
|
|
5321
|
+
} catch (b) {
|
|
5322
5322
|
console.warn("\u26a0\ufe0f \ub77c\uc774\uc13c\uc2a4 \ud0a4\uc5d0\uc11c \ubcf5\ud638\ud654 \ud0a4\ub97c \uac00\uc838\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4:",
|
|
5323
|
-
|
|
5324
|
-
try {
|
|
5325
|
-
const e = await fetch("php_server/verify_language.php", {
|
|
5326
|
-
method: "POST",
|
|
5327
|
-
headers: {
|
|
5328
|
-
"Content-Type": "application/json"
|
|
5329
|
-
},
|
|
5330
|
-
body: JSON.stringify({
|
|
5331
|
-
action: "getHash",
|
|
5332
|
-
fileName: "Dlicense/language.js.zip"
|
|
5333
|
-
})
|
|
5334
|
-
});
|
|
5335
|
-
if (e.ok) {
|
|
5336
|
-
const g = await e.json();
|
|
5337
|
-
if (g.success)
|
|
5338
|
-
if (g.decryptKey) a = g.decryptKey;
|
|
5339
|
-
else if (g.keyParts && g.keyOrder) {
|
|
5340
|
-
b = [];
|
|
5341
|
-
for (c = 0; c < g.keyOrder.length; c++) b[c] = g.keyParts[g.keyOrder[c]];
|
|
5342
|
-
a = b.join("")
|
|
5343
|
-
}
|
|
5344
|
-
}
|
|
5345
|
-
} catch (e) {
|
|
5346
|
-
console.warn("PHP \uc11c\ubc84 \ud3f4\ubc31 \uc2e4\ud328:", e)
|
|
5347
|
-
}
|
|
5323
|
+
b)
|
|
5348
5324
|
}
|
|
5349
5325
|
if (!a) throw Error("\ubcf5\ud638\ud654 \ud0a4\ub97c \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub77c\uc774\uc13c\uc2a4 \ud0a4\ub97c \ud655\uc778\ud558\uac70\ub098 PHP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uc138\uc694.");
|
|
5350
5326
|
return a
|
|
@@ -5368,8 +5344,7 @@ q,x,c)}`;
|
|
|
5368
5344
|
c += d;
|
|
5369
5345
|
d = Number(b.getBigUint64(c, !0));
|
|
5370
5346
|
c += 8;
|
|
5371
|
-
b.getBigUint64(c,
|
|
5372
|
-
!0);
|
|
5347
|
+
b.getBigUint64(c, !0);
|
|
5373
5348
|
c += 8;
|
|
5374
5349
|
e = b.getUint32(c, !0);
|
|
5375
5350
|
c += 4;
|
|
@@ -5390,7 +5365,8 @@ q,x,c)}`;
|
|
|
5390
5365
|
uint8View: a
|
|
5391
5366
|
}
|
|
5392
5367
|
},
|
|
5393
|
-
_decryptDecryptChunks: async function(a,
|
|
5368
|
+
_decryptDecryptChunks: async function(a,
|
|
5369
|
+
b, c) {
|
|
5394
5370
|
const d = this,
|
|
5395
5371
|
e = Array(a.length);
|
|
5396
5372
|
c = [];
|
|
@@ -5404,8 +5380,7 @@ q,x,c)}`;
|
|
|
5404
5380
|
data: l
|
|
5405
5381
|
}
|
|
5406
5382
|
} catch (l) {
|
|
5407
|
-
throw console.error(`\uccad\ud06c ${h+
|
|
5408
|
-
1} AES \ubcf5\ud638\ud654 \uc2e4\ud328:`, l), Error(`\uccad\ud06c ${h+1} \ubcf5\ud638\ud654 \uc2e4\ud328: ${l.message}`);
|
|
5383
|
+
throw console.error(`\uccad\ud06c ${h+1} AES \ubcf5\ud638\ud654 \uc2e4\ud328:`, l), Error(`\uccad\ud06c ${h+1} \ubcf5\ud638\ud654 \uc2e4\ud328: ${l.message}`);
|
|
5409
5384
|
}
|
|
5410
5385
|
})();
|
|
5411
5386
|
c.push(g)
|
|
@@ -5415,7 +5390,8 @@ q,x,c)}`;
|
|
|
5415
5390
|
});
|
|
5416
5391
|
return e
|
|
5417
5392
|
},
|
|
5418
|
-
_decryptCombineChunks: function(a,
|
|
5393
|
+
_decryptCombineChunks: function(a,
|
|
5394
|
+
b, c) {
|
|
5419
5395
|
let d = new Uint8Array(b),
|
|
5420
5396
|
e = 0;
|
|
5421
5397
|
for (let g = 0; g < a.length; g++) {
|
|
@@ -5445,29 +5421,29 @@ q,x,c)}`;
|
|
|
5445
5421
|
a = !0;
|
|
5446
5422
|
break
|
|
5447
5423
|
}
|
|
5448
|
-
await new Promise(d => setTimeout(d,
|
|
5449
|
-
50))
|
|
5424
|
+
await new Promise(d => setTimeout(d, 50))
|
|
5450
5425
|
}
|
|
5451
5426
|
a || console.warn("\u26a0\ufe0f language.js \uc804\uc5ed \ud568\uc218 \ub4f1\ub85d \ud655\uc778 \uc2e4\ud328 (\ud0c0\uc784\uc544\uc6c3), \uacc4\uc18d \uc9c4\ud589...");
|
|
5452
5427
|
return b
|
|
5453
5428
|
},
|
|
5454
5429
|
_decryptCleanupKey: function() {
|
|
5455
|
-
window._decryptKeyCleanup && window.decryptKeyForLanguageJS &&
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5430
|
+
window._decryptKeyCleanup && window.decryptKeyForLanguageJS &&
|
|
5431
|
+
setTimeout(() => {
|
|
5432
|
+
try {
|
|
5433
|
+
window.decryptKeyForLanguageJS = null, delete window.decryptKeyForLanguageJS, delete window._decryptKeyCleanup
|
|
5434
|
+
} catch (a) {
|
|
5435
|
+
console.warn("\ubcf5\ud638\ud654 \ud0a4 \uc81c\uac70 \uc911 \uc624\ub958:", a)
|
|
5436
|
+
}
|
|
5437
|
+
}, 1E3)
|
|
5462
5438
|
},
|
|
5463
|
-
_decryptLoadAndRunScript: async function(a,
|
|
5464
|
-
b) {
|
|
5439
|
+
_decryptLoadAndRunScript: async function(a, b) {
|
|
5465
5440
|
let c = null;
|
|
5466
5441
|
try {
|
|
5467
5442
|
const e = await DomQuery.prototype._decryptGetDecryptKey.call(this);
|
|
5468
5443
|
var d = await DomQuery.prototype._decryptFetchEncryptedScript.call(this, a);
|
|
5469
5444
|
const g = await DomQuery.prototype._decryptDecompressGzip.call(this, d),
|
|
5470
|
-
h = DomQuery.prototype._decryptParseBinaryHeader.call(this,
|
|
5445
|
+
h = DomQuery.prototype._decryptParseBinaryHeader.call(this,
|
|
5446
|
+
g);
|
|
5471
5447
|
await DomQuery.prototype._decryptLoadAESJS.call(this);
|
|
5472
5448
|
a = [];
|
|
5473
5449
|
let f = h.offset;
|
|
@@ -5478,8 +5454,7 @@ q,x,c)}`;
|
|
|
5478
5454
|
const u = (new TextDecoder).decode(r);
|
|
5479
5455
|
a.push(u)
|
|
5480
5456
|
}
|
|
5481
|
-
const l =
|
|
5482
|
-
await DomQuery.prototype._decryptDecryptChunks.call(this, a, e, h.chunkSizes),
|
|
5457
|
+
const l = await DomQuery.prototype._decryptDecryptChunks.call(this, a, e, h.chunkSizes),
|
|
5483
5458
|
k = DomQuery.prototype._decryptCombineChunks.call(this, l, h.originalSize, h.storedChunkSize),
|
|
5484
5459
|
m = DomQuery.prototype._decryptDecodeText.call(this, k);
|
|
5485
5460
|
c = await DomQuery.prototype._decryptExecuteScript.call(this, m);
|
|
@@ -5492,31 +5467,31 @@ q,x,c)}`;
|
|
|
5492
5467
|
if (c && c.parentNode) try {
|
|
5493
5468
|
c.parentNode.removeChild(c)
|
|
5494
5469
|
} catch (g) {
|
|
5495
|
-
console.warn("\u274c \uc2a4\ud06c\ub9bd\ud2b8 \uc694\uc18c \uc81c\uac70 \uc2e4\ud328:",
|
|
5496
|
-
g)
|
|
5470
|
+
console.warn("\u274c \uc2a4\ud06c\ub9bd\ud2b8 \uc694\uc18c \uc81c\uac70 \uc2e4\ud328:", g)
|
|
5497
5471
|
}
|
|
5498
5472
|
b && b(e)
|
|
5499
5473
|
}
|
|
5500
5474
|
},
|
|
5501
5475
|
_decryptLoadLanguageJS: function(a) {
|
|
5502
5476
|
const b = window.DomQueryLanguage;
|
|
5503
|
-
b.loaded ? "function" === typeof a && a(null) : b.loading ? "function" === typeof a && b.pendingCallbacks.push(a) :
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
e)
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5477
|
+
b.loaded ? "function" === typeof a && a(null) : b.loading ? "function" === typeof a && b.pendingCallbacks.push(a) :
|
|
5478
|
+
(b.loading = !0, "function" === typeof a && b.pendingCallbacks.push(a), DomQuery.prototype._decryptLoadAndRunScript.call(this, "Dlicense/language.js.zip?v=" + (window.languageVersion || "1.0.0"), function(c) {
|
|
5479
|
+
c ? (console.error("language.js \ub85c\ub4dc \uc2e4\ud328:", c), b.loading = !1, b.pendingCallbacks.forEach(d => {
|
|
5480
|
+
try {
|
|
5481
|
+
d(c)
|
|
5482
|
+
} catch (e) {
|
|
5483
|
+
console.error("\ucf5c\ubc31 \uc2e4\ud589 \uc911 \uc624\ub958:", e)
|
|
5484
|
+
}
|
|
5485
|
+
})) : (b.loaded = !0, b.loading = !1, b.pendingCallbacks.forEach(d => {
|
|
5486
|
+
try {
|
|
5487
|
+
d(null)
|
|
5488
|
+
} catch (e) {
|
|
5489
|
+
console.error("\ucf5c\ubc31 \uc2e4\ud589 \uc911 \uc624\ub958:",
|
|
5490
|
+
e)
|
|
5491
|
+
}
|
|
5492
|
+
}));
|
|
5493
|
+
b.pendingCallbacks = []
|
|
5494
|
+
}))
|
|
5520
5495
|
},
|
|
5521
5496
|
insertAdjacentHTML: function(a, b, c) {
|
|
5522
5497
|
if (!["beforebegin", "afterbegin", "beforeend", "afterend"].includes(a)) return console.error("Invalid position. Use 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."), this;
|
|
@@ -5527,8 +5502,8 @@ q,x,c)}`;
|
|
|
5527
5502
|
return this
|
|
5528
5503
|
},
|
|
5529
5504
|
unique: function(a) {
|
|
5530
|
-
return Array.isArray(a) ?
|
|
5531
|
-
|
|
5505
|
+
return Array.isArray(a) ? 0 < a.length && a[0] instanceof Element ? a.filter((b, c, d) => d.findIndex(e => e === b) === c) : [...(new Set(a))] : (console.error("Input must be an array"),
|
|
5506
|
+
[])
|
|
5532
5507
|
},
|
|
5533
5508
|
trim: function(a, b) {
|
|
5534
5509
|
return "string" !== typeof a ? a : void 0 === b ? a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : a.replace(new RegExp(`^[${b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]+|[${b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]+$`, "g"), "")
|
|
@@ -5536,13 +5511,13 @@ q,x,c)}`;
|
|
|
5536
5511
|
_detectDeviceInfo: function(a) {
|
|
5537
5512
|
if (DomQuery.prototype._deviceInfoCache && !a) return DomQuery.prototype._deviceInfoCache;
|
|
5538
5513
|
try {
|
|
5539
|
-
a =
|
|
5540
|
-
navigator;
|
|
5514
|
+
a = navigator;
|
|
5541
5515
|
var b = a.userAgent,
|
|
5542
5516
|
c = b.toLowerCase(),
|
|
5543
5517
|
d = window.innerWidth || screen.width || 0,
|
|
5544
5518
|
e = window.innerHeight || screen.height || 0,
|
|
5545
|
-
g = window.devicePixelRatio ||
|
|
5519
|
+
g = window.devicePixelRatio ||
|
|
5520
|
+
1,
|
|
5546
5521
|
h = 0 < a.maxTouchPoints || "ontouchstart" in window,
|
|
5547
5522
|
f = (a.vendor || "").toLowerCase(),
|
|
5548
5523
|
l = "unknown",
|
|
@@ -5551,8 +5526,8 @@ q,x,c)}`;
|
|
|
5551
5526
|
n = !1,
|
|
5552
5527
|
r = !1,
|
|
5553
5528
|
u = !1;
|
|
5554
|
-
/\bCrOS\b/i.test(c) ? (l = "chromeos", u = !0) : /macintosh/i.test(c) ? 500 > d && 1E3 > e || 1E3 > d && 500 > e || (600 > d || 600 > e) && 450 > d ? (l = "ios", k = !0) : h && 1 < a.maxTouchPoints ? (l = "ios", k = !0) : (l = "macos", n = !0) : /iphone|ipod/i.test(c) ? (l = "ios", k = !0) : /ipad/i.test(c) ? (l =
|
|
5555
|
-
|
|
5529
|
+
/\bCrOS\b/i.test(c) ? (l = "chromeos", u = !0) : /macintosh/i.test(c) ? 500 > d && 1E3 > e || 1E3 > d && 500 > e || (600 > d || 600 > e) && 450 > d ? (l = "ios", k = !0) : h && 1 < a.maxTouchPoints ? (l = "ios", k = !0) : (l = "macos", n = !0) : /iphone|ipod/i.test(c) ? (l = "ios", k = !0) : /ipad/i.test(c) ? (l = "ios", k = !0) : /android/i.test(c) ? (l = "android", m = !0) : /linux/i.test(c) && h && !u ? (l = "android", m = !0) : /windows|win32|win64|wow64/i.test(c) ? (l = "windows", r = !0) :
|
|
5530
|
+
/linux|x11/i.test(c) && (l = "linux");
|
|
5556
5531
|
var v = !1,
|
|
5557
5532
|
B = null,
|
|
5558
5533
|
D = null,
|
|
@@ -5586,10 +5561,10 @@ q,x,c)}`;
|
|
|
5586
5561
|
var t = !(!window.webkit || !window.webkit.messageHandlers),
|
|
5587
5562
|
w = !!(window.webkit || window.ReactNativeWebView || window.flutter_inappwebview || window.cordova),
|
|
5588
5563
|
C = !c.includes("safari/") || c.includes("version/") && !c.includes("mobile/");
|
|
5589
|
-
(v = t || w || null !==
|
|
5590
|
-
D || C && !a.standalone && !/crios|fxios|edgios|opios/i.test(c)) && (B = "ios")
|
|
5564
|
+
(v = t || w || null !== D || C && !a.standalone && !/crios|fxios|edgios|opios/i.test(c)) && (B = "ios")
|
|
5591
5565
|
} else if (m) {
|
|
5592
|
-
var q = !!(window.Android || window.AndroidBridge || window.ReactNativeWebView ||
|
|
5566
|
+
var q = !!(window.Android || window.AndroidBridge || window.ReactNativeWebView ||
|
|
5567
|
+
window.flutter_inappwebview || window.cordova),
|
|
5593
5568
|
x = /\bwv\b/i.test(c),
|
|
5594
5569
|
y = /version\/[\d.]+.*?chrome/i.test(c) && !/ chrome\/[\d.]+/i.test(c),
|
|
5595
5570
|
z = c.includes("chrome/") && x && !/samsungbrowser|opr\/|edg\//i.test(c);
|
|
@@ -5597,13 +5572,13 @@ q,x,c)}`;
|
|
|
5597
5572
|
}
|
|
5598
5573
|
var A = "desktop";
|
|
5599
5574
|
if (/smart-?tv|googletv|appletv|roku|tizen|webos|hbbtv/i.test(c)) A = "tv";
|
|
5600
|
-
else if (/playstation|xbox|nintendo|wii/i.test(c)) A =
|
|
5601
|
-
"console";
|
|
5575
|
+
else if (/playstation|xbox|nintendo|wii/i.test(c)) A = "console";
|
|
5602
5576
|
else if (k)
|
|
5603
5577
|
if (/macintosh/i.test(c)) {
|
|
5604
5578
|
var E = d / g;
|
|
5605
5579
|
A = 450 > E || 500 > d && 1E3 > e ? "mobile" : 900 > E || 1E3 > d && 1E3 > e ? "tablet" : "mobile"
|
|
5606
|
-
} else /ipad/i.test(c) ||
|
|
5580
|
+
} else /ipad/i.test(c) ||
|
|
5581
|
+
h && 1 < a.maxTouchPoints && /macintosh/i.test(c) ? A = "tablet" : /iphone|ipod/i.test(c) ? A = "mobile" : (E = d / g, 450 > E ? A = "mobile" : 900 > E && (A = "tablet"));
|
|
5607
5582
|
else if (m) {
|
|
5608
5583
|
var J = /mobile/i.test(c),
|
|
5609
5584
|
G = /tablet/i.test(c);
|
|
@@ -5614,18 +5589,18 @@ q,x,c)}`;
|
|
|
5614
5589
|
var I = 2.1 > Math.max(d, e) / Math.min(d, e);
|
|
5615
5590
|
A = G || J && E || E && I && 3 > g ? "tablet" : "mobile"
|
|
5616
5591
|
} else if (u) A = h ? "tablet" : "desktop";
|
|
5617
|
-
else if (/mobile|phone/i.test(c)) A =
|
|
5618
|
-
"mobile";
|
|
5592
|
+
else if (/mobile|phone/i.test(c)) A = "mobile";
|
|
5619
5593
|
else if (h && "desktop" === A) {
|
|
5620
5594
|
E = d / g;
|
|
5621
5595
|
var N = Math.sqrt(d * d + e * e) / g;
|
|
5622
5596
|
if (450 > E || 700 > N) A = "mobile";
|
|
5623
|
-
else if (900 > E || 1300 >
|
|
5597
|
+
else if (900 > E || 1300 >
|
|
5598
|
+
N) A = "tablet"
|
|
5624
5599
|
}
|
|
5625
5600
|
G = "unknown";
|
|
5626
5601
|
I = "";
|
|
5627
|
-
v ? G = "webview" : /edg(?:e|ios|a)\//i.test(c) ? (G = "edge", I = (c.match(/edg(?:e|ios|a)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /opr\//i.test(c) || /opera/i.test(c) && !/mini/i.test(c) ? (G = "opera", I = (c.match(/(?:opr|opera)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /samsungbrowser/i.test(c) ? (G = "samsung", I = (c.match(/samsungbrowser\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /chrome|crios|crmo/i.test(c) ?
|
|
5628
|
-
(G = "
|
|
5602
|
+
v ? G = "webview" : /edg(?:e|ios|a)\//i.test(c) ? (G = "edge", I = (c.match(/edg(?:e|ios|a)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /opr\//i.test(c) || /opera/i.test(c) && !/mini/i.test(c) ? (G = "opera", I = (c.match(/(?:opr|opera)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /samsungbrowser/i.test(c) ? (G = "samsung", I = (c.match(/samsungbrowser\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /chrome|crios|crmo/i.test(c) ? (G = "chrome", I = (c.match(/(?:chrome|crios|crmo)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /safari/i.test(c) && /apple/i.test(f) ?
|
|
5603
|
+
(G = "safari", I = (c.match(/version\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /firefox|fxios/i.test(c) ? (G = "firefox", I = (c.match(/(?:firefox|fxios)\/(\d+(?:\.\d+)?)/i) || [])[1] || "") : /trident|msie/i.test(c) && (G = "ie", I = (c.match(/(?:msie |rv:)(\d+(?:\.\d+)?)/i) || [])[1] || "");
|
|
5629
5604
|
DomQuery.prototype._deviceInfoCache = {
|
|
5630
5605
|
platform: l,
|
|
5631
5606
|
deviceType: A,
|
|
@@ -5638,7 +5613,8 @@ q,x,c)}`;
|
|
|
5638
5613
|
isChromeOS: u,
|
|
5639
5614
|
isPC: ("windows" === l || "macos" === l || "linux" === l || "chromeos" === l) && "desktop" === A,
|
|
5640
5615
|
isMobile: "mobile" === A,
|
|
5641
|
-
isTablet: "tablet" ===
|
|
5616
|
+
isTablet: "tablet" ===
|
|
5617
|
+
A,
|
|
5642
5618
|
isDesktop: "desktop" === A,
|
|
5643
5619
|
isTV: "tv" === A,
|
|
5644
5620
|
isConsole: "console" === A,
|
|
@@ -5656,15 +5632,15 @@ q,x,c)}`;
|
|
|
5656
5632
|
pixelRatio: g,
|
|
5657
5633
|
hasTouch: h,
|
|
5658
5634
|
orientation: d && e ? d > e ? "landscape" : "portrait" : null,
|
|
5659
|
-
maxTouchPoints: a.maxTouchPoints ||
|
|
5660
|
-
0,
|
|
5635
|
+
maxTouchPoints: a.maxTouchPoints || 0,
|
|
5661
5636
|
isIPad: /ipad/i.test(c) || k && "tablet" === A,
|
|
5662
5637
|
isIPadOS13Plus: /macintosh/i.test(c) && k,
|
|
5663
5638
|
isStandalone: !!a.standalone
|
|
5664
5639
|
};
|
|
5665
5640
|
return DomQuery.prototype._deviceInfoCache
|
|
5666
5641
|
} catch (O) {
|
|
5667
|
-
return console.error("Device detection error:",
|
|
5642
|
+
return console.error("Device detection error:",
|
|
5643
|
+
O), DomQuery.prototype._deviceInfoCache = {
|
|
5668
5644
|
platform: "unknown",
|
|
5669
5645
|
deviceType: "desktop",
|
|
5670
5646
|
browser: "unknown",
|
|
@@ -5713,7 +5689,8 @@ q,x,c)}`;
|
|
|
5713
5689
|
var g = e.preventBack;
|
|
5714
5690
|
e.preventBack = !0;
|
|
5715
5691
|
window._domqueryStateManager.closingStates.set(b, !0);
|
|
5716
|
-
if ("function" ===
|
|
5692
|
+
if ("function" ===
|
|
5693
|
+
typeof a.options.onCloseStart) a.options.onCloseStart(c.count);
|
|
5717
5694
|
var h = !1;
|
|
5718
5695
|
d = function() {
|
|
5719
5696
|
if (!h) {
|
|
@@ -5721,11 +5698,11 @@ q,x,c)}`;
|
|
|
5721
5698
|
c.count = Math.max(0, c.count - 1);
|
|
5722
5699
|
var f = window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length - 1];
|
|
5723
5700
|
f && f.key === a.key && window._domqueryStateManager.registrationOrder.pop();
|
|
5724
|
-
0 >= c.count &&
|
|
5725
|
-
(c.isActive = !1, window._domqueryStateManager.activeHistories.delete(b));
|
|
5701
|
+
0 >= c.count && (c.isActive = !1, window._domqueryStateManager.activeHistories.delete(b));
|
|
5726
5702
|
window._domqueryStateManager.closingStates.delete(b);
|
|
5727
5703
|
e.preventBack = g;
|
|
5728
|
-
window._domqueryStateManager.doneCallbackTime =
|
|
5704
|
+
window._domqueryStateManager.doneCallbackTime =
|
|
5705
|
+
Date.now()
|
|
5729
5706
|
}
|
|
5730
5707
|
};
|
|
5731
5708
|
if ("function" === typeof a.options.onCloseEnd) a.options.onCloseEnd(c.count, d);
|
|
@@ -5738,16 +5715,16 @@ q,x,c)}`;
|
|
|
5738
5715
|
var f = null;
|
|
5739
5716
|
let l = !1,
|
|
5740
5717
|
k = null;
|
|
5741
|
-
"string" === typeof a ? (g = a, h = "function" === typeof b ? b : null, l = "boolean" === typeof c ? c : !1, f = "function" === typeof d ? d : "function" ===
|
|
5742
|
-
|
|
5718
|
+
"string" === typeof a ? (g = a, h = "function" === typeof b ? b : null, l = "boolean" === typeof c ? c : !1, f = "function" === typeof d ? d : "function" === typeof c ? c : null, k = e && "object" === typeof e ? e : null) : "function" === typeof a ? (h = a, l = "boolean" === typeof b ? b : !1, f = "function" === typeof c ? c : null, k = d && "object" === typeof d ? d : null) : "boolean" === typeof a &&
|
|
5719
|
+
(l = a);
|
|
5743
5720
|
window.popstateHandlerRegistered || (window.addEventListener("popstate", function(m) {
|
|
5744
5721
|
if (window._domqueryStateManager.isButtonBack) window._domqueryStateManager.isButtonBack = !1;
|
|
5745
5722
|
else {
|
|
5746
5723
|
var n = Date.now();
|
|
5747
|
-
if (!(window._domqueryStateManager.doneCallbackTime && 100 > n - window._domqueryStateManager.doneCallbackTime || 100 > n -
|
|
5748
|
-
window._domqueryStateManager.lastPopstateTime)) {
|
|
5724
|
+
if (!(window._domqueryStateManager.doneCallbackTime && 100 > n - window._domqueryStateManager.doneCallbackTime || 100 > n - window._domqueryStateManager.lastPopstateTime)) {
|
|
5749
5725
|
window._domqueryStateManager.lastPopstateTime = n;
|
|
5750
|
-
if (m.state && m.state.key && (n = window._domqueryStateManager.histories.get(m.state.key)) && (!n.isActive ||
|
|
5726
|
+
if (m.state && m.state.key && (n = window._domqueryStateManager.histories.get(m.state.key)) && (!n.isActive ||
|
|
5727
|
+
n.count < m.state.count)) {
|
|
5751
5728
|
n.count = m.state.count;
|
|
5752
5729
|
n.isActive = !0;
|
|
5753
5730
|
window._domqueryStateManager.activeHistories.add(m.state.key);
|
|
@@ -5761,17 +5738,18 @@ q,x,c)}`;
|
|
|
5761
5738
|
return
|
|
5762
5739
|
}
|
|
5763
5740
|
if (n = window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length - 1])
|
|
5764
|
-
if (n.options && n.options.target) DomQuery.prototype._handlePanelCloseWithTarget.call({},
|
|
5741
|
+
if (n.options && n.options.target) DomQuery.prototype._handlePanelCloseWithTarget.call({},
|
|
5742
|
+
n);
|
|
5765
5743
|
else {
|
|
5766
5744
|
var r = "gong_tea_yun_" + n.key,
|
|
5767
5745
|
u = window._domqueryStateManager.histories.get(r);
|
|
5768
5746
|
if (u && !u.preventBack) {
|
|
5769
|
-
if (u.count = Math.max(0, u.count - 1), window._domqueryStateManager.registrationOrder.pop(), 0 >= u.count && (u.isActive = !1, window._domqueryStateManager.activeHistories.delete(r)),
|
|
5770
|
-
u.callback?.(u.count), u.finalOnBackCallback?.(u.count), n.onBackCallback && n.onBackCallback !== u.finalOnBackCallback) n.onBackCallback(u.count)
|
|
5747
|
+
if (u.count = Math.max(0, u.count - 1), window._domqueryStateManager.registrationOrder.pop(), 0 >= u.count && (u.isActive = !1, window._domqueryStateManager.activeHistories.delete(r)), u.callback?.(u.count), u.finalOnBackCallback?.(u.count), n.onBackCallback && n.onBackCallback !== u.finalOnBackCallback) n.onBackCallback(u.count)
|
|
5771
5748
|
} else {
|
|
5772
5749
|
r = null;
|
|
5773
5750
|
for (const [, v] of window._domqueryStateManager.histories)
|
|
5774
|
-
if (v.isActive && v.preventBack &&
|
|
5751
|
+
if (v.isActive && v.preventBack &&
|
|
5752
|
+
0 < v.count) {
|
|
5775
5753
|
r = v;
|
|
5776
5754
|
break
|
|
5777
5755
|
} if (r) {
|
|
@@ -5784,23 +5762,22 @@ q,x,c)}`;
|
|
|
5784
5762
|
}
|
|
5785
5763
|
}
|
|
5786
5764
|
}), window.popstateHandlerRegistered = !0);
|
|
5787
|
-
window._domqueryStateManager ||
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
});
|
|
5765
|
+
window._domqueryStateManager || (window._domqueryStateManager = {
|
|
5766
|
+
histories: new Map,
|
|
5767
|
+
activeHistories: new Set,
|
|
5768
|
+
stateIndex: 0,
|
|
5769
|
+
registrationOrder: [],
|
|
5770
|
+
stats: {
|
|
5771
|
+
totalTrueCount: 0,
|
|
5772
|
+
totalFalseCount: 0
|
|
5773
|
+
},
|
|
5774
|
+
preventBackForwardCount: {},
|
|
5775
|
+
lastPopstateTime: 0,
|
|
5776
|
+
isButtonBack: !1,
|
|
5777
|
+
closingStates: new Map,
|
|
5778
|
+
pendingPreventBackReset: new Map,
|
|
5779
|
+
doneCallbackTime: 0
|
|
5780
|
+
});
|
|
5804
5781
|
g = "gong_tea_yun_" + g.replace(/[^a-zA-Z0-9_]/g, "");
|
|
5805
5782
|
window._domqueryStateManager.histories.has(g) || window._domqueryStateManager.histories.set(g, {
|
|
5806
5783
|
count: 0,
|
|
@@ -5852,13 +5829,13 @@ q,x,c)}`;
|
|
|
5852
5829
|
let d = "default_history_key",
|
|
5853
5830
|
e = null;
|
|
5854
5831
|
c = void 0 !== c ? c : 100;
|
|
5855
|
-
void 0 !== a && null !== a && ("function" === typeof a ?
|
|
5856
|
-
e = a : d = "function" === typeof a.toString ? a.toString() : "default_history_key");
|
|
5832
|
+
void 0 !== a && null !== a && ("function" === typeof a ? e = a : d = "function" === typeof a.toString ? a.toString() : "default_history_key");
|
|
5857
5833
|
"function" === typeof b && (e = b);
|
|
5858
5834
|
d = "gong_tea_yun_" + d.replace(/[^a-zA-Z0-9_]/g, "");
|
|
5859
5835
|
a = () => {
|
|
5860
5836
|
if (!window._domqueryStateManager) return window.history.back(), "function" === typeof e && e(0, 0), 0;
|
|
5861
|
-
var g =
|
|
5837
|
+
var g =
|
|
5838
|
+
d.replace("gong_tea_yun_", ""),
|
|
5862
5839
|
h = null,
|
|
5863
5840
|
f = -1;
|
|
5864
5841
|
for (var l = window._domqueryStateManager.registrationOrder.length - 1; 0 <= l; l--)
|
|
@@ -5866,11 +5843,11 @@ q,x,c)}`;
|
|
|
5866
5843
|
h = window._domqueryStateManager.registrationOrder[l];
|
|
5867
5844
|
f = l;
|
|
5868
5845
|
break
|
|
5869
|
-
} l =
|
|
5870
|
-
window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length - 1];
|
|
5846
|
+
} l = window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length - 1];
|
|
5871
5847
|
if (!h) return "function" === typeof e && e(0, 0), 0;
|
|
5872
5848
|
h = f === window._domqueryStateManager.registrationOrder.length - 1;
|
|
5873
|
-
if (!h) window._domqueryStateManager.registrationOrder.splice(f,
|
|
5849
|
+
if (!h) window._domqueryStateManager.registrationOrder.splice(f,
|
|
5850
|
+
1);
|
|
5874
5851
|
else if (l && g !== l.key) return "function" === typeof e && e(0, 0), 0;
|
|
5875
5852
|
window._domqueryStateManager.isButtonBack = !0;
|
|
5876
5853
|
g = window._domqueryStateManager.histories.get(d);
|
|
@@ -5886,36 +5863,37 @@ q,x,c)}`;
|
|
|
5886
5863
|
}
|
|
5887
5864
|
m = d.replace("gong_tea_yun_", "");
|
|
5888
5865
|
if (h)
|
|
5889
|
-
for (f =
|
|
5866
|
+
for (f =
|
|
5867
|
+
window._domqueryStateManager.registrationOrder.length - 1; 0 <= f; f--)
|
|
5890
5868
|
if (window._domqueryStateManager.registrationOrder[f].key === m) {
|
|
5891
5869
|
window._domqueryStateManager.registrationOrder.splice(f, 1);
|
|
5892
5870
|
break
|
|
5893
5871
|
} m = g.count - 1;
|
|
5894
5872
|
g.count = m;
|
|
5895
5873
|
g.isMinusCall = !0;
|
|
5896
|
-
g.preventBack ?
|
|
5897
|
-
|
|
5874
|
+
g.preventBack ? (g.trueCount = Math.max(0, g.trueCount - 1), window._domqueryStateManager.stats.totalTrueCount = Math.max(0, window._domqueryStateManager.stats.totalTrueCount - 1)) : (g.falseCount = Math.max(0, g.falseCount - 1), window._domqueryStateManager.stats.totalFalseCount = Math.max(0,
|
|
5875
|
+
window._domqueryStateManager.stats.totalFalseCount - 1));
|
|
5898
5876
|
if (0 >= m) {
|
|
5899
5877
|
g.isActive = !1;
|
|
5900
5878
|
window._domqueryStateManager.activeHistories.delete(d);
|
|
5901
5879
|
k = 0;
|
|
5902
5880
|
f = !1;
|
|
5903
5881
|
h = [];
|
|
5904
|
-
for (let [n, r] of window._domqueryStateManager.histories) r.isActive && 0 < r.count && (k += r.count, r.preventBack &&
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
}));
|
|
5882
|
+
for (let [n, r] of window._domqueryStateManager.histories) r.isActive && 0 < r.count && (k += r.count, r.preventBack && (f = !0), h.push({
|
|
5883
|
+
key: n,
|
|
5884
|
+
count: r.count,
|
|
5885
|
+
preventBack: r.preventBack
|
|
5886
|
+
}));
|
|
5910
5887
|
"function" === typeof e && e(m, k);
|
|
5911
5888
|
g.preventBack ? (h.forEach(n => {
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5889
|
+
history.pushState({
|
|
5890
|
+
key: n.key,
|
|
5891
|
+
count: n.count,
|
|
5892
|
+
preventBack: n.preventBack,
|
|
5893
|
+
restack: !0
|
|
5894
|
+
}, "")
|
|
5895
|
+
}), window.history.go(-(h.length + 1))) : 0 !== k ||
|
|
5896
|
+
f ? window.history.back() : window.history.go(-1)
|
|
5919
5897
|
} else {
|
|
5920
5898
|
g = 0;
|
|
5921
5899
|
for ([, k] of window._domqueryStateManager.histories) k.isActive && 0 < k.count && (g += k.count);
|
package/domquery.min.js
CHANGED
|
@@ -232,8 +232,8 @@ var b=window.getComputedStyle(a);a=parseFloat(b.width);const d=parseFloat(b.padd
|
|
|
232
232
|
position:function(a,b={}){function c(k){k=parseFloat(k.toFixed(4));return 0===k%1?Math.round(k):k}b={useRAF:!1,considerTransform:!1,...b};if(!this.elements||!this.elements.length)return"function"===typeof a&&a.call(this,this),this;var d=this,e=new WeakMap,g=new WeakMap;const h=(k,m)=>{if(!k||!k.getBoundingClientRect)return{top:0,left:0};if(g.has(k))return g.get(k);m=k.getBoundingClientRect();a:if(e.has(k))var n=e.get(k);else{for(var r=k;r&&r!==document.body&&r!==document.documentElement;){n=getComputedStyle(r).overflow;
|
|
233
233
|
if("auto"===n||"scroll"===n){e.set(k,r);n=r;break a}r=r.parentElement}e.set(k,null);n=null}r=n?n.scrollLeft:window.pageXOffset||document.documentElement.scrollLeft||0;n=n?n.scrollTop:window.pageYOffset||document.documentElement.scrollTop||0;m={top:m.top+n,left:m.left+r};var u=k.offsetParent;u&&u!==document.body&&u!==document.documentElement&&(u=u.getBoundingClientRect(),m.top-=u.top+n,m.left-=u.left+r);n=getComputedStyle(k);r=parseFloat(n.marginTop)||0;n=parseFloat(n.marginLeft)||0;m.top-=r;m.left-=
|
|
234
234
|
n;m.top=c(isNaN(m.top)?0:m.top);m.left=c(isNaN(m.left)?0:m.left);g.set(k,m);return m},f=()=>{var k=d.elements.map(h);k=1<k.length?k:k[0]||{top:0,left:0};document.getElementById("dynamicPositionInfo")&&(document.getElementById("dynamicPositionInfo").textContent=`Left: ${k.left}, Top: ${k.top}`);return k},l=k=>{a&&"function"===typeof a&&a.call(d,k);return k};return"function"===typeof a?(b.useRAF?requestAnimationFrame(()=>{const k=f();l(k)}):setTimeout(()=>{const k=f();l(k)},0),d):f()},getLastPosition:function(){return this.lastPosition||
|
|
235
|
-
{left:0,top:0}},_outerHeight_outerWidth:function(a,b,c,d){if(!a||0===a.length)return 0;var e="outer"+d.charAt(0).toUpperCase()+d.slice(1)+"Cache",g=this[e]||(this[e]=new WeakMap),h=function(f,l){if(1!==f.nodeType)return 0;var k=g.get(f);if(k&&!l)return k;k=window.getComputedStyle(f);if(f instanceof SVGElement)var m="svg"===f.tagName.toLowerCase()?parseFloat(f.getAttribute(d))||f.viewBox&&f.viewBox.baseVal[d]||parseFloat(k[d])||0:f.getBBox()[d];else{var n=k.display;if("none"===n){var r=f.style.position
|
|
236
|
-
u=f.style.visibility
|
|
235
|
+
{left:0,top:0}},_outerHeight_outerWidth:function(a,b,c,d){if(!a||0===a.length)return 0;var e="outer"+d.charAt(0).toUpperCase()+d.slice(1)+"Cache",g=this[e]||(this[e]=new WeakMap),h=function(f,l){if(1!==f.nodeType)return 0;var k=g.get(f);if(k&&!l)return k;k=window.getComputedStyle(f);if(f instanceof SVGElement)var m="svg"===f.tagName.toLowerCase()?parseFloat(f.getAttribute(d))||f.viewBox&&f.viewBox.baseVal[d]||parseFloat(k[d])||0:f.getBBox()[d];else{var n=k.display;if("none"===n){var r=f.style.position;
|
|
236
|
+
var u=f.style.visibility;var v=f.style.display;f.style.position="absolute";f.style.visibility="hidden";f.style.display="block";k=window.getComputedStyle(f)}m=parseFloat(k[d])+parseFloat(k["padding"+("height"===d?"Top":"Left")])+parseFloat(k["padding"+("height"===d?"Bottom":"Right")])+parseFloat(k["border"+("height"===d?"Top":"Left")+"Width"])+parseFloat(k["border"+("height"===d?"Bottom":"Right")+"Width"]);"none"===n&&(f.style.position=r,f.style.visibility=u,f.style.display=v)}l&&(m+=parseFloat(k["margin"+
|
|
237
237
|
("height"===d?"Top":"Left")])+parseFloat(k["margin"+("height"===d?"Bottom":"Right")]));m=Math.round(m);g.set(f,m);return m};if(void 0===b||"boolean"===typeof b)return c=!0===b,h(a[0],c);b=parseFloat(b);a.forEach(function(f){var l=window.getComputedStyle(f);h(f,!1);var k=b;f instanceof SVGElement||(k-=parseFloat(l["padding"+("height"===d?"Top":"Left")])+parseFloat(l["padding"+("height"===d?"Bottom":"Right")])+parseFloat(l["border"+("height"===d?"Top":"Left")+"Width"])+parseFloat(l["border"+("height"===
|
|
238
238
|
d?"Bottom":"Right")+"Width"]));c&&(k-=parseFloat(l["margin"+("height"===d?"Top":"Left")])+parseFloat(l["margin"+("height"===d?"Bottom":"Right")]));k=Math.max(0,k);if(f instanceof SVGElement){if(f.setAttribute(d,k),"svg"===f.tagName.toLowerCase()&&(f.style[d]=k+"px",l=f.getAttribute("viewBox")))l=l.split(" "),l["width"===d?2:3]=k,f.setAttribute("viewBox",l.join(" "))}else f.style[d]=k+"px";g.delete(f)});return this},outerHeight:function(a,b){return this._outerHeight_outerWidth.call(this,this.elements,
|
|
239
239
|
a,b,"height")},outerWidth:function(a,b){return this._outerHeight_outerWidth.call(this,this.elements,a,b,"width")},offset:function(a,b=!1,c){if(!this.elements||0===this.elements.length)return b?[]:void 0;if(void 0===a)return c=d=>{d=d.getBoundingClientRect();let e=document.documentElement,g=window;return{top:d.top+g.pageYOffset-e.clientTop,left:d.left+g.pageXOffset-e.clientLeft}},b?Array.prototype.map.call(this.elements,c):c(this.elements[0]);this.elements.forEach(d=>{if(1===d.nodeType){var e=this.offset.call({elements:[d]}),
|
|
@@ -245,20 +245,20 @@ b.length);b.forEach((c,d)=>{d=c.parentElement;if(!d||!d.classList.contains("tea2
|
|
|
245
245
|
"");e.setAttribute("data-border-width","1");e.setAttribute("data-event-initialized","true");e.id&&e.id.startsWith("table-")||(e.id=`table-${Date.now()}-${Math.random().toString(36).substr(2,9)}`)})},100),setTimeout(()=>{/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);d.querySelectorAll(".video-wrapper").forEach(e=>{const g=e.querySelector("iframe");if(g){var h=g.style.width.match(/(\d+)%/);if(h){h=parseInt(h[1]);e.setAttribute("data-scale",h.toString());
|
|
246
246
|
const f=d.clientWidth*h/100,l=f/(16/9);g.style.width=`${h}%`;g.style.height=`${l}px`;e.style.setProperty("--video-width",`${f}px`);e.style.setProperty("--video-height",`${l}px`)}}});"function"===typeof setupVideoInteractions&&setupVideoInteractions()},10),!0}return!1},getContent:function(){var a=this[0];if(a&&a.webEditorInstance)return a.webEditorInstance.getContent();if(a){if((a=a.querySelector(".editor"))&&a.webEditorInstance&&a.webEditorInstance.getContent)return a.webEditorInstance.getContent();
|
|
247
247
|
if(!a)return null;let b="";(()=>{const c=contentArea.cloneNode(!0);c.innerHTML.includes('<textarea style="box-sizing: border-box')?b="":(c.querySelectorAll("td").forEach(d=>{if(d.querySelector(".video-wrapper")||d.querySelector("img")||d.querySelector("iframe")){const e=(d.getAttribute("style")||"").split(";").filter(g=>-1===g.indexOf("height")).join(";");d.setAttribute("style",e)}}),[".symbol-controls",".resize-handle",".resize-handle-mobile",".size-overlay"].forEach(d=>{c.querySelectorAll(d).forEach(e=>
|
|
248
|
-
e.remove())}),c.querySelectorAll(".video-wrapper").forEach(d=>{for(;d.firstChild;){const f=d.firstChild;if("IFRAME"===f.tagName){var e=f.getAttribute("style")||"",g=e.match(/width:\s([\d.]+[%px])/);e=e.match(/height:\s([\d.]+[%px])/);if(g&&e){g=g[1];
|
|
249
|
-
""").replace(/'/g,"'");e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");f.setAttribute("width",g);f.setAttribute("height",e)}f.removeAttribute("style");f.hasAttribute("src")&&((g=f.getAttribute("src"))&&g.toLowerCase().trim().startsWith("javascript:")?f.removeAttribute("src"):g&&g.toLowerCase().trim().startsWith("data:")&&!g.toLowerCase().includes("data:image/")&&f.removeAttribute("src"));f.setAttribute("sandbox",
|
|
250
|
-
d)}d.remove()}),c.querySelectorAll(".resizable-image").forEach(d=>{const e=d.querySelector("img");if(e){if(e.hasAttribute("src")){const g=e.getAttribute("src");g&&g.toLowerCase().trim().startsWith("javascript:")?e.removeAttribute("src"):g&&g.toLowerCase().trim().startsWith("data:")&&!g.toLowerCase().includes("data:image/")&&e.removeAttribute("src")}d.parentNode.insertBefore(e,d)}d.remove()}),c.querySelectorAll('div[class*="table-"][class*="tea24874"]').forEach(d=>
|
|
251
|
-
|
|
252
|
-
d.removeAttribute(e.name)})}),c.querySelectorAll("script").forEach(d=>{d.remove()}),c.querySelectorAll("object, embed, applet").forEach(d=>{d.remove()}),b=c.innerHTML,b=b.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<script/gi,"<script").replace(/<\/script/gi,"</script").replace(/on\w+="[^"]*"/gi,"").replace(/on\w+='[^']*'/gi,"").replace(/on\w+=\w+/gi,"").replace(/javascript:[^\s"']+/gi,
|
|
253
|
-
"<applet").replace(/<base/gi,"<base"),b=b.replace(/&#x/gi,"&#x").replace(/�/gi,"&#0").replace(/&#/gi,"&#"),b=b.replace(/eval\s*\(/gi,"eval(").replace(/setTimeout\s*\(/gi,"setTimeout(").replace(/setInterval\s*\(/gi,"setInterval(").replace(/Function\s*\(/gi,"Function(").replace(/alert\s*\(/gi,"alert(").replace(/confirm\s*\(/gi,"confirm(").replace(/prompt\s*\(/gi,"prompt(").replace(/document\.cookie/gi,
|
|
254
|
-
"document.domain").replace(/document\.location/gi,"document.location").replace(/document\.write/gi,"document.write").replace(/document\.URL/gi,"document.URL").replace(/window\.location/gi,"window.location").replace(/location\./gi,"location.").replace(/fetch\s*\(/gi,"fetch("))})();return b?b:null}return null},executeCommand:function(a,b=null){return this.each(function(){this.webEditorInstance&&this.webEditorInstance.executeCommand(a,
|
|
255
|
-
document.createElement("div");b.innerHTML=a;b=b.querySelectorAll(".domqGLG");const c=[],d=/\x3c!--\s*domqGLG(?:_([^\s]+?))?\s*--\x3e/gi;let e=[],g;for(;null!==(g=d.exec(a));)e.push({index:g.index,fullMatch:g[0],key:g[1]||null,commentStart:g.index,commentEnd:g.index+g[0].length});e.forEach(h=>{var f=h.commentStart;f=a.substring(Math.max(0,f-500),f);var l=f.lastIndexOf(">");if(f=(0<=l?f.substring(l+1):f).replace(/<[^>]*>/g,
|
|
256
|
-
"domqGLG",l.textContent=f,h.key&&l.setAttribute("data-comment-key",h.key.trim()),c.push(l)});return[...b,...c]},extractJSContent:function(a){return a.split("\n").filter(b=>/\/\/\s*domqGLG/.test(b))},processdomqGLGElements:function(a){const b=[];a.forEach((c,d)=>{const e=g=>{var h="title value placeholder alt aria-label content".split(" ");for(let f of g.attributes){const l=f.name,k=f.value.trim();h.includes(l)&&k&&
|
|
257
|
-
b.push(h);for(let f of g.children)e(f)};e(c)});return b}}},_dlanguageTranslateHelper:function(){return{replaceStringsInCode:function(a,b){function c(l){if("string"!==typeof l)return null;l=l.trim();try{return JSON.parse(l)}catch(k){try{return JSON.parse("["+l+"]")}catch(m){try{return JSON.parse("["+l+"]")}catch(n){return null}}}}function d(l,k){if(Array.isArray(l))return l.map(m=>d(m,k));if(l&&"object"===typeof l){const m=
|
|
258
|
-
typeof l?k:l}a=a.split("\n");let e=0;for(let l=0;l<a.length;l++){const k=a[l];if(/\/\/\s*domqGLG/.test(k)){if(e>=b.length)break;var g=b[e],h=k.match(/^\s*([\[\{].+?[\]\}])\s*,?\s*\/\/\s*domqGLG/);if(h){h=h[1].trim();var f=c(h);if(null!==f){g=d(f,g);g=JSON.stringify(g);a[l]=k.replace(h,g);e++;continue}}if(h=k.match(/^\s*"[^"]+":\s*(.+?)\s*,?\s*\/\/\s*domqGLG/))if(h=h[1].trim().replace(/,\s*$/,""),f=c(h),null!==f){g=
|
|
259
|
-
h[1].trim().replace(/[;,]\s*$/,""),h.startsWith("[")||h.startsWith("{")){if(f=c(h),null!==f){g=d(f,g);g=JSON.stringify(g);a[l]=k.replace(h,g);e++;continue}}else{h=h.replace(/^["'`]|["'`]$/g,"");a[l]=k.replace(h,g);e++;continue}h=[...k.matchAll(/(["'`])((?:[^\\]|\\.)*?)\1/g)];for(const m of h)if(h=m[1],m[2].replace(/\\(.)/g,"$1").trim()){f=g.replace(/\\/g,"\\\\").replace(new RegExp(h,
|
|
260
|
-
g),e++}}return a.join("\n")}}},_extractCreateModal:function(a){a=a||"Multilingual Text Extraction";const b=document.createElement("div");b.id="domquery-dlanguage-modal";b.style.cssText="\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbackground: rgba(0, 0, 0, 0.5);\n\t\t\t\tdisplay: none;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tz-index: 10000;\n\t\t\t";
|
|
261
|
-
"\n\t\t\t\tbackground: white;\n\t\t\t\tpadding: 30px;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tbox-shadow: 0 4px 20px rgba(0,0,0,0.3);\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 420px;\n\t\t\t\tmin-width: 220px;\n\t\t\t\tmax-height: 80vh;\n\t\t\t\tmargin: 0 20px;\n\t\t\t\toverflow-y: auto;\n\t\t\t";var d=document.createElement("style");d.textContent="\n\t\t\t\t#domquery-dlanguage-modal-header {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\twhite-space: nowrap;\n\t\t\t\t}\n\t\t\t";
|
|
248
|
+
e.remove())}),c.querySelectorAll(".video-wrapper").forEach(d=>{for(;d.firstChild;){const f=d.firstChild;if("IFRAME"===f.tagName){var e=f.getAttribute("style")||"",g=e.match(/width:\s([\d.]+[%px])/);e=e.match(/height:\s([\d.]+[%px])/);if(g&&e){g=g[1];g=-1!==g.indexOf("%")?g:parseFloat(g)/contentArea.clientWidth*100+"%";var h=g;e=e[1];if(-1!==h.indexOf("%")){h=parseFloat(h);const l=contentArea.clientWidth;e=parseFloat(e)/(h/100*l)*100+"%"}g=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,
|
|
249
|
+
">").replace(/"/g,""").replace(/'/g,"'");e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");f.setAttribute("width",g);f.setAttribute("height",e)}f.removeAttribute("style");f.hasAttribute("src")&&((g=f.getAttribute("src"))&&g.toLowerCase().trim().startsWith("javascript:")?f.removeAttribute("src"):g&&g.toLowerCase().trim().startsWith("data:")&&!g.toLowerCase().includes("data:image/")&&f.removeAttribute("src"));f.setAttribute("sandbox",
|
|
250
|
+
"allow-same-origin allow-scripts")}d.parentNode.insertBefore(f,d)}d.remove()}),c.querySelectorAll(".resizable-image").forEach(d=>{const e=d.querySelector("img");if(e){if(e.hasAttribute("src")){const g=e.getAttribute("src");g&&g.toLowerCase().trim().startsWith("javascript:")?e.removeAttribute("src"):g&&g.toLowerCase().trim().startsWith("data:")&&!g.toLowerCase().includes("data:image/")&&e.removeAttribute("src")}d.parentNode.insertBefore(e,d)}d.remove()}),c.querySelectorAll('div[class*="table-"][class*="tea24874"]').forEach(d=>
|
|
251
|
+
{var e=d.className.split(" ").filter(g=>!g.startsWith("table-")&&"tea24874"!==g);0===e.length?((e=d.querySelector("table"))&&d.parentNode.insertBefore(e,d),d.remove()):d.className=e.join(" ").trim()}),c.querySelectorAll("table[data-symbol-type]").forEach(d=>{d.removeAttribute("data-symbol-type")}),c.querySelectorAll("[data-symbol-type]").forEach(d=>{d.removeAttribute("data-symbol-type")}),c.querySelectorAll('[id^="symbol-"]').forEach(d=>{d.removeAttribute("id")}),c.querySelectorAll("*").forEach(d=>
|
|
252
|
+
{Array.from(d.attributes).forEach(e=>{e.name.toLowerCase().startsWith("on")&&d.removeAttribute(e.name)})}),c.querySelectorAll("script").forEach(d=>{d.remove()}),c.querySelectorAll("object, embed, applet").forEach(d=>{d.remove()}),b=c.innerHTML,b=b.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<script/gi,"<script").replace(/<\/script/gi,"</script").replace(/on\w+="[^"]*"/gi,"").replace(/on\w+='[^']*'/gi,"").replace(/on\w+=\w+/gi,"").replace(/javascript:[^\s"']+/gi,
|
|
253
|
+
"").replace(/<object/gi,"<object").replace(/<embed/gi,"<embed").replace(/<applet/gi,"<applet").replace(/<base/gi,"<base"),b=b.replace(/&#x/gi,"&#x").replace(/�/gi,"&#0").replace(/&#/gi,"&#"),b=b.replace(/eval\s*\(/gi,"eval(").replace(/setTimeout\s*\(/gi,"setTimeout(").replace(/setInterval\s*\(/gi,"setInterval(").replace(/Function\s*\(/gi,"Function(").replace(/alert\s*\(/gi,"alert(").replace(/confirm\s*\(/gi,"confirm(").replace(/prompt\s*\(/gi,"prompt(").replace(/document\.cookie/gi,
|
|
254
|
+
"document.cookie").replace(/document\.domain/gi,"document.domain").replace(/document\.location/gi,"document.location").replace(/document\.write/gi,"document.write").replace(/document\.URL/gi,"document.URL").replace(/window\.location/gi,"window.location").replace(/location\./gi,"location.").replace(/fetch\s*\(/gi,"fetch("))})();return b?b:null}return null},executeCommand:function(a,b=null){return this.each(function(){this.webEditorInstance&&this.webEditorInstance.executeCommand(a,
|
|
255
|
+
b)})},_dlanguageExtractHelper:function(){return{extractHTMLContent:function(a){var b=document.createElement("div");b.innerHTML=a;b=b.querySelectorAll(".domqGLG");const c=[],d=/\x3c!--\s*domqGLG(?:_([^\s]+?))?\s*--\x3e/gi;let e=[],g;for(;null!==(g=d.exec(a));)e.push({index:g.index,fullMatch:g[0],key:g[1]||null,commentStart:g.index,commentEnd:g.index+g[0].length});e.forEach(h=>{var f=h.commentStart;f=a.substring(Math.max(0,f-500),f);var l=f.lastIndexOf(">");if(f=(0<=l?f.substring(l+1):f).replace(/<[^>]*>/g,
|
|
256
|
+
"").trim().replace(/\s+/g," ").trim())l=document.createElement("span"),l.className="domqGLG",l.textContent=f,h.key&&l.setAttribute("data-comment-key",h.key.trim()),c.push(l)});return[...b,...c]},extractJSContent:function(a){return a.split("\n").filter(b=>/\/\/\s*domqGLG/.test(b))},processdomqGLGElements:function(a){const b=[];a.forEach((c,d)=>{const e=g=>{var h="title value placeholder alt aria-label content".split(" ");for(let f of g.attributes){const l=f.name,k=f.value.trim();h.includes(l)&&k&&
|
|
257
|
+
b.push(k)}for(let f of g.childNodes)f.nodeType===Node.TEXT_NODE&&(h=f.nodeValue.trim())&&b.push(h);for(let f of g.children)e(f)};e(c)});return b}}},_dlanguageTranslateHelper:function(){return{replaceStringsInCode:function(a,b){function c(l){if("string"!==typeof l)return null;l=l.trim();try{return JSON.parse(l)}catch(k){try{return JSON.parse("["+l+"]")}catch(m){try{return JSON.parse("["+l+"]")}catch(n){return null}}}}function d(l,k){if(Array.isArray(l))return l.map(m=>d(m,k));if(l&&"object"===typeof l){const m=
|
|
258
|
+
{};for(const n in l)l.hasOwnProperty(n)&&(m[n]=d(l[n],k));return m}return"string"===typeof l?k:l}a=a.split("\n");let e=0;for(let l=0;l<a.length;l++){const k=a[l];if(/\/\/\s*domqGLG/.test(k)){if(e>=b.length)break;var g=b[e],h=k.match(/^\s*([\[\{].+?[\]\}])\s*,?\s*\/\/\s*domqGLG/);if(h){h=h[1].trim();var f=c(h);if(null!==f){g=d(f,g);g=JSON.stringify(g);a[l]=k.replace(h,g);e++;continue}}if(h=k.match(/^\s*"[^"]+":\s*(.+?)\s*,?\s*\/\/\s*domqGLG/))if(h=h[1].trim().replace(/,\s*$/,""),f=c(h),null!==f){g=
|
|
259
|
+
d(f,g);g=JSON.stringify(g);a[l]=k.replace(h,g);e++;continue}if(h=k.match(/=\s*(.+?)\s*[;,]?\s*\/\/\s*domqGLG/))if(h=h[1].trim().replace(/[;,]\s*$/,""),h.startsWith("[")||h.startsWith("{")){if(f=c(h),null!==f){g=d(f,g);g=JSON.stringify(g);a[l]=k.replace(h,g);e++;continue}}else{h=h.replace(/^["'`]|["'`]$/g,"");a[l]=k.replace(h,g);e++;continue}h=[...k.matchAll(/(["'`])((?:[^\\]|\\.)*?)\1/g)];for(const m of h)if(h=m[1],m[2].replace(/\\(.)/g,"$1").trim()){f=g.replace(/\\/g,"\\\\").replace(new RegExp(h,
|
|
260
|
+
"g"),"\\"+h);a[l]=k.replace(m[0],`${h}${f}${h}`);e++;break}if(h=k.match(/\/\/\s*(.+?)\s*\/\/\s*domqGLG/))a[l]=k.replace(h[1],g),e++}}return a.join("\n")}}},_extractCreateModal:function(a){a=a||"Multilingual Text Extraction";const b=document.createElement("div");b.id="domquery-dlanguage-modal";b.style.cssText="\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbackground: rgba(0, 0, 0, 0.5);\n\t\t\t\tdisplay: none;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tz-index: 10000;\n\t\t\t";
|
|
261
|
+
const c=document.createElement("div");c.style.cssText="\n\t\t\t\tbackground: white;\n\t\t\t\tpadding: 30px;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tbox-shadow: 0 4px 20px rgba(0,0,0,0.3);\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 420px;\n\t\t\t\tmin-width: 220px;\n\t\t\t\tmax-height: 80vh;\n\t\t\t\tmargin: 0 20px;\n\t\t\t\toverflow-y: auto;\n\t\t\t";var d=document.createElement("style");d.textContent="\n\t\t\t\t#domquery-dlanguage-modal-header {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\twhite-space: nowrap;\n\t\t\t\t}\n\t\t\t";
|
|
262
262
|
document.head.appendChild(d);d=document.createElement("div");d.style.cssText="margin-bottom: 20px;";var e=document.createElement("h2");e.textContent=a;e.style.cssText="margin: 0; color: #333;";e.id="domquery-dlanguage-modal-header";d.appendChild(e);a=document.createElement("div");a.id="domquery-extraction-items";a.style.cssText="margin-bottom: 20px;";e=(()=>{const h=document.createElement("div");h.className="domquery-extraction-item";h.style.cssText="\n\t\t\t\t\tborder: 1px solid #ddd;\n\t\t\t\t\tborder-radius: 8px;\n\t\t\t\t\tpadding: 2px;\n\t\t\t\t\tbackground:rgb(233, 229, 229);\n\t\t\t\t";
|
|
263
263
|
const f=document.createElement("div");f.style.cssText="display: flex; align-items: center; gap: 3px; flex-wrap: wrap;";const l=document.createElement("input");l.type="text";l.placeholder="e.g., test.html or test.js";l.style.cssText="\n\t\t\t\t\tflex: 1;\n\t\t\t\t\tmin-width: 120px;\n\t\t\t\t\tpadding: 8px;\n\t\t\t\t\tborder: 1px solid #ddd;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t";const k=document.createElement("button");k.textContent="Extract";k.style.cssText="\n\t\t\t\t\tbackground: #2196F3;\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tborder: none;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t";
|
|
264
264
|
k.className="domquery-extract-btn";f.appendChild(l);f.appendChild(k);h.appendChild(f);k.onclick=()=>{let m=l.value.trim();if(m){var n=null;n=m.toLowerCase().endsWith(".html")?"html":m.toLowerCase().endsWith(".js")?"js":(window.location.pathname||"").toLowerCase().endsWith(".js")?"js":"html";k.disabled=!0;k.textContent="Extracting...";window.domquery_extractSingleFile(m,n,function(r,u){k.disabled=!1;k.textContent="Extract";r||alert("Extraction failed: "+(u&&u.error?u.error:"Failed to extract file. Please check the file path and try again."))})}};
|
|
@@ -271,8 +271,8 @@ b.startsWith("[")||b.startsWith("{")?b:b.replace(/^["'`]|["'`]$/g,""));b||(d=a.m
|
|
|
271
271
|
""));let c=1===b.length?b[0]:b.join(", ");1===b.length&&(a=a.substring(0,a.indexOf("// domqGLG")).match(/['"]([^'"]+)['"]/))&&a[1]===b[0]&&(c=a[1]);return c},_extractProcessJSLine:function(a,b,c,d,e,g=null){var h=a.match(/domqGLG\s*\(\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")\s*,\s*['"]([^'"]+)['"]\s*(?:,\s*[^)]+)?\s*\)/);if(h)return a=h[1]||h[2],b=h[3],a=a.replace(/\\(.)/g,"$1"),b=`Gong_${b}`,c[b]=DomQuery.prototype._convertQuotesForExtraction.call(this,a),b;if(!a.includes("// domqGLG"))return null;
|
|
272
272
|
g||(h=a.match(/\/\/\s*domqGLG_(\w+)/))&&(g=h[1]);(h=DomQuery.prototype._extractTextFromJSLine.call(this,a))||(h=DomQuery.prototype._extractProcessHTMLArrayComment.call(this,a));if(!h)return null;a=g?`Gong_${g}`:DomQuery.prototype._extractGenerateAndRegisterKey.call(this,h,b,c,d,"Gong_",e);c[a]=DomQuery.prototype._convertQuotesForExtraction.call(this,h);return a},_extractGenerateAndRegisterKey:function(a,b,c,d,e,g){e=e||"Gong_";if(g=b.get(a))return g;g=DomQuery.prototype._extractGenerateKey.call(this,
|
|
273
273
|
a);g=e=`${e}${g}`;c.hasOwnProperty(e)?(d[e]=(d[e]||0)+1,g=`${e}_${d[e]}`):d[e]=0;b.set(a,g);return g},_extractAnalyzeDynamicElements:function(a,b,c,d,e,g){const h=this,f=[];a=a.split("\n");const l=new Map;for(let n=0;n<a.length;n++){var k=a[n].trim(),m=k.match(/(\w+)\s*=\s*document\.createElement\(['"](button|img|a)['"]\)/i);if(m)k=m[1],m=m[2].toUpperCase(),l.has(k)||l.set(k,{varName:k,tagName:m,attributes:{},textContent:null,hasDomqGLG:!1});else for(const [r,u]of l.entries())if(k.includes(r))if(k.includes(`${r}.className`)&&
|
|
274
|
-
k.includes("domqGLG"))u.hasDomqGLG=!0;else if(k.includes(`${r}.classList.add`)&&k.includes("domqGLG"))u.hasDomqGLG=!0;else if(k.includes(`${r}.setAttribute('class'`)&&k.includes("domqGLG"))u.hasDomqGLG=!0;else
|
|
275
|
-
(m=k.match(/\/\/\s*domqGLG\s+\[['"]([^'"]+)['"]\]/))
|
|
274
|
+
k.includes("domqGLG"))u.hasDomqGLG=!0;else if(k.includes(`${r}.classList.add`)&&k.includes("domqGLG"))u.hasDomqGLG=!0;else if(k.includes(`${r}.setAttribute('class'`)&&k.includes("domqGLG"))u.hasDomqGLG=!0;else{if(k.includes(`${r}.setAttribute`)&&k.includes("// domqGLG")&&(m=k.match(/\/\/\s*domqGLG\s+\[['"]([^'"]+)['"]\]/))){u.hasDomqGLG=!0;const v=k.match(/\.setAttribute\(['"](value|title|aria-label|alt)['"]/);v&&(u.attributes[v[1]]=m[1]);continue}if(k.includes(`${r}.textContent`)&&k.includes("// domqGLG")&&
|
|
275
|
+
(m=k.match(/\/\/\s*domqGLG\s+\[['"]([^'"]+)['"]\]/))){u.hasDomqGLG=!0;u.textContent=m[1];continue}k.includes("appendChild")&&k.includes(r)&&u.hasDomqGLG&&(0<Object.keys(u.attributes).length||u.textContent)&&(f.push({...u}),l.delete(r))}}for(const n of l.values())n.hasDomqGLG&&(0<Object.keys(n.attributes).length||n.textContent)&&f.push({...n});f.forEach(n=>{var r=[];"BUTTON"===n.tagName?(n.textContent&&r.push(`text:${n.textContent}`),n.attributes.value&&r.push(`value:${n.attributes.value}`),n.attributes.title&&
|
|
276
276
|
r.push(`title:${n.attributes.title}`),n.attributes["aria-label"]&&r.push(`aria-label:${n.attributes["aria-label"]}`)):"IMG"===n.tagName?(n.attributes.alt&&r.push(`alt:${n.attributes.alt}`),n.attributes.title&&r.push(`title:${n.attributes.title}`),n.attributes["aria-label"]&&r.push(`aria-label:${n.attributes["aria-label"]}`)):"A"===n.tagName&&(n.textContent&&r.push(`text:${n.textContent}`),n.attributes.title&&r.push(`title:${n.attributes.title}`),n.attributes["aria-label"]&&r.push(`aria-label:${n.attributes["aria-label"]}`));
|
|
277
277
|
if(0<r.length){r=r.join(", ");n=DomQuery.prototype._convertQuotesForExtraction.call(h,r);let u=r=`Yoon_${DomQuery.prototype._extractGenerateHTMLKey.call(h,r,e,g)}`;c.hasOwnProperty(r)&&(d[r]=(d[r]||0)+1,u=`${r}_${d[r]}`);r=u;c[r]=n;b.set(n,r);e++}});return e},_extractDownloadJSON:function(a,b,c){var d=JSON.stringify(a,null,2);b=`${b.split("/").pop().replace(`.${c}`,"").replace(/[^a-zA-Z0-9]/g,"_")}.${c}.json`;d=new Blob([d],{type:"application/json"});d=URL.createObjectURL(d);c=document.createElement("a");
|
|
278
278
|
c.href=d;c.download=b;c.click();URL.revokeObjectURL(d);return{data:a,fileName:b}},_extractProcessHTML:function(a,b,c,d){const e=this,g={},h=new Map,f={},l=new Map,k=[],m=(q,x,y,z)=>{if(l.has(q)){const A=l.get(q);console.warn(`\u26a0\ufe0f \uc911\ubcf5\ub41c \uace0\uc720\uac12 \ubc1c\uacac: "${q}" (${x})\n`+` \uc774\uc804 \uc704\uce58: ${c}:${A.lineNumber}\uc904\n`+` \ud604\uc7ac \uc704\uce58: ${c}:${y}\uc904\n`+` \ucee8\ud14d\uc2a4\ud2b8: ${z}`);k.push({uniqueValue:q,keyType:x,previousLine:A.lineNumber,
|
|
@@ -298,46 +298,46 @@ _decryptDecryptChunk:async function(a,b){try{if("function"===typeof window.decry
|
|
|
298
298
|
b),a}},_decryptFetchLicense:async function(){try{const a=await fetch("Dlicense/license.key");return a.ok?await a.text():null}catch(a){return console.warn("\ub77c\uc774\uc13c\uc2a4 \ud0a4 fetch \uc2e4\ud328:",a),null}},_decryptParseLicense:function(a){return(a=a.match(/-----BEGIN PRIVATE KEY-----\n([\s\S]+)\n-----END PRIVATE KEY-----/))?(a=a[1].replace(/\n/g,""),a=decodeURIComponent(escape(atob(a))),a=JSON.parse(a),a.info||a):null},_decryptCalculateSeed:function(a){const b=a.getMonth()+1,c=a.getDate(),
|
|
299
299
|
d=a.getHours(),e=a.getMinutes();a=a.getSeconds();return(17*(1E6*b+1E4*c+100*d+e)+31*(100*(60*d+e)+a))%1E7},_decryptCalculateOrder:function(a,b){const c=[],d=new Set;for(let g=0;g<b;g++){let h;var e=0;do if(h=((a+17*g)%b+(3*a+7*g+1)%b*2)%b,a=(5*a+11*g+1)%1E7,e++,200<e){for(e=0;e<b;e++)if(!d.has(e)){h=e;break}break}while(d.has(h));c[g]=h;d.add(h)}return c},_decryptRestoreKeyParts:function(a,b){const c=Array(5);for(let d=0;d<b.length;d++)c[b[d]]=a[d];return c},_decryptValidateKeyHash:function(a,b){if("undefined"===
|
|
300
300
|
typeof secureSHA256)throw Error("secureSHA256 \ud568\uc218\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c SHA256.js\ub97c \uba3c\uc800 \ub85c\ub4dc\ud574\uc8fc\uc138\uc694.");if(secureSHA256(a)!==b)throw Error("\ubcf5\ud638\ud654 \ud0a4 \ud574\uc2dc\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ub77c\uc774\uc13c\uc2a4 \ud0a4\uac00 \ubcc0\uc870\ub418\uc5c8\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \ub77c\uc774\uc13c\uc2a4 \ud0a4\ub97c \uc0dd\uc131\ud574\uc8fc\uc138\uc694.");
|
|
301
|
-
},_decryptGetDecryptKey:async function(){let a=null;if(window.decryptKeyForLanguageJS)a=window.decryptKeyForLanguageJS;else try{
|
|
302
|
-
a=DomQuery.prototype._decryptRestoreKeyParts.call(this,g,e).join("");if(32!==a.length)throw Error("\ubcf5\uc6d0\ub41c \ubcf5\ud638\ud654 \ud0a4 \uae38\uc774\uac00 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.");c.decryptKeyHash&&DomQuery.prototype._decryptValidateKeyHash.call(this,a,c.decryptKeyHash);window.decryptKeyForLanguageJS=a;window._decryptKeyCleanup=!0}}}catch(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
e)}}))
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
(G="
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
n
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
1
|
|
335
|
-
|
|
336
|
-
window._domqueryStateManager.stats.
|
|
337
|
-
|
|
338
|
-
$.
|
|
339
|
-
$.
|
|
340
|
-
$.
|
|
301
|
+
},_decryptGetDecryptKey:async function(){let a=null;if(window.decryptKeyForLanguageJS)a=window.decryptKeyForLanguageJS;else try{const b=await DomQuery.prototype._decryptFetchLicense.call(this);if(b){const c=DomQuery.prototype._decryptParseLicense.call(this,b);if(c){const d=DomQuery.prototype._decryptCalculateSeed.call(this,new Date(c.createdAt)),e=DomQuery.prototype._decryptCalculateOrder.call(this,d,5),g=c.decryptKeyParts;if(!g||5!==g.length)throw Error("\ub77c\uc774\uc13c\uc2a4\uc5d0 \ubcf5\ud638\ud654 \ud0a4 \ubd80\ubd84\uc774 \uc62c\ubc14\ub974\uac8c \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. (5\uac1c \ubd80\ubd84 \ud544\uc694)");
|
|
302
|
+
a=DomQuery.prototype._decryptRestoreKeyParts.call(this,g,e).join("");if(32!==a.length)throw Error("\ubcf5\uc6d0\ub41c \ubcf5\ud638\ud654 \ud0a4 \uae38\uc774\uac00 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.");c.decryptKeyHash&&DomQuery.prototype._decryptValidateKeyHash.call(this,a,c.decryptKeyHash);window.decryptKeyForLanguageJS=a;window._decryptKeyCleanup=!0}}}catch(b){console.warn("\u26a0\ufe0f \ub77c\uc774\uc13c\uc2a4 \ud0a4\uc5d0\uc11c \ubcf5\ud638\ud654 \ud0a4\ub97c \uac00\uc838\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4:",
|
|
303
|
+
b)}if(!a)throw Error("\ubcf5\ud638\ud654 \ud0a4\ub97c \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub77c\uc774\uc13c\uc2a4 \ud0a4\ub97c \ud655\uc778\ud558\uac70\ub098 PHP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uc138\uc694.");return a},_decryptFetchEncryptedScript:async function(a){a=await fetch(a);if(!a.ok)throw Error(`\ud30c\uc77c \ub2e4\uc6b4\ub85c\ub4dc \uc2e4\ud328: ${a.status} ${a.statusText}`);return await a.arrayBuffer()},_decryptParseBinaryHeader:function(a){const b=new DataView(a);
|
|
304
|
+
a=new Uint8Array(a);let c=0;var d=a.slice(c,c+32);(new TextDecoder).decode(d).replace(/\0/g,"");c+=32;d=b.getUint32(c,!0);c+=4;var e=a.slice(c,c+d);(new TextDecoder).decode(e);c+=d;d=Number(b.getBigUint64(c,!0));c+=8;b.getBigUint64(c,!0);c+=8;e=b.getUint32(c,!0);c+=4;const g=b.getUint32(c,!0);c+=4;const h=[];for(let f=0;f<g;f++){const l=b.getUint32(c,!0);h.push(l);c+=4}return{offset:c,originalSize:d,storedChunkSize:e,storedTotalChunks:g,chunkSizes:h,uint8View:a}},_decryptDecryptChunks:async function(a,
|
|
305
|
+
b,c){const d=this,e=Array(a.length);c=[];for(let h=0;h<a.length;h++){const f=a[h];var g=(async()=>{try{const l=await DomQuery.prototype._decryptDecryptChunk.call(d,f,b);return{index:h,data:l}}catch(l){throw console.error(`\uccad\ud06c ${h+1} AES \ubcf5\ud638\ud654 \uc2e4\ud328:`,l),Error(`\uccad\ud06c ${h+1} \ubcf5\ud638\ud654 \uc2e4\ud328: ${l.message}`);}})();c.push(g)}for(a=0;a<c.length;a+=5)g=c.slice(a,a+5),(await Promise.all(g)).forEach(h=>{e[h.index]=h.data});return e},_decryptCombineChunks:function(a,
|
|
306
|
+
b,c){let d=new Uint8Array(b),e=0;for(let g=0;g<a.length;g++){const h=a[g],f=g===a.length-1?b-e:c;for(let l=0;l<f&&l<h.length;l++)d[e+l]=h.charCodeAt(l);e+=f}return d},_decryptDecodeText:function(a){a=(new TextDecoder("utf-8")).decode(a);try{65279===a.charCodeAt(0)&&(a=a.substring(1)),a=a.replace(/\0/g,""),a=a.trim()}catch(b){}return a},_decryptExecuteScript:async function(a){const b=document.createElement("script");b.textContent=a;b.textContent=a;document.head.appendChild(b);a=!1;const c=Date.now();
|
|
307
|
+
for(;!a&&3E3>Date.now()-c;){if("function"===typeof window.domquery_applyHTMLTranslation&&"function"===typeof window.domquery_applyJSTranslation&&"function"===typeof window.domquery_extractSingleFile){a=!0;break}await new Promise(d=>setTimeout(d,50))}a||console.warn("\u26a0\ufe0f language.js \uc804\uc5ed \ud568\uc218 \ub4f1\ub85d \ud655\uc778 \uc2e4\ud328 (\ud0c0\uc784\uc544\uc6c3), \uacc4\uc18d \uc9c4\ud589...");return b},_decryptCleanupKey:function(){window._decryptKeyCleanup&&window.decryptKeyForLanguageJS&&
|
|
308
|
+
setTimeout(()=>{try{window.decryptKeyForLanguageJS=null,delete window.decryptKeyForLanguageJS,delete window._decryptKeyCleanup}catch(a){console.warn("\ubcf5\ud638\ud654 \ud0a4 \uc81c\uac70 \uc911 \uc624\ub958:",a)}},1E3)},_decryptLoadAndRunScript:async function(a,b){let c=null;try{const e=await DomQuery.prototype._decryptGetDecryptKey.call(this);var d=await DomQuery.prototype._decryptFetchEncryptedScript.call(this,a);const g=await DomQuery.prototype._decryptDecompressGzip.call(this,d),h=DomQuery.prototype._decryptParseBinaryHeader.call(this,
|
|
309
|
+
g);await DomQuery.prototype._decryptLoadAESJS.call(this);a=[];let f=h.offset;for(d=0;d<h.storedTotalChunks;d++){const n=h.chunkSizes[d],r=h.uint8View.slice(f,f+n);f+=n;const u=(new TextDecoder).decode(r);a.push(u)}const l=await DomQuery.prototype._decryptDecryptChunks.call(this,a,e,h.chunkSizes),k=DomQuery.prototype._decryptCombineChunks.call(this,l,h.originalSize,h.storedChunkSize),m=DomQuery.prototype._decryptDecodeText.call(this,k);c=await DomQuery.prototype._decryptExecuteScript.call(this,m);
|
|
310
|
+
DomQuery.prototype._decryptCleanupKey.call(this);c&&c.parentNode&&c.parentNode.removeChild(c);c=null;b&&b(null)}catch(e){console.error("\u274c language.js.zip \ub85c\ub4dc \uc2e4\ud328:",e);if(c&&c.parentNode)try{c.parentNode.removeChild(c)}catch(g){console.warn("\u274c \uc2a4\ud06c\ub9bd\ud2b8 \uc694\uc18c \uc81c\uac70 \uc2e4\ud328:",g)}b&&b(e)}},_decryptLoadLanguageJS:function(a){const b=window.DomQueryLanguage;b.loaded?"function"===typeof a&&a(null):b.loading?"function"===typeof a&&b.pendingCallbacks.push(a):
|
|
311
|
+
(b.loading=!0,"function"===typeof a&&b.pendingCallbacks.push(a),DomQuery.prototype._decryptLoadAndRunScript.call(this,"Dlicense/language.js.zip?v="+(window.languageVersion||"1.0.0"),function(c){c?(console.error("language.js \ub85c\ub4dc \uc2e4\ud328:",c),b.loading=!1,b.pendingCallbacks.forEach(d=>{try{d(c)}catch(e){console.error("\ucf5c\ubc31 \uc2e4\ud589 \uc911 \uc624\ub958:",e)}})):(b.loaded=!0,b.loading=!1,b.pendingCallbacks.forEach(d=>{try{d(null)}catch(e){console.error("\ucf5c\ubc31 \uc2e4\ud589 \uc911 \uc624\ub958:",
|
|
312
|
+
e)}}));b.pendingCallbacks=[]}))},insertAdjacentHTML:function(a,b,c){if(!["beforebegin","afterbegin","beforeend","afterend"].includes(a))return console.error("Invalid position. Use 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."),this;this.each(function(){this.insertAdjacentHTML(a,b)});"function"===typeof c&&c.call(this);return this},unique:function(a){return Array.isArray(a)?0<a.length&&a[0]instanceof Element?a.filter((b,c,d)=>d.findIndex(e=>e===b)===c):[...(new Set(a))]:(console.error("Input must be an array"),
|
|
313
|
+
[])},trim:function(a,b){return"string"!==typeof a?a:void 0===b?a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):a.replace(new RegExp(`^[${b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]+|[${b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]+$`,"g"),"")},_detectDeviceInfo:function(a){if(DomQuery.prototype._deviceInfoCache&&!a)return DomQuery.prototype._deviceInfoCache;try{a=navigator;var b=a.userAgent,c=b.toLowerCase(),d=window.innerWidth||screen.width||0,e=window.innerHeight||screen.height||0,g=window.devicePixelRatio||
|
|
314
|
+
1,h=0<a.maxTouchPoints||"ontouchstart"in window,f=(a.vendor||"").toLowerCase(),l="unknown",k=!1,m=!1,n=!1,r=!1,u=!1;/\bCrOS\b/i.test(c)?(l="chromeos",u=!0):/macintosh/i.test(c)?500>d&&1E3>e||1E3>d&&500>e||(600>d||600>e)&&450>d?(l="ios",k=!0):h&&1<a.maxTouchPoints?(l="ios",k=!0):(l="macos",n=!0):/iphone|ipod/i.test(c)?(l="ios",k=!0):/ipad/i.test(c)?(l="ios",k=!0):/android/i.test(c)?(l="android",m=!0):/linux/i.test(c)&&h&&!u?(l="android",m=!0):/windows|win32|win64|wow64/i.test(c)?(l="windows",r=!0):
|
|
315
|
+
/linux|x11/i.test(c)&&(l="linux");var v=!1,B=null,D=null,p={facebook:/\bfb[\w_]*\b|fbav|fb_iab|fbios|fbandroid/i,instagram:/\binstagram\b/i,twitter:/\btwitter\b/i,tiktok:/\btiktok\b|bytedancewebview/i,snapchat:/\bsnapchat\b/i,linkedin:/\blinkedin\b/i,pinterest:/\bpinterest\b/i,reddit:/\breddit\b/i,kakaotalk:/\bkakaotalk\b/i,line:/\bline\b/i,whatsapp:/\bwhatsapp\b/i,telegram:/\btelegram\b/i,wechat:/\bmicromessenger\b/i,naver:/\bnaver\b|naver\(inapp\)/i,daum:/\bdaum\b/i,samsung:/\bsamsungbrowser\b/i,
|
|
316
|
+
reactnative:/react[\s-]?native/i,flutter:/flutter/i,cordova:/cordova/i,ionic:/ionic/i};for(A in p)if(p[A].test(c)){D=A;break}if(k){var t=!(!window.webkit||!window.webkit.messageHandlers),w=!!(window.webkit||window.ReactNativeWebView||window.flutter_inappwebview||window.cordova),C=!c.includes("safari/")||c.includes("version/")&&!c.includes("mobile/");(v=t||w||null!==D||C&&!a.standalone&&!/crios|fxios|edgios|opios/i.test(c))&&(B="ios")}else if(m){var q=!!(window.Android||window.AndroidBridge||window.ReactNativeWebView||
|
|
317
|
+
window.flutter_inappwebview||window.cordova),x=/\bwv\b/i.test(c),y=/version\/[\d.]+.*?chrome/i.test(c)&&!/ chrome\/[\d.]+/i.test(c),z=c.includes("chrome/")&&x&&!/samsungbrowser|opr\/|edg\//i.test(c);(v=q||x||y||null!==D||z)&&(B="android")}var A="desktop";if(/smart-?tv|googletv|appletv|roku|tizen|webos|hbbtv/i.test(c))A="tv";else if(/playstation|xbox|nintendo|wii/i.test(c))A="console";else if(k)if(/macintosh/i.test(c)){var E=d/g;A=450>E||500>d&&1E3>e?"mobile":900>E||1E3>d&&1E3>e?"tablet":"mobile"}else/ipad/i.test(c)||
|
|
318
|
+
h&&1<a.maxTouchPoints&&/macintosh/i.test(c)?A="tablet":/iphone|ipod/i.test(c)?A="mobile":(E=d/g,450>E?A="mobile":900>E&&(A="tablet"));else if(m){var J=/mobile/i.test(c),G=/tablet/i.test(c);E=d/g;var P=Math.min(d,e)/g;J=!J||G;E=600<=E||600<=P;var I=2.1>Math.max(d,e)/Math.min(d,e);A=G||J&&E||E&&I&&3>g?"tablet":"mobile"}else if(u)A=h?"tablet":"desktop";else if(/mobile|phone/i.test(c))A="mobile";else if(h&&"desktop"===A){E=d/g;var N=Math.sqrt(d*d+e*e)/g;if(450>E||700>N)A="mobile";else if(900>E||1300>
|
|
319
|
+
N)A="tablet"}G="unknown";I="";v?G="webview":/edg(?:e|ios|a)\//i.test(c)?(G="edge",I=(c.match(/edg(?:e|ios|a)\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/opr\//i.test(c)||/opera/i.test(c)&&!/mini/i.test(c)?(G="opera",I=(c.match(/(?:opr|opera)\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/samsungbrowser/i.test(c)?(G="samsung",I=(c.match(/samsungbrowser\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/chrome|crios|crmo/i.test(c)?(G="chrome",I=(c.match(/(?:chrome|crios|crmo)\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/safari/i.test(c)&&/apple/i.test(f)?
|
|
320
|
+
(G="safari",I=(c.match(/version\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/firefox|fxios/i.test(c)?(G="firefox",I=(c.match(/(?:firefox|fxios)\/(\d+(?:\.\d+)?)/i)||[])[1]||""):/trident|msie/i.test(c)&&(G="ie",I=(c.match(/(?:msie |rv:)(\d+(?:\.\d+)?)/i)||[])[1]||"");DomQuery.prototype._deviceInfoCache={platform:l,deviceType:A,browser:G,browserVersion:I,isIOS:k,isAndroid:m,isMacOS:n,isWindows:r,isChromeOS:u,isPC:("windows"===l||"macos"===l||"linux"===l||"chromeos"===l)&&"desktop"===A,isMobile:"mobile"===A,isTablet:"tablet"===
|
|
321
|
+
A,isDesktop:"desktop"===A,isTV:"tv"===A,isConsole:"console"===A,isWebView:v,webViewType:B,inAppBrowser:D,isSafari:"safari"===G,isChrome:"chrome"===G,isFirefox:"firefox"===G,isEdge:"edge"===G,isSamsungBrowser:"samsung"===G,userAgent:b,screenWidth:d,screenHeight:e,pixelRatio:g,hasTouch:h,orientation:d&&e?d>e?"landscape":"portrait":null,maxTouchPoints:a.maxTouchPoints||0,isIPad:/ipad/i.test(c)||k&&"tablet"===A,isIPadOS13Plus:/macintosh/i.test(c)&&k,isStandalone:!!a.standalone};return DomQuery.prototype._deviceInfoCache}catch(O){return console.error("Device detection error:",
|
|
322
|
+
O),DomQuery.prototype._deviceInfoCache={platform:"unknown",deviceType:"desktop",browser:"unknown",browserVersion:"",isIOS:!1,isAndroid:!1,isMacOS:!1,isWindows:!1,isChromeOS:!1,isPC:!0,isMobile:!1,isTablet:!1,isDesktop:!0,isTV:!1,isConsole:!1,isWebView:!1,webViewType:null,inAppBrowser:null,isSafari:!1,isChrome:!1,isFirefox:!1,isEdge:!1,isSamsungBrowser:!1,userAgent:navigator&&navigator.userAgent||"",screenWidth:0,screenHeight:0,pixelRatio:1,hasTouch:!1,orientation:null,maxTouchPoints:0,isIPad:!1,isIPadOS13Plus:!1,
|
|
323
|
+
isStandalone:!1,_error:O.message},DomQuery.prototype._deviceInfoCache}},_handlePanelCloseWithTarget:function(a){const b="gong_tea_yun_"+a.key,c=window._domqueryStateManager.histories.get(b);var d="gong_tea_yun_"+a.options.target.replace(/[^a-zA-Z0-9_]/g,"");const e=window._domqueryStateManager.histories.get(d);if(c&&e)if(window._domqueryStateManager.closingStates.get(b))history.forward();else{var g=e.preventBack;e.preventBack=!0;window._domqueryStateManager.closingStates.set(b,!0);if("function"===
|
|
324
|
+
typeof a.options.onCloseStart)a.options.onCloseStart(c.count);var h=!1;d=function(){if(!h){h=!0;c.count=Math.max(0,c.count-1);var f=window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length-1];f&&f.key===a.key&&window._domqueryStateManager.registrationOrder.pop();0>=c.count&&(c.isActive=!1,window._domqueryStateManager.activeHistories.delete(b));window._domqueryStateManager.closingStates.delete(b);e.preventBack=g;window._domqueryStateManager.doneCallbackTime=
|
|
325
|
+
Date.now()}};if("function"===typeof a.options.onCloseEnd)a.options.onCloseEnd(c.count,d);else d()}},_historyOn:function(a,b,c,d,e){let g="default_history_key",h=null;var f=null;let l=!1,k=null;"string"===typeof a?(g=a,h="function"===typeof b?b:null,l="boolean"===typeof c?c:!1,f="function"===typeof d?d:"function"===typeof c?c:null,k=e&&"object"===typeof e?e:null):"function"===typeof a?(h=a,l="boolean"===typeof b?b:!1,f="function"===typeof c?c:null,k=d&&"object"===typeof d?d:null):"boolean"===typeof a&&
|
|
326
|
+
(l=a);window.popstateHandlerRegistered||(window.addEventListener("popstate",function(m){if(window._domqueryStateManager.isButtonBack)window._domqueryStateManager.isButtonBack=!1;else{var n=Date.now();if(!(window._domqueryStateManager.doneCallbackTime&&100>n-window._domqueryStateManager.doneCallbackTime||100>n-window._domqueryStateManager.lastPopstateTime)){window._domqueryStateManager.lastPopstateTime=n;if(m.state&&m.state.key&&(n=window._domqueryStateManager.histories.get(m.state.key))&&(!n.isActive||
|
|
327
|
+
n.count<m.state.count)){n.count=m.state.count;n.isActive=!0;window._domqueryStateManager.activeHistories.add(m.state.key);window._domqueryStateManager.registrationOrder.push({key:m.state.key.replace("gong_tea_yun_",""),preventBack:m.state.preventBack,options:m.state.hasOptions?n.options:null,onBackCallback:n.finalOnBackCallback});n.onCallback?.(n.count);return}if(n=window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length-1])if(n.options&&n.options.target)DomQuery.prototype._handlePanelCloseWithTarget.call({},
|
|
328
|
+
n);else{var r="gong_tea_yun_"+n.key,u=window._domqueryStateManager.histories.get(r);if(u&&!u.preventBack){if(u.count=Math.max(0,u.count-1),window._domqueryStateManager.registrationOrder.pop(),0>=u.count&&(u.isActive=!1,window._domqueryStateManager.activeHistories.delete(r)),u.callback?.(u.count),u.finalOnBackCallback?.(u.count),n.onBackCallback&&n.onBackCallback!==u.finalOnBackCallback)n.onBackCallback(u.count)}else{r=null;for(const [,v]of window._domqueryStateManager.histories)if(v.isActive&&v.preventBack&&
|
|
329
|
+
0<v.count){r=v;break}if(r){r.finalOnBackCallback?.(r.count);if(n.onBackCallback&&n.onBackCallback!==r.finalOnBackCallback)n.onBackCallback(r.count);(!m.state||m.state&&!m.state.isBlocker)&&history.forward()}}}}}}),window.popstateHandlerRegistered=!0);window._domqueryStateManager||(window._domqueryStateManager={histories:new Map,activeHistories:new Set,stateIndex:0,registrationOrder:[],stats:{totalTrueCount:0,totalFalseCount:0},preventBackForwardCount:{},lastPopstateTime:0,isButtonBack:!1,closingStates:new Map,
|
|
330
|
+
pendingPreventBackReset:new Map,doneCallbackTime:0});g="gong_tea_yun_"+g.replace(/[^a-zA-Z0-9_]/g,"");window._domqueryStateManager.histories.has(g)||window._domqueryStateManager.histories.set(g,{count:0,trueCount:0,falseCount:0,callback:h,onCallback:h,finalOnBackCallback:f,isMinusCall:!1,isActive:!1,lastStateIndex:-1,preventBack:l,options:k});a=window._domqueryStateManager.histories.get(g);a.callback=h;a.onCallback=h;a.finalOnBackCallback=f;a.isActive=!0;a.preventBack=l;a.options=k;window._domqueryStateManager.activeHistories.add(g);
|
|
331
|
+
window._domqueryStateManager.registrationOrder.push({key:g.replace("gong_tea_yun_",""),preventBack:l,options:k,onBackCallback:f});window._domqueryStateManager.stateIndex++;f=a.count+1;a.count=f;a.lastStateIndex=window._domqueryStateManager.stateIndex;l?(a.trueCount++,window._domqueryStateManager.stats.totalTrueCount++):(a.falseCount++,window._domqueryStateManager.stats.totalFalseCount++);try{history.pushState({key:g,count:f,stateIndex:window._domqueryStateManager.stateIndex,preventBack:l,hasOptions:!!k,
|
|
332
|
+
targetKey:k?.target},""),"function"===typeof h&&h(f)}catch(m){console.error("History state update failed:",m)}return f},_historyOff:function(a,b,c){let d="default_history_key",e=null;c=void 0!==c?c:100;void 0!==a&&null!==a&&("function"===typeof a?e=a:d="function"===typeof a.toString?a.toString():"default_history_key");"function"===typeof b&&(e=b);d="gong_tea_yun_"+d.replace(/[^a-zA-Z0-9_]/g,"");a=()=>{if(!window._domqueryStateManager)return window.history.back(),"function"===typeof e&&e(0,0),0;var g=
|
|
333
|
+
d.replace("gong_tea_yun_",""),h=null,f=-1;for(var l=window._domqueryStateManager.registrationOrder.length-1;0<=l;l--)if(window._domqueryStateManager.registrationOrder[l].key===g){h=window._domqueryStateManager.registrationOrder[l];f=l;break}l=window._domqueryStateManager.registrationOrder[window._domqueryStateManager.registrationOrder.length-1];if(!h)return"function"===typeof e&&e(0,0),0;h=f===window._domqueryStateManager.registrationOrder.length-1;if(!h)window._domqueryStateManager.registrationOrder.splice(f,
|
|
334
|
+
1);else if(l&&g!==l.key)return"function"===typeof e&&e(0,0),0;window._domqueryStateManager.isButtonBack=!0;g=window._domqueryStateManager.histories.get(d);if(!g||0>=g.count||!g.isActive){window._domqueryStateManager.activeHistories.delete(d);g&&(g.isActive=!1,g.count=0);var k=0;g=!1;for(var [,m]of window._domqueryStateManager.histories)m.isActive&&0<m.count&&(k+=m.count,m.preventBack&&(g=!0));"function"===typeof e&&e(0,k);0!==k||g||window.history.go(-1);return 0}m=d.replace("gong_tea_yun_","");if(h)for(f=
|
|
335
|
+
window._domqueryStateManager.registrationOrder.length-1;0<=f;f--)if(window._domqueryStateManager.registrationOrder[f].key===m){window._domqueryStateManager.registrationOrder.splice(f,1);break}m=g.count-1;g.count=m;g.isMinusCall=!0;g.preventBack?(g.trueCount=Math.max(0,g.trueCount-1),window._domqueryStateManager.stats.totalTrueCount=Math.max(0,window._domqueryStateManager.stats.totalTrueCount-1)):(g.falseCount=Math.max(0,g.falseCount-1),window._domqueryStateManager.stats.totalFalseCount=Math.max(0,
|
|
336
|
+
window._domqueryStateManager.stats.totalFalseCount-1));if(0>=m){g.isActive=!1;window._domqueryStateManager.activeHistories.delete(d);k=0;f=!1;h=[];for(let [n,r]of window._domqueryStateManager.histories)r.isActive&&0<r.count&&(k+=r.count,r.preventBack&&(f=!0),h.push({key:n,count:r.count,preventBack:r.preventBack}));"function"===typeof e&&e(m,k);g.preventBack?(h.forEach(n=>{history.pushState({key:n.key,count:n.count,preventBack:n.preventBack,restack:!0},"")}),window.history.go(-(h.length+1))):0!==k||
|
|
337
|
+
f?window.history.back():window.history.go(-1)}else{g=0;for([,k]of window._domqueryStateManager.histories)k.isActive&&0<k.count&&(g+=k.count);"function"===typeof e&&e(m,g);window.history.back()}return m};if(0>=c)return a();setTimeout(a,c);return-1}};const $=function(a,b){return new DomQuery(a,b)};var $domquery=$,domQuery=DomQuery,domquery=DomQuery;$.trim=DomQuery.prototype.trim;domQuery.trim=$.trim;$.fn=DomQuery.prototype;DomQuery.fn=DomQuery.prototype;domquery.fn=DomQuery.prototype;$.param=DomQuery.prototype.param;
|
|
338
|
+
$.unique=DomQuery.prototype.unique;domQuery.unique=$.unique;$.easing=DomQuery.prototype.easing={};$.shadow=DomQuery.prototype.shadow;$.scaleArr=DomQuery.prototype.scaleArr;$.aBox=DomQuery.prototype.aBox;$.anieasing=DomQuery.prototype.anieasing;$._anieasing=DomQuery.prototype._anieasing;$.show=DomQuery.prototype.show;$.hide=DomQuery.prototype.hide;$.fadeIn=DomQuery.prototype.fadeIn;$.fadeOut=DomQuery.prototype.fadeOut;$.fadeTo=DomQuery.prototype.fadeTo;$.delay=DomQuery.prototype.delay;$.toggle=DomQuery.prototype.toggle;
|
|
339
|
+
$.slideUp=DomQuery.prototype.slideUp;$.slideDown=DomQuery.prototype.slideDown;$.fadeToggle=DomQuery.prototype.fadeToggle;$.slideToggle=DomQuery.prototype.slideToggle;$._processDuration=DomQuery.prototype._processDuration;$._isStringSelector=DomQuery.prototype._isStringSelector;$.fn.on=DomQuery.prototype.on;$.fn.off=DomQuery.prototype.off;$.hasData=DomQuery.prototype.hasData;domQuery.hasData=$.hasData;$.queue=function(a,b,c){return $(a).queue(b,c)};$.dequeue=function(a,b){return $(a).dequeue(b)};
|
|
340
|
+
$.version="1.0.0";$.fn.version=$.version;domquery.version=$.version;$.fn.reverse=function(){this.elements.reverse();return this};let _$=window.$;$.noConflict=function(){window.$===$&&(window.$=_$);return $};
|
|
341
341
|
$.extend=function(){let a=arguments[0]||{},b=1,c=arguments.length,d=!1;"boolean"===typeof a&&(d=a,a=arguments[b]||{},b++);for("object"===typeof a||$.isFunction(a)||(a={});b<c;b++){let g=arguments[b];if(null!=g)for(let h in g){var e=a[h];let f=g[h];a!==f&&(d&&f&&($.isPlainObject(f)||$.isArray(f))?(e=e&&($.isPlainObject(e)||$.isArray(e))?e:$.isArray(f)?[]:{},a[h]=$.extend(d,e,f)):void 0!==f&&(a[h]=f))}}return a};$.fn.extend=function(a){return $.extend($.fn,a)};
|
|
342
342
|
$.isPlainObject=function(a){return"[object Object]"===Object.prototype.toString.call(a)};$.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};$.isFunction=function(a){return"function"===typeof a};const inArray=function(a,b){return b&&Array.isArray(b)?b.indexOf(a):-1};domquery.inArray=inArray;$.inArray=inArray;$.when=function(){return Promise.all(Array.from(arguments))};
|
|
343
343
|
$.parseXML=function(a){let b;if(!a||"string"!==typeof a)return null;try{b=(new window.DOMParser).parseFromString(a,"text/xml")}catch(c){b=void 0}if(!b||b.getElementsByTagName("parsererror").length)throw Error("Invalid XML: "+a);return b};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domquery-com",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A modern JavaScript library that integrates all features needed for web app development. Optimized for hybrid app/WebView environments.",
|
|
5
5
|
"main": "domquery.js",
|
|
6
6
|
"module": "domquery.js",
|