🚸 feat: add hash for built-in JS files and update JS interop imports (#2387)

This commit is contained in:
capdiem
2025-04-16 16:41:12 +08:00
committed by GitHub
parent 8c638becd8
commit 0da712c278
83 changed files with 535 additions and 471 deletions

View File

@@ -16,8 +16,7 @@
"build:drawflow": "rollup --config rollup.config.drawflow.ts",
"build:swiper": "rollup --config rollup.config.swiper.ts",
"build:xgplayer": "rollup --config rollup.config.xgplayer.ts",
"build:sortable": "rollup --config rollup.config.sortable.ts",
"build:pdfjs": "rollup --config rollup.config.pdfjs.ts"
"build:sortable": "rollup --config rollup.config.sortable.ts"
},
"author": "",
"license": "MIT",
@@ -50,9 +49,10 @@
"markdown-it-header-sections": "^1.0.0",
"markdown-it-todo": "^1.0.5",
"monaco-editor": "^0.36.1",
"pdfjs-dist": "^4.5.136",
"punycode": "^2.1.1",
"rollup": "^2.79.1",
"rollup-plugin-delete": "^2.2.0",
"rollup-plugin-output-manifest": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"sortablejs": "^1.15.2",
"swiper": "^10.2.0",

View File

@@ -101,6 +101,12 @@ importers:
rollup:
specifier: ^2.79.1
version: 2.79.2
rollup-plugin-delete:
specifier: ^2.2.0
version: 2.2.0(rollup@2.79.2)
rollup-plugin-output-manifest:
specifier: ^2.0.0
version: 2.0.0
rollup-plugin-terser:
specifier: ^7.0.2
version: 7.0.2(rollup@2.79.2)
@@ -646,6 +652,18 @@ packages:
'@microsoft/dotnet-js-interop@6.0.11':
resolution: {integrity: sha512-twOLkAiPPsopaJcl9T5QVkABoKStIu1ef7ckE00z1/ZRBD+n+78xHsynq/dEUYIzsN/Z6HqXn5Lfv6mqCDfqmA==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
'@nodelib/fs.stat@2.0.5':
resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
engines: {node: '>= 8'}
'@nodelib/fs.walk@1.2.8':
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
'@rollup/plugin-babel@6.0.4':
resolution: {integrity: sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==}
engines: {node: '>=14.0.0'}
@@ -748,6 +766,9 @@ packages:
'@types/mdurl@2.0.0':
resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==}
'@types/node@13.13.52':
resolution: {integrity: sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==}
'@types/node@18.19.64':
resolution: {integrity: sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==}
@@ -765,9 +786,17 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
aggregate-error@3.1.0:
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
engines: {node: '>=8'}
argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
array-union@2.1.0:
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
babel-plugin-polyfill-corejs2@0.4.11:
resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==}
peerDependencies:
@@ -792,9 +821,16 @@ packages:
bl@4.1.0:
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
brace-expansion@2.0.1:
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
braces@3.0.3:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
browserslist@4.24.2:
resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -816,12 +852,19 @@ packages:
chownr@1.1.4:
resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}
clean-stack@2.2.0:
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
engines: {node: '>=6'}
commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
commondir@1.0.1:
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
convert-source-map@2.0.0:
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
@@ -867,6 +910,10 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
del@6.1.1:
resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==}
engines: {node: '>=10'}
delegate@3.2.0:
resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==}
@@ -874,6 +921,10 @@ packages:
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
engines: {node: '>=8'}
dir-glob@3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'}
downloadjs@1.4.7:
resolution: {integrity: sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q==}
@@ -932,6 +983,17 @@ packages:
ext@1.7.0:
resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==}
fast-glob@3.3.3:
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
engines: {node: '>=8.6.0'}
fastq@1.19.1:
resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
fill-range@7.1.1:
resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
engines: {node: '>=8'}
fs-constants@1.0.0:
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
@@ -953,6 +1015,14 @@ packages:
github-from-package@0.0.0:
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Glob versions prior to v9 are no longer supported
glob@8.1.0:
resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
engines: {node: '>=12'}
@@ -962,6 +1032,13 @@ packages:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
globby@11.1.0:
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
engines: {node: '>=10'}
graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
gridstack@7.3.0:
resolution: {integrity: sha512-JKZgsHzm1ljkn1NnBZpf8j4NDOBCXTuw0m1ZC0sr6NKUh0BFWzXAONIxtX1hWGUVeKLj5l1VcmnTwCXw5ypDNw==}
@@ -976,6 +1053,14 @@ packages:
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
ignore@5.3.2:
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
indent-string@4.0.0:
resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}
engines: {node: '>=8'}
inflight@1.0.6:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
@@ -990,9 +1075,29 @@ packages:
resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==}
engines: {node: '>= 0.4'}
is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
is-glob@4.0.3:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
is-module@1.0.0:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
is-path-cwd@2.2.0:
resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==}
engines: {node: '>=6'}
is-path-inside@3.0.3:
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
engines: {node: '>=8'}
is-reference@1.2.1:
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
@@ -1070,6 +1175,14 @@ packages:
merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
merge2@1.4.1:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
micromatch@4.0.8:
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
engines: {node: '>=8.6'}
mimic-response@2.1.0:
resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==}
engines: {node: '>=8'}
@@ -1078,6 +1191,9 @@ packages:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
minimatch@5.1.6:
resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
engines: {node: '>=10'}
@@ -1113,9 +1229,21 @@ packages:
once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
p-map@4.0.0:
resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==}
engines: {node: '>=10'}
path-is-absolute@1.0.1:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
path2d@0.2.1:
resolution: {integrity: sha512-Fl2z/BHvkTNvkuBzYTpTuirHZg6wW9z8+4SND/3mDTEcYbbNKWAy21dz9D3ePNNwrrK8pqZO5vLPZ1hLF6T7XA==}
engines: {node: '>=6'}
@@ -1147,6 +1275,9 @@ packages:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
randombytes@2.1.0:
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
@@ -1186,6 +1317,24 @@ packages:
resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
hasBin: true
reusify@1.1.0:
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
rimraf@3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
rollup-plugin-delete@2.2.0:
resolution: {integrity: sha512-REKtDKWvjZlbrWpPvM9X/fadCs3E9I9ge27AK8G0e4bXwSLeABAAwtjiI1u3ihqZxk6mJeB2IVeSbH4DtOcw7A==}
engines: {node: '>=10'}
peerDependencies:
rollup: '*'
rollup-plugin-output-manifest@2.0.0:
resolution: {integrity: sha512-RJJ/MzM2Sj65o63qs1aIwD+AofAhdYi5Hx1Pk8/Fn6dWxbcSlficfJLNGeYJ14CPi7CHvEHwgjs23LiFS/x/Dw==}
rollup-plugin-terser@7.0.2:
resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==}
deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
@@ -1197,6 +1346,9 @@ packages:
engines: {node: '>=10.0.0'}
hasBin: true
run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@@ -1221,6 +1373,10 @@ packages:
simple-get@4.0.1:
resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==}
slash@3.0.0:
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'}
sortablejs@1.15.3:
resolution: {integrity: sha512-zdK3/kwwAK1cJgy1rwl1YtNTbRmc8qW/+vgXf75A7NHag5of4pyI6uK86ktmQETyWRH7IGaE73uZOOBcGxgqZg==}
@@ -1262,6 +1418,13 @@ packages:
engines: {node: '>=10'}
hasBin: true
to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
tslib@1.14.1:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
@@ -2017,6 +2180,18 @@ snapshots:
'@microsoft/dotnet-js-interop@6.0.11': {}
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5
run-parallel: 1.2.0
'@nodelib/fs.stat@2.0.5': {}
'@nodelib/fs.walk@1.2.8':
dependencies:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.19.1
'@rollup/plugin-babel@6.0.4(@babel/core@7.26.0)(rollup@2.79.2)':
dependencies:
'@babel/core': 7.26.0
@@ -2108,6 +2283,8 @@ snapshots:
'@types/mdurl@2.0.0': {}
'@types/node@13.13.52': {}
'@types/node@18.19.64':
dependencies:
undici-types: 5.26.5
@@ -2120,8 +2297,15 @@ snapshots:
acorn@8.14.0: {}
aggregate-error@3.1.0:
dependencies:
clean-stack: 2.2.0
indent-string: 4.0.0
argparse@2.0.1: {}
array-union@2.1.0: {}
babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.26.0):
dependencies:
'@babel/compat-data': 7.26.2
@@ -2158,10 +2342,19 @@ snapshots:
readable-stream: 3.6.2
optional: true
brace-expansion@1.1.11:
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
brace-expansion@2.0.1:
dependencies:
balanced-match: 1.0.2
braces@3.0.3:
dependencies:
fill-range: 7.1.1
browserslist@4.24.2:
dependencies:
caniuse-lite: 1.0.30001677
@@ -2189,10 +2382,14 @@ snapshots:
chownr@1.1.4:
optional: true
clean-stack@2.2.0: {}
commander@2.20.3: {}
commondir@1.0.1: {}
concat-map@0.0.1: {}
convert-source-map@2.0.0: {}
core-js-compat@3.39.0:
@@ -2231,11 +2428,26 @@ snapshots:
deepmerge@4.3.1: {}
del@6.1.1:
dependencies:
globby: 11.1.0
graceful-fs: 4.2.11
is-glob: 4.0.3
is-path-cwd: 2.2.0
is-path-inside: 3.0.3
p-map: 4.0.0
rimraf: 3.0.2
slash: 3.0.0
delegate@3.2.0: {}
detect-libc@2.0.3:
optional: true
dir-glob@3.0.1:
dependencies:
path-type: 4.0.0
downloadjs@1.4.7: {}
drawflow@0.0.59: {}
@@ -2296,6 +2508,22 @@ snapshots:
dependencies:
type: 2.7.3
fast-glob@3.3.3:
dependencies:
'@nodelib/fs.stat': 2.0.5
'@nodelib/fs.walk': 1.2.8
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.8
fastq@1.19.1:
dependencies:
reusify: 1.1.0
fill-range@7.1.1:
dependencies:
to-regex-range: 5.0.1
fs-constants@1.0.0:
optional: true
@@ -2311,6 +2539,19 @@ snapshots:
github-from-package@0.0.0:
optional: true
glob-parent@5.1.2:
dependencies:
is-glob: 4.0.3
glob@7.2.3:
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 3.1.2
once: 1.4.0
path-is-absolute: 1.0.1
glob@8.1.0:
dependencies:
fs.realpath: 1.0.0
@@ -2321,6 +2562,17 @@ snapshots:
globals@11.12.0: {}
globby@11.1.0:
dependencies:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.3.3
ignore: 5.3.2
merge2: 1.4.1
slash: 3.0.0
graceful-fs@4.2.11: {}
gridstack@7.3.0: {}
has-flag@4.0.0: {}
@@ -2332,6 +2584,10 @@ snapshots:
ieee754@1.2.1:
optional: true
ignore@5.3.2: {}
indent-string@4.0.0: {}
inflight@1.0.6:
dependencies:
once: 1.4.0
@@ -2346,8 +2602,20 @@ snapshots:
dependencies:
hasown: 2.0.2
is-extglob@2.1.1: {}
is-glob@4.0.3:
dependencies:
is-extglob: 2.1.1
is-module@1.0.0: {}
is-number@7.0.0: {}
is-path-cwd@2.2.0: {}
is-path-inside@3.0.3: {}
is-reference@1.2.1:
dependencies:
'@types/estree': 1.0.6
@@ -2415,12 +2683,23 @@ snapshots:
merge-stream@2.0.0: {}
merge2@1.4.1: {}
micromatch@4.0.8:
dependencies:
braces: 3.0.3
picomatch: 2.3.1
mimic-response@2.1.0:
optional: true
mimic-response@3.1.0:
optional: true
minimatch@3.1.2:
dependencies:
brace-expansion: 1.1.11
minimatch@5.1.6:
dependencies:
brace-expansion: 2.0.1
@@ -2454,8 +2733,16 @@ snapshots:
dependencies:
wrappy: 1.0.2
p-map@4.0.0:
dependencies:
aggregate-error: 3.1.0
path-is-absolute@1.0.1: {}
path-parse@1.0.7: {}
path-type@4.0.0: {}
path2d@0.2.1:
optional: true
@@ -2494,6 +2781,8 @@ snapshots:
punycode@2.3.1: {}
queue-microtask@1.2.3: {}
randombytes@2.1.0:
dependencies:
safe-buffer: 5.2.1
@@ -2546,6 +2835,22 @@ snapshots:
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
reusify@1.1.0: {}
rimraf@3.0.2:
dependencies:
glob: 7.2.3
rollup-plugin-delete@2.2.0(rollup@2.79.2):
dependencies:
del: 6.1.1
rollup: 2.79.2
rollup-plugin-output-manifest@2.0.0:
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
rollup-plugin-terser@7.0.2(rollup@2.79.2):
dependencies:
'@babel/code-frame': 7.26.2
@@ -2558,6 +2863,10 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
run-parallel@1.2.0:
dependencies:
queue-microtask: 1.2.3
safe-buffer@5.2.1: {}
semver@6.3.1: {}
@@ -2586,6 +2895,8 @@ snapshots:
simple-concat: 1.0.1
optional: true
slash@3.0.0: {}
sortablejs@1.15.3: {}
source-map-support@0.5.21:
@@ -2635,6 +2946,12 @@ snapshots:
commander: 2.20.3
source-map-support: 0.5.21
to-regex-range@5.0.1:
dependencies:
is-number: 7.0.0
tslib@1.14.1: {}
tslib@2.8.1: {}
tunnel-agent@0.6.0:

View File

@@ -1,4 +1,6 @@
import { defineConfig } from "rollup";
import del from "rollup-plugin-delete";
import outputManifest from "rollup-plugin-output-manifest";
import { terser } from "rollup-plugin-terser";
import resolve from "@rollup/plugin-node-resolve";
@@ -30,13 +32,27 @@ export default defineConfig({
},
output: [
{
entryFileNames: "[name]-[hash].js",
dir: "../MASA.Blazor/wwwroot/js",
format: "es",
chunkFileNames: "chunks/[name].js",
chunkFileNames: "chunks/[name]-[hash].js",
sourcemap: true,
},
],
plugins: [typescript(), resolve(), terser()],
plugins: [
typescript(),
resolve(),
terser(),
outputManifest(),
del({
targets: [
"../MASA.Blazor/wwwroot/js/components/*",
"../MASA.Blazor/wwwroot/js/mixins/*",
"../MASA.Blazor/wwwroot/js/chunks/*",
],
force: true,
}),
],
watch: {
exclude: "node_modules/**",
},

View File

@@ -1,34 +0,0 @@
import { defineConfig } from "rollup";
import { terser } from "rollup-plugin-terser";
import { getBabelOutputPlugin } from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
export default defineConfig({
input: [
"./src/proxies/pdf.js/mobile-viewer.ts",
"./src/proxies/pdf.js/pdf.worker.js",
],
output: [
{
dir: "../Masa.Blazor/wwwroot/js/proxies/pdf-mobile-viewer",
entryFileNames: "[name].js",
format: "esm",
sourcemap: true,
},
],
plugins: [
typescript(),
getBabelOutputPlugin({
presets: ["@babel/preset-env"],
}),
resolve(),
commonjs(),
terser(),
],
watch: {
exclude: "node_modules/**",
},
});

View File

@@ -1,340 +0,0 @@
import "core-js/modules/es.array.at.js";
import "core-js/modules/es.string.replace-all";
import "core-js/modules/web.structured-clone.js";
import "core-js/proposals/promise-with-resolvers";
import {
build, getDocument, GlobalWorkerOptions, InvalidPDFException, MissingPDFException,
PDFDocumentProxy, UnexpectedResponseException, version
} from "pdfjs-dist";
import * as pdfjsViewer from "pdfjs-dist/web/pdf_viewer.mjs";
const TEXT_LAYER_MODE = 0; // DISABLE
const MAX_IMAGE_SIZE = 1024 * 1024;
const DEFAULT_SCALE_VALUE = "auto";
class PDFViewerApplication {
pdfLoadingTask: any;
pdfDocument: PDFDocumentProxy;
pdfViewer: pdfjsViewer.PDFViewer;
pdfHistory: any;
pdfLinkService: any;
eventBus: any;
value: number;
l10n: pdfjsViewer.GenericL10n;
previous: HTMLElement;
next: HTMLElement;
zoomInBtn: HTMLElement;
zoomOutBtn: HTMLElement;
container: HTMLDivElement;
viewerDiv: HTMLElement;
pagination: HTMLElement;
maxCanvasPixels: number;
startDistance = 0;
_zoomIn = () => this.zoomIn();
_zoomOut = () => this.zoomOut();
_previousClick = () => this.page--;
_nextClick = () => this.page++;
_touchstart = (e: TouchEvent) => {
if (e.touches.length === 2) {
this.startDistance = getDistance(e.touches);
console.log("touchstart startDistance", this.startDistance);
e.preventDefault();
}
};
_touchmove = (e: TouchEvent) => {
if (e.touches.length === 2) {
const currentDistance = getDistance(e.touches);
if (Math.abs(currentDistance - this.startDistance) > 10) {
const scaleChange = currentDistance / this.startDistance;
this.startDistance = currentDistance;
const origin = getCenter(e.touches);
if (scaleChange > 1) {
this.zoomIn(origin);
} else {
this.zoomOut(origin);
}
}
e.preventDefault();
}
};
_wheel = (e: WheelEvent) => {
if (e.ctrlKey) {
e.preventDefault();
const origin = [e.clientX, e.clientY];
if (e.deltaY < 0) {
this.zoomIn(origin);
} else {
this.zoomOut(origin);
}
}
};
constructor(container: HTMLDivElement, maxCanvasPixels: number) {
this.container = container;
this.maxCanvasPixels = maxCanvasPixels;
this.previous = container.querySelector(".previous");
this.next = container.querySelector(".next");
this.zoomInBtn = container.querySelector(".zoomIn");
this.zoomOutBtn = container.querySelector(".zoomOut");
this.viewerDiv = this.container.firstElementChild as HTMLElement;
this.pagination = container.querySelector(".pagination");
this.pdfLoadingTask = null;
this.pdfDocument = null;
this.pdfViewer = null;
this.pdfHistory = null;
this.pdfLinkService = null;
this.eventBus = null;
this.value = 0;
}
async open(url: string) {
if (this.pdfLoadingTask) {
// We need to destroy already opened document
return this.close().then(
function () {
// ... and repeat the open() call.
return this.open(url);
}.bind(this)
);
}
const self = this;
// Loading document.
const loadingTask = getDocument({
url,
maxImageSize: MAX_IMAGE_SIZE,
});
this.pdfLoadingTask = loadingTask;
loadingTask.onProgress = function (progressData) {
self.progress(progressData.loaded / progressData.total);
};
try {
const pdfDocument = await loadingTask.promise;
this.pdfDocument = pdfDocument;
this.pdfViewer.setDocument(pdfDocument);
this.pdfLinkService.setDocument(pdfDocument);
this.pdfHistory.initialize({
fingerprint: pdfDocument.fingerprints[0],
});
// this.loadingBar.hide();
} catch (reason) {
let key = "pdfjs-loading-error";
if (reason instanceof InvalidPDFException) {
key = "pdfjs-invalid-file-error";
} else if (reason instanceof MissingPDFException) {
key = "pdfjs-missing-file-error";
} else if (reason instanceof UnexpectedResponseException) {
key = "pdfjs-unexpected-response-error";
}
self.l10n.get(key, null, null).then((msg) => {
self.error(msg, { message: reason?.message });
});
// self.loadingBar.hide();
}
}
async close() {
if (!this.pdfLoadingTask) {
return;
}
await this.pdfLoadingTask.destroy();
this.pdfLoadingTask = null;
if (this.pdfDocument) {
this.pdfDocument = null;
this.pdfViewer.setDocument(null);
this.pdfLinkService.setDocument(null, null);
if (this.pdfHistory) {
this.pdfHistory.reset();
}
}
}
// get loadingBar() {
// const bar = document.getElementById("loadingBar");
// return shadow(this, "loadingBar", new pdfjsViewer.ProgressBar(bar));
// }
error(message, moreInfo) {
const moreInfoText = [`PDF.js v${version || "?"} (build: ${build || "?"})`];
if (moreInfo) {
moreInfoText.push(`Message: ${moreInfo.message}`);
if (moreInfo.stack) {
moreInfoText.push(`Stack: ${moreInfo.stack}`);
} else {
if (moreInfo.filename) {
moreInfoText.push(`File: ${moreInfo.filename}`);
}
if (moreInfo.lineNumber) {
moreInfoText.push(`Line: ${moreInfo.lineNumber}`);
}
}
}
console.error(`${message}\n\n${moreInfoText.join("\n")}`);
}
progress(level) {
const percent = Math.round(level * 100);
// Updating the bar if value increases.
// if (percent > this.loadingBar.percent || isNaN(percent)) {
// this.loadingBar.percent = percent;
// }
}
get pagesCount() {
return this.pdfDocument.numPages;
}
get page() {
return this.pdfViewer.currentPageNumber;
}
set page(val) {
this.pdfViewer.currentPageNumber = val;
}
zoomIn(origin: any[] = null) {
this.pdfViewer.updateScale({
scaleFactor: 1.1,
origin,
});
}
zoomOut(origin: any[] = null) {
this.pdfViewer.updateScale({
scaleFactor: 0.9,
origin,
});
}
initUI() {
const eventBus = new pdfjsViewer.EventBus();
this.eventBus = eventBus;
const linkService = new pdfjsViewer.PDFLinkService({
eventBus,
});
this.pdfLinkService = linkService;
this.l10n = new pdfjsViewer.GenericL10n(null);
const pdfViewer = new pdfjsViewer.PDFViewer({
container: this.container,
eventBus,
linkService,
l10n: this.l10n,
maxCanvasPixels: this.maxCanvasPixels,
textLayerMode: TEXT_LAYER_MODE,
});
this.pdfViewer = pdfViewer;
linkService.setViewer(pdfViewer);
this.pdfHistory = new pdfjsViewer.PDFHistory({
eventBus,
linkService,
});
linkService.setHistory(this.pdfHistory);
eventBus.on("pagesinit", () => {
// We can use pdfViewer now, e.g. let's change default scale.
pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;
if (this.pagination) {
this.pagination.textContent = `${pdfViewer.currentPageNumber} / ${this.pagesCount}`;
}
});
eventBus.on(
"pagechanging",
(evt) => {
const page = evt.pageNumber;
const numPages = this.pagesCount;
if (this.pagination) {
this.pagination.textContent = `${page} / ${numPages}`;
}
},
true
);
this.container.addEventListener("touchstart", this._touchstart, {
passive: false,
});
this.container.addEventListener("touchmove", this._touchmove, {
passive: false,
});
this.viewerDiv.addEventListener("wheel", this._wheel);
this.previous &&
this.previous.addEventListener("click", this._previousClick);
this.next && this.next.addEventListener("click", this._nextClick);
this.zoomInBtn && this.zoomInBtn.addEventListener("click", this._zoomIn);
this.zoomOutBtn && this.zoomOutBtn.addEventListener("click", this._zoomOut);
}
destroy() {
this.container.removeEventListener("touchstart", this._touchstart);
this.container.removeEventListener("touchmove", this._touchstart);
this.viewerDiv.removeEventListener("wheel", this._wheel);
this.previous &&
this.previous.removeEventListener("click", this._previousClick);
this.next && this.next.removeEventListener("click", this._nextClick);
this.zoomInBtn && this.zoomInBtn.removeEventListener("click", this._zoomIn);
this.zoomOutBtn &&
this.zoomOutBtn.removeEventListener("click", this._zoomOut);
}
}
function getCenter(touches: TouchList) {
const centerX = (touches[0].clientX + touches[1].clientX) / 2;
const centerY = (touches[0].clientY + touches[1].clientY) / 2;
return [centerX, centerY];
}
function getDistance(touches: TouchList) {
const dx = touches[0].pageX - touches[1].pageX;
const dy = touches[0].pageY - touches[1].pageY;
return Math.sqrt(dx * dx + dy * dy);
}
function init(
viewerContainer: HTMLDivElement,
url: string,
maxCanvasPixels: number = 0
) {
const pdfViewerApp = new PDFViewerApplication(
viewerContainer,
maxCanvasPixels
);
GlobalWorkerOptions.workerSrc = new URL(
"./pdf.worker.js",
import.meta.url
).toString();
pdfViewerApp.initUI();
pdfViewerApp.open(url);
return pdfViewerApp;
}
export { init };

View File

@@ -1,7 +0,0 @@
import "core-js/modules/es.array.at.js";
import "core-js/modules/es.string.replace-all";
import "core-js/modules/web.structured-clone.js";
import "core-js/proposals/promise-with-resolvers";
import * as pdfworker from "pdfjs-dist/build/pdf.worker.mjs";
export default pdfworker;

View File

@@ -0,0 +1,97 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
using System.Text;
using System.Text.Json;
namespace Masa.Blazor.SourceGenerator;
[Generator]
public class JSManifestGenerator : IIncrementalGenerator
{
public void Initialize(IncrementalGeneratorInitializationContext context)
{
var manifestFiles = context.AdditionalTextsProvider
.Where(file => file.Path.EndsWith("manifest.json"));
var manifestContent = manifestFiles
.Select((file, cancellationToken) =>
{
var text = file.GetText(cancellationToken);
return text?.ToString();
});
context.RegisterSourceOutput(manifestContent.Collect(),
(spc, contents) =>
{
foreach (var content in contents)
{
if (content == null) continue;
try
{
var manifest = JsonSerializer.Deserialize<Dictionary<string, string>>(content);
var code = GenerateManifestClass(manifest);
spc.AddSource("JSManifest.g.cs", SourceText.From(code, Encoding.UTF8));
}
catch (JsonException ex)
{
// 报告 JSON 解析错误
spc.ReportDiagnostic(Diagnostic.Create(
new DiagnosticDescriptor(
"JSMANIFEST001",
"Invalid manifest.json",
$"JSON parsing error: {ex.Message}",
"Build",
DiagnosticSeverity.Error,
true),
Location.None));
}
}
});
}
private string GenerateManifestClass(Dictionary<string, string> manifest)
{
var sb = new StringBuilder();
sb.AppendLine("// <auto-generated/>");
sb.AppendLine("#pragma warning disable CS1591");
sb.AppendLine("namespace Masa.Blazor.SourceGenerated;");
sb.AppendLine("public static class JSManifest");
sb.AppendLine("{");
foreach (var entry in manifest)
{
var key = SanitizeIdentifier(entry.Key);
sb.AppendLine($" public const string {key} = \"{entry.Value}\";");
}
sb.AppendLine("}");
return sb.ToString();
}
private static string SanitizeIdentifier(string key)
{
if (key.StartsWith("components/") || key.StartsWith("mixins/") || key.StartsWith("proxies/"))
{
key = key[(key.IndexOf('/') + 1)..];
}
var sanitized = new StringBuilder();
var nextUpper = true;
foreach (var c in key)
{
if (char.IsLetterOrDigit(c))
{
sanitized.Append(nextUpper ? char.ToUpper(c) : c);
nextUpper = false;
}
else
{
nextUpper = true;
}
}
return sanitized.ToString();
}
}

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<RootNamespace>Masa.Blazor.SourceGenerator</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0"/>
</ItemGroup>
</Project>

View File

@@ -1,6 +1,6 @@
namespace Masa.Blazor.Components.Input;
public class InputJSModule : JSModule
public class InputJSModule(IJSRuntime js) : JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.InputIndexJs}")
{
private IInputJsCallbacks? _owner;
private DotNetObjectReference<InputJSModule>? _selfReference;
@@ -9,10 +9,6 @@ public class InputJSModule : JSModule
public bool Initialized { get; private set; }
public InputJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/components/input/index.js")
{
}
public async ValueTask InitializeAsync(IInputJsCallbacks owner)
{
if (_isDisposed)

View File

@@ -1,11 +1,7 @@
namespace Masa.Blazor;
public class IntersectJSModule : JSModule
public class IntersectJSModule(IJSRuntime js) : JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.IntersectIndexJs}")
{
public IntersectJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/mixins/intersect/index.js")
{
}
public async ValueTask ObserverAsync(
ElementReference el,
DotNetObjectReference<IntersectInvoker> handle,

View File

@@ -19,7 +19,7 @@ public class Touch : IAsyncDisposable
_moduleTask = new Lazy<Task<IJSObjectReference>>(
() => jsRuntime.InvokeAsync<IJSObjectReference>(
"import",
"./_content/Masa.Blazor/js/components/navigation-drawer/touch.js").AsTask()
$"./_content/Masa.Blazor/js/{JSManifest.NavigationDrawerTouchJs}").AsTask()
);
}

View File

@@ -1,11 +1,8 @@
namespace Masa.Blazor.Components.ScrollToTarget;
public class ScrollToTargetJSModule : JSModule
public class ScrollToTargetJSModule(IJSRuntime js)
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.ScrollToTargetIndexJs}")
{
public ScrollToTargetJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/components/scroll-to-target/index.js")
{
}
public async ValueTask<ScrollToTargetJSObjectReference> InitAsync(
DotNetObjectReference<ScrollToTargetJSInteropHandle> interopHandle,
IntersectionObserverInit options

View File

@@ -1,11 +1,8 @@
namespace Masa.Blazor.Components.Transition;
public class TransitionJSModule : JSModule
public class TransitionJSModule(IJSRuntime js)
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.TransitionIndexJs}")
{
public TransitionJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/components/transition/index.js")
{
}
public bool Initialized { get; private set; }
public async ValueTask<IJSObjectReference?> InitAsync(ElementReference elementReference,

View File

@@ -147,7 +147,7 @@ public partial class MWindow : MItemGroup
private async Task UseTouchAsync()
{
_module = await Js.InvokeAsync<IJSObjectReference>("import", "./_content/Masa.Blazor/js/components/window/touch.js");
_module = await Js.InvokeAsync<IJSObjectReference>("import", $"./_content/Masa.Blazor/js/{JSManifest.WindowTouchJs}");
_useTouchId = await _module.InvokeAsync<int>("useTouch", Ref, new TouchValue(
new Dictionary<string, AddEventListenerOptions>
{

View File

@@ -1,11 +1,8 @@
namespace Masa.Blazor.JSModules;
public class ResizeJSModule : JSModule, IResizeJSModule
public class ResizeJSModule(IJSRuntime js)
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.ResizeIndexJs}"), IResizeJSModule
{
public ResizeJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/mixins/resize/index.js")
{
}
public async ValueTask ObserverAsync(ElementReference el, Func<Task> handle)
{
await InvokeVoidAsync("observe", el, DotNetObjectReference.Create(new Invoker(handle)));

View File

@@ -55,11 +55,13 @@
<ItemGroup>
<ProjectReference Include="..\Masa.Blazor.Docs.ApiGenerator\Masa.Blazor.Docs.ApiGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\Masa.Blazor.SourceGenerator\Masa.Blazor.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="" />
<None Include="Masa.Blazor96_96.png" Pack="true" PackagePath="" />
<AdditionalFiles Include="wwwroot\js\manifest.json" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,15 +1,12 @@
namespace Masa.Blazor.Mixins.Activatable;
public class ActivatableJsModule : JSModule
public class ActivatableJsModule(IJSRuntime js)
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.ActivatableIndexJs}")
{
private IActivatableJsCallbacks? _owner;
private DotNetObjectReference<ActivatableJsModule>? _selfReference;
private IJSObjectReference? _instance;
public ActivatableJsModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/mixins/activatable/index.js")
{
}
public async ValueTask InitializeAsync(IActivatableJsCallbacks owner)
{
_owner = owner;

View File

@@ -1,16 +1,13 @@
namespace Masa.Blazor.Mixins;
public class OutsideClickJSModule : JSModule
public class OutsideClickJSModule(IJSRuntime js)
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.OutsideClickIndexJs}")
{
private IOutsideClickJsCallback? _owner;
private DotNetObjectReference<OutsideClickJSModule>? _selfReference;
private IJSObjectReference? _instance;
private CancellationTokenSource? _cts;
public OutsideClickJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/mixins/outside-click/index.js")
{
}
public bool Initialized { get; private set; }
public async ValueTask InitializeAsync(IOutsideClickJsCallback owner, params string[] excludedSelectors)

View File

@@ -3,7 +3,7 @@
namespace Masa.Blazor.Mixins;
public class ScrollStrategyJSModule(IJSRuntime js)
: JSModule(js, "./_content/Masa.Blazor/js/components/overlay/scroll-strategy.js")
: JSModule(js, $"./_content/Masa.Blazor/js/{JSManifest.OverlayScrollStrategyJs}")
{
public async ValueTask<ScrollStrategyResult> CreateScrollStrategy(ElementReference root,
ElementReference contentRef, ScrollStrategyOptions options)

View File

@@ -132,7 +132,7 @@ public partial class PPageStack: MasaComponentBase
if (firstRender)
{
_module = await Js.InvokeAsync<IJSObjectReference>("import",
"./_content/Masa.Blazor/js/components/page-stack/index.js");
$"./_content/Masa.Blazor/js/{JSManifest.PageStackIndexJs}");
_dotnetObjectId = await _module.InvokeAsync<int>("attachListener", _dotNetObjectReference);
}
}

View File

@@ -13,7 +13,7 @@ public class Touch : IAsyncDisposable
_moduleTask = new Lazy<Task<IJSObjectReference>>(
() => jsRuntime
.InvokeAsync<IJSObjectReference>("import", "./_content/Masa.Blazor/js/components/page-stack/touch.js")
.InvokeAsync<IJSObjectReference>("import", $"./_content/Masa.Blazor/js/{JSManifest.PageStackTouchJs}")
.AsTask());
}

View File

@@ -19,4 +19,5 @@ global using Masa.Blazor.Core.I18n;
global using Microsoft.AspNetCore.Components.Forms;
global using Masa.Blazor.Mixins;
global using Masa.Blazor.Helpers;
global using Masa.Blazor.JSInterop;
global using Masa.Blazor.JSInterop;
global using Masa.Blazor.SourceGenerated;

View File

@@ -1,2 +1,2 @@
function e(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function t(e){return{detail:e.detail,touches:n(e.touches),targetTouches:n(e.targetTouches),changedTouches:n(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function n(e){const t=[];for(let n=0;n<e.length;n++){const c=e[n];t.push({identifier:c.identifier,clientX:c.clientX,clientY:c.clientY,screenX:c.screenX,screenY:c.screenY,pageX:c.pageX,pageY:c.pageY})}return t}function c(e){const t=e.target;if(function(e){return-1!==r.indexOf(e.getAttribute("type"))}(t)){const e=function(e){const t=e.value,n=e.type;switch(n){case"date":case"month":case"week":return t;case"datetime-local":return 16===t.length?t+":00":t;case"time":return 5===t.length?t+":00":t}throw new Error(`Invalid element type '${n}'.`)}(t);return{value:e}}if(function(e){return e instanceof HTMLSelectElement&&"select-multiple"===e.type}(t)){const e=t;return{value:Array.from(e.options).filter((e=>e.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}const r=["date","datetime-local","month","time","week"];export{t as a,c as b,e as p};
//# sourceMappingURL=EventType.js.map
//# sourceMappingURL=EventType-63cda6c3.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
const e="$parent.",t="undefined"!=typeof window;let n=!1;try{if(t){const e=Object.defineProperty({},"passive",{get:()=>{n=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}function r(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function i(e){const t=e,n={},r=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return r?(n.elementReferenceId=r,n.selector=`[${r}]`):n.selector=function(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var r=e,i=1;r=r.previousElementSibling;)r.nodeName.toLowerCase()==n&&i++;1!=i&&(n+=":nth-of-type("+i+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}(t),n.class=t.getAttribute("class"),n}function o(e){return"string"==typeof e?document.querySelector(e):e}function s(e,t="px"){return null==e||""===e?void 0:isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function a(t){var n;if(t.startsWith(e)){const r=t.replace(e,""),i=null===(n=document.querySelector(r))||void 0===n?void 0:n.parentElement;return i?i.classList.contains("m-btn__content")?i.parentElement:i:null}return document.querySelector(t)}Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});export{o as a,r as b,s as c,a as d,i as g};
//# sourceMappingURL=helper.js.map
//# sourceMappingURL=helper-fcebaced.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{_ as t,a as e}from"./tslib.es6-2c470b77.js";var n,i;class r{constructor(t){this.size=t,n.set(this,[]),i.set(this,0)}push(r){t(this,n,"f")[t(this,i,"f")]=r,e(this,i,(t(this,i,"f")+1)%this.size,"f")}values(){return t(this,n,"f").slice(t(this,i,"f")).concat(t(this,n,"f").slice(0,t(this,i,"f")))}}n=new WeakMap,i=new WeakMap;function s(t){return(t<0?-1:1)*Math.sqrt(Math.abs(t))*1.41421356237}function o(t){if(t.length<2)return 0;if(2===t.length)return t[1].t===t[0].t?0:(t[1].d-t[0].d)/(t[1].t-t[0].t);let e=0;for(let n=t.length-1;n>0;n--){if(t[n].t===t[n-1].t)continue;const i=s(e),r=(t[n].d-t[n-1].d)/(t[n].t-t[n-1].t);e+=(r-i)*Math.abs(r),n===t.length-1&&(e*=.5)}return 1e3*s(e)}function h(){const t={};return{addMovement:function(e){Array.from(e.changedTouches).forEach((n=>{var i;(null!==(i=t[n.identifier])&&void 0!==i?i:t[n.identifier]=new r(20)).push([e.timeStamp,n])}))},endTouch:function(e){Array.from(e.changedTouches).forEach((e=>{delete t[e.identifier]}))},getVelocity:function(e){var n;const i=null===(n=t[e])||void 0===n?void 0:n.values().reverse();if(!i)throw new Error(`No samples for touch id ${e}`);const r=i[0],s=[],h=[];for(const t of i){if(r[0]-t[0]>100)break;s.push({t:t[0],d:t[1].clientX}),h.push({t:t[0],d:t[1].clientY})}return{x:o(s),y:o(h),get direction(){const{x:t,y:e}=this,[n,i]=[Math.abs(t),Math.abs(e)];return n>i&&t>=0?"right":n>i&&t<=0?"left":i>n&&e>=0?"down":i>n&&e<=0?"up":function(){throw new Error}()}}}}}export{h as u};
//# sourceMappingURL=touch-6b73e4c6.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{_ as t,a as e}from"./tslib.es6.js";var n,i;class r{constructor(t){this.size=t,n.set(this,[]),i.set(this,0)}push(r){t(this,n,"f")[t(this,i,"f")]=r,e(this,i,(t(this,i,"f")+1)%this.size,"f")}values(){return t(this,n,"f").slice(t(this,i,"f")).concat(t(this,n,"f").slice(0,t(this,i,"f")))}}n=new WeakMap,i=new WeakMap;function s(t){return(t<0?-1:1)*Math.sqrt(Math.abs(t))*1.41421356237}function o(t){if(t.length<2)return 0;if(2===t.length)return t[1].t===t[0].t?0:(t[1].d-t[0].d)/(t[1].t-t[0].t);let e=0;for(let n=t.length-1;n>0;n--){if(t[n].t===t[n-1].t)continue;const i=s(e),r=(t[n].d-t[n-1].d)/(t[n].t-t[n-1].t);e+=(r-i)*Math.abs(r),n===t.length-1&&(e*=.5)}return 1e3*s(e)}function h(){const t={};return{addMovement:function(e){Array.from(e.changedTouches).forEach((n=>{var i;(null!==(i=t[n.identifier])&&void 0!==i?i:t[n.identifier]=new r(20)).push([e.timeStamp,n])}))},endTouch:function(e){Array.from(e.changedTouches).forEach((e=>{delete t[e.identifier]}))},getVelocity:function(e){var n;const i=null===(n=t[e])||void 0===n?void 0:n.values().reverse();if(!i)throw new Error(`No samples for touch id ${e}`);const r=i[0],s=[],h=[];for(const t of i){if(r[0]-t[0]>100)break;s.push({t:t[0],d:t[1].clientX}),h.push({t:t[0],d:t[1].clientY})}return{x:o(s),y:o(h),get direction(){const{x:t,y:e}=this,[n,i]=[Math.abs(t),Math.abs(e)];return n>i&&t>=0?"right":n>i&&t<=0?"left":i>n&&e>=0?"down":i>n&&e<=0?"up":function(){throw new Error}()}}}}}export{h as u};
//# sourceMappingURL=touch.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
function e(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function t(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{f(n.next(e))}catch(e){a(e)}}function c(e){try{f(n.throw(e))}catch(e){a(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}f((n=n.apply(e,t||[])).next())}))}function r(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function n(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError;export{r as _,n as a,t as b,e as c};
//# sourceMappingURL=tslib.es6.js.map
//# sourceMappingURL=tslib.es6-2c470b77.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{_ as t}from"../../chunks/tslib.es6-2c470b77.js";import{p as e,a as n,b as i}from"../../chunks/EventType-63cda6c3.js";import{g as s}from"../../chunks/helper-fcebaced.js";function o(t,i){let o={target:{}};return"mouse"===t?o=Object.assign(Object.assign({},o),e(i)):"touch"===t&&(o=Object.assign(Object.assign({},o),n(i))),o.target=s(i.target),o}function u(t,e,n){let i=!1;for(const s of t.composedPath()){if(s===n)break;if(a(s,e)){i=!0;break}}return i}function a(t,e){const n=["_blazorEvents_1","stopPropagationFlags",e];let i=t,s=0;for(;i[n[s]];)i=i[n[s]],s++;return s==n.length&&"boolean"==typeof i&&i}var h,r,c,l,p,d;class m{constructor(e,n,i,s){h.add(this),this.input=n,this.inputSlot=i,this.dotnetHelper=e,this.debounce=s,t(this,h,"m",r).call(this)}setValue(t){this.input.value=t}}function v(t,e,n,i){return new m(t,e,n,i)}h=new WeakSet,r=function(){this.input&&this.inputSlot&&(t(this,h,"m",p).call(this),t(this,h,"m",d).call(this),this.input&&(this.input instanceof HTMLInputElement||this.input instanceof HTMLTextAreaElement)&&t(this,h,"m",c).call(this))},c=function(){let e,n=!1;this.input.addEventListener("compositionstart",(t=>{n=!0})),this.input.addEventListener("compositionend",(t=>{n=!1;const e=i(t);e.value=this.input.value,-1!==this.input.maxLength&&e.value.length>this.input.maxLength&&(e.value=e.value.substring(0,this.input.maxLength)),this.dotnetHelper.invokeMethodAsync("OnInput",e)})),this.input.addEventListener("input",(t=>{if(!n){var s=i(t);clearTimeout(e),e=setTimeout((()=>{this.dotnetHelper.invokeMethodAsync("OnInput",s)}),this.debounce)}})),this.input.addEventListener("change",(e=>{var n=i(e);t(this,h,"m",l).call(this,e),this.dotnetHelper.invokeMethodAsync("OnChange",n)}))},l=function(t){if("number"===t.target.type){const e=t.target.value,n=t.target.valueAsNumber;e&&e!==n.toString()&&(this.input.value=isNaN(n)?"":n.toString())}},p=function(){this.inputSlot.addEventListener("click",(t=>{if(!u(t,"click",this.inputSlot)){var e=o("mouse",t);this.dotnetHelper.invokeMethodAsync("OnClick",e)}}))},d=function(){this.inputSlot.addEventListener("mouseup",(t=>{if(!u(t,"mouseup",this.inputSlot)){var e=o("mouse",t);this.dotnetHelper.invokeMethodAsync("OnMouseUp",e)}}))};export{v as init};
//# sourceMappingURL=index-dacf9172.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{_ as t}from"../../chunks/tslib.es6.js";import{p as e,a as n,b as i}from"../../chunks/EventType.js";import{g as s}from"../../chunks/helper.js";function o(t,i){let o={target:{}};return"mouse"===t?o=Object.assign(Object.assign({},o),e(i)):"touch"===t&&(o=Object.assign(Object.assign({},o),n(i))),o.target=s(i.target),o}function u(t,e,n){let i=!1;for(const s of t.composedPath()){if(s===n)break;if(a(s,e)){i=!0;break}}return i}function a(t,e){const n=["_blazorEvents_1","stopPropagationFlags",e];let i=t,s=0;for(;i[n[s]];)i=i[n[s]],s++;return s==n.length&&"boolean"==typeof i&&i}var h,r,l,c,p,d;class m{constructor(e,n,i,s){h.add(this),this.input=n,this.inputSlot=i,this.dotnetHelper=e,this.debounce=s,t(this,h,"m",r).call(this)}setValue(t){this.input.value=t}}function v(t,e,n,i){return new m(t,e,n,i)}h=new WeakSet,r=function(){this.input&&this.inputSlot&&(t(this,h,"m",p).call(this),t(this,h,"m",d).call(this),this.input&&(this.input instanceof HTMLInputElement||this.input instanceof HTMLTextAreaElement)&&t(this,h,"m",l).call(this))},l=function(){let e,n=!1;this.input.addEventListener("compositionstart",(t=>{n=!0})),this.input.addEventListener("compositionend",(t=>{n=!1;const e=i(t);e.value=this.input.value,-1!==this.input.maxLength&&e.value.length>this.input.maxLength&&(e.value=e.value.substring(0,this.input.maxLength)),this.dotnetHelper.invokeMethodAsync("OnInput",e)})),this.input.addEventListener("input",(t=>{if(!n){var s=i(t);clearTimeout(e),e=setTimeout((()=>{this.dotnetHelper.invokeMethodAsync("OnInput",s)}),this.debounce)}})),this.input.addEventListener("change",(e=>{var n=i(e);t(this,h,"m",c).call(this,e),this.dotnetHelper.invokeMethodAsync("OnChange",n)}))},c=function(t){if("number"===t.target.type){const e=t.target.value,n=t.target.valueAsNumber;e&&e!==n.toString()&&(this.input.value=isNaN(n)?"":n.toString())}},p=function(){this.inputSlot.addEventListener("click",(t=>{if(!u(t,"click",this.inputSlot)){var e=o("mouse",t);this.dotnetHelper.invokeMethodAsync("OnClick",e)}}))},d=function(){this.inputSlot.addEventListener("mouseup",(t=>{if(!u(t,"mouseup",this.inputSlot)){var e=o("mouse",t);this.dotnetHelper.invokeMethodAsync("OnMouseUp",e)}}))};export{v as init};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{u as t}from"../../chunks/touch-6b73e4c6.js";import{a as o}from"../../chunks/helper-fcebaced.js";import"../../chunks/tslib.es6-2c470b77.js";function n(n,i,s){var c,r;const l=o(n);if(!l)return console.warn("The root element of MNavigationDrawer component is not found, touching to open/close will not work."),{};window.addEventListener("touchstart",M,{passive:!0}),window.addEventListener("touchmove",T,{passive:!1}),window.addEventListener("touchend",x,{passive:!0});const d=["left","right"].includes(s.position),{addMovement:u,endTouch:h,getVelocity:a}=t();let m,p=!1,f=!1,v=0,w=0,g=null!==(c=l.style.transform)&&void 0!==c?c:null,y=null!==(r=l.style.transition)&&void 0!==r?r:null;function E(t,o){return("left"===s.position?t:"right"===s.position?document.documentElement.clientWidth-t:"top"===s.position?t:"bottom"===s.position?document.documentElement.clientHeight-t:e())-(o?s.width:0)}function b(t,o=!0){const n="left"===s.position?(t-w)/s.width:"right"===s.position?(document.documentElement.clientWidth-t-w)/s.width:"top"===s.position?(t-w)/s.width:"bottom"===s.position?(document.documentElement.clientHeight-t-w)/s.width:e();return o?Math.max(0,Math.min(1,n)):n}function M(t){var o,n;if(s.touchless)return;g=null!==(o=l.style.transform)&&void 0!==o?o:null,y=null!==(n=l.style.transition)&&void 0!==n?n:null;const i=t.changedTouches[0].clientX,c=t.changedTouches[0].clientY,r="left"===s.position?i<25:"right"===s.position?i>document.documentElement.clientWidth-25:"top"===s.position?c<25:"bottom"===s.position?c>document.documentElement.clientHeight-25:e(),a=s.isActive&&("left"===s.position?i<s.width:"right"===s.position?i>document.documentElement.clientWidth-s.width:"top"===s.position?c<s.width:"bottom"===s.position?c>document.documentElement.clientHeight-s.width:e());(r||a||s.isActive&&s.isTemporary)&&(m=[i,c],w=E(d?i:c,s.isActive),v=b(d?i:c),p=w>-20&&w<80,h(t),u(t))}function T(t){if(s.touchless)return;const o=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(p){if(!t.cancelable)return void(p=!1);const e=Math.abs(o-m[0]),i=Math.abs(n-m[1]);(d?e>i&&e>3:i>e&&i>3)?(f=!0,p=!1):(d?i:e)>3&&(p=!1)}if(A(),!f)return;t.preventDefault(),u(t);const e=b(d?o:n,!1);v=Math.max(0,Math.min(1,e)),e>1?w=E(d?o:n,!0):e<0&&(w=E(d?o:n,!1)),i.invokeMethodAsync("TouchMove",f,v)}function x(t){if(p=!1,s.touchless||!f)return;u(t),f=!1,A();const o=a(t.changedTouches[0].identifier),n=Math.abs(o.x),c=Math.abs(o.y),r=d?n>c&&n>400:c>n&&c>3;s.isActive=r?o.direction===({left:"right",right:"left",top:"down",bottom:"up"}[s.position]||e()):v>.5,i.invokeMethodAsync("TouchEnd",s.isActive)}const A=()=>{const t=f?{transform:"left"===s.position?`translateX(calc(-100% + ${v*s.width}px))`:"right"===s.position?`translateX(calc(100% - ${v*s.width}px))`:"top"===s.position?`translateY(calc(-100% + ${v*s.width}px))`:"bottom"===s.position?`translateY(calc(100% - ${v*s.width}px))`:e(),transition:"none"}:void 0;f?(l.style.setProperty("transform",(null==t?void 0:t.transform)||"none"),l.style.setProperty("transition",(null==t?void 0:t.transition)||null)):(l.style.setProperty("transform",g),l.style.setProperty("transition",y))};return{syncState:t=>{s=t},dispose:()=>{i.dispose(),window.removeEventListener("touchstart",M),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",x)}}}function e(){throw new Error}export{n as useTouch};
//# sourceMappingURL=touch-591647e2.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{u as t}from"../../chunks/touch.js";import{a as o}from"../../chunks/helper.js";import"../../chunks/tslib.es6.js";function n(n,i,s){var c,r;const l=o(n);if(!l)return console.warn("The root element of MNavigationDrawer component is not found, touching to open/close will not work."),{};window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",T,{passive:!1}),window.addEventListener("touchend",x,{passive:!0});const d=["left","right"].includes(s.position),{addMovement:u,endTouch:h,getVelocity:a}=t();let m,p=!1,v=!1,f=0,w=0,g=null!==(c=l.style.transform)&&void 0!==c?c:null,y=null!==(r=l.style.transition)&&void 0!==r?r:null;function E(t,o){return("left"===s.position?t:"right"===s.position?document.documentElement.clientWidth-t:"top"===s.position?t:"bottom"===s.position?document.documentElement.clientHeight-t:e())-(o?s.width:0)}function M(t,o=!0){const n="left"===s.position?(t-w)/s.width:"right"===s.position?(document.documentElement.clientWidth-t-w)/s.width:"top"===s.position?(t-w)/s.width:"bottom"===s.position?(document.documentElement.clientHeight-t-w)/s.width:e();return o?Math.max(0,Math.min(1,n)):n}function b(t){var o,n;if(s.touchless)return;g=null!==(o=l.style.transform)&&void 0!==o?o:null,y=null!==(n=l.style.transition)&&void 0!==n?n:null;const i=t.changedTouches[0].clientX,c=t.changedTouches[0].clientY,r="left"===s.position?i<25:"right"===s.position?i>document.documentElement.clientWidth-25:"top"===s.position?c<25:"bottom"===s.position?c>document.documentElement.clientHeight-25:e(),a=s.isActive&&("left"===s.position?i<s.width:"right"===s.position?i>document.documentElement.clientWidth-s.width:"top"===s.position?c<s.width:"bottom"===s.position?c>document.documentElement.clientHeight-s.width:e());(r||a||s.isActive&&s.isTemporary)&&(m=[i,c],w=E(d?i:c,s.isActive),f=M(d?i:c),p=w>-20&&w<80,h(t),u(t))}function T(t){if(s.touchless)return;const o=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(p){if(!t.cancelable)return void(p=!1);const e=Math.abs(o-m[0]),i=Math.abs(n-m[1]);(d?e>i&&e>3:i>e&&i>3)?(v=!0,p=!1):(d?i:e)>3&&(p=!1)}if(A(),!v)return;t.preventDefault(),u(t);const e=M(d?o:n,!1);f=Math.max(0,Math.min(1,e)),e>1?w=E(d?o:n,!0):e<0&&(w=E(d?o:n,!1)),i.invokeMethodAsync("TouchMove",v,f)}function x(t){if(p=!1,s.touchless||!v)return;u(t),v=!1,A();const o=a(t.changedTouches[0].identifier),n=Math.abs(o.x),c=Math.abs(o.y),r=d?n>c&&n>400:c>n&&c>3;s.isActive=r?o.direction===({left:"right",right:"left",top:"down",bottom:"up"}[s.position]||e()):f>.5,i.invokeMethodAsync("TouchEnd",s.isActive)}const A=()=>{const t=v?{transform:"left"===s.position?`translateX(calc(-100% + ${f*s.width}px))`:"right"===s.position?`translateX(calc(100% - ${f*s.width}px))`:"top"===s.position?`translateY(calc(-100% + ${f*s.width}px))`:"bottom"===s.position?`translateY(calc(100% - ${f*s.width}px))`:e(),transition:"none"}:void 0;v?(l.style.setProperty("transform",(null==t?void 0:t.transform)||"none"),l.style.setProperty("transition",(null==t?void 0:t.transition)||null)):(l.style.setProperty("transform",g),l.style.setProperty("transition",y))};return{syncState:t=>{s=t},dispose:()=>{i.dispose(),window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",x)}}}function e(){throw new Error}export{n as useTouch};
//# sourceMappingURL=touch.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{c as o}from"../../chunks/helper-fcebaced.js";function e(o,e){const l=[];if(e&&o&&!e.contains(o))return l;for(;o&&(t(o)&&l.push(o),o!==e);)o=o.parentElement;return l}function t(o){if(!o||o.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(o);return"scroll"===e.overflowY||"auto"===e.overflowY&&o.scrollHeight>o.clientHeight}function l(l,r,s,n,c){return"block"===l.strategy?function(l,r){const s=l.root.offsetParent,n=[...new Set([...e(l.contentEl,r.contained?s:void 0)])],c=(i=s||document.documentElement,t(i)&&i),a=()=>{c&&l.root.classList.add("m-overlay--scroll-blocked");const e=window.innerWidth-document.documentElement.offsetWidth;n.filter((o=>!o.classList.contains("m-overlay-scroll-blocked"))).forEach(((t,l)=>{t.style.setProperty("--m-body-scroll-x",o(-t.scrollLeft)),t.style.setProperty("--m-body-scroll-y",o(-t.scrollTop)),t!==document.documentElement&&t.style.setProperty("--m-scrollbar-offset",o(e)),t.classList.add("m-overlay-scroll-blocked")}))};var i;return a(),{bind:a,unbind:()=>{n.filter((o=>o.classList.contains("m-overlay-scroll-blocked"))).forEach(((o,e)=>{const t=parseFloat(o.style.getPropertyValue("--m-body-scroll-x")),l=parseFloat(o.style.getPropertyValue("--m-body-scroll-y")),r=o.style.scrollBehavior;o.style.scrollBehavior="auto",o.style.removeProperty("--m-body-scroll-x"),o.style.removeProperty("--m-body-scroll-y"),o.style.removeProperty("--m-scrollbar-offset"),o.classList.remove("m-overlay-scroll-blocked"),o.scrollLeft=-t,o.scrollTop=-l,o.style.scrollBehavior=r})),c&&l.root.classList.remove("m-overlay--scroll-blocked")}}}({root:r,contentEl:s,targetEl:n},l):function(o,t){var l;const r=null!==(l=o.targetEl)&&void 0!==l?l:o.contentEl,s=()=>{var e;null===(e=o.invoker)||void 0===e||e.invokeMethodAsync("ScrollStrategy_OnScroll",t.strategy)},n=[document,...e(r)];return n.forEach((o=>o.addEventListener("scroll",s,{passive:!0}))),{unbind:()=>{var e;null===(e=o.invoker)||void 0===e||e.dispose(),n.forEach((o=>o.removeEventListener("scroll",s)))}}}({root:r,contentEl:s,targetEl:n,invoker:c},l)}export{l as useScrollStrategies};
//# sourceMappingURL=scroll-strategy-483fa795.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{c as o}from"../../chunks/helper.js";function e(o,e){const l=[];if(e&&o&&!e.contains(o))return l;for(;o&&(t(o)&&l.push(o),o!==e);)o=o.parentElement;return l}function t(o){if(!o||o.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(o);return"scroll"===e.overflowY||"auto"===e.overflowY&&o.scrollHeight>o.clientHeight}function l(l,r,s,n,c){return"block"===l.strategy?function(l,r){const s=l.root.offsetParent,n=[...new Set([...e(l.contentEl,r.contained?s:void 0)])],c=(i=s||document.documentElement,t(i)&&i),a=()=>{c&&l.root.classList.add("m-overlay--scroll-blocked");const e=window.innerWidth-document.documentElement.offsetWidth;n.filter((o=>!o.classList.contains("m-overlay-scroll-blocked"))).forEach(((t,l)=>{t.style.setProperty("--m-body-scroll-x",o(-t.scrollLeft)),t.style.setProperty("--m-body-scroll-y",o(-t.scrollTop)),t!==document.documentElement&&t.style.setProperty("--m-scrollbar-offset",o(e)),t.classList.add("m-overlay-scroll-blocked")}))};var i;return a(),{bind:a,unbind:()=>{n.filter((o=>o.classList.contains("m-overlay-scroll-blocked"))).forEach(((o,e)=>{const t=parseFloat(o.style.getPropertyValue("--m-body-scroll-x")),l=parseFloat(o.style.getPropertyValue("--m-body-scroll-y")),r=o.style.scrollBehavior;o.style.scrollBehavior="auto",o.style.removeProperty("--m-body-scroll-x"),o.style.removeProperty("--m-body-scroll-y"),o.style.removeProperty("--m-scrollbar-offset"),o.classList.remove("m-overlay-scroll-blocked"),o.scrollLeft=-t,o.scrollTop=-l,o.style.scrollBehavior=r})),c&&l.root.classList.remove("m-overlay--scroll-blocked")}}}({root:r,contentEl:s,targetEl:n},l):function(o,t){var l;const r=null!==(l=o.targetEl)&&void 0!==l?l:o.contentEl,s=()=>{var e;null===(e=o.invoker)||void 0===e||e.invokeMethodAsync("ScrollStrategy_OnScroll",t.strategy)},n=[document,...e(r)];return n.forEach((o=>o.addEventListener("scroll",s,{passive:!0}))),{unbind:()=>{var e;null===(e=o.invoker)||void 0===e||e.dispose(),n.forEach((o=>o.removeEventListener("scroll",s)))}}}({root:r,contentEl:s,targetEl:n,invoker:c},l)}export{l as useScrollStrategies};
//# sourceMappingURL=scroll-strategy.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{b as e}from"../../chunks/tslib.es6-2c470b77.js";import{c as t}from"../../chunks/helper-fcebaced.js";const s={},o={},l={};let c=0;function r(t){const r=c,a=t=>function(t,o){return e(this,void 0,void 0,(function*(){const e=s[t];if(null===e)return;const l=o.target.closest("a");if(!l)return;const c=l.getAttribute("href");if(!c)return;let r=l.getAttribute("data-page-stack-strategy");r=null===r?null:r.toLowerCase(),""!==r&&"true"!==r&&"push"!==r||(document.querySelector("[page-stack-id]")||n(),yield e.invokeMethodAsync("Push",c))}))}(r,t),i=()=>t.invokeMethodAsync("Popstate",window.location.pathname);return o[r]=a,l[r]=i,s[r]=t,document.addEventListener("click",a),window.addEventListener("popstate",i),c++}function n(){const e=document.documentElement;e.classList.contains("m-page-stack-scroll-blocked")||0===e.scrollLeft&&0===e.scrollTop||(e.style.setProperty("--m-page-stack-scroll-x",t(-e.scrollLeft)),e.style.setProperty("--m-page-stack-scroll-y",t(-e.scrollTop)),e.classList.add("m-page-stack-scroll-blocked"))}function a(){const e=document.documentElement;if(!e.classList.contains("m-page-stack-scroll-blocked"))return;const t=parseFloat(e.style.getPropertyValue("--m-page-stack-scroll-x")),s=parseFloat(e.style.getPropertyValue("--m-page-stack-scroll-y")),o=e.style.scrollBehavior;e.style.scrollBehavior="auto",e.style.removeProperty("--m-page-stack-scroll-x"),e.style.removeProperty("--m-page-stack-scroll-y"),e.classList.remove("m-page-stack-scroll-blocked"),e.scrollLeft=-t,e.scrollTop=-s,e.style.scrollBehavior=o}function i(e){const t=o[e];t&&document.removeEventListener("click",t);const c=l[e];c&&window.removeEventListener("popstate",c),s[e]&&s[e].dispose(),delete o[e],delete l[e],delete s[e]}export{r as attachListener,n as blockScroll,i as detachListener,a as unblockScroll};
//# sourceMappingURL=index-3e905ef2.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{b as e}from"../../chunks/tslib.es6.js";import{c as t}from"../../chunks/helper.js";const s={},o={},l={};let c=0;function r(t){const r=c,a=t=>function(t,o){return e(this,void 0,void 0,(function*(){const e=s[t];if(null===e)return;const l=o.target.closest("a");if(!l)return;const c=l.getAttribute("href");if(!c)return;let r=l.getAttribute("data-page-stack-strategy");r=null===r?null:r.toLowerCase(),""!==r&&"true"!==r&&"push"!==r||(document.querySelector("[page-stack-id]")||n(),yield e.invokeMethodAsync("Push",c))}))}(r,t),i=()=>t.invokeMethodAsync("Popstate",window.location.pathname);return o[r]=a,l[r]=i,s[r]=t,document.addEventListener("click",a),window.addEventListener("popstate",i),c++}function n(){const e=document.documentElement;e.classList.contains("m-page-stack-scroll-blocked")||0===e.scrollLeft&&0===e.scrollTop||(e.style.setProperty("--m-page-stack-scroll-x",t(-e.scrollLeft)),e.style.setProperty("--m-page-stack-scroll-y",t(-e.scrollTop)),e.classList.add("m-page-stack-scroll-blocked"))}function a(){const e=document.documentElement;if(!e.classList.contains("m-page-stack-scroll-blocked"))return;const t=parseFloat(e.style.getPropertyValue("--m-page-stack-scroll-x")),s=parseFloat(e.style.getPropertyValue("--m-page-stack-scroll-y")),o=e.style.scrollBehavior;e.style.scrollBehavior="auto",e.style.removeProperty("--m-page-stack-scroll-x"),e.style.removeProperty("--m-page-stack-scroll-y"),e.classList.remove("m-page-stack-scroll-blocked"),e.scrollLeft=-t,e.scrollTop=-s,e.style.scrollBehavior=o}function i(e){const t=o[e];t&&document.removeEventListener("click",t);const c=l[e];c&&window.removeEventListener("popstate",c),s[e]&&s[e].dispose(),delete o[e],delete l[e],delete s[e]}export{r as attachListener,n as blockScroll,i as detachListener,a as unblockScroll};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{u as t}from"../../chunks/touch-6b73e4c6.js";import{a as e}from"../../chunks/helper-fcebaced.js";import"../../chunks/tslib.es6-2c470b77.js";function n(n,o,c){const s=e(n);if(!s)return;window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",y,{passive:!1}),window.addEventListener("touchend",b,{passive:!0});const r=["left","right"].includes(c.position),{addMovement:d,endTouch:u,getVelocity:a}=t();let m,l=!1,h=!1,p=0,f=0;function v(t,e){return("left"===c.position?t:"right"===c.position?document.documentElement.clientWidth-t:i())-(e?document.documentElement.clientWidth:0)}function E(t,e=!0){const n="left"===c.position?(t-f)/document.documentElement.clientWidth:"right"===c.position?(document.documentElement.clientWidth-t-f)/document.documentElement.clientWidth:i();return e?Math.max(0,Math.min(1,n)):n}function g(t){const e=t.target.closest(".m-page-stack-item");return e&&e.parentElement===s}function w(t){if(!g(t))return;const e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY,o="left"===c.position?e<25:"right"===c.position?e>document.documentElement.clientWidth-25:i(),s=c.isActive&&("left"===c.position?e<document.documentElement.clientWidth:"right"===c.position?e>0:i());(o||s||c.isActive)&&(m=[e,n],f=v(r?e:n,c.isActive),p=E(r?e:n),l=f>-20&&f<80,u(t),d(t))}function y(t){if(!g(t))return;const e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(l){if(!t.cancelable)return void(l=!1);const i=Math.abs(e-m[0]),o=Math.abs(n-m[1]);(r?i>o&&i>3:o>i&&o>3)?(h=!0,l=!1):(r?o:i)>3&&(l=!1)}if(!h)return;t.preventDefault(),d(t);const i=E(r?e:n,!1);p=Math.max(0,Math.min(1,i)),i>1?f=v(r?e:n,!0):i<0&&(f=v(r?e:n,!1)),M()}function b(t){if(!g(t))return;if(l=!1,!h)return;d(t),h=!1;const e=a(t.changedTouches[0].identifier),n=Math.abs(e.x),s=Math.abs(e.y),u=r?n>s&&n>400:s>n&&s>3;c.isActive=u?e.direction===({left:"right",right:"left",top:"down",bottom:"up"}[c.position]||i()):p>.5,M(),setTimeout((()=>o.invokeMethodAsync("TouchEnd",c.isActive)),200)}const M=()=>{if(h){const t="left"===c.position?`translateX(calc(-100% + ${p*document.documentElement.clientWidth}px))`:"right"===c.position?`translateX(calc(100% - ${p*document.documentElement.clientWidth}px))`:i();s.style.setProperty("transform",t),s.style.setProperty("transition","none")}else c.isActive?s.style.removeProperty("transform"):s.style.setProperty("transform","translateX(100%)"),s.style.removeProperty("transition")};return{syncState:t=>{c=t},dispose:()=>{o.dispose(),window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",y),window.removeEventListener("touchend",b)}}}function i(){throw new Error}export{n as useTouch};
//# sourceMappingURL=touch-5a869b3d.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{u as t}from"../../chunks/touch.js";import{a as e}from"../../chunks/helper.js";import"../../chunks/tslib.es6.js";function n(n,o,c){const s=e(n);if(!s)return;window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",y,{passive:!1}),window.addEventListener("touchend",M,{passive:!0});const r=["left","right"].includes(c.position),{addMovement:u,endTouch:d,getVelocity:a}=t();let m,l=!1,h=!1,p=0,f=0;function v(t,e){return("left"===c.position?t:"right"===c.position?document.documentElement.clientWidth-t:i())-(e?document.documentElement.clientWidth:0)}function E(t,e=!0){const n="left"===c.position?(t-f)/document.documentElement.clientWidth:"right"===c.position?(document.documentElement.clientWidth-t-f)/document.documentElement.clientWidth:i();return e?Math.max(0,Math.min(1,n)):n}function g(t){const e=t.target.closest(".m-page-stack-item");return e&&e.parentElement===s}function w(t){if(!g(t))return;const e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY,o="left"===c.position?e<25:"right"===c.position?e>document.documentElement.clientWidth-25:i(),s=c.isActive&&("left"===c.position?e<document.documentElement.clientWidth:"right"===c.position?e>0:i());(o||s||c.isActive)&&(m=[e,n],f=v(r?e:n,c.isActive),p=E(r?e:n),l=f>-20&&f<80,d(t),u(t))}function y(t){if(!g(t))return;const e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY;if(l){if(!t.cancelable)return void(l=!1);const i=Math.abs(e-m[0]),o=Math.abs(n-m[1]);(r?i>o&&i>3:o>i&&o>3)?(h=!0,l=!1):(r?o:i)>3&&(l=!1)}if(!h)return;t.preventDefault(),u(t);const i=E(r?e:n,!1);p=Math.max(0,Math.min(1,i)),i>1?f=v(r?e:n,!0):i<0&&(f=v(r?e:n,!1)),W()}function M(t){if(!g(t))return;if(l=!1,!h)return;u(t),h=!1;const e=a(t.changedTouches[0].identifier),n=Math.abs(e.x),s=Math.abs(e.y),d=r?n>s&&n>400:s>n&&s>3;c.isActive=d?e.direction===({left:"right",right:"left",top:"down",bottom:"up"}[c.position]||i()):p>.5,W(),setTimeout((()=>o.invokeMethodAsync("TouchEnd",c.isActive)),200)}const W=()=>{if(h){const t="left"===c.position?`translateX(calc(-100% + ${p*document.documentElement.clientWidth}px))`:"right"===c.position?`translateX(calc(100% - ${p*document.documentElement.clientWidth}px))`:i();s.style.setProperty("transform",t),s.style.setProperty("transition","none")}else c.isActive?s.style.removeProperty("transform"):s.style.setProperty("transform","translateX(100%)"),s.style.removeProperty("transition")};return{syncState:t=>{c=t},dispose:()=>{o.dispose(),window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",y),window.removeEventListener("touchend",M)}}}function i(){throw new Error}export{n as useTouch};
//# sourceMappingURL=touch.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{b as e}from"../../chunks/tslib.es6-2c470b77.js";import{formatToStandardOptions as t}from"../../mixins/intersect/index-20e7c1e3.js";import"../../chunks/helper-fcebaced.js";class s{constructor(e,s){this.activeStack=[],this.handle=e,this.options=t(s)}observe(t){const s=document.getElementById(t);if(!s)return void console.warn(`[ScrollToTarget] Element with id '${t}' not found`);if(s._intersectForScrollToTarget)return;const i=new IntersectionObserver(((s=[],i)=>e(this,void 0,void 0,(function*(){s.some((e=>e.isIntersecting))?this.activeStack.push(t):this.activeStack.includes(t)&&this.activeStack.splice(this.activeStack.indexOf(t),1),yield this.handle.invokeMethodAsync("UpdateActiveTarget",this.activeStack[this.activeStack.length-1])}))),this.options);s._intersectForScrollToTarget=Object(s._intersectForScrollToTarget),s._intersectForScrollToTarget={handle:this.handle,observer:i},i.observe(s)}unobserve(e){const t=document.getElementById(e);if(!t)return;const s=t._intersectForScrollToTarget;s&&(s.observer.unobserve(t),delete t._intersectForScrollToTarget)}dispose(){this.handle&&(this.handle.dispose(),this.handle=null)}}function i(e,t){return new s(e,t)}export{i as init};
//# sourceMappingURL=index-bce691f8.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-bce691f8.js","sources":["../../../../../Masa.Blazor.JS/src/components/scroll-to-target/index.ts"],"sourcesContent":["import { formatToStandardOptions, IntersectionObserverOptions } from \"../../mixins/intersect\";\r\n\r\nclass ScrollToTargetJSInterop {\r\n activeStack: string[] = [];\r\n handle: DotNet.DotNetObject;\r\n options?: IntersectionObserverInit | null;\r\n\r\n constructor(\r\n handle: DotNet.DotNetObject,\r\n options?: IntersectionObserverOptions\r\n ) {\r\n this.handle = handle;\r\n this.options = formatToStandardOptions(options);\r\n }\r\n\r\n observe(id: string) {\r\n const el = document.getElementById(id);\r\n if (!el) {\r\n console.warn(`[ScrollToTarget] Element with id '${id}' not found`);\r\n return;\r\n }\r\n\r\n if (el[\"_intersectForScrollToTarget\"]) {\r\n return;\r\n }\r\n\r\n const observer = new IntersectionObserver(\r\n async (\r\n entries: IntersectionObserverEntry[] = [],\r\n observer: IntersectionObserver\r\n ) => {\r\n const isIntersecting = entries.some((e) => e.isIntersecting);\r\n if (isIntersecting) {\r\n this.activeStack.push(id);\r\n } else if (this.activeStack.includes(id)) {\r\n this.activeStack.splice(this.activeStack.indexOf(id), 1);\r\n }\r\n\r\n await this.handle.invokeMethodAsync(\r\n \"UpdateActiveTarget\",\r\n this.activeStack[this.activeStack.length - 1]\r\n );\r\n },\r\n this.options\r\n );\r\n\r\n el[\"_intersectForScrollToTarget\"] = Object(el[\"_intersectForScrollToTarget\"]);\r\n el[\"_intersectForScrollToTarget\"] = { handle: this.handle, observer };\r\n\r\n observer.observe(el);\r\n }\r\n\r\n unobserve(id: string) {\r\n const el = document.getElementById(id);\r\n if (!el) return;\r\n\r\n const observe = el[\"_intersectForScrollToTarget\"];\r\n if (!observe) return;\r\n\r\n observe.observer.unobserve(el);\r\n delete el[\"_intersectForScrollToTarget\"];\r\n }\r\n\r\n dispose() {\r\n if (this.handle) {\r\n this.handle.dispose();\r\n this.handle = null\r\n }\r\n }\r\n}\r\n\r\nfunction init(\r\n handle: DotNet.DotNetObject,\r\n options?: IntersectionObserverOptions\r\n) {\r\n return new ScrollToTargetJSInterop(handle, options);\r\n}\r\n\r\nexport { init };\r\n"],"names":["ScrollToTargetJSInterop","constructor","handle","options","this","activeStack","formatToStandardOptions","observe","id","el","document","getElementById","console","warn","observer","IntersectionObserver","entries","__awaiter","some","e","isIntersecting","push","includes","splice","indexOf","invokeMethodAsync","length","Object","unobserve","dispose","init"],"mappings":"kLAEA,MAAMA,EAKJ,WAAAC,CACEC,EACAC,GANFC,KAAWC,YAAa,GAQtBD,KAAKF,OAASA,EACdE,KAAKD,QAAUG,EAAwBH,EACxC,CAED,OAAAI,CAAQC,GACN,MAAMC,EAAKC,SAASC,eAAeH,GACnC,IAAKC,EAEH,YADAG,QAAQC,KAAK,qCAAqCL,gBAIpD,GAAIC,EAAgC,4BAClC,OAGF,MAAMK,EAAW,IAAIC,sBACnB,CACEC,EAAuC,GACvCF,IACEG,EAAAb,UAAA,OAAA,GAAA,YACqBY,EAAQE,MAAMC,GAAMA,EAAEC,iBAE3ChB,KAAKC,YAAYgB,KAAKb,GACbJ,KAAKC,YAAYiB,SAASd,IACnCJ,KAAKC,YAAYkB,OAAOnB,KAAKC,YAAYmB,QAAQhB,GAAK,SAGlDJ,KAAKF,OAAOuB,kBAChB,qBACArB,KAAKC,YAAYD,KAAKC,YAAYqB,OAAS,GAE/C,KACAtB,KAAKD,SAGPM,EAAgC,4BAAIkB,OAAOlB,EAAgC,6BAC3EA,EAAgC,4BAAI,CAAEP,OAAQE,KAAKF,OAAQY,YAE3DA,EAASP,QAAQE,EAClB,CAED,SAAAmB,CAAUpB,GACR,MAAMC,EAAKC,SAASC,eAAeH,GACnC,IAAKC,EAAI,OAET,MAAMF,EAAUE,EAAgC,4BAC3CF,IAELA,EAAQO,SAASc,UAAUnB,UACpBA,EAAgC,4BACxC,CAED,OAAAoB,GACMzB,KAAKF,SACPE,KAAKF,OAAO2B,UACZzB,KAAKF,OAAS,KAEjB,EAGH,SAAS4B,EACP5B,EACAC,GAEA,OAAO,IAAIH,EAAwBE,EAAQC,EAC7C"}

View File

@@ -1,2 +0,0 @@
import{b as e}from"../../chunks/tslib.es6.js";import{formatToStandardOptions as t}from"../../mixins/intersect/index.js";import"../../chunks/helper.js";class s{constructor(e,s){this.activeStack=[],this.handle=e,this.options=t(s)}observe(t){const s=document.getElementById(t);if(!s)return void console.warn(`[ScrollToTarget] Element with id '${t}' not found`);if(s._intersectForScrollToTarget)return;const i=new IntersectionObserver(((s=[],i)=>e(this,void 0,void 0,(function*(){s.some((e=>e.isIntersecting))?this.activeStack.push(t):this.activeStack.includes(t)&&this.activeStack.splice(this.activeStack.indexOf(t),1),yield this.handle.invokeMethodAsync("UpdateActiveTarget",this.activeStack[this.activeStack.length-1])}))),this.options);s._intersectForScrollToTarget=Object(s._intersectForScrollToTarget),s._intersectForScrollToTarget={handle:this.handle,observer:i},i.observe(s)}unobserve(e){const t=document.getElementById(e);if(!t)return;const s=t._intersectForScrollToTarget;s&&(s.observer.unobserve(t),delete t._intersectForScrollToTarget)}dispose(){this.handle&&(this.handle.dispose(),this.handle=null)}}function i(e,t){return new s(e,t)}export{i as init};
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sources":["../../../../../Masa.Blazor.JS/src/components/scroll-to-target/index.ts"],"sourcesContent":["import { formatToStandardOptions, IntersectionObserverOptions } from \"../../mixins/intersect\";\r\n\r\nclass ScrollToTargetJSInterop {\r\n activeStack: string[] = [];\r\n handle: DotNet.DotNetObject;\r\n options?: IntersectionObserverInit | null;\r\n\r\n constructor(\r\n handle: DotNet.DotNetObject,\r\n options?: IntersectionObserverOptions\r\n ) {\r\n this.handle = handle;\r\n this.options = formatToStandardOptions(options);\r\n }\r\n\r\n observe(id: string) {\r\n const el = document.getElementById(id);\r\n if (!el) {\r\n console.warn(`[ScrollToTarget] Element with id '${id}' not found`);\r\n return;\r\n }\r\n\r\n if (el[\"_intersectForScrollToTarget\"]) {\r\n return;\r\n }\r\n\r\n const observer = new IntersectionObserver(\r\n async (\r\n entries: IntersectionObserverEntry[] = [],\r\n observer: IntersectionObserver\r\n ) => {\r\n const isIntersecting = entries.some((e) => e.isIntersecting);\r\n if (isIntersecting) {\r\n this.activeStack.push(id);\r\n } else if (this.activeStack.includes(id)) {\r\n this.activeStack.splice(this.activeStack.indexOf(id), 1);\r\n }\r\n\r\n await this.handle.invokeMethodAsync(\r\n \"UpdateActiveTarget\",\r\n this.activeStack[this.activeStack.length - 1]\r\n );\r\n },\r\n this.options\r\n );\r\n\r\n el[\"_intersectForScrollToTarget\"] = Object(el[\"_intersectForScrollToTarget\"]);\r\n el[\"_intersectForScrollToTarget\"] = { handle: this.handle, observer };\r\n\r\n observer.observe(el);\r\n }\r\n\r\n unobserve(id: string) {\r\n const el = document.getElementById(id);\r\n if (!el) return;\r\n\r\n const observe = el[\"_intersectForScrollToTarget\"];\r\n if (!observe) return;\r\n\r\n observe.observer.unobserve(el);\r\n delete el[\"_intersectForScrollToTarget\"];\r\n }\r\n\r\n dispose() {\r\n if (this.handle) {\r\n this.handle.dispose();\r\n this.handle = null\r\n }\r\n }\r\n}\r\n\r\nfunction init(\r\n handle: DotNet.DotNetObject,\r\n options?: IntersectionObserverOptions\r\n) {\r\n return new ScrollToTargetJSInterop(handle, options);\r\n}\r\n\r\nexport { init };\r\n"],"names":["ScrollToTargetJSInterop","constructor","handle","options","this","activeStack","formatToStandardOptions","observe","id","el","document","getElementById","console","warn","observer","IntersectionObserver","entries","__awaiter","some","e","isIntersecting","push","includes","splice","indexOf","invokeMethodAsync","length","Object","unobserve","dispose","init"],"mappings":"uJAEA,MAAMA,EAKJ,WAAAC,CACEC,EACAC,GANFC,KAAWC,YAAa,GAQtBD,KAAKF,OAASA,EACdE,KAAKD,QAAUG,EAAwBH,EACxC,CAED,OAAAI,CAAQC,GACN,MAAMC,EAAKC,SAASC,eAAeH,GACnC,IAAKC,EAEH,YADAG,QAAQC,KAAK,qCAAqCL,gBAIpD,GAAIC,EAAgC,4BAClC,OAGF,MAAMK,EAAW,IAAIC,sBACnB,CACEC,EAAuC,GACvCF,IACEG,EAAAb,UAAA,OAAA,GAAA,YACqBY,EAAQE,MAAMC,GAAMA,EAAEC,iBAE3ChB,KAAKC,YAAYgB,KAAKb,GACbJ,KAAKC,YAAYiB,SAASd,IACnCJ,KAAKC,YAAYkB,OAAOnB,KAAKC,YAAYmB,QAAQhB,GAAK,SAGlDJ,KAAKF,OAAOuB,kBAChB,qBACArB,KAAKC,YAAYD,KAAKC,YAAYqB,OAAS,GAE/C,KACAtB,KAAKD,SAGPM,EAAgC,4BAAIkB,OAAOlB,EAAgC,6BAC3EA,EAAgC,4BAAI,CAAEP,OAAQE,KAAKF,OAAQY,YAE3DA,EAASP,QAAQE,EAClB,CAED,SAAAmB,CAAUpB,GACR,MAAMC,EAAKC,SAASC,eAAeH,GACnC,IAAKC,EAAI,OAET,MAAMF,EAAUE,EAAgC,4BAC3CF,IAELA,EAAQO,SAASc,UAAUnB,UACpBA,EAAgC,4BACxC,CAED,OAAAoB,GACMzB,KAAKF,SACPE,KAAKF,OAAO2B,UACZzB,KAAKF,OAAS,KAEjB,EAGH,SAAS4B,EACP5B,EACAC,GAEA,OAAO,IAAIH,EAAwBE,EAAQC,EAC7C"}

View File

@@ -0,0 +1,2 @@
import{b as n}from"../../chunks/helper-fcebaced.js";class e{constructor(e,t){this._onTransitionEnd=e=>{const t=this._getTransitionLeaveEnter(e);t&&this.handle&&this.handle.invokeMethodAsync("OnTransitionEnd",n(e.target),"leave"==t?0:1)},this._onTransitionCancel=e=>{const t=this._getTransitionLeaveEnter(e);t&&this.handle&&this.handle.invokeMethodAsync("OnTransitionCancel",n(e.target),"leave"==t?0:1)},this.handle=t,this.el=e,this.el.addEventListener("transitionend",this._onTransitionEnd),this.el.addEventListener("transitioncancel",this._onTransitionCancel)}_getTransitionLeaveEnter(n){const e=n.target.className.split(" ");return e.some((n=>n.includes("transition-leave")))?"leave":e.some((n=>n.includes("transition-enter")))?"enter":void 0}reset(n){this.el.removeEventListener("transitionend",this._onTransitionEnd),this.el.removeEventListener("transitioncancel",this._onTransitionCancel),this.el=n,this.el.addEventListener("transitionend",this._onTransitionEnd),this.el.addEventListener("transitioncancel",this._onTransitionCancel)}dispose(){this.el.removeEventListener("transitionend",this._onTransitionEnd),this.el.removeEventListener("transitioncancel",this._onTransitionCancel),delete t[this.handle._id],this.handle.dispose(),this.handle=null}}let t={number:e};function i(n,i){let s;if(s="string"==typeof n?document.querySelector(n):n,!s||!i)return null;const r=i._id;if(t[r])return t[r];const a=new e(s,i);return t[r]=a,a}export{i as init};
//# sourceMappingURL=index-abf7b5ed.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-abf7b5ed.js","sources":["../../../../../Masa.Blazor.JS/src/components/transition/index.ts"],"sourcesContent":["import { getBlazorId } from \"utils/helper\";\r\n\r\nclass Transition {\r\n el: HTMLElement;\r\n handle?: DotNet.DotNetObject;\r\n\r\n constructor(elOrSelector: HTMLElement, handle: DotNet.DotNetObject) {\r\n this.handle = handle;\r\n this.el = elOrSelector;\r\n this.el.addEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.addEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n }\r\n\r\n _onTransitionEnd = (e: TransitionEvent) => {\r\n const leaveEnter = this._getTransitionLeaveEnter(e);\r\n if (!leaveEnter) return;\r\n\r\n this.handle &&\r\n this.handle.invokeMethodAsync(\r\n \"OnTransitionEnd\",\r\n getBlazorId(e.target),\r\n leaveEnter == \"leave\" ? 0 : 1\r\n );\r\n };\r\n\r\n _onTransitionCancel = (e: TransitionEvent) => {\r\n const leaveEnter = this._getTransitionLeaveEnter(e);\r\n if (!leaveEnter) return;\r\n\r\n this.handle &&\r\n this.handle.invokeMethodAsync(\r\n \"OnTransitionCancel\",\r\n getBlazorId(e.target),\r\n leaveEnter == \"leave\" ? 0 : 1\r\n );\r\n };\r\n\r\n _getTransitionLeaveEnter(e: TransitionEvent): \"leave\" | \"enter\" | undefined {\r\n const classNames = e.target.className.split(\" \");\r\n if (classNames.some((n) => n.includes(\"transition-leave\"))) {\r\n return \"leave\";\r\n } else if (classNames.some((n) => n.includes(\"transition-enter\"))) {\r\n return \"enter\";\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n reset(el: HTMLElement) {\r\n this.el.removeEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.removeEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n this.el = el;\r\n this.el.addEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.addEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n }\r\n\r\n dispose() {\r\n this.el.removeEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.removeEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n\r\n delete transitionInstances[this.handle[\"_id\"]];\r\n this.handle.dispose();\r\n this.handle = null;\r\n }\r\n}\r\n\r\n// Store all instances of transition,\r\n// avoid creating multiple instances of the same element,\r\n// because we can't guarantee that js interop will only call the instantiation method once\r\nlet transitionInstances = {\r\n number: Transition,\r\n};\r\n\r\nfunction init(elOrSelector: HTMLElement | string, handle: DotNet.DotNetObject) {\r\n let el: HTMLElement;\r\n if (typeof elOrSelector === \"string\") {\r\n el = document.querySelector(elOrSelector);\r\n } else {\r\n el = elOrSelector;\r\n }\r\n\r\n if (!el || !handle) {\r\n return null;\r\n }\r\n\r\n const dotNetObjectId = handle[\"_id\"];\r\n\r\n if (transitionInstances[dotNetObjectId]) {\r\n return transitionInstances[dotNetObjectId];\r\n }\r\n\r\n const transitionEl = new Transition(el, handle);\r\n transitionInstances[dotNetObjectId] = transitionEl;\r\n\r\n return transitionEl;\r\n}\r\n\r\nexport { init };\r\n"],"names":["Transition","constructor","elOrSelector","handle","this","_onTransitionEnd","e","leaveEnter","_getTransitionLeaveEnter","invokeMethodAsync","getBlazorId","target","_onTransitionCancel","el","addEventListener","classNames","className","split","some","n","includes","reset","removeEventListener","dispose","transitionInstances","number","init","document","querySelector","dotNetObjectId","transitionEl"],"mappings":"oDAEA,MAAMA,EAIJ,WAAAC,CAAYC,EAA2BC,GAOvCC,KAAAC,iBAAoBC,IAClB,MAAMC,EAAaH,KAAKI,yBAAyBF,GAC5CC,GAELH,KAAKD,QACHC,KAAKD,OAAOM,kBACV,kBACAC,EAAYJ,EAAEK,QACA,SAAdJ,EAAwB,EAAI,EAC7B,EAGLH,KAAAQ,oBAAuBN,IACrB,MAAMC,EAAaH,KAAKI,yBAAyBF,GAC5CC,GAELH,KAAKD,QACHC,KAAKD,OAAOM,kBACV,qBACAC,EAAYJ,EAAEK,QACA,SAAdJ,EAAwB,EAAI,EAC7B,EA3BHH,KAAKD,OAASA,EACdC,KAAKS,GAAKX,EACVE,KAAKS,GAAGC,iBAAiB,gBAAiBV,KAAKC,kBAC/CD,KAAKS,GAAGC,iBAAiB,mBAAoBV,KAAKQ,oBACnD,CA0BD,wBAAAJ,CAAyBF,GACvB,MAAMS,EAAaT,EAAEK,OAAOK,UAAUC,MAAM,KAC5C,OAAIF,EAAWG,MAAMC,GAAMA,EAAEC,SAAS,sBAC7B,QACEL,EAAWG,MAAMC,GAAMA,EAAEC,SAAS,sBACpC,aAEP,CAEH,CAED,KAAAC,CAAMR,GACJT,KAAKS,GAAGS,oBAAoB,gBAAiBlB,KAAKC,kBAClDD,KAAKS,GAAGS,oBAAoB,mBAAoBlB,KAAKQ,qBACrDR,KAAKS,GAAKA,EACVT,KAAKS,GAAGC,iBAAiB,gBAAiBV,KAAKC,kBAC/CD,KAAKS,GAAGC,iBAAiB,mBAAoBV,KAAKQ,oBACnD,CAED,OAAAW,GACEnB,KAAKS,GAAGS,oBAAoB,gBAAiBlB,KAAKC,kBAClDD,KAAKS,GAAGS,oBAAoB,mBAAoBlB,KAAKQ,4BAE9CY,EAAoBpB,KAAKD,OAAY,KAC5CC,KAAKD,OAAOoB,UACZnB,KAAKD,OAAS,IACf,EAMH,IAAIqB,EAAsB,CACxBC,OAAQzB,GAGV,SAAS0B,EAAKxB,EAAoCC,GAChD,IAAIU,EAOJ,GALEA,EAD0B,iBAAjBX,EACJyB,SAASC,cAAc1B,GAEvBA,GAGFW,IAAOV,EACV,OAAO,KAGT,MAAM0B,EAAiB1B,EAAY,IAEnC,GAAIqB,EAAoBK,GACtB,OAAOL,EAAoBK,GAG7B,MAAMC,EAAe,IAAI9B,EAAWa,EAAIV,GAGxC,OAFAqB,EAAoBK,GAAkBC,EAE/BA,CACT"}

View File

@@ -1,2 +0,0 @@
import{b as n}from"../../chunks/helper.js";class e{constructor(e,t){this._onTransitionEnd=e=>{const t=this._getTransitionLeaveEnter(e);t&&this.handle&&this.handle.invokeMethodAsync("OnTransitionEnd",n(e.target),"leave"==t?0:1)},this._onTransitionCancel=e=>{const t=this._getTransitionLeaveEnter(e);t&&this.handle&&this.handle.invokeMethodAsync("OnTransitionCancel",n(e.target),"leave"==t?0:1)},this.handle=t,this.el=e,this.el.addEventListener("transitionend",this._onTransitionEnd),this.el.addEventListener("transitioncancel",this._onTransitionCancel)}_getTransitionLeaveEnter(n){const e=n.target.className.split(" ");return e.some((n=>n.includes("transition-leave")))?"leave":e.some((n=>n.includes("transition-enter")))?"enter":void 0}reset(n){this.el.removeEventListener("transitionend",this._onTransitionEnd),this.el.removeEventListener("transitioncancel",this._onTransitionCancel),this.el=n,this.el.addEventListener("transitionend",this._onTransitionEnd),this.el.addEventListener("transitioncancel",this._onTransitionCancel)}dispose(){this.el.removeEventListener("transitionend",this._onTransitionEnd),this.el.removeEventListener("transitioncancel",this._onTransitionCancel),delete t[this.handle._id],this.handle.dispose(),this.handle=null}}let t={number:e};function i(n,i){let s;if(s="string"==typeof n?document.querySelector(n):n,!s||!i)return null;const r=i._id;if(t[r])return t[r];const o=new e(s,i);return t[r]=o,o}export{i as init};
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sources":["../../../../../Masa.Blazor.JS/src/components/transition/index.ts"],"sourcesContent":["import { getBlazorId } from \"utils/helper\";\r\n\r\nclass Transition {\r\n el: HTMLElement;\r\n handle?: DotNet.DotNetObject;\r\n\r\n constructor(elOrSelector: HTMLElement, handle: DotNet.DotNetObject) {\r\n this.handle = handle;\r\n this.el = elOrSelector;\r\n this.el.addEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.addEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n }\r\n\r\n _onTransitionEnd = (e: TransitionEvent) => {\r\n const leaveEnter = this._getTransitionLeaveEnter(e);\r\n if (!leaveEnter) return;\r\n\r\n this.handle &&\r\n this.handle.invokeMethodAsync(\r\n \"OnTransitionEnd\",\r\n getBlazorId(e.target),\r\n leaveEnter == \"leave\" ? 0 : 1\r\n );\r\n };\r\n\r\n _onTransitionCancel = (e: TransitionEvent) => {\r\n const leaveEnter = this._getTransitionLeaveEnter(e);\r\n if (!leaveEnter) return;\r\n\r\n this.handle &&\r\n this.handle.invokeMethodAsync(\r\n \"OnTransitionCancel\",\r\n getBlazorId(e.target),\r\n leaveEnter == \"leave\" ? 0 : 1\r\n );\r\n };\r\n\r\n _getTransitionLeaveEnter(e: TransitionEvent): \"leave\" | \"enter\" | undefined {\r\n const classNames = e.target.className.split(\" \");\r\n if (classNames.some((n) => n.includes(\"transition-leave\"))) {\r\n return \"leave\";\r\n } else if (classNames.some((n) => n.includes(\"transition-enter\"))) {\r\n return \"enter\";\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n reset(el: HTMLElement) {\r\n this.el.removeEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.removeEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n this.el = el;\r\n this.el.addEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.addEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n }\r\n\r\n dispose() {\r\n this.el.removeEventListener(\"transitionend\", this._onTransitionEnd);\r\n this.el.removeEventListener(\"transitioncancel\", this._onTransitionCancel);\r\n\r\n delete transitionInstances[this.handle[\"_id\"]];\r\n this.handle.dispose();\r\n this.handle = null;\r\n }\r\n}\r\n\r\n// Store all instances of transition,\r\n// avoid creating multiple instances of the same element,\r\n// because we can't guarantee that js interop will only call the instantiation method once\r\nlet transitionInstances = {\r\n number: Transition,\r\n};\r\n\r\nfunction init(elOrSelector: HTMLElement | string, handle: DotNet.DotNetObject) {\r\n let el: HTMLElement;\r\n if (typeof elOrSelector === \"string\") {\r\n el = document.querySelector(elOrSelector);\r\n } else {\r\n el = elOrSelector;\r\n }\r\n\r\n if (!el || !handle) {\r\n return null;\r\n }\r\n\r\n const dotNetObjectId = handle[\"_id\"];\r\n\r\n if (transitionInstances[dotNetObjectId]) {\r\n return transitionInstances[dotNetObjectId];\r\n }\r\n\r\n const transitionEl = new Transition(el, handle);\r\n transitionInstances[dotNetObjectId] = transitionEl;\r\n\r\n return transitionEl;\r\n}\r\n\r\nexport { init };\r\n"],"names":["Transition","constructor","elOrSelector","handle","this","_onTransitionEnd","e","leaveEnter","_getTransitionLeaveEnter","invokeMethodAsync","getBlazorId","target","_onTransitionCancel","el","addEventListener","classNames","className","split","some","n","includes","reset","removeEventListener","dispose","transitionInstances","number","init","document","querySelector","dotNetObjectId","transitionEl"],"mappings":"2CAEA,MAAMA,EAIJ,WAAAC,CAAYC,EAA2BC,GAOvCC,KAAAC,iBAAoBC,IAClB,MAAMC,EAAaH,KAAKI,yBAAyBF,GAC5CC,GAELH,KAAKD,QACHC,KAAKD,OAAOM,kBACV,kBACAC,EAAYJ,EAAEK,QACA,SAAdJ,EAAwB,EAAI,EAC7B,EAGLH,KAAAQ,oBAAuBN,IACrB,MAAMC,EAAaH,KAAKI,yBAAyBF,GAC5CC,GAELH,KAAKD,QACHC,KAAKD,OAAOM,kBACV,qBACAC,EAAYJ,EAAEK,QACA,SAAdJ,EAAwB,EAAI,EAC7B,EA3BHH,KAAKD,OAASA,EACdC,KAAKS,GAAKX,EACVE,KAAKS,GAAGC,iBAAiB,gBAAiBV,KAAKC,kBAC/CD,KAAKS,GAAGC,iBAAiB,mBAAoBV,KAAKQ,oBACnD,CA0BD,wBAAAJ,CAAyBF,GACvB,MAAMS,EAAaT,EAAEK,OAAOK,UAAUC,MAAM,KAC5C,OAAIF,EAAWG,MAAMC,GAAMA,EAAEC,SAAS,sBAC7B,QACEL,EAAWG,MAAMC,GAAMA,EAAEC,SAAS,sBACpC,aAEP,CAEH,CAED,KAAAC,CAAMR,GACJT,KAAKS,GAAGS,oBAAoB,gBAAiBlB,KAAKC,kBAClDD,KAAKS,GAAGS,oBAAoB,mBAAoBlB,KAAKQ,qBACrDR,KAAKS,GAAKA,EACVT,KAAKS,GAAGC,iBAAiB,gBAAiBV,KAAKC,kBAC/CD,KAAKS,GAAGC,iBAAiB,mBAAoBV,KAAKQ,oBACnD,CAED,OAAAW,GACEnB,KAAKS,GAAGS,oBAAoB,gBAAiBlB,KAAKC,kBAClDD,KAAKS,GAAGS,oBAAoB,mBAAoBlB,KAAKQ,4BAE9CY,EAAoBpB,KAAKD,OAAY,KAC5CC,KAAKD,OAAOoB,UACZnB,KAAKD,OAAS,IACf,EAMH,IAAIqB,EAAsB,CACxBC,OAAQzB,GAGV,SAAS0B,EAAKxB,EAAoCC,GAChD,IAAIU,EAOJ,GALEA,EAD0B,iBAAjBX,EACJyB,SAASC,cAAc1B,GAEvBA,GAGFW,IAAOV,EACV,OAAO,KAGT,MAAM0B,EAAiB1B,EAAY,IAEnC,GAAIqB,EAAoBK,GACtB,OAAOL,EAAoBK,GAG7B,MAAMC,EAAe,IAAI9B,EAAWa,EAAIV,GAGxC,OAFAqB,EAAoBK,GAAkBC,EAE/BA,CACT"}

View File

@@ -0,0 +1,2 @@
import{c as t}from"../../chunks/tslib.es6-2c470b77.js";function o(t,o){const n=t.changedTouches[0];o.touchendX=n.clientX,o.touchendY=n.clientY,(t=>{const{touchstartX:o,touchendX:n,touchstartY:e,touchendY:c,dotnetHelper:s}=t;t.offsetX=n-o,t.offsetY=c-e,Math.abs(t.offsetY)<.5*Math.abs(t.offsetX)&&(n<o-16&&s.invokeMethodAsync("OnTouchend","left"),n>o+16&&s.invokeMethodAsync("OnTouchend","right")),Math.abs(t.offsetX)<.5*Math.abs(t.offsetY)&&(c<e-16&&s.invokeMethodAsync("OnTouchend","up"),c>e+16&&s.invokeMethodAsync("OnTouchend","down"))})(o)}let n=0;function e(e,c,s){var u,a;const h=(null==c?void 0:c.parent)?e.parentElement:e,r=null!==(u=null==c?void 0:c.options)&&void 0!==u?u:{};if(!h)return;const i=function(t,n){const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,dotnetHelper:n};return{touchstart:o=>{var n;(null===(n=t.touchstart)||void 0===n?void 0:n.stopPropagation)&&o.stopPropagation(),function(t,o){const n=t.changedTouches[0];o.touchstartX=n.clientX,o.touchstartY=n.clientY}(o,e)},touchend:n=>{var c;(null===(c=t.touchend)||void 0===c?void 0:c.stopPropagation)&&n.stopPropagation(),o(n,e)},touchmove:o=>{var n;(null===(n=t.touchmove)||void 0===n?void 0:n.stopPropagation)&&o.stopPropagation(),function(t,o){const n=t.changedTouches[0];o.touchmoveX=n.clientX,o.touchmoveY=n.clientY}(o,e)}}}(r,s);return h._touchHandlers=null!==(a=h._touchHandlers)&&void 0!==a?a:Object.create(null),h._touchHandlers[n]=i,Object.keys(i).forEach((o=>{var n;const e=null!==(n=r[o])&&void 0!==n?n:{passive:!0},c=t(e,["stopPropagation"]);h.addEventListener(o,i[o],c)})),n++}function c(t,o){if(!t)return;const n=t._touchHandlers;if(!n||!n[o])return;const e=n[o];Object.keys(e).forEach((o=>{t.removeEventListener(o,e[o])})),delete n[o]}export{c as cleanupTouch,e as useTouch};
//# sourceMappingURL=touch-f601a168.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{c as t}from"../../chunks/tslib.es6.js";function o(t,o){const n=t.changedTouches[0];o.touchendX=n.clientX,o.touchendY=n.clientY,(t=>{const{touchstartX:o,touchendX:n,touchstartY:e,touchendY:c,dotnetHelper:s}=t;t.offsetX=n-o,t.offsetY=c-e,Math.abs(t.offsetY)<.5*Math.abs(t.offsetX)&&(n<o-16&&s.invokeMethodAsync("OnTouchend","left"),n>o+16&&s.invokeMethodAsync("OnTouchend","right")),Math.abs(t.offsetX)<.5*Math.abs(t.offsetY)&&(c<e-16&&s.invokeMethodAsync("OnTouchend","up"),c>e+16&&s.invokeMethodAsync("OnTouchend","down"))})(o)}let n=0;function e(e,c,s){var u,a;const h=(null==c?void 0:c.parent)?e.parentElement:e,r=null!==(u=null==c?void 0:c.options)&&void 0!==u?u:{};if(!h)return;const i=function(t,n){const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,dotnetHelper:n};return{touchstart:o=>{var n;(null===(n=t.touchstart)||void 0===n?void 0:n.stopPropagation)&&o.stopPropagation(),function(t,o){const n=t.changedTouches[0];o.touchstartX=n.clientX,o.touchstartY=n.clientY}(o,e)},touchend:n=>{var c;(null===(c=t.touchend)||void 0===c?void 0:c.stopPropagation)&&n.stopPropagation(),o(n,e)},touchmove:o=>{var n;(null===(n=t.touchmove)||void 0===n?void 0:n.stopPropagation)&&o.stopPropagation(),function(t,o){const n=t.changedTouches[0];o.touchmoveX=n.clientX,o.touchmoveY=n.clientY}(o,e)}}}(r,s);return h._touchHandlers=null!==(a=h._touchHandlers)&&void 0!==a?a:Object.create(null),h._touchHandlers[n]=i,Object.keys(i).forEach((o=>{var n;const e=null!==(n=r[o])&&void 0!==n?n:{passive:!0},c=t(e,["stopPropagation"]);h.addEventListener(o,i[o],c)})),n++}function c(t,o){if(!t)return;const n=t._touchHandlers;if(!n||!n[o])return;const e=n[o];Object.keys(e).forEach((o=>{t.removeEventListener(o,e[o])})),delete n[o]}export{c as cleanupTouch,e as useTouch};
//# sourceMappingURL=touch.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,14 @@
{
"components/input/index.js": "components/input/index-dacf9172.js",
"components/navigation-drawer/touch.js": "components/navigation-drawer/touch-591647e2.js",
"components/overlay/scroll-strategy.js": "components/overlay/scroll-strategy-483fa795.js",
"components/page-stack/index.js": "components/page-stack/index-3e905ef2.js",
"components/page-stack/touch.js": "components/page-stack/touch-5a869b3d.js",
"components/scroll-to-target/index.js": "components/scroll-to-target/index-bce691f8.js",
"components/transition/index.js": "components/transition/index-abf7b5ed.js",
"components/window/touch.js": "components/window/touch-f601a168.js",
"mixins/activatable/index.js": "mixins/activatable/index-33daf586.js",
"mixins/intersect/index.js": "mixins/intersect/index-20e7c1e3.js",
"mixins/outside-click/index.js": "mixins/outside-click/index-392b22b4.js",
"mixins/resize/index.js": "mixins/resize/index-c158af85.js"
}

View File

@@ -0,0 +1,2 @@
import{d as t}from"../../chunks/helper-fcebaced.js";import{p as e}from"../../chunks/EventType-63cda6c3.js";class s{constructor(t,e,s){this.openDelay=t,this.closeDelay=e,this.dotNetHelper=s}clearDelay(){clearTimeout(this.openTimeout),clearTimeout(this.closeTimeout)}runDelay(t,e){this.clearDelay();const s=parseInt(this[`${t}Delay`],10);this[`${t}Timeout`]=setTimeout(e||(()=>{const e={open:!0,close:!1}[t];this.setActive(e)}),s)}setActive(t){this.isActive!=t&&(this.isActive=t,this.dotNetHelper.invokeMethodAsync("SetActive",this.isActive))}resetDelay(t,e){this.openDelay=t,this.closeDelay=e}}class i extends s{constructor(e,s,i,o,n,r,c,a,h){super(c,a,h),this.activatorListeners={},this.popupListeners={},this.isActive=e,this.activator=t(s),this.disabled=i,this.openOnClick=o,this.openOnHover=n,this.openOnFocus=r,this.dotNetHelper=h}resetActivator(t){const e=document.querySelector(t);e&&(this.activator=e),this.resetActivatorEvents(this.disabled,this.openOnHover,this.openOnFocus)}addActivatorEvents(){if(!this.activator||this.disabled)return;this.activatorListeners=this.genActivatorListeners();const t=Object.keys(this.activatorListeners);for(const e of t)this.activator.addEventListener(e,this.activatorListeners[e])}genActivatorListeners(){if(this.disabled)return{};const t={};return this.openOnHover?(t.mouseenter=t=>{this.runDelay("open")},t.mouseleave=t=>{this.runDelay("close")}):this.openOnClick&&(t.click=t=>{var s,i;this.activator&&this.activator.focus();const o=t.composedPath().find((t=>t===this.activator));(null===(i=null===(s=null==o?void 0:o._blazorEvents_1)||void 0===s?void 0:s.handlers)||void 0===i?void 0:i.click)||t.stopPropagation(),this.dotNetHelper.invokeMethodAsync("OnClick",e(t)),this.setActive(!this.isActive)}),this.openOnFocus&&(t.focus=t=>{var e,s;const i=t.composedPath().find((t=>t===this.activator));(null===(s=null===(e=null==i?void 0:i._blazorEvents_1)||void 0===e?void 0:e.handlers)||void 0===s?void 0:s.focus)||t.stopPropagation(),this.runDelay("open")},t.blur=t=>{this.runDelay("close")}),t}removeActivatorEvents(){if(!this.activator)return;const t=Object.keys(this.activatorListeners);for(const e of t)this.activator.removeEventListener(e,this.activatorListeners[e]);this.activatorListeners={}}resetActivatorEvents(t,e,s){this.disabled=t,this.openOnHover=e,this.openOnFocus=s,this.removeActivatorEvents(),this.addActivatorEvents()}runDelaying(t){this.runDelay(t?"open":"close")}registerPopup(t,e){const s=document.querySelector(t);s?(this.popupElement=s,this.closeOnContentClick=e,this.addPopupEvents()):console.error("popup not exists")}addPopupEvents(){if(!this.popupElement||this.disabled)return;this.popupListeners=this.genPopupListeners();const t=Object.keys(this.popupListeners);for(const e of t)this.popupElement.addEventListener(e,this.popupListeners[e])}removePopupEvents(){if(!this.popupElement)return;const t=Object.keys(this.popupListeners);for(const e of t)this.popupElement.removeEventListener(e,this.popupListeners[e]);this.popupListeners={}}genPopupListeners(){if(this.disabled)return;const t={};return!this.disabled&&this.openOnHover&&(t.mouseenter=t=>{this.runDelay("open")},t.mouseleave=t=>{this.runDelay("close")}),this.closeOnContentClick&&(t.click=t=>{this.setActive(!1)}),t}resetPopupEvents(t){this.closeOnContentClick=t,this.removePopupEvents(),this.addPopupEvents()}}function o(t,e,s,o,n,r,c,a,h){var p=new i(t,e,s,o,n,r,c,a,h);return p.addActivatorEvents(),p}export{o as init};
//# sourceMappingURL=index-33daf586.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{d as t}from"../../chunks/helper.js";import{p as e}from"../../chunks/EventType.js";class s{constructor(t,e,s){this.openDelay=t,this.closeDelay=e,this.dotNetHelper=s}clearDelay(){clearTimeout(this.openTimeout),clearTimeout(this.closeTimeout)}runDelay(t,e){this.clearDelay();const s=parseInt(this[`${t}Delay`],10);this[`${t}Timeout`]=setTimeout(e||(()=>{const e={open:!0,close:!1}[t];this.setActive(e)}),s)}setActive(t){this.isActive!=t&&(this.isActive=t,this.dotNetHelper.invokeMethodAsync("SetActive",this.isActive))}resetDelay(t,e){this.openDelay=t,this.closeDelay=e}}class i extends s{constructor(e,s,i,o,n,r,c,a,h){super(c,a,h),this.activatorListeners={},this.popupListeners={},this.isActive=e,this.activator=t(s),this.disabled=i,this.openOnClick=o,this.openOnHover=n,this.openOnFocus=r,this.dotNetHelper=h}resetActivator(t){const e=document.querySelector(t);e&&(this.activator=e),this.resetActivatorEvents(this.disabled,this.openOnHover,this.openOnFocus)}addActivatorEvents(){if(!this.activator||this.disabled)return;this.activatorListeners=this.genActivatorListeners();const t=Object.keys(this.activatorListeners);for(const e of t)this.activator.addEventListener(e,this.activatorListeners[e])}genActivatorListeners(){if(this.disabled)return{};const t={};return this.openOnHover?(t.mouseenter=t=>{this.runDelay("open")},t.mouseleave=t=>{this.runDelay("close")}):this.openOnClick&&(t.click=t=>{var s,i;this.activator&&this.activator.focus();const o=t.composedPath().find((t=>t===this.activator));(null===(i=null===(s=null==o?void 0:o._blazorEvents_1)||void 0===s?void 0:s.handlers)||void 0===i?void 0:i.click)||t.stopPropagation(),this.dotNetHelper.invokeMethodAsync("OnClick",e(t)),this.setActive(!this.isActive)}),this.openOnFocus&&(t.focus=t=>{var e,s;const i=t.composedPath().find((t=>t===this.activator));(null===(s=null===(e=null==i?void 0:i._blazorEvents_1)||void 0===e?void 0:e.handlers)||void 0===s?void 0:s.focus)||t.stopPropagation(),this.runDelay("open")},t.blur=t=>{this.runDelay("close")}),t}removeActivatorEvents(){if(!this.activator)return;const t=Object.keys(this.activatorListeners);for(const e of t)this.activator.removeEventListener(e,this.activatorListeners[e]);this.activatorListeners={}}resetActivatorEvents(t,e,s){this.disabled=t,this.openOnHover=e,this.openOnFocus=s,this.removeActivatorEvents(),this.addActivatorEvents()}runDelaying(t){this.runDelay(t?"open":"close")}registerPopup(t,e){const s=document.querySelector(t);s?(this.popupElement=s,this.closeOnContentClick=e,this.addPopupEvents()):console.error("popup not exists")}addPopupEvents(){if(!this.popupElement||this.disabled)return;this.popupListeners=this.genPopupListeners();const t=Object.keys(this.popupListeners);for(const e of t)this.popupElement.addEventListener(e,this.popupListeners[e])}removePopupEvents(){if(!this.popupElement)return;const t=Object.keys(this.popupListeners);for(const e of t)this.popupElement.removeEventListener(e,this.popupListeners[e]);this.popupListeners={}}genPopupListeners(){if(this.disabled)return;const t={};return!this.disabled&&this.openOnHover&&(t.mouseenter=t=>{this.runDelay("open")},t.mouseleave=t=>{this.runDelay("close")}),this.closeOnContentClick&&(t.click=t=>{this.setActive(!1)}),t}resetPopupEvents(t){this.closeOnContentClick=t,this.removePopupEvents(),this.addPopupEvents()}}function o(t,e,s,o,n,r,c,a,h){var p=new i(t,e,s,o,n,r,c,a,h);return p.addActivatorEvents(),p}export{o as init};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{b as t}from"../../chunks/tslib.es6-2c470b77.js";import{g as o}from"../../chunks/helper-fcebaced.js";function r(r,n,i){var c;if(!n)throw new Error("the handle cannot be null");if(!r)return void n.dispose();if(r._intersect)return;const a=null!==(c=null==i?void 0:i.once)&&void 0!==c&&c,g=s(i),u=new IntersectionObserver(((i=[],s)=>t(this,void 0,void 0,(function*(){const t=i.map((t=>({isIntersecting:t.isIntersecting,target:o(t.target)}))),s=t.some((t=>t.isIntersecting));a&&!s||(yield n.invokeMethodAsync("Invoke",{isIntersecting:s,entries:t})),s&&a&&e(r)}))),g);r._intersect=Object(r._intersect),r._intersect={handle:n,observer:u},u.observe(r)}function e(t){if(!t)return;const o=t._intersect;o&&(o.observer.unobserve(t),o.handle.dispose(),delete t._intersect)}function n(t,o,e){if(t){const n=document.querySelector(t);n&&r(n,o,e)}}function i(t){if(t){const o=document.querySelector(t);o&&e(o)}}function s(t){if(!t)return null;const o=t.rootSelector?document.querySelector(t.rootSelector):null;return"None"!==t.autoRootMargin&&("Top"===t.autoRootMargin&&"0px"!==t.rootMarginBottom?t.rootMarginTop=c(o,t.rootMarginBottom,!1)+"px":"Right"===t.autoRootMargin&&"0px"!==t.rootMarginLeft?t.rootMarginRight=c(o,t.rootMarginLeft,!1)+"px":"Bottom"===t.autoRootMargin&&"0px"!==t.rootMarginTop?t.rootMarginBottom=c(o,t.rootMarginTop,!1)+"px":"Left"===t.autoRootMargin&&"0px"!==t.rootMarginRight&&(t.rootMarginLeft=c(o,t.rootMarginRight,!1)+"px")),{rootMargin:`${t.rootMarginTop} ${t.rootMarginRight} ${t.rootMarginBottom} ${t.rootMarginLeft}`,root:o,threshold:t.threshold}}function c(t,o,r){t=t||document.documentElement;const e=parseInt(o);if(isNaN(e))return 0;var n=r?t.clientWidth:t.clientHeight;return Math.abs(e)-n}export{s as formatToStandardOptions,r as observe,n as observeSelector,e as unobserve,i as unobserveSelector};
//# sourceMappingURL=index-20e7c1e3.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
import{b as t}from"../../chunks/tslib.es6.js";import{g as o}from"../../chunks/helper.js";function r(r,n,i){var c;if(!n)throw new Error("the handle cannot be null");if(!r)return void n.dispose();if(r._intersect)return;const a=null!==(c=null==i?void 0:i.once)&&void 0!==c&&c,g=s(i),u=new IntersectionObserver(((i=[],s)=>t(this,void 0,void 0,(function*(){const t=i.map((t=>({isIntersecting:t.isIntersecting,target:o(t.target)}))),s=t.some((t=>t.isIntersecting));a&&!s||(yield n.invokeMethodAsync("Invoke",{isIntersecting:s,entries:t})),s&&a&&e(r)}))),g);r._intersect=Object(r._intersect),r._intersect={handle:n,observer:u},u.observe(r)}function e(t){if(!t)return;const o=t._intersect;o&&(o.observer.unobserve(t),o.handle.dispose(),delete t._intersect)}function n(t,o,e){if(t){const n=document.querySelector(t);n&&r(n,o,e)}}function i(t){if(t){const o=document.querySelector(t);o&&e(o)}}function s(t){if(!t)return null;const o=t.rootSelector?document.querySelector(t.rootSelector):null;return"None"!==t.autoRootMargin&&("Top"===t.autoRootMargin&&"0px"!==t.rootMarginBottom?t.rootMarginTop=c(o,t.rootMarginBottom,!1)+"px":"Right"===t.autoRootMargin&&"0px"!==t.rootMarginLeft?t.rootMarginRight=c(o,t.rootMarginLeft,!1)+"px":"Bottom"===t.autoRootMargin&&"0px"!==t.rootMarginTop?t.rootMarginBottom=c(o,t.rootMarginTop,!1)+"px":"Left"===t.autoRootMargin&&"0px"!==t.rootMarginRight&&(t.rootMarginLeft=c(o,t.rootMarginRight,!1)+"px")),{rootMargin:`${t.rootMarginTop} ${t.rootMarginRight} ${t.rootMarginBottom} ${t.rootMarginLeft}`,root:o,threshold:t.threshold}}function c(t,o,r){t=t||document.documentElement;const e=parseInt(o);if(isNaN(e))return 0;var n=r?t.clientWidth:t.clientHeight;return Math.abs(e)-n}export{s as formatToStandardOptions,r as observe,n as observeSelector,e as unobserve,i as unobserveSelector};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
class e{constructor(e,t){this.lastMousedownWasOutside=!0,this.dotNetHelper=e,this.excludedSelectors=t}genListeners(){this.listener=e=>{this.checkEvent(e)||this.lastMousedownWasOutside&&this.dotNetHelper.invokeMethodAsync("OnOutsideClick")},this.mousedownListener=e=>{this.lastMousedownWasOutside=!this.checkEvent(e)}}addListeners(){this.genListeners(),document.addEventListener("click",this.listener,!0),document.addEventListener("mousedown",this.mousedownListener,!0)}removeListeners(){document.removeEventListener("click",this.listener,!0),document.removeEventListener("mousedown",this.mousedownListener,!0)}resetListener(){this.removeListeners(),this.addListeners()}updateExcludeSelectors(e){this.excludedSelectors=e}checkEvent(e){return this.excludedSelectors.some((t=>Array.from(document.querySelectorAll(t)).some((t=>t.contains(e.target)))))}unbind(){this.removeListeners()}}function t(t,s){var n=new e(t,s);return n.addListeners(),n}export{t as init};
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index-392b22b4.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-392b22b4.js","sources":["../../../../../Masa.Blazor.JS/src/mixins/outside-click.ts"],"sourcesContent":["class OutsideClick {\r\n dotNetHelper: DotNet.DotNetObject;\r\n listener: (e: MouseEvent & KeyboardEvent & FocusEvent) => void;\r\n mousedownListener: (e: MouseEvent) => void;\r\n excludedSelectors: string[];\r\n lastMousedownWasOutside: boolean = true;\r\n\r\n constructor(dotNetHelper: DotNet.DotNetObject, excludedSelectors: string[]) {\r\n this.dotNetHelper = dotNetHelper;\r\n this.excludedSelectors = excludedSelectors;\r\n }\r\n\r\n genListeners() {\r\n this.listener = (e) => {\r\n if (this.checkEvent(e)) return;\r\n\r\n if (this.lastMousedownWasOutside) {\r\n this.dotNetHelper.invokeMethodAsync(\"OnOutsideClick\");\r\n }\r\n };\r\n\r\n this.mousedownListener = (e) => {\r\n this.lastMousedownWasOutside = !this.checkEvent(e);\r\n };\r\n }\r\n\r\n addListeners() {\r\n this.genListeners();\r\n document.addEventListener(\"click\", this.listener, true);\r\n document.addEventListener(\"mousedown\", this.mousedownListener, true);\r\n }\r\n\r\n removeListeners() {\r\n document.removeEventListener(\"click\", this.listener, true);\r\n document.removeEventListener(\"mousedown\", this.mousedownListener, true);\r\n }\r\n\r\n resetListener() {\r\n this.removeListeners();\r\n this.addListeners();\r\n }\r\n\r\n updateExcludeSelectors(selectors: string[]) {\r\n this.excludedSelectors = selectors;\r\n }\r\n\r\n checkEvent(e: MouseEvent) {\r\n return this.excludedSelectors.some((selector) => {\r\n const elements = Array.from(document.querySelectorAll(selector));\r\n return elements.some(el => el.contains(e.target as HTMLElement));\r\n });\r\n }\r\n\r\n unbind() {\r\n this.removeListeners();\r\n }\r\n}\r\n\r\nfunction init(dotNetHelper: DotNet.DotNetObject, excludeSelectors: string[]) {\r\n var instance = new OutsideClick(dotNetHelper, excludeSelectors);\r\n\r\n instance.addListeners();\r\n\r\n return instance;\r\n}\r\n\r\nexport { init };\r\n"],"names":["OutsideClick","constructor","dotNetHelper","excludedSelectors","this","lastMousedownWasOutside","genListeners","listener","e","checkEvent","invokeMethodAsync","mousedownListener","addListeners","document","addEventListener","removeListeners","removeEventListener","resetListener","updateExcludeSelectors","selectors","some","selector","Array","from","querySelectorAll","el","contains","target","unbind","init","excludeSelectors","instance"],"mappings":"AAAA,MAAMA,EAOJ,WAAAC,CAAYC,EAAmCC,GAF/CC,KAAuBC,yBAAY,EAGjCD,KAAKF,aAAeA,EACpBE,KAAKD,kBAAoBA,CAC1B,CAED,YAAAG,GACEF,KAAKG,SAAYC,IACXJ,KAAKK,WAAWD,IAEhBJ,KAAKC,yBACPD,KAAKF,aAAaQ,kBAAkB,iBACrC,EAGHN,KAAKO,kBAAqBH,IACxBJ,KAAKC,yBAA2BD,KAAKK,WAAWD,EAAE,CAErD,CAED,YAAAI,GACER,KAAKE,eACLO,SAASC,iBAAiB,QAASV,KAAKG,UAAU,GAClDM,SAASC,iBAAiB,YAAaV,KAAKO,mBAAmB,EAChE,CAED,eAAAI,GACEF,SAASG,oBAAoB,QAASZ,KAAKG,UAAU,GACrDM,SAASG,oBAAoB,YAAaZ,KAAKO,mBAAmB,EACnE,CAED,aAAAM,GACEb,KAAKW,kBACLX,KAAKQ,cACN,CAED,sBAAAM,CAAuBC,GACrBf,KAAKD,kBAAoBgB,CAC1B,CAED,UAAAV,CAAWD,GACT,OAAOJ,KAAKD,kBAAkBiB,MAAMC,GACjBC,MAAMC,KAAKV,SAASW,iBAAiBH,IACtCD,MAAKK,GAAMA,EAAGC,SAASlB,EAAEmB,WAE5C,CAED,MAAAC,GACExB,KAAKW,iBACN,EAGH,SAASc,EAAK3B,EAAmC4B,GAC/C,IAAIC,EAAW,IAAI/B,EAAaE,EAAc4B,GAI9C,OAFAC,EAASnB,eAEFmB,CACT"}

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sources":["../../../../../Masa.Blazor.JS/src/mixins/outside-click.ts"],"sourcesContent":["class OutsideClick {\r\n dotNetHelper: DotNet.DotNetObject;\r\n listener: (e: MouseEvent & KeyboardEvent & FocusEvent) => void;\r\n mousedownListener: (e: MouseEvent) => void;\r\n excludedSelectors: string[];\r\n lastMousedownWasOutside: boolean = true;\r\n\r\n constructor(dotNetHelper: DotNet.DotNetObject, excludedSelectors: string[]) {\r\n this.dotNetHelper = dotNetHelper;\r\n this.excludedSelectors = excludedSelectors;\r\n }\r\n\r\n genListeners() {\r\n this.listener = (e) => {\r\n if (this.checkEvent(e)) return;\r\n\r\n if (this.lastMousedownWasOutside) {\r\n this.dotNetHelper.invokeMethodAsync(\"OnOutsideClick\");\r\n }\r\n };\r\n\r\n this.mousedownListener = (e) => {\r\n this.lastMousedownWasOutside = !this.checkEvent(e);\r\n };\r\n }\r\n\r\n addListeners() {\r\n this.genListeners();\r\n document.addEventListener(\"click\", this.listener, true);\r\n document.addEventListener(\"mousedown\", this.mousedownListener, true);\r\n }\r\n\r\n removeListeners() {\r\n document.removeEventListener(\"click\", this.listener, true);\r\n document.removeEventListener(\"mousedown\", this.mousedownListener, true);\r\n }\r\n\r\n resetListener() {\r\n this.removeListeners();\r\n this.addListeners();\r\n }\r\n\r\n updateExcludeSelectors(selectors: string[]) {\r\n this.excludedSelectors = selectors;\r\n }\r\n\r\n checkEvent(e: MouseEvent) {\r\n return this.excludedSelectors.some((selector) => {\r\n const elements = Array.from(document.querySelectorAll(selector));\r\n return elements.some(el => el.contains(e.target as HTMLElement));\r\n });\r\n }\r\n\r\n unbind() {\r\n this.removeListeners();\r\n }\r\n}\r\n\r\nfunction init(dotNetHelper: DotNet.DotNetObject, excludeSelectors: string[]) {\r\n var instance = new OutsideClick(dotNetHelper, excludeSelectors);\r\n\r\n instance.addListeners();\r\n\r\n return instance;\r\n}\r\n\r\nexport { init };\r\n"],"names":["OutsideClick","constructor","dotNetHelper","excludedSelectors","this","lastMousedownWasOutside","genListeners","listener","e","checkEvent","invokeMethodAsync","mousedownListener","addListeners","document","addEventListener","removeListeners","removeEventListener","resetListener","updateExcludeSelectors","selectors","some","selector","Array","from","querySelectorAll","el","contains","target","unbind","init","excludeSelectors","instance"],"mappings":"AAAA,MAAMA,EAOJ,WAAAC,CAAYC,EAAmCC,GAF/CC,KAAuBC,yBAAY,EAGjCD,KAAKF,aAAeA,EACpBE,KAAKD,kBAAoBA,CAC1B,CAED,YAAAG,GACEF,KAAKG,SAAYC,IACXJ,KAAKK,WAAWD,IAEhBJ,KAAKC,yBACPD,KAAKF,aAAaQ,kBAAkB,iBACrC,EAGHN,KAAKO,kBAAqBH,IACxBJ,KAAKC,yBAA2BD,KAAKK,WAAWD,EAAE,CAErD,CAED,YAAAI,GACER,KAAKE,eACLO,SAASC,iBAAiB,QAASV,KAAKG,UAAU,GAClDM,SAASC,iBAAiB,YAAaV,KAAKO,mBAAmB,EAChE,CAED,eAAAI,GACEF,SAASG,oBAAoB,QAASZ,KAAKG,UAAU,GACrDM,SAASG,oBAAoB,YAAaZ,KAAKO,mBAAmB,EACnE,CAED,aAAAM,GACEb,KAAKW,kBACLX,KAAKQ,cACN,CAED,sBAAAM,CAAuBC,GACrBf,KAAKD,kBAAoBgB,CAC1B,CAED,UAAAV,CAAWD,GACT,OAAOJ,KAAKD,kBAAkBiB,MAAMC,GACjBC,MAAMC,KAAKV,SAASW,iBAAiBH,IACtCD,MAAKK,GAAMA,EAAGC,SAASlB,EAAEmB,WAE5C,CAED,MAAAC,GACExB,KAAKW,iBACN,EAGH,SAASc,EAAK3B,EAAmC4B,GAC/C,IAAIC,EAAW,IAAI/B,EAAaE,EAAc4B,GAI9C,OAFAC,EAASnB,eAEFmB,CACT"}

View File

@@ -0,0 +1,2 @@
import{b as e}from"../../chunks/tslib.es6-2c470b77.js";var r=function(e,r,n){var i=null,t=null,o=n&&n.leading,s=n&&n.trailing;null==o&&(o=!0);null==s&&(s=!o);1==o&&(s=!1);var u=function(){i&&(clearTimeout(i),i=null)},l=function(){var n=o&&!i,u=this,l=arguments;if(t=function(){return e.apply(u,l)},i||(i=setTimeout((function(){if(i=null,s)return t()}),r)),n)return n=!1,t()};return l.cancel=u,l.flush=function(){var e=t;u(),e&&e()},l};function n(n,i){if(!i)throw new Error("the handle from .NET cannot be null");if(!n)return void i.dispose();const t=r((()=>{i&&i.invokeMethodAsync("Invoke")}),300,{trailing:!0}),o=new ResizeObserver(((r=[])=>e(this,void 0,void 0,(function*(){r.length&&t()}))));n._resizeObserver=Object(n._resizeObserver),n._resizeObserver={handle:i,observer:o},o.observe(n)}function i(e){e&&e._resizeObserver&&(e._resizeObserver.observer.unobserve(e),e._resizeObserver.handle.dispose(),delete e._resizeObserver)}function t(e,r){if(e){const i=document.querySelector(e);i&&n(i,r)}}function o(e){if(e){const r=document.querySelector(e);r&&i(r)}}export{n as observe,t as observeSelector,i as unobserve,o as unobserveSelector};
//# sourceMappingURL=index-c158af85.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-c158af85.js","sources":["../../../../../Masa.Blazor.JS/node_modules/.pnpm/just-throttle@4.2.0/node_modules/just-throttle/index.mjs","../../../../../Masa.Blazor.JS/src/mixins/resize.ts"],"sourcesContent":["var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import throttle from \"just-throttle\";\r\n\r\nfunction observe(el: HTMLElement, handle: DotNet.DotNetObject) {\r\n if (!handle) {\r\n throw new Error(\"the handle from .NET cannot be null\");\r\n }\r\n\r\n if (!el) {\r\n handle.dispose();\r\n return;\r\n }\r\n\r\n const throttled = throttle(\r\n () => {\r\n if (!handle) return;\r\n handle.invokeMethodAsync(\"Invoke\");\r\n },\r\n 300,\r\n { trailing: true }\r\n );\r\n\r\n const observer = new ResizeObserver(\r\n async (entries: ResizeObserverEntry[] = []) => {\r\n if (!entries.length) return;\r\n throttled();\r\n }\r\n );\r\n\r\n el._resizeObserver = Object(el._resizeObserver);\r\n el._resizeObserver = { handle, observer };\r\n\r\n observer.observe(el);\r\n}\r\n\r\nfunction unobserve(el: HTMLElement) {\r\n if (!el) return;\r\n\r\n if (!el._resizeObserver) return;\r\n\r\n el._resizeObserver.observer.unobserve(el);\r\n el._resizeObserver.handle.dispose();\r\n delete el._resizeObserver;\r\n}\r\n\r\nfunction observeSelector(\r\n selector: string,\r\n handle: DotNet.DotNetObject\r\n) {\r\n if (selector) {\r\n const el = document.querySelector(selector) as HTMLElement;\r\n el && observe(el, handle);\r\n }\r\n}\r\n\r\nfunction unobserveSelector(selector: string) {\r\n if (selector) {\r\n const el = document.querySelector(selector) as HTMLElement;\r\n el && unobserve(el);\r\n }\r\n}\r\n\r\nexport { observe, unobserve, observeSelector, unobserveSelector };\r\n"],"names":["functionThrottle","fn","interval","options","timeoutId","throttledFn","leading","trailing","cancel","clearTimeout","throttleWrapper","callNow","context","this","args","arguments","apply","setTimeout","flush","call","observe","el","handle","Error","dispose","throttled","throttle","invokeMethodAsync","observer","ResizeObserver","entries","__awaiter","length","_resizeObserver","Object","unobserve","observeSelector","selector","document","querySelector","unobserveSelector"],"mappings":"uDAAA,IAAIA,EAEJ,SAAkBC,EAAIC,EAAUC,GAC9B,IAAIC,EAAY,KACZC,EAAc,KACdC,EAAWH,GAAWA,EAAQG,QAC9BC,EAAYJ,GAAWA,EAAQI,SAEpB,MAAXD,IACFA,GAAU,GAGI,MAAZC,IACFA,GAAYD,GAGC,GAAXA,IACFC,GAAW,GAGb,IAAIC,EAAS,WACPJ,IACFK,aAAaL,GACbA,EAAY,KAElB,EAWMM,EAAkB,WACpB,IAAIC,EAAUL,IAAYF,EACtBQ,EAAUC,KACVC,EAAOC,UAgBX,GAdAV,EAAc,WACZ,OAAOJ,EAAGe,MAAMJ,EAASE,EAC/B,EAESV,IACHA,EAAYa,YAAW,WAGrB,GAFAb,EAAY,KAERG,EACF,OAAOF,GAEV,GAAEH,IAGDS,EAEF,OADAA,GAAU,EACHN,GAEb,EAKE,OAHAK,EAAgBF,OAASA,EACzBE,EAAgBQ,MAnCJ,WACV,IAAIC,EAAOd,EACXG,IAEIW,GACFA,GAEN,EA8BST,CACT,EC/DA,SAASU,EAAQC,EAAiBC,GAChC,IAAKA,EACH,MAAM,IAAIC,MAAM,uCAGlB,IAAKF,EAEH,YADAC,EAAOE,UAIT,MAAMC,EAAYC,GAChB,KACOJ,GACLA,EAAOK,kBAAkB,SAAS,GAEpC,IACA,CAAEpB,UAAU,IAGRqB,EAAW,IAAIC,gBACnB,CAAOC,EAAiC,KAAMC,EAAAlB,UAAA,OAAA,GAAA,YACvCiB,EAAQE,QACbP,GACD,MAGHJ,EAAGY,gBAAkBC,OAAOb,EAAGY,iBAC/BZ,EAAGY,gBAAkB,CAAEX,SAAQM,YAE7BA,EAASR,QAAQC,EACrB,CAEA,SAASc,EAAUd,GACZA,GAEAA,EAAGY,kBAERZ,EAAGY,gBAAgBL,SAASO,UAAUd,GACtCA,EAAGY,gBAAgBX,OAAOE,iBACnBH,EAAGY,gBACZ,CAEA,SAASG,EACPC,EACAf,GAEA,GAAIe,EAAU,CACZ,MAAMhB,EAAKiB,SAASC,cAAcF,GAClChB,GAAMD,EAAQC,EAAIC,EACnB,CACH,CAEA,SAASkB,EAAkBH,GACzB,GAAIA,EAAU,CACZ,MAAMhB,EAAKiB,SAASC,cAAcF,GAClChB,GAAMc,EAAUd,EACjB,CACH"}

View File

@@ -1,2 +0,0 @@
import{b as e}from"../../chunks/tslib.es6.js";var r=function(e,r,n){var i=null,t=null,o=n&&n.leading,s=n&&n.trailing;null==o&&(o=!0);null==s&&(s=!o);1==o&&(s=!1);var u=function(){i&&(clearTimeout(i),i=null)},l=function(){var n=o&&!i,u=this,l=arguments;if(t=function(){return e.apply(u,l)},i||(i=setTimeout((function(){if(i=null,s)return t()}),r)),n)return n=!1,t()};return l.cancel=u,l.flush=function(){var e=t;u(),e&&e()},l};function n(n,i){if(!i)throw new Error("the handle from .NET cannot be null");if(!n)return void i.dispose();const t=r((()=>{i&&i.invokeMethodAsync("Invoke")}),300,{trailing:!0}),o=new ResizeObserver(((r=[])=>e(this,void 0,void 0,(function*(){r.length&&t()}))));n._resizeObserver=Object(n._resizeObserver),n._resizeObserver={handle:i,observer:o},o.observe(n)}function i(e){e&&e._resizeObserver&&(e._resizeObserver.observer.unobserve(e),e._resizeObserver.handle.dispose(),delete e._resizeObserver)}function t(e,r){if(e){const i=document.querySelector(e);i&&n(i,r)}}function o(e){if(e){const r=document.querySelector(e);r&&i(r)}}export{n as observe,t as observeSelector,i as unobserve,o as unobserveSelector};
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sources":["../../../../../Masa.Blazor.JS/node_modules/.pnpm/just-throttle@4.2.0/node_modules/just-throttle/index.mjs","../../../../../Masa.Blazor.JS/src/mixins/resize.ts"],"sourcesContent":["var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import throttle from \"just-throttle\";\r\n\r\nfunction observe(el: HTMLElement, handle: DotNet.DotNetObject) {\r\n if (!handle) {\r\n throw new Error(\"the handle from .NET cannot be null\");\r\n }\r\n\r\n if (!el) {\r\n handle.dispose();\r\n return;\r\n }\r\n\r\n const throttled = throttle(\r\n () => {\r\n if (!handle) return;\r\n handle.invokeMethodAsync(\"Invoke\");\r\n },\r\n 300,\r\n { trailing: true }\r\n );\r\n\r\n const observer = new ResizeObserver(\r\n async (entries: ResizeObserverEntry[] = []) => {\r\n if (!entries.length) return;\r\n throttled();\r\n }\r\n );\r\n\r\n el._resizeObserver = Object(el._resizeObserver);\r\n el._resizeObserver = { handle, observer };\r\n\r\n observer.observe(el);\r\n}\r\n\r\nfunction unobserve(el: HTMLElement) {\r\n if (!el) return;\r\n\r\n if (!el._resizeObserver) return;\r\n\r\n el._resizeObserver.observer.unobserve(el);\r\n el._resizeObserver.handle.dispose();\r\n delete el._resizeObserver;\r\n}\r\n\r\nfunction observeSelector(\r\n selector: string,\r\n handle: DotNet.DotNetObject\r\n) {\r\n if (selector) {\r\n const el = document.querySelector(selector) as HTMLElement;\r\n el && observe(el, handle);\r\n }\r\n}\r\n\r\nfunction unobserveSelector(selector: string) {\r\n if (selector) {\r\n const el = document.querySelector(selector) as HTMLElement;\r\n el && unobserve(el);\r\n }\r\n}\r\n\r\nexport { observe, unobserve, observeSelector, unobserveSelector };\r\n"],"names":["functionThrottle","fn","interval","options","timeoutId","throttledFn","leading","trailing","cancel","clearTimeout","throttleWrapper","callNow","context","this","args","arguments","apply","setTimeout","flush","call","observe","el","handle","Error","dispose","throttled","throttle","invokeMethodAsync","observer","ResizeObserver","entries","__awaiter","length","_resizeObserver","Object","unobserve","observeSelector","selector","document","querySelector","unobserveSelector"],"mappings":"8CAAA,IAAIA,EAEJ,SAAkBC,EAAIC,EAAUC,GAC9B,IAAIC,EAAY,KACZC,EAAc,KACdC,EAAWH,GAAWA,EAAQG,QAC9BC,EAAYJ,GAAWA,EAAQI,SAEpB,MAAXD,IACFA,GAAU,GAGI,MAAZC,IACFA,GAAYD,GAGC,GAAXA,IACFC,GAAW,GAGb,IAAIC,EAAS,WACPJ,IACFK,aAAaL,GACbA,EAAY,KAElB,EAWMM,EAAkB,WACpB,IAAIC,EAAUL,IAAYF,EACtBQ,EAAUC,KACVC,EAAOC,UAgBX,GAdAV,EAAc,WACZ,OAAOJ,EAAGe,MAAMJ,EAASE,EAC/B,EAESV,IACHA,EAAYa,YAAW,WAGrB,GAFAb,EAAY,KAERG,EACF,OAAOF,GAEV,GAAEH,IAGDS,EAEF,OADAA,GAAU,EACHN,GAEb,EAKE,OAHAK,EAAgBF,OAASA,EACzBE,EAAgBQ,MAnCJ,WACV,IAAIC,EAAOd,EACXG,IAEIW,GACFA,GAEN,EA8BST,CACT,EC/DA,SAASU,EAAQC,EAAiBC,GAChC,IAAKA,EACH,MAAM,IAAIC,MAAM,uCAGlB,IAAKF,EAEH,YADAC,EAAOE,UAIT,MAAMC,EAAYC,GAChB,KACOJ,GACLA,EAAOK,kBAAkB,SAAS,GAEpC,IACA,CAAEpB,UAAU,IAGRqB,EAAW,IAAIC,gBACnB,CAAOC,EAAiC,KAAMC,EAAAlB,UAAA,OAAA,GAAA,YACvCiB,EAAQE,QACbP,GACD,MAGHJ,EAAGY,gBAAkBC,OAAOb,EAAGY,iBAC/BZ,EAAGY,gBAAkB,CAAEX,SAAQM,YAE7BA,EAASR,QAAQC,EACrB,CAEA,SAASc,EAAUd,GACZA,GAEAA,EAAGY,kBAERZ,EAAGY,gBAAgBL,SAASO,UAAUd,GACtCA,EAAGY,gBAAgBX,OAAOE,iBACnBH,EAAGY,gBACZ,CAEA,SAASG,EACPC,EACAf,GAEA,GAAIe,EAAU,CACZ,MAAMhB,EAAKiB,SAASC,cAAcF,GAClChB,GAAMD,EAAQC,EAAIC,EACnB,CACH,CAEA,SAASkB,EAAkBH,GACzB,GAAIA,EAAU,CACZ,MAAMhB,EAAKiB,SAASC,cAAcF,GAClChB,GAAMc,EAAUd,EACjB,CACH"}