diff --git a/package.json b/package.json index 3a9a9cb919a2adfe3266594f9b111d0d290d05e4..493a1a3ab2fd47b849d148343edb63079a599910 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "@vitejs/plugin-vue-jsx": "^1.1.7", "@vue/compiler-sfc": "^3.1.1", "acorn-loose": "^8.1.0", + "core-js": "2", "eslint": "^7.17.0", "fs-extra": "^9.0.1", "jest": "^27.0.6", diff --git a/packages/uni-app-plus/dist/style.css b/packages/uni-app-plus/dist/style.css index a530fc9273d310c9f79e84ed67060da598ed4ed3..a3123670053d5e18ac13f952b19f25fa6525d22b 100644 --- a/packages/uni-app-plus/dist/style.css +++ b/packages/uni-app-plus/dist/style.css @@ -153,94 +153,6 @@ uni-view { uni-view[hidden] { display: none; } -uni-audio { - display: none; -} - -uni-audio[controls] { - display: inline-block; -} - -uni-audio[hidden] { - display: none; -} - -.uni-audio-default { - max-width: 100%; - min-width: 302px; - height: 65px; - background: #fcfcfc; - border: 1px solid #e0e0e0; - border-radius: 2.5px; - display: inline-block; - overflow: hidden; -} - -.uni-audio-left { - width: 65px; - height: 65px; - float: left; - background-color: #e6e6e6; - background-size: 100% 100%; - background-position: 50% 50%; -} - -.uni-audio-button { - width: 24px; - height: 24px; - margin: 20.5px; - background-size: cover; -} - -.uni-audio-button.play { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAB4dJREFUaAXNWg1MlVUYvpcfIRCJ+MnCaOBl8dOcOCEQZ9kmI5cQG5Yb6MifKbMaGVobOtlibTWHDpgpxBUwF07826iFsMkYJhg559JdGiQSkUzSBA0QkZ7n4/u+nXsvwf3jwru99/y/3/N+3znvec97rlbjABofH38GYtaAV4MjwDqwH9gHTBoE3wd3gA3gi+B6rVY7hHR2CKD9wFngs+BHYGuJYziWMqiscwgP8wLvBQ+AHUWURZle1mqhtXQAhLui7xZwPvgFsBENDg7+Drp069at2z09Pf03b978u6mpqZ+dVq1aFRAVFeW/aNGigNDQ0JfDwsISfXx8wowETBT+QpIPLsf0GpuomvrXIgUAPhhizoGXi+II+tq1az/o9fpLFRUVd8S26fJZWVkLN2/enBgTE/PW/PnzF5v0b0P5HSjxp0m9WXFaBQD+NYw6C1bf+vDwcF9DQ4N+/fr19ciPm0m1osLT01N76tSpNaD3PTw8FgpD+TXSoESrUGeWnVIBgM/EiDKwJ0eiPNrS0nJsw4YNNd3d3aOscxSFhIS4V1dXpyckJGRB5jxZ7jDSbVDiW7lslriY1cgVMvjjKErgR0dH/zl06NCuFStWfOdo8HwkZVL2wYMHP3ny5AlNLonPPi5jkSpMfyb9AhjAadMIlsBjrndmZ2fnnThxos9UwEyUMzIynj9y5EgB1gb3ExK/xBuTTSczBQCeC/ZnsDTnCR6f9YMbN25QiNMoOjras7W1tcjb2ztcfijXRKzpwjaaQgBPU0lrI4HntOGbdzZ4AuYzt2/fvm9sbOweyyBiOidjlCr4Y6QAyrTzkqlEx9GSkpJ9zpo2BGNKfHZRUdF+1D+W24iNGFVSpxAAcxekryK9/cuXLx/FoqpWe85iBlPpvbi4uB0yBE4lHabSvyyLX2AXyhJ42nmYytPsMBcI+80ZWKZeGQsxEqtEkgJ4+3Sm9sh1Gm5SM2EqFfnWpsRSV1dXIYzbI2NWv0AqGiXXl+4Bd1ihs0XZu3fvHhgYGNBXVVUlWDTAyk7p6ekNIyMj7fIwYiVmIwWkNvo2trgHAQEBy+CghW7cuPGLvr6+L3fu3PmSJNBBP8R09erVHwVxEwrgU/AwkqQ00DFT8lamqkEICgqKKy4u1sMU7li6dKnVLvL/Pbe0tLRFaEsidi1+UlB5ng3ctBYsWLBV6GRxFnJ4yjIj7CX36uvrS1NTU+uwEM3ara3Al/gaTl+EPC6Vi/hNRUhHR8dPSt5Rqbu7+3Nr1679rL+//3BBQYHyYJvFd3V1iTNkNRV4RZF2G6TkHZ36+vpG5uXlHcah59Pk5GSbj5AY3y1gi6ACisOk4UlKaJyJrBYnsuTa2trjzc3N7/r7+9N1sYo6OzsfCAN0VEB9GzwGCo0zlnV1dfVOTEzMhn3Xl5eXx1rzIBOMflRAsv8UopxhrRFoT18vL68QHCu/am9vz7FUjglGHyow6xQcHBxjKwgqwKCTRIweKHlnpZhGDfC7LP4CJhgH3QCUxzd/AmboA0kP8zNNcDt+w8ZUvHv37l+tedaSJUueFfrfpwJ0oSVLxLiN0DgjWWxsDxobG79JSUn53haXRafT+QrAOjiFDEoFg05K3tEpduoxg8FweuXKlRlJSUm1toAnpvDwcB55FTJQAdUFYMRMaXFkil34l9zc3K2RkZElV65ceWSPbCz414XxF6kAXWfpdMNwHyNmQge7skNDQ3dOnjy5PzAwMLewsLDLLmEYDJMb5ObmFiXLIeZ6FxzNGOK+IFeyk91f4enTpyNtbW3HIiIiNsHCNCmy7U1zcnKWCTIuEDu/AOn8RKLRMFbJcJ9StjRlBIN94Y40ZmZmboqNja3iScrS8dP1IyaEWt4W+kmYaYVILHA/8GGglbHKdevWqV+FHaYjOGofw811hcfZOV1fW9pxzE1wcXGJlscSq6SA+qZhJfai8nN2wNHtDhb0pt7eXoe9Qcq1lRg3hRvNkLtyytuHfAHlKVOI+UIwQxYaRolramrSmZ8LhLefJIAnRmKVSFUAHbiq8yeqNRpGiWE5XlXKs5WWlZUthu3/SHh+voxVqlKnEEuYRvTPee5czjKjxDCr2bMVnYNF9IO7fRRQAokHxIuPeCig3t4YKcAeUCIYiRrcffjwYUd8fPyHzo6PwuJ4XL9+/QAWrjILOHWmDu5SAWjHa500sBSNZoibUWKGvNnuDOKbNwFPLLytITYjUteAWIuOvNbZptQxxF1ZWXnYGWuCc57TRnjzhMFbGmIyI7MpJPbAdMpEuQzsKdc/hi+jT0tLO+NoE0tTSWsjL9h58vP45qe8YppSAQqBEmaXfAy0MlbJcJ+tXqUMUMMdlpsUIuE78JYVO89mznn7LvmUh8gL+xzKknVS6hmrZLiPETNrr1npmNG3oXsg7LCKaFobx1yzKhKhBE3sFnA+mCFuI4IyBuyWzYjb/MHQh+lFN09SPIxgirxIlxhepeIWiHL41vPBFl90i4MtykOROfVXA4tAT9YJisyJP3tMu4gnA29aB2UY4V4DXg1m/FMH9gMrMSd6jwwe8PxtAPMU6JC/2/wHuyI2cMsNBRIAAAAASUVORK5CYII=); -} - -.uni-audio-button.pause { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABatJREFUaAXVWl1IpFUYnllZGUf3wlz6MXER1ES7s83VUDJw6KpdaSTDwMnYFSK6KNirooHullKQCNzQRjZ/wom1u9ALQ0mT1ktFdEBWXLdibaH1jwmx5zme83W+z2Hm+7bZmc8X3jl/73vO837n/z3j9aSBjo6O8lBNC7gZXAUuBxeCz4FJj8APwTHwCngaPOX1evcRZocAuhAcAt8G74KdEnWoyzpobGYIjfnBn4D/BqeLWBfr9Du1wmtXAZXnQPY9cBj8HNhEe3t7sbW1tfn19fW7m5ubD5aXl7dnZmYeUKipqel8dXV1UUlJyfmysrILFRUV9X6/n8PMSveREQYPYHgdWgsTpW0ZAPDPQ3kC/JJeCUEvLi7+NDg4+EskEvldL0sVD4VCz3Z1db1SW1v7egJj7kD/Coy4l6qelAYAfB0quQ02vno8Hr8/OTkZaWtrmzo4ODhK1Uiycp/P5x0fH28JBAKh3Nxcow3osDdaYcRCMv2kBgD8O1D+BuyTlcTn5+cj7e3t0Y2NjX+SVey0rLS09OzY2Fiwvr4+BN1cqX+A8CqM+E6mTwRnTuTIDAn+FpIC/OHh4V+9vb0fNzQ0jKYbPJtknaybbbAtCYNt35JYZJY5SNgDctj8DFEBfnd3d627u/vT4eHhP8zqTybV0dHxTH9//+f5+fkVsgX2xKuJhtMJAwCeE/Y3sBiPBF9XV/fh0tISK8kY1dTU+BYWFvo0IzgnLlontmkIATyXSq42Ajy7kl8+0+D5ldgm29aGEzFNSIwUEWQyADlc59VSGe/r6/ssU8PmGI75l20TA3LjsoTYiNEgYwjBMu6CPKuIr4/Vph+TasyQzGJkbm7ubaxO1yQEDqVyDKU9pvUe+AhpAZ7rPJbKHyjgBuKyTUwSCzESqyBhAL4+D1PXZZ6Hm9STWCpV/U5DYiEmTe+6xOwRQwiJEAq/pQCPB0VFRdf+7w7LutJJ3LG3t7dvaseOdzGMImoIXVaN8WzjNvDERkzEpnAiFJjP4OvzMhJQBTyYqbjdEDov7+/vf4+6pu0wZQcGBi7arV/JWbAFiN2Lnzcg8COFuGkVFBSo2a70UoYEhC5+OqWgJoAv+mdeXt5bWpat6M7Ozk1tc7vMIfSa0lxdXf1VxZ2ETsGz7sfRoV4sFtMxNtOAF1hAugs6jrn3lxcmDV0VDTBuRrxJaYWujFowltMA40LNa6ArUWugLBgLaYByfXjUHVaTd13UgvEcDTjVRAPodBJE74GKuzW0YHxEA+gxE0TXh4q7NbRgfEgDeIQWRL+Nirs1tGCM0YAVBZZOJxV3a2jBuEIDphVYesxU3EnIY4ETeco+jg71LBinacAUWNxueFSlx4yCTmh0dPRLJ4AoOzIy8oWTNihLbNpxmpin1H2AnrcrFJqdnf0KM901tzFiUoQ94M3GxsYPZHoC94FW9gBJnEYZoa8SBy1hGNNuIWIiNg2PwKwbIPYDdhF9lZqgK6LEpA0fYv3PAHQF94IbCikdrcXFxWdVOtsh/abEpOG4ITGbvBI9EBA3f3qJo9FoUFPIapROX81zTYzEKkgNIQ8s4qwOH2d7PPQS9/T0vKjS2QqJQXqsFYSwxCrSpsmK6yVdi7zx0APmoVuvs7Pz/Wx55+jkHRoa+jonJ+cp4gHdAV+CAcbrjckASsCI0+vcpQGw7h6CVrDwRvMCTS8xvwbLM0Fsy+KZJha+1hCbiYw5oOdCkM86V1UejWBXZmJOsA22pXkeCIOvNAmfmk4MIQWaIYZTwiemYDAY3dracsUTU1IDpBGn95FP9Yac2KfzmVUzgkssHxfCYOGGR2gQvXp0jNG3lOyh+wKosrLykmWMq3q4SYXBth+6laLtEL3hqr8a2AZuFYQhrvizR8pJbAWeKA1j6OFuATeDq8D09hWClc+Jp0ceGHn/5hWWt8C0/N3mX15C4bDnCIuAAAAAAElFTkSuQmCC); -} - -.uni-audio-right { - box-sizing: border-box; - height: 65px; - margin-left: 65px; - padding: 11px 16.5px 13.5px 15px; - overflow: hidden; -} - -.uni-audio-time { - margin-top: 3.5px; - height: 16.5px; - font-size: 12px; - color: #888888; - float: right; -} - -.uni-audio-info { - margin-right: 70px; - overflow: hidden; -} - -.uni-audio-name { - height: 22.5px; - line-height: 22.5px; - margin-bottom: 3.5px; - font-size: 14px; - color: #353535; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.uni-audio-author { - height: 14.5px; - line-height: 14.5px; - font-size: 12px; - color: #888888; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} uni-button { position: relative; display: block; diff --git a/packages/uni-app-plus/dist/uni-app-service.es.js b/packages/uni-app-plus/dist/uni-app-service.es.js index f9f6a8e1d459f966b2234d5aa459c1d757031d26..f2361bb98821274a9234d67c6f314211fb543c9c 100644 --- a/packages/uni-app-plus/dist/uni-app-service.es.js +++ b/packages/uni-app-plus/dist/uni-app-service.es.js @@ -1891,6 +1891,10 @@ var serviceContext = (function (vue) { PAGE_META_KEYS.forEach((name) => { res[name] = extend({}, globalStyle[name], pageMeta[name]); }); + const { navigationBar } = res; + navigationBar.titleText && + navigationBar.titleImage && + (navigationBar.titleText = ''); return res; } function normalizePullToRefreshRpx(pullToRefresh) { diff --git a/packages/uni-app-plus/dist/uni-app-view.umd.js b/packages/uni-app-plus/dist/uni-app-view.umd.js index 09485dabb5779c8f9b8e282b73ed6517bbe05fa7..bcc8db9addd978a747082b829e70db5db24a195f 100644 --- a/packages/uni-app-plus/dist/uni-app-view.umd.js +++ b/packages/uni-app-plus/dist/uni-app-view.umd.js @@ -5,27 +5,617 @@ var base = "* {\n margin: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n}\n\nhtml,\nbody {\n -webkit-user-select: none;\n user-select: none;\n width: 100%;\n}\n\nhtml {\n height: 100%;\n height: 100vh;\n width: 100%;\n width: 100vw;\n}\n\nbody {\n overflow-x: hidden;\n background-color: white;\n}\n\ninput[type='search']::-webkit-search-cancel-button {\n display: none;\n}\n\n.uni-loading,\nuni-button[loading]:before {\n background: transparent\n url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=')\n no-repeat;\n}\n\n.uni-loading {\n width: 20px;\n height: 20px;\n display: inline-block;\n vertical-align: middle;\n animation: uni-loading 1s steps(12, end) infinite;\n background-size: 100%;\n}\n\n@keyframes uni-loading {\n 0% {\n transform: rotate3d(0, 0, 1, 0deg);\n }\n\n 100% {\n transform: rotate3d(0, 0, 1, 360deg);\n }\n}\n"; var nvue = "[nvue] uni-view,\n[nvue] uni-label,\n[nvue] uni-swiper-item,\n[nvue] uni-scroll-view {\n display: flex;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n align-items: stretch;\n align-content: flex-start;\n}\n\n[nvue] uni-button {\n margin: 0;\n}\n\n[nvue-dir-row] uni-view,\n[nvue-dir-row] uni-label,\n[nvue-dir-row] uni-swiper-item {\n flex-direction: row;\n}\n\n[nvue-dir-column] uni-view,\n[nvue-dir-column] uni-label,\n[nvue-dir-column] uni-swiper-item {\n flex-direction: column;\n}\n\n[nvue-dir-row-reverse] uni-view,\n[nvue-dir-row-reverse] uni-label,\n[nvue-dir-row-reverse] uni-swiper-item {\n flex-direction: row-reverse;\n}\n\n[nvue-dir-column-reverse] uni-view,\n[nvue-dir-column-reverse] uni-label,\n[nvue-dir-column-reverse] uni-swiper-item {\n flex-direction: column-reverse;\n}\n\n[nvue] uni-view,\n[nvue] uni-image,\n[nvue] uni-input,\n[nvue] uni-scroll-view,\n[nvue] uni-swiper,\n[nvue] uni-swiper-item,\n[nvue] uni-text,\n[nvue] uni-textarea,\n[nvue] uni-video {\n position: relative;\n border: 0px solid #000000;\n box-sizing: border-box;\n}\n\n[nvue] uni-swiper-item {\n position: absolute;\n}\n"; var resizeSensor = "@keyframes once-show {\n from {\n top: 0;\n }\n}\nuni-resize-sensor,\nuni-resize-sensor > div {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n}\nuni-resize-sensor {\n display: block;\n z-index: -1;\n visibility: hidden;\n animation: once-show 1ms;\n}\nuni-resize-sensor > div > div {\n position: absolute;\n left: 0;\n top: 0;\n}\nuni-resize-sensor > div:first-child > div {\n width: 100000px;\n height: 100000px;\n}\nuni-resize-sensor > div:last-child > div {\n width: 200%;\n height: 200%;\n}\n"; + var _wks = { exports: {} }; + var _shared = { exports: {} }; + var _core = { exports: {} }; + var core$2 = _core.exports = { + version: "2.6.12" + }; + if (typeof __e == "number") + __e = core$2; + var _global = { exports: {} }; + var window$5 = _global.exports = typeof window$5 != "undefined" && window$5.Math == Math ? window$5 : typeof self != "undefined" && self.Math == Math ? self : Function("return this")(); + if (typeof __g == "number") + __g = window$5; + var core$1 = _core.exports; + var window$4 = _global.exports; + var SHARED = "__core-js_shared__"; + var store$1 = window$4[SHARED] || (window$4[SHARED] = {}); + (_shared.exports = function(key2, value) { + return store$1[key2] || (store$1[key2] = value !== void 0 ? value : {}); + })("versions", []).push({ + version: core$1.version, + mode: "window", + copyright: "\xA9 2020 Denis Pushkarev (zloirock.ru)" + }); + var id$1 = 0; + var px = Math.random(); + var _uid = function(key2) { + return "Symbol(".concat(key2 === void 0 ? "" : key2, ")_", (++id$1 + px).toString(36)); + }; + var store = _shared.exports("wks"); + var uid$4 = _uid; + var Symbol$1 = _global.exports.Symbol; + var USE_SYMBOL = typeof Symbol$1 == "function"; + var $exports = _wks.exports = function(name) { + return store[name] || (store[name] = USE_SYMBOL && Symbol$1[name] || (USE_SYMBOL ? Symbol$1 : uid$4)("Symbol." + name)); + }; + $exports.store = store; + var _objectDp = {}; + var _isObject = function(it) { + return typeof it === "object" ? it !== null : typeof it === "function"; + }; + var isObject$4 = _isObject; + var _anObject = function(it) { + if (!isObject$4(it)) + throw TypeError(it + " is not an object!"); + return it; + }; + var _fails = function(exec) { + try { + return !!exec(); + } catch (e2) { + return true; + } + }; + var _descriptors = !_fails(function() { + return Object.defineProperty({}, "a", { + get: function() { + return 7; + } + }).a != 7; + }); + var isObject$3 = _isObject; + var document$2 = _global.exports.document; + var is = isObject$3(document$2) && isObject$3(document$2.createElement); + var _domCreate = function(it) { + return is ? document$2.createElement(it) : {}; + }; + var _ie8DomDefine = !_descriptors && !_fails(function() { + return Object.defineProperty(_domCreate("div"), "a", { + get: function() { + return 7; + } + }).a != 7; + }); + var isObject$2 = _isObject; + var _toPrimitive = function(it, S) { + if (!isObject$2(it)) + return it; + var fn, val; + if (S && typeof (fn = it.toString) == "function" && !isObject$2(val = fn.call(it))) + return val; + if (typeof (fn = it.valueOf) == "function" && !isObject$2(val = fn.call(it))) + return val; + if (!S && typeof (fn = it.toString) == "function" && !isObject$2(val = fn.call(it))) + return val; + throw TypeError("Can't convert object to primitive value"); + }; + var anObject$2 = _anObject; + var IE8_DOM_DEFINE = _ie8DomDefine; + var toPrimitive = _toPrimitive; + var dP$2 = Object.defineProperty; + _objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject$2(O); + P = toPrimitive(P, true); + anObject$2(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP$2(O, P, Attributes); + } catch (e2) { + } + if ("get" in Attributes || "set" in Attributes) + throw TypeError("Accessors not supported!"); + if ("value" in Attributes) + O[P] = Attributes.value; + return O; + }; + var _propertyDesc = function(bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value + }; + }; + var dP$1 = _objectDp; + var createDesc = _propertyDesc; + var _hide = _descriptors ? function(object, key2, value) { + return dP$1.f(object, key2, createDesc(1, value)); + } : function(object, key2, value) { + object[key2] = value; + return object; + }; + var UNSCOPABLES = _wks.exports("unscopables"); + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == void 0) + _hide(ArrayProto, UNSCOPABLES, {}); + var _addToUnscopables = function(key2) { + ArrayProto[UNSCOPABLES][key2] = true; + }; + var _iterStep = function(done, value) { + return { + value, + done: !!done + }; + }; + var _iterators = {}; + var toString = {}.toString; + var _cof = function(it) { + return toString.call(it).slice(8, -1); + }; + var cof = _cof; + var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) { + return cof(it) == "String" ? it.split("") : Object(it); + }; + var _defined = function(it) { + if (it == void 0) + throw TypeError("Can't call method on " + it); + return it; + }; + var IObject = _iobject; + var defined$1 = _defined; + var _toIobject = function(it) { + return IObject(defined$1(it)); + }; + var _redefine = { exports: {} }; + var hasOwnProperty$2 = {}.hasOwnProperty; + var _has = function(it, key2) { + return hasOwnProperty$2.call(it, key2); + }; + var _functionToString = _shared.exports("native-function-to-string", Function.toString); + var window$3 = _global.exports; + var hide$3 = _hide; + var has$5 = _has; + var SRC = _uid("src"); + var $toString = _functionToString; + var TO_STRING = "toString"; + var TPL = ("" + $toString).split(TO_STRING); + _core.exports.inspectSource = function(it) { + return $toString.call(it); + }; + (_redefine.exports = function(O, key2, val, safe) { + var isFunction2 = typeof val == "function"; + if (isFunction2) + has$5(val, "name") || hide$3(val, "name", key2); + if (O[key2] === val) + return; + if (isFunction2) + has$5(val, SRC) || hide$3(val, SRC, O[key2] ? "" + O[key2] : TPL.join(String(key2))); + if (O === window$3) { + O[key2] = val; + } else if (!safe) { + delete O[key2]; + hide$3(O, key2, val); + } else if (O[key2]) { + O[key2] = val; + } else { + hide$3(O, key2, val); + } + })(Function.prototype, TO_STRING, function toString2() { + return typeof this == "function" && this[SRC] || $toString.call(this); + }); + var _aFunction = function(it) { + if (typeof it != "function") + throw TypeError(it + " is not a function!"); + return it; + }; + var aFunction$1 = _aFunction; + var _ctx = function(fn, that, length) { + aFunction$1(fn); + if (that === void 0) + return fn; + switch (length) { + case 1: + return function(a2) { + return fn.call(that, a2); + }; + case 2: + return function(a2, b) { + return fn.call(that, a2, b); + }; + case 3: + return function(a2, b, c) { + return fn.call(that, a2, b, c); + }; + } + return function() { + return fn.apply(that, arguments); + }; + }; + var window$2 = _global.exports; + var core = _core.exports; + var hide$2 = _hide; + var redefine$2 = _redefine.exports; + var ctx = _ctx; + var PROTOTYPE$1 = "prototype"; + var $export$3 = function(type, name, source) { + var IS_FORCED = type & $export$3.F; + var IS_GLOBAL = type & $export$3.G; + var IS_STATIC = type & $export$3.S; + var IS_PROTO = type & $export$3.P; + var IS_BIND = type & $export$3.B; + var target = IS_GLOBAL ? window$2 : IS_STATIC ? window$2[name] || (window$2[name] = {}) : (window$2[name] || {})[PROTOTYPE$1]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE$1] || (exports[PROTOTYPE$1] = {}); + var key2, own, out2, exp; + if (IS_GLOBAL) + source = name; + for (key2 in source) { + own = !IS_FORCED && target && target[key2] !== void 0; + out2 = (own ? target : source)[key2]; + exp = IS_BIND && own ? ctx(out2, window$2) : IS_PROTO && typeof out2 == "function" ? ctx(Function.call, out2) : out2; + if (target) + redefine$2(target, key2, out2, type & $export$3.U); + if (exports[key2] != out2) + hide$2(exports, key2, exp); + if (IS_PROTO && expProto[key2] != out2) + expProto[key2] = out2; + } + }; + window$2.core = core; + $export$3.F = 1; + $export$3.G = 2; + $export$3.S = 4; + $export$3.P = 8; + $export$3.B = 16; + $export$3.W = 32; + $export$3.U = 64; + $export$3.R = 128; + var _export = $export$3; + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function(it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + var toInteger$1 = _toInteger; + var min$1 = Math.min; + var _toLength = function(it) { + return it > 0 ? min$1(toInteger$1(it), 9007199254740991) : 0; + }; + var toInteger = _toInteger; + var max = Math.max; + var min = Math.min; + var _toAbsoluteIndex = function(index2, length) { + index2 = toInteger(index2); + return index2 < 0 ? max(index2 + length, 0) : min(index2, length); + }; + var toIObject$3 = _toIobject; + var toLength = _toLength; + var toAbsoluteIndex = _toAbsoluteIndex; + var _arrayIncludes = function(IS_INCLUDES) { + return function($this, el, fromIndex) { + var O = toIObject$3($this); + var length = toLength(O.length); + var index2 = toAbsoluteIndex(fromIndex, length); + var value; + if (IS_INCLUDES && el != el) + while (length > index2) { + value = O[index2++]; + if (value != value) + return true; + } + else + for (; length > index2; index2++) { + if (IS_INCLUDES || index2 in O) { + if (O[index2] === el) + return IS_INCLUDES || index2 || 0; + } + } + return !IS_INCLUDES && -1; + }; + }; + var shared = _shared.exports("keys"); + var uid$3 = _uid; + var _sharedKey = function(key2) { + return shared[key2] || (shared[key2] = uid$3(key2)); + }; + var has$4 = _has; + var toIObject$2 = _toIobject; + var arrayIndexOf = _arrayIncludes(false); + var IE_PROTO$2 = _sharedKey("IE_PROTO"); + var _objectKeysInternal = function(object, names) { + var O = toIObject$2(object); + var i2 = 0; + var result = []; + var key2; + for (key2 in O) { + if (key2 != IE_PROTO$2) + has$4(O, key2) && result.push(key2); + } + while (names.length > i2) { + if (has$4(O, key2 = names[i2++])) { + ~arrayIndexOf(result, key2) || result.push(key2); + } + } + return result; + }; + var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","); + var $keys = _objectKeysInternal; + var enumBugKeys$1 = _enumBugKeys; + var _objectKeys = Object.keys || function keys(O) { + return $keys(O, enumBugKeys$1); + }; + var dP = _objectDp; + var anObject$1 = _anObject; + var getKeys$2 = _objectKeys; + var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject$1(O); + var keys = getKeys$2(Properties); + var length = keys.length; + var i2 = 0; + var P; + while (length > i2) { + dP.f(O, P = keys[i2++], Properties[P]); + } + return O; + }; + var document$1 = _global.exports.document; + var _html = document$1 && document$1.documentElement; + var anObject = _anObject; + var dPs = _objectDps; + var enumBugKeys = _enumBugKeys; + var IE_PROTO$1 = _sharedKey("IE_PROTO"); + var Empty = function() { + }; + var PROTOTYPE = "prototype"; + var createDict = function() { + var iframe = _domCreate("iframe"); + var i2 = enumBugKeys.length; + var lt = "<"; + var gt = ">"; + var iframeDocument; + iframe.style.display = "none"; + _html.appendChild(iframe); + iframe.src = "javascript:"; + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + "script" + gt + "document.F=Object" + lt + "/script" + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i2--) { + delete createDict[PROTOTYPE][enumBugKeys[i2]]; + } + return createDict(); + }; + var _objectCreate = Object.create || function create2(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + result[IE_PROTO$1] = O; + } else + result = createDict(); + return Properties === void 0 ? result : dPs(result, Properties); + }; + var def$1 = _objectDp.f; + var has$3 = _has; + var TAG = _wks.exports("toStringTag"); + var _setToStringTag = function(it, tag, stat) { + if (it && !has$3(it = stat ? it : it.prototype, TAG)) + def$1(it, TAG, { + configurable: true, + value: tag + }); + }; + var create = _objectCreate; + var descriptor = _propertyDesc; + var setToStringTag$1 = _setToStringTag; + var IteratorPrototype = {}; + _hide(IteratorPrototype, _wks.exports("iterator"), function() { + return this; + }); + var _iterCreate = function(Constructor, NAME2, next) { + Constructor.prototype = create(IteratorPrototype, { + next: descriptor(1, next) + }); + setToStringTag$1(Constructor, NAME2 + " Iterator"); + }; + var defined = _defined; + var _toObject = function(it) { + return Object(defined(it)); + }; + var has$2 = _has; + var toObject$1 = _toObject; + var IE_PROTO = _sharedKey("IE_PROTO"); + var ObjectProto = Object.prototype; + var _objectGpo = Object.getPrototypeOf || function(O) { + O = toObject$1(O); + if (has$2(O, IE_PROTO)) + return O[IE_PROTO]; + if (typeof O.constructor == "function" && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + var $export$2 = _export; + var redefine$1 = _redefine.exports; + var hide$1 = _hide; + var Iterators$2 = _iterators; + var $iterCreate = _iterCreate; + var setToStringTag = _setToStringTag; + var getPrototypeOf = _objectGpo; + var ITERATOR$1 = _wks.exports("iterator"); + var BUGGY = !([].keys && "next" in [].keys()); + var FF_ITERATOR = "@@iterator"; + var KEYS = "keys"; + var VALUES$1 = "values"; + var returnThis = function() { + return this; + }; + var _iterDefine = function(Base, NAME2, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME2, next); + var getMethod = function(kind) { + if (!BUGGY && kind in proto2) + return proto2[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES$1: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries2() { + return new Constructor(this, kind); + }; + }; + var TAG2 = NAME2 + " Iterator"; + var DEF_VALUES = DEFAULT == VALUES$1; + var VALUES_BUG = false; + var proto2 = Base.prototype; + var $native = proto2[ITERATOR$1] || proto2[FF_ITERATOR] || DEFAULT && proto2[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod("entries") : void 0; + var $anyNative = NAME2 == "Array" ? proto2.entries || $native : $native; + var methods2, key2, IteratorPrototype2; + if ($anyNative) { + IteratorPrototype2 = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype2 !== Object.prototype && IteratorPrototype2.next) { + setToStringTag(IteratorPrototype2, TAG2, true); + if (typeof IteratorPrototype2[ITERATOR$1] != "function") + hide$1(IteratorPrototype2, ITERATOR$1, returnThis); + } + } + if (DEF_VALUES && $native && $native.name !== VALUES$1) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + if (BUGGY || VALUES_BUG || !proto2[ITERATOR$1]) { + hide$1(proto2, ITERATOR$1, $default); + } + Iterators$2[NAME2] = $default; + Iterators$2[TAG2] = returnThis; + if (DEFAULT) { + methods2 = { + values: DEF_VALUES ? $default : getMethod(VALUES$1), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) + for (key2 in methods2) { + if (!(key2 in proto2)) + redefine$1(proto2, key2, methods2[key2]); + } + else + $export$2($export$2.P + $export$2.F * (BUGGY || VALUES_BUG), NAME2, methods2); + } + return methods2; + }; + var addToUnscopables = _addToUnscopables; + var step = _iterStep; + var Iterators$1 = _iterators; + var toIObject$1 = _toIobject; + var es6_array_iterator = _iterDefine(Array, "Array", function(iterated, kind) { + this._t = toIObject$1(iterated); + this._i = 0; + this._k = kind; + }, function() { + var O = this._t; + var kind = this._k; + var index2 = this._i++; + if (!O || index2 >= O.length) { + this._t = void 0; + return step(1); + } + if (kind == "keys") + return step(0, index2); + if (kind == "values") + return step(0, O[index2]); + return step(0, [index2, O[index2]]); + }, "values"); + Iterators$1.Arguments = Iterators$1.Array; + addToUnscopables("keys"); + addToUnscopables("values"); + addToUnscopables("entries"); + var $iterators = es6_array_iterator; + var getKeys$1 = _objectKeys; + var redefine = _redefine.exports; + var window$1 = _global.exports; + var hide = _hide; + var Iterators = _iterators; + var wks = _wks.exports; + var ITERATOR = wks("iterator"); + var TO_STRING_TAG = wks("toStringTag"); + var ArrayValues = Iterators.Array; + var DOMIterables = { + CSSRuleList: true, + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, + TextTrackCueList: false, + TextTrackList: false, + TouchList: false + }; + for (var collections = getKeys$1(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = window$1[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) + hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) + hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) + for (key in $iterators) { + if (!proto[key]) + redefine(proto, key, $iterators[key], true); + } + } + } function makeMap$1(str, expectsLowerCase) { - const map2 = Object.create(null); - const list2 = str.split(","); - for (let i = 0; i < list2.length; i++) { - map2[list2[i]] = true; + var map2 = Object.create(null); + var list2 = str.split(","); + for (var i2 = 0; i2 < list2.length; i2++) { + map2[list2[i2]] = true; } return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val]; } - const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"; - const isGloballyWhitelisted = /* @__PURE__ */ makeMap$1(GLOBALS_WHITE_LISTED); - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /* @__PURE__ */ makeMap$1(specialBooleanAttrs); + var GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"; + var isGloballyWhitelisted = /* @__PURE__ */ makeMap$1(GLOBALS_WHITE_LISTED); + var specialBooleanAttrs = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly"; + var isSpecialBooleanAttr = /* @__PURE__ */ makeMap$1(specialBooleanAttrs); function normalizeStyle(value) { if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = normalizeStyle(isString(item) ? parseStringStyle(item) : item); + var res = {}; + for (var i2 = 0; i2 < value.length; i2++) { + var item = value[i2]; + var normalized = normalizeStyle(isString(item) ? parseStringStyle(item) : item); if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; + for (var key2 in normalized) { + res[key2] = normalized[key2]; } } } @@ -34,31 +624,31 @@ return value; } } - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:(.+)/; + var listDelimiterRE = /;(?![^(]*\))/g; + var propertyDelimiterRE = /:(.+)/; function parseStringStyle(cssText) { - const ret = {}; + var ret = {}; cssText.split(listDelimiterRE).forEach((item) => { if (item) { - const tmp = item.split(propertyDelimiterRE); + var tmp = item.split(propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } function normalizeClass(value) { - let res = ""; + var res = ""; if (isString(value)) { res = value; } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); + for (var i2 = 0; i2 < value.length; i2++) { + var normalized = normalizeClass(value[i2]); if (normalized) { res += normalized + " "; } } } else if (isObject$1(value)) { - for (const name in value) { + for (var name in value) { if (value[name]) { res += name + " "; } @@ -66,108 +656,94 @@ } return res.trim(); } - const toDisplayString = (val) => { - return val == null ? "" : isObject$1(val) ? JSON.stringify(val, replacer, 2) : String(val); - }; - const replacer = (_key, val) => { - if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries2, [key, val2]) => { - entries2[`${key} =>`] = val2; - return entries2; - }, {}) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } else if (isObject$1(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; - }; - const EMPTY_OBJ = {}; - const EMPTY_ARR = []; - const NOOP = () => { + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var NOOP = () => { }; - const NO = () => false; - const onRE = /^on[^a-z]/; - const isOn = (key) => onRE.test(key); - const isModelListener = (key) => key.startsWith("onUpdate:"); - const extend = Object.assign; - const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); + var NO = () => false; + var onRE = /^on[^a-z]/; + var isOn = (key2) => onRE.test(key2); + var isModelListener = (key2) => key2.startsWith("onUpdate:"); + var extend = Object.assign; + var remove = (arr, el) => { + var i2 = arr.indexOf(el); + if (i2 > -1) { + arr.splice(i2, 1); } }; - const hasOwnProperty$1 = Object.prototype.hasOwnProperty; - const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key); - const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === "[object Map]"; - const isSet = (val) => toTypeString(val) === "[object Set]"; - const isFunction = (val) => typeof val === "function"; - const isString = (val) => typeof val === "string"; - const isSymbol = (val) => typeof val === "symbol"; - const isObject$1 = (val) => val !== null && typeof val === "object"; - const isPromise = (val) => { + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var hasOwn$1 = (val, key2) => hasOwnProperty$1.call(val, key2); + var isArray = Array.isArray; + var isMap = (val) => toTypeString(val) === "[object Map]"; + var isSet = (val) => toTypeString(val) === "[object Set]"; + var isFunction = (val) => typeof val === "function"; + var isString = (val) => typeof val === "string"; + var isSymbol = (val) => typeof val === "symbol"; + var isObject$1 = (val) => val !== null && typeof val === "object"; + var isPromise = (val) => { return isObject$1(val) && isFunction(val.then) && isFunction(val.catch); }; - const objectToString = Object.prototype.toString; - const toTypeString = (value) => objectToString.call(value); - const toRawType = (value) => { + var objectToString = Object.prototype.toString; + var toTypeString = (value) => objectToString.call(value); + var toRawType = (value) => { return toTypeString(value).slice(8, -1); }; - const isPlainObject = (val) => toTypeString(val) === "[object Object]"; - const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; - const isReservedProp = /* @__PURE__ */ makeMap$1(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"); - const cacheStringFunction$1 = (fn) => { - const cache2 = Object.create(null); + var isPlainObject = (val) => toTypeString(val) === "[object Object]"; + var isIntegerKey = (key2) => isString(key2) && key2 !== "NaN" && key2[0] !== "-" && "" + parseInt(key2, 10) === key2; + var isReservedProp = /* @__PURE__ */ makeMap$1(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"); + var cacheStringFunction$1 = (fn) => { + var cache2 = Object.create(null); return (str) => { - const hit = cache2[str]; + var hit = cache2[str]; return hit || (cache2[str] = fn(str)); }; }; - const camelizeRE = /-(\w)/g; - const camelize = cacheStringFunction$1((str) => { + var camelizeRE = /-(\w)/g; + var camelize = cacheStringFunction$1((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); - const hyphenateRE = /\B([A-Z])/g; - const hyphenate = cacheStringFunction$1((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); - const capitalize = cacheStringFunction$1((str) => str.charAt(0).toUpperCase() + str.slice(1)); - const toHandlerKey = cacheStringFunction$1((str) => str ? `on${capitalize(str)}` : ``); - const hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); - const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); + var hyphenateRE = /\B([A-Z])/g; + var hyphenate = cacheStringFunction$1((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); + var capitalize = cacheStringFunction$1((str) => str.charAt(0).toUpperCase() + str.slice(1)); + var toHandlerKey = cacheStringFunction$1((str) => str ? "on".concat(capitalize(str)) : ""); + var hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); + var invokeArrayFns = (fns, arg) => { + for (var i2 = 0; i2 < fns.length; i2++) { + fns[i2](arg); } }; - const def = (obj, key, value) => { - Object.defineProperty(obj, key, { + var def = (obj, key2, value) => { + Object.defineProperty(obj, key2, { configurable: true, enumerable: false, value }); }; - const toNumber = (val) => { - const n = parseFloat(val); + var toNumber = (val) => { + var n = parseFloat(val); return isNaN(n) ? val : n; }; - let lastLogTime = 0; + var lastLogTime = 0; function formatLog(module, ...args) { - const now = Date.now(); - const diff = lastLogTime ? now - lastLogTime : 0; + var now = Date.now(); + var diff = lastLogTime ? now - lastLogTime : 0; lastLogTime = now; - return `[${now}][${diff}ms][${module}]\uFF1A${args.map((arg) => JSON.stringify(arg)).join(" ")}`; + return "[".concat(now, "][").concat(diff, "ms][").concat(module, "]\uFF1A").concat(args.map((arg) => JSON.stringify(arg)).join(" ")); } function getCustomDataset(el) { return extend({}, el.dataset, el.__uniDataset); } function passive(passive2) { - return { passive: passive2 }; + return { + passive: passive2 + }; } function normalizeTarget(el) { - const { id: id2, offsetTop, offsetLeft } = el; + var { + id: id2, + offsetTop, + offsetLeft + } = el; return { id: id2, dataset: getCustomDataset(el), @@ -176,33 +752,40 @@ }; } function addFont(family, source, desc) { - const fonts = document.fonts; + var fonts = document.fonts; if (fonts) { - const fontFace = new FontFace(family, source, desc); + var fontFace = new FontFace(family, source, desc); return fontFace.load().then(() => { fonts.add(fontFace); }); } return new Promise((resolve) => { - const style = document.createElement("style"); - const values = []; + var style = document.createElement("style"); + var values = []; if (desc) { - const { style: style2, weight, stretch, unicodeRange, variant, featureSettings } = desc; - style2 && values.push(`font-style:${style2}`); - weight && values.push(`font-weight:${weight}`); - stretch && values.push(`font-stretch:${stretch}`); - unicodeRange && values.push(`unicode-range:${unicodeRange}`); - variant && values.push(`font-variant:${variant}`); - featureSettings && values.push(`font-feature-settings:${featureSettings}`); - } - style.innerText = `@font-face{font-family:"${family}";src:${source};${values.join(";")}}`; + var { + style: _style, + weight, + stretch, + unicodeRange, + variant, + featureSettings + } = desc; + _style && values.push("font-style:".concat(_style)); + weight && values.push("font-weight:".concat(weight)); + stretch && values.push("font-stretch:".concat(stretch)); + unicodeRange && values.push("unicode-range:".concat(unicodeRange)); + variant && values.push("font-variant:".concat(variant)); + featureSettings && values.push("font-feature-settings:".concat(featureSettings)); + } + style.innerText = '@font-face{font-family:"'.concat(family, '";src:').concat(source, ";").concat(values.join(";"), "}"); document.head.appendChild(style); resolve(); }); } function scrollTo(scrollTop, duration) { if (isString(scrollTop)) { - const el = document.querySelector(scrollTop); + var el = document.querySelector(scrollTop); if (el) { scrollTop = el.getBoundingClientRect().top + window.pageYOffset; } @@ -210,8 +793,11 @@ if (scrollTop < 0) { scrollTop = 0; } - const documentElement = document.documentElement; - const { clientHeight, scrollHeight } = documentElement; + var documentElement = document.documentElement; + var { + clientHeight, + scrollHeight + } = documentElement; scrollTop = Math.min(scrollTop, scrollHeight - clientHeight); if (duration === 0) { documentElement.scrollTop = document.body.scrollTop = scrollTop; @@ -220,12 +806,12 @@ if (window.scrollY === scrollTop) { return; } - const scrollTo2 = (duration2) => { + var scrollTo2 = (duration2) => { if (duration2 <= 0) { window.scrollTo(0, scrollTop); return; } - const distaince = scrollTop - window.scrollY; + var distaince = scrollTop - window.scrollY; requestAnimationFrame(function() { window.scrollTo(0, window.scrollY + distaince / duration2 * 10); scrollTo2(duration2 - 10); @@ -254,14 +840,14 @@ type += "Passive"; } } - return `on${capitalize(camelize(type))}`; + return "on".concat(capitalize(camelize(type))); } - const optionsModifierRE$1 = /(?:Once|Passive|Capture)$/; + var optionsModifierRE$1 = /(?:Once|Passive|Capture)$/; function parseEventName(name) { - let options; + var options; if (optionsModifierRE$1.test(name)) { options = {}; - let m; + var m; while (m = name.match(optionsModifierRE$1)) { name = name.slice(0, name.length - m[0].length); options[m[0].toLowerCase()] = true; @@ -269,52 +855,52 @@ } return [hyphenate(name.slice(2)), options]; } - const EventModifierFlags = { + var EventModifierFlags = { stop: 1, prevent: 1 << 1, self: 1 << 2 }; - const ATTR_CLASS = "class"; - const ATTR_STYLE = "style"; - const ATTR_INNER_HTML = "innerHTML"; - const ATTR_TEXT_CONTENT = "textContent"; - const ATTR_V_SHOW = ".vShow"; - const ACTION_TYPE_PAGE_CREATE = 1; - const ACTION_TYPE_PAGE_CREATED = 2; - const ACTION_TYPE_CREATE = 3; - const ACTION_TYPE_REMOVE = 5; - const ACTION_TYPE_SET_ATTRIBUTE = 6; - const ACTION_TYPE_REMOVE_ATTRIBUTE = 7; - const ACTION_TYPE_ADD_EVENT = 8; - const ACTION_TYPE_REMOVE_EVENT = 9; - const ACTION_TYPE_SET_TEXT = 10; - const ACTION_TYPE_PAGE_SCROLL = 15; - const ACTION_TYPE_EVENT = 20; + var ATTR_CLASS = "class"; + var ATTR_STYLE = "style"; + var ATTR_INNER_HTML = "innerHTML"; + var ATTR_TEXT_CONTENT = "textContent"; + var ATTR_V_SHOW = ".vShow"; + var ACTION_TYPE_PAGE_CREATE = 1; + var ACTION_TYPE_PAGE_CREATED = 2; + var ACTION_TYPE_CREATE = 3; + var ACTION_TYPE_REMOVE = 5; + var ACTION_TYPE_SET_ATTRIBUTE = 6; + var ACTION_TYPE_REMOVE_ATTRIBUTE = 7; + var ACTION_TYPE_ADD_EVENT = 8; + var ACTION_TYPE_REMOVE_EVENT = 9; + var ACTION_TYPE_SET_TEXT = 10; + var ACTION_TYPE_PAGE_SCROLL = 15; + var ACTION_TYPE_EVENT = 20; function cache(fn) { - const cache2 = Object.create(null); + var cache2 = Object.create(null); return (str) => { - const hit = cache2[str]; + var hit = cache2[str]; return hit || (cache2[str] = fn(str)); }; } function cacheStringFunction(fn) { return cache(fn); } - function once(fn, ctx = null) { - let res; + function once(fn, ctx2 = null) { + var res; return (...args) => { if (fn) { - res = fn.apply(ctx, args); + res = fn.apply(ctx2, args); fn = null; } return res; }; } function debounce(fn, delay) { - let timeout; - const newFn = function() { + var timeout; + var newFn = function() { clearTimeout(timeout); - const timerFn = () => fn.apply(this, arguments); + var timerFn = () => fn.apply(this, arguments); timeout = setTimeout(timerFn, delay); }; newFn.cancel = function() { @@ -322,14 +908,14 @@ }; return newFn; } - const NAVBAR_HEIGHT = 44; - const PRIMARY_COLOR = "#007aff"; - const SCHEME_RE = /^([a-z-]+:)?\/\//i; - const DATA_RE = /^data:.*,.*/; - const JSON_PROTOCOL = "json://"; - const ON_PAGE_SCROLL = "onPageScroll"; - const ON_REACH_BOTTOM = "onReachBottom"; - const isObject = (val) => val !== null && typeof val === "object"; + var NAVBAR_HEIGHT = 44; + var PRIMARY_COLOR = "#007aff"; + var SCHEME_RE = /^([a-z-]+:)?\/\//i; + var DATA_RE = /^data:.*,.*/; + var JSON_PROTOCOL = "json://"; + var ON_PAGE_SCROLL = "onPageScroll"; + var ON_REACH_BOTTOM = "onReachBottom"; + var isObject = (val) => val !== null && typeof val === "object"; class BaseFormatter { constructor() { this._caches = Object.create(null); @@ -338,7 +924,7 @@ if (!values) { return [message]; } - let tokens = this._caches[message]; + var tokens = this._caches[message]; if (!tokens) { tokens = parse(message); this._caches[message] = tokens; @@ -346,28 +932,34 @@ return compile(tokens, values); } } - const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; - const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; + var RE_TOKEN_LIST_VALUE = /^(?:\d)+/; + var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse(format) { - const tokens = []; - let position = 0; - let text2 = ""; + var tokens = []; + var position = 0; + var text2 = ""; while (position < format.length) { - let char = format[position++]; + var char = format[position++]; if (char === "{") { if (text2) { - tokens.push({ type: "text", value: text2 }); + tokens.push({ + type: "text", + value: text2 + }); } text2 = ""; - let sub = ""; + var sub = ""; char = format[position++]; while (char !== void 0 && char !== "}") { sub += char; char = format[position++]; } - const isClosed = char === "}"; - const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; - tokens.push({ value: sub, type }); + var isClosed = char === "}"; + var type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; + tokens.push({ + value: sub, + type + }); } else if (char === "%") { if (format[position] !== "{") { text2 += char; @@ -376,18 +968,21 @@ text2 += char; } } - text2 && tokens.push({ type: "text", value: text2 }); + text2 && tokens.push({ + type: "text", + value: text2 + }); return tokens; } function compile(tokens, values) { - const compiled = []; - let index2 = 0; - const mode2 = Array.isArray(values) ? "list" : isObject(values) ? "named" : "unknown"; + var compiled = []; + var index2 = 0; + var mode2 = Array.isArray(values) ? "list" : isObject(values) ? "named" : "unknown"; if (mode2 === "unknown") { return compiled; } while (index2 < tokens.length) { - const token = tokens[index2]; + var token = tokens[index2]; switch (token.type) { case "text": compiled.push(token.value); @@ -405,14 +1000,14 @@ } return compiled; } - const LOCALE_ZH_HANS = "zh-Hans"; - const LOCALE_ZH_HANT = "zh-Hant"; - const LOCALE_EN = "en"; - const LOCALE_FR = "fr"; - const LOCALE_ES = "es"; - const hasOwnProperty = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty.call(val, key); - const defaultFormatter = new BaseFormatter(); + var LOCALE_ZH_HANS = "zh-Hans"; + var LOCALE_ZH_HANT = "zh-Hant"; + var LOCALE_EN = "en"; + var LOCALE_FR = "fr"; + var LOCALE_ES = "es"; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = (val, key2) => hasOwnProperty.call(val, key2); + var defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } @@ -440,13 +1035,19 @@ } return LOCALE_ZH_HANS; } - const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]); + var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]); if (lang) { return lang; } } class I18n { - constructor({ locale, fallbackLocale, messages, watcher, formater }) { + constructor({ + locale, + fallbackLocale, + messages, + watcher, + formater + }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; @@ -463,7 +1064,7 @@ } } setLocale(locale) { - const oldLocale = this.locale; + var oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; @@ -477,7 +1078,7 @@ return this.locale; } watchLocale(fn) { - const index2 = this.watchers.push(fn) - 1; + var index2 = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index2, 1); }; @@ -489,19 +1090,19 @@ this.messages[locale] = message; } } - t(key, locale, values) { - let message = this.message; + t(key2, locale, values) { + var message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } - if (!hasOwn(message, key)) { - console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); - return key; + if (!hasOwn(message, key2)) { + console.warn("Cannot translate the value of keypath ".concat(key2, ". Use the value of keypath as default.")); + return key2; } - return this.formater.interpolate(message[key], values).join(""); + return this.formater.interpolate(message[key2], values).join(""); } } function initLocaleWatcher(appVm, i18n2) { @@ -518,43 +1119,43 @@ if (typeof locale !== "string") { locale = fallbackLocale; } - const i18n2 = new I18n({ + var i18n2 = new I18n({ locale: locale || fallbackLocale, fallbackLocale, messages }); - let t2 = (key, values) => { + var t2 = (key2, values) => { if (typeof getApp !== "function") { - t2 = function(key2, values2) { - return i18n2.t(key2, values2); + t2 = function(key3, values2) { + return i18n2.t(key3, values2); }; } else { - const appVm = getApp().$vm; + var appVm = getApp().$vm; if (!appVm.$t || !appVm.$i18n) { - t2 = function(key2, values2) { - return i18n2.t(key2, values2); + t2 = function(key3, values2) { + return i18n2.t(key3, values2); }; } else { initLocaleWatcher(appVm, i18n2); - t2 = function(key2, values2) { - const $i18n = appVm.$i18n; - const silentTranslationWarn = $i18n.silentTranslationWarn; + t2 = function(key3, values2) { + var $i18n = appVm.$i18n; + var silentTranslationWarn = $i18n.silentTranslationWarn; $i18n.silentTranslationWarn = true; - const msg = appVm.$t(key2, values2); + var msg = appVm.$t(key3, values2); $i18n.silentTranslationWarn = silentTranslationWarn; - if (msg !== key2) { + if (msg !== key3) { return msg; } - return i18n2.t(key2, $i18n.locale, values2); + return i18n2.t(key3, $i18n.locale, values2); }; } } - return t2(key, values); + return t2(key2, values); }; return { i18n: i18n2, - t(key, values) { - return t2(key, values); + t(key2, values) { + return t2(key2, values); }, add(locale2, message) { return i18n2.add(locale2, message); @@ -567,10 +1168,10 @@ } }; } - let i18n; + var i18n; function useI18n() { if (!i18n) { - let language; + var language; { language = plus.os.language; } @@ -584,44 +1185,41 @@ return res; }, {}); } - const initI18nShowModalMsgsOnce = /* @__PURE__ */ once(() => { - const name = "uni.showModal."; + var initI18nPickerMsgsOnce = /* @__PURE__ */ once(() => { + var name = "uni.picker."; { - useI18n().add(LOCALE_EN, normalizeMessages(name, { cancel: "Cancel", confirm: "OK" })); - } - { - useI18n().add(LOCALE_ES, normalizeMessages(name, { cancel: "Cancelar", confirm: "OK" })); - } - { - useI18n().add(LOCALE_FR, normalizeMessages(name, { cancel: "Annuler", confirm: "OK" })); - } - { - useI18n().add(LOCALE_ZH_HANS, normalizeMessages(name, { cancel: "\u53D6\u6D88", confirm: "\u786E\u5B9A" })); - } - { - useI18n().add(LOCALE_ZH_HANT, normalizeMessages(name, { cancel: "\u53D6\u6D88", confirm: "\u78BA\u5B9A" })); - } - }); - const initI18nPickerMsgsOnce = /* @__PURE__ */ once(() => { - const name = "uni.picker."; - { - useI18n().add(LOCALE_EN, normalizeMessages(name, { done: "Done", cancel: "Cancel" })); + useI18n().add(LOCALE_EN, normalizeMessages(name, { + done: "Done", + cancel: "Cancel" + })); } { - useI18n().add(LOCALE_ES, normalizeMessages(name, { done: "OK", cancel: "Cancelar" })); + useI18n().add(LOCALE_ES, normalizeMessages(name, { + done: "OK", + cancel: "Cancelar" + })); } { - useI18n().add(LOCALE_FR, normalizeMessages(name, { done: "OK", cancel: "Annuler" })); + useI18n().add(LOCALE_FR, normalizeMessages(name, { + done: "OK", + cancel: "Annuler" + })); } { - useI18n().add(LOCALE_ZH_HANS, normalizeMessages(name, { done: "\u5B8C\u6210", cancel: "\u53D6\u6D88" })); + useI18n().add(LOCALE_ZH_HANS, normalizeMessages(name, { + done: "\u5B8C\u6210", + cancel: "\u53D6\u6D88" + })); } { - useI18n().add(LOCALE_ZH_HANT, normalizeMessages(name, { done: "\u5B8C\u6210", cancel: "\u53D6\u6D88" })); + useI18n().add(LOCALE_ZH_HANT, normalizeMessages(name, { + done: "\u5B8C\u6210", + cancel: "\u53D6\u6D88" + })); } }); - const initI18nButtonMsgsOnce = /* @__PURE__ */ once(() => { - const name = "uni.button."; + var initI18nButtonMsgsOnce = /* @__PURE__ */ once(() => { + var name = "uni.button."; { useI18n().add(LOCALE_EN, normalizeMessages(name, { "feedback.title": "feedback", @@ -653,33 +1251,33 @@ })); } }); - const E = function() { + var E = function() { }; E.prototype = { - on: function(name, callback, ctx) { + on: function(name, callback, ctx2) { var e2 = this.e || (this.e = {}); (e2[name] || (e2[name] = [])).push({ fn: callback, - ctx + ctx: ctx2 }); return this; }, - once: function(name, callback, ctx) { - var self = this; + once: function(name, callback, ctx2) { + var self2 = this; function listener() { - self.off(name, listener); - callback.apply(ctx, arguments); + self2.off(name, listener); + callback.apply(ctx2, arguments); } listener._ = callback; - return this.on(name, listener, ctx); + return this.on(name, listener, ctx2); }, emit: function(name) { var data = [].slice.call(arguments, 1); var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); - var i = 0; + var i2 = 0; var len = evtArr.length; - for (i; i < len; i++) { - evtArr[i].fn.apply(evtArr[i].ctx, data); + for (i2; i2 < len; i2++) { + evtArr[i2].fn.apply(evtArr[i2].ctx, data); } return this; }, @@ -688,9 +1286,9 @@ var evts = e2[name]; var liveEvents = []; if (evts && callback) { - for (var i = 0, len = evts.length; i < len; i++) { - if (evts[i].fn !== callback && evts[i].fn._ !== callback) - liveEvents.push(evts[i]); + for (var i2 = 0, len = evts.length; i2 < len; i2++) { + if (evts[i2].fn !== callback && evts[i2].fn._ !== callback) + liveEvents.push(evts[i2]); } } liveEvents.length ? e2[name] = liveEvents : delete e2[name]; @@ -698,7 +1296,7 @@ } }; function initBridge(subscribeNamespace) { - const emitter = new E(); + var emitter = new E(); return { on(event, callback) { return emitter.on(event, callback); @@ -713,26 +1311,33 @@ return emitter.emit(event, ...args); }, subscribe(event, callback, once2 = false) { - emitter[once2 ? "once" : "on"](`${subscribeNamespace}.${event}`, callback); + emitter[once2 ? "once" : "on"]("".concat(subscribeNamespace, ".").concat(event), callback); }, unsubscribe(event, callback) { - emitter.off(`${subscribeNamespace}.${event}`, callback); + emitter.off("".concat(subscribeNamespace, ".").concat(event), callback); }, subscribeHandler(event, args, pageId) { - emitter.emit(`${subscribeNamespace}.${event}`, args, pageId); + emitter.emit("".concat(subscribeNamespace, ".").concat(event), args, pageId); } }; } - const INVOKE_VIEW_API = "invokeViewApi"; - const INVOKE_SERVICE_API = "invokeServiceApi"; - let invokeServiceMethodId = 1; - const invokeServiceMethod = (name, args, callback) => { - const { subscribe, publishHandler: publishHandler2 } = UniViewJSBridge; - const id2 = callback ? invokeServiceMethodId++ : 0; + var INVOKE_VIEW_API = "invokeViewApi"; + var INVOKE_SERVICE_API = "invokeServiceApi"; + var invokeServiceMethodId = 1; + var invokeServiceMethod = (name, args, callback) => { + var { + subscribe, + publishHandler: publishHandler2 + } = UniViewJSBridge; + var id2 = callback ? invokeServiceMethodId++ : 0; callback && subscribe(INVOKE_SERVICE_API + "." + id2, callback, true); - publishHandler2(INVOKE_SERVICE_API, { id: id2, name, args }); + publishHandler2(INVOKE_SERVICE_API, { + id: id2, + name, + args + }); }; - const viewMethods = Object.create(null); + var viewMethods = Object.create(null); function normalizeViewMethodName(pageId, name) { return pageId + "." + name; } @@ -755,41 +1360,44 @@ args }, pageId) { name = normalizeViewMethodName(pageId, name); - const publish = (res) => { + var publish = (res) => { id2 && UniViewJSBridge.publishHandler(INVOKE_VIEW_API + "." + id2, res); }; - const handler = viewMethods[name]; + var handler = viewMethods[name]; if (handler) { handler(args, publish); } else { publish({}); } } - const ViewJSBridge = /* @__PURE__ */ extend(initBridge("service"), { + var ViewJSBridge = /* @__PURE__ */ extend(initBridge("service"), { invokeServiceMethod }); - const LONGPRESS_TIMEOUT = 350; - const LONGPRESS_THRESHOLD = 10; - const passiveOptions$2 = passive(true); - let longPressTimer; + var LONGPRESS_TIMEOUT = 350; + var LONGPRESS_THRESHOLD = 10; + var passiveOptions$2 = passive(true); + var longPressTimer; function clearLongPressTimer() { if (longPressTimer) { clearTimeout(longPressTimer); longPressTimer = null; } } - let startPageX = 0; - let startPageY = 0; + var startPageX = 0; + var startPageY = 0; function touchstart(evt) { clearLongPressTimer(); if (evt.touches.length !== 1) { return; } - const { pageX, pageY } = evt.touches[0]; + var { + pageX, + pageY + } = evt.touches[0]; startPageX = pageX; startPageY = pageY; longPressTimer = setTimeout(function() { - const customEvent = new CustomEvent("longpress", { + var customEvent = new CustomEvent("longpress", { bubbles: true, cancelable: true, target: evt.target, @@ -807,7 +1415,10 @@ if (evt.touches.length !== 1) { return clearLongPressTimer(); } - const { pageX, pageY } = evt.touches[0]; + var { + pageX, + pageY + } = evt.touches[0]; if (Math.abs(pageX - startPageX) > LONGPRESS_THRESHOLD || Math.abs(pageY - startPageY) > LONGPRESS_THRESHOLD) { return clearLongPressTimer(); } @@ -819,22 +1430,22 @@ window.addEventListener("touchcancel", clearLongPressTimer, passiveOptions$2); } function checkValue$1(value, defaultValue) { - const newValue = Number(value); + var newValue = Number(value); return isNaN(newValue) ? defaultValue : newValue; } function getWindowWidth() { - const screenFix = /^Apple/.test(navigator.vendor) && typeof window.orientation === "number"; - const landscape = screenFix && Math.abs(window.orientation) === 90; + var screenFix = /^Apple/.test(navigator.vendor) && typeof window.orientation === "number"; + var landscape = screenFix && Math.abs(window.orientation) === 90; var screenWidth = screenFix ? Math[landscape ? "max" : "min"](screen.width, screen.height) : screen.width; var windowWidth = Math.min(window.innerWidth, document.documentElement.clientWidth, screenWidth) || screenWidth; return windowWidth; } function useRem() { function updateRem() { - const config = __uniConfig.globalStyle || {}; - const maxWidth = checkValue$1(config.rpxCalcMaxDeviceWidth, 960); - const baseWidth = checkValue$1(config.rpxCalcBaseDeviceWidth, 375); - let width = getWindowWidth(); + var config = __uniConfig.globalStyle || {}; + var maxWidth = checkValue$1(config.rpxCalcMaxDeviceWidth, 960); + var baseWidth = checkValue$1(config.rpxCalcBaseDeviceWidth, 375); + var width = getWindowWidth(); width = width <= maxWidth ? width : baseWidth; document.documentElement.style.fontSize = width / 23.4375 + "px"; } @@ -849,11 +1460,33 @@ initLongPress(); } } - const targetMap = new WeakMap(); - const effectStack = []; - let activeEffect; - const ITERATE_KEY = Symbol(""); - const MAP_KEY_ITERATE_KEY = Symbol(""); + var fails$1 = _fails; + var _strictMethod = function(method, arg) { + return !!method && fails$1(function() { + arg ? method.call(null, function() { + }, 1) : method.call(null); + }); + }; + var $export$1 = _export; + var aFunction = _aFunction; + var toObject = _toObject; + var fails = _fails; + var $sort = [].sort; + var test = [1, 2, 3]; + $export$1($export$1.P + $export$1.F * (fails(function() { + test.sort(void 0); + }) || !fails(function() { + test.sort(null); + }) || !_strictMethod($sort)), "Array", { + sort: function sort(comparefn) { + return comparefn === void 0 ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); + } + }); + var targetMap = new WeakMap(); + var effectStack = []; + var activeEffect; + var ITERATE_KEY = Symbol(""); + var MAP_KEY_ITERATE_KEY = Symbol(""); function isEffect(fn) { return fn && fn._isEffect === true; } @@ -861,7 +1494,7 @@ if (isEffect(fn)) { fn = fn.raw; } - const effect2 = createReactiveEffect(fn, options); + var effect2 = createReactiveEffect(fn, options); if (!options.lazy) { effect2(); } @@ -876,9 +1509,9 @@ effect2.active = false; } } - let uid = 0; + var uid = 0; function createReactiveEffect(fn, options) { - const effect2 = function reactiveEffect() { + var effect2 = function reactiveEffect() { if (!effect2.active) { return fn(); } @@ -906,16 +1539,18 @@ return effect2; } function cleanup(effect2) { - const { deps } = effect2; + var { + deps + } = effect2; if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect2); + for (var i2 = 0; i2 < deps.length; i2++) { + deps[i2].delete(effect2); } deps.length = 0; } } - let shouldTrack = true; - const trackStack = []; + var shouldTrack = true; + var trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); shouldTrack = false; @@ -925,33 +1560,33 @@ shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); + var last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } - function track(target, type, key) { + function track(target, type, key2) { if (!shouldTrack || activeEffect === void 0) { return; } - let depsMap = targetMap.get(target); + var depsMap = targetMap.get(target); if (!depsMap) { targetMap.set(target, depsMap = new Map()); } - let dep = depsMap.get(key); + var dep = depsMap.get(key2); if (!dep) { - depsMap.set(key, dep = new Set()); + depsMap.set(key2, dep = new Set()); } if (!dep.has(activeEffect)) { dep.add(activeEffect); activeEffect.deps.push(dep); } } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); + function trigger(target, type, key2, newValue, oldValue, oldTarget) { + var depsMap = targetMap.get(target); if (!depsMap) { return; } - const effects = new Set(); - const add2 = (effectsToAdd) => { + var effects = new Set(); + var add2 = (effectsToAdd) => { if (effectsToAdd) { effectsToAdd.forEach((effect2) => { if (effect2 !== activeEffect || effect2.allowRecurse) { @@ -962,15 +1597,15 @@ }; if (type === "clear") { depsMap.forEach(add2); - } else if (key === "length" && isArray(target)) { - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 >= newValue) { + } else if (key2 === "length" && isArray(target)) { + depsMap.forEach((dep, key3) => { + if (key3 === "length" || key3 >= newValue) { add2(dep); } }); } else { - if (key !== void 0) { - add2(depsMap.get(key)); + if (key2 !== void 0) { + add2(depsMap.get(key2)); } switch (type) { case "add": @@ -979,7 +1614,7 @@ if (isMap(target)) { add2(depsMap.get(MAP_KEY_ITERATE_KEY)); } - } else if (isIntegerKey(key)) { + } else if (isIntegerKey(key2)) { add2(depsMap.get("length")); } break; @@ -998,7 +1633,7 @@ break; } } - const run = (effect2) => { + var run = (effect2) => { if (effect2.options.scheduler) { effect2.options.scheduler(effect2); } else { @@ -1007,22 +1642,22 @@ }; effects.forEach(run); } - const isNonTrackableKeys = /* @__PURE__ */ makeMap$1(`__proto__,__v_isRef,__isVue`); - const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol)); - const get = /* @__PURE__ */ createGetter(); - const shallowGet = /* @__PURE__ */ createGetter(false, true); - const readonlyGet = /* @__PURE__ */ createGetter(true); - const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); + var isNonTrackableKeys = /* @__PURE__ */ makeMap$1("__proto__,__v_isRef,__isVue"); + var builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key2) => Symbol[key2]).filter(isSymbol)); + var get = /* @__PURE__ */ createGetter(); + var shallowGet = /* @__PURE__ */ createGetter(false, true); + var readonlyGet = /* @__PURE__ */ createGetter(true); + var arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - const method = Array.prototype[key]; - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get", i + ""); - } - const res = method.apply(arr, args); + var instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key2) => { + var method = Array.prototype[key2]; + instrumentations[key2] = function(...args) { + var arr = toRaw(this); + for (var i2 = 0, l = this.length; i2 < l; i2++) { + track(arr, "get", i2 + ""); + } + var res = method.apply(arr, args); if (res === -1 || res === false) { return method.apply(arr, args.map(toRaw)); } else { @@ -1030,11 +1665,11 @@ } }; }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - const method = Array.prototype[key]; - instrumentations[key] = function(...args) { + ["push", "pop", "shift", "unshift", "splice"].forEach((key2) => { + var method = Array.prototype[key2]; + instrumentations[key2] = function(...args) { pauseTracking(); - const res = method.apply(this, args); + var res = method.apply(this, args); resetTracking(); return res; }; @@ -1042,30 +1677,30 @@ return instrumentations; } function createGetter(isReadonly2 = false, shallow = false) { - return function get2(target, key, receiver) { - if (key === "__v_isReactive") { + return function get2(target, key2, receiver) { + if (key2 === "__v_isReactive") { return !isReadonly2; - } else if (key === "__v_isReadonly") { + } else if (key2 === "__v_isReadonly") { return isReadonly2; - } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { + } else if (key2 === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { return target; } - const targetIsArray = isArray(target); - if (!isReadonly2 && targetIsArray && hasOwn$1(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); + var targetIsArray = isArray(target); + if (!isReadonly2 && targetIsArray && hasOwn$1(arrayInstrumentations, key2)) { + return Reflect.get(arrayInstrumentations, key2, receiver); } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + var res = Reflect.get(target, key2, receiver); + if (isSymbol(key2) ? builtInSymbols.has(key2) : isNonTrackableKeys(key2)) { return res; } if (!isReadonly2) { - track(target, "get", key); + track(target, "get", key2); } if (shallow) { return res; } if (isRef(res)) { - const shouldUnwrap = !targetIsArray || !isIntegerKey(key); + var shouldUnwrap = !targetIsArray || !isIntegerKey(key2); return shouldUnwrap ? res.value : res; } if (isObject$1(res)) { @@ -1074,11 +1709,11 @@ return res; }; } - const set = /* @__PURE__ */ createSetter(); - const shallowSet = /* @__PURE__ */ createSetter(true); + var set = /* @__PURE__ */ createSetter(); + var shallowSet = /* @__PURE__ */ createSetter(true); function createSetter(shallow = false) { - return function set2(target, key, value, receiver) { - let oldValue = target[key]; + return function set2(target, key2, value, receiver) { + var oldValue = target[key2]; if (!shallow) { value = toRaw(value); oldValue = toRaw(oldValue); @@ -1087,31 +1722,31 @@ return true; } } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key); - const result = Reflect.set(target, key, value, receiver); + var hadKey = isArray(target) && isIntegerKey(key2) ? Number(key2) < target.length : hasOwn$1(target, key2); + var result = Reflect.set(target, key2, value, receiver); if (target === toRaw(receiver)) { if (!hadKey) { - trigger(target, "add", key, value); + trigger(target, "add", key2, value); } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value); + trigger(target, "set", key2, value); } } return result; }; } - function deleteProperty(target, key) { - const hadKey = hasOwn$1(target, key); - target[key]; - const result = Reflect.deleteProperty(target, key); + function deleteProperty(target, key2) { + var hadKey = hasOwn$1(target, key2); + target[key2]; + var result = Reflect.deleteProperty(target, key2); if (result && hadKey) { - trigger(target, "delete", key, void 0); + trigger(target, "delete", key2, void 0); } return result; } - function has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); + function has(target, key2) { + var result = Reflect.has(target, key2); + if (!isSymbol(key2) || !builtInSymbols.has(key2)) { + track(target, "has", key2); } return result; } @@ -1119,57 +1754,59 @@ track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target); } - const mutableHandlers = { + var mutableHandlers = { get, set, deleteProperty, has, ownKeys }; - const readonlyHandlers = { + var readonlyHandlers = { get: readonlyGet, - set(target, key) { + set(target, key2) { return true; }, - deleteProperty(target, key) { + deleteProperty(target, key2) { return true; } }; - const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { + var shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); - const toReactive = (value) => isObject$1(value) ? reactive(value) : value; - const toReadonly = (value) => isObject$1(value) ? readonly(value) : value; - const toShallow = (value) => value; - const getProto = (v2) => Reflect.getPrototypeOf(v2); - function get$1(target, key, isReadonly2 = false, isShallow = false) { + var toReactive = (value) => isObject$1(value) ? reactive(value) : value; + var toReadonly = (value) => isObject$1(value) ? readonly(value) : value; + var toShallow = (value) => value; + var getProto = (v2) => Reflect.getPrototypeOf(v2); + function get$1(target, key2, isReadonly2 = false, isShallow = false) { target = target["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (key !== rawKey) { - !isReadonly2 && track(rawTarget, "get", key); + var rawTarget = toRaw(target); + var rawKey = toRaw(key2); + if (key2 !== rawKey) { + !isReadonly2 && track(rawTarget, "get", key2); } !isReadonly2 && track(rawTarget, "get", rawKey); - const { has: has2 } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; - if (has2.call(rawTarget, key)) { - return wrap(target.get(key)); + var { + has: has2 + } = getProto(rawTarget); + var wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key2)) { + return wrap(target.get(key2)); } else if (has2.call(rawTarget, rawKey)) { return wrap(target.get(rawKey)); } else if (target !== rawTarget) { - target.get(key); + target.get(key2); } } - function has$1(key, isReadonly2 = false) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (key !== rawKey) { - !isReadonly2 && track(rawTarget, "has", key); + function has$1(key2, isReadonly2 = false) { + var target = this["__v_raw"]; + var rawTarget = toRaw(target); + var rawKey = toRaw(key2); + if (key2 !== rawKey) { + !isReadonly2 && track(rawTarget, "has", key2); } !isReadonly2 && track(rawTarget, "has", rawKey); - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + return key2 === rawKey ? target.has(key2) : target.has(key2) || target.has(rawKey); } function size(target, isReadonly2 = false) { target = target["__v_raw"]; @@ -1178,52 +1815,58 @@ } function add(value) { value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); + var target = toRaw(this); + var proto2 = getProto(target); + var hadKey = proto2.has.call(target, value); if (!hadKey) { target.add(value); trigger(target, "add", value, value); } return this; } - function set$1(key, value) { + function set$1(key2, value) { value = toRaw(value); - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); + var target = toRaw(this); + var { + has: has2, + get: get2 + } = getProto(target); + var hadKey = has2.call(target, key2); if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); + key2 = toRaw(key2); + hadKey = has2.call(target, key2); } - const oldValue = get2.call(target, key); - target.set(key, value); + var oldValue = get2.call(target, key2); + target.set(key2, value); if (!hadKey) { - trigger(target, "add", key, value); + trigger(target, "add", key2, value); } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value); + trigger(target, "set", key2, value); } return this; } - function deleteEntry(key) { - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); + function deleteEntry(key2) { + var target = toRaw(this); + var { + has: has2, + get: get2 + } = getProto(target); + var hadKey = has2.call(target, key2); if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); + key2 = toRaw(key2); + hadKey = has2.call(target, key2); } - get2 ? get2.call(target, key) : void 0; - const result = target.delete(key); + get2 ? get2.call(target, key2) : void 0; + var result = target.delete(key2); if (hadKey) { - trigger(target, "delete", key, void 0); + trigger(target, "delete", key2, void 0); } return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const result = target.clear(); + var target = toRaw(this); + var hadItems = target.size !== 0; + var result = target.clear(); if (hadItems) { trigger(target, "clear", void 0, void 0); } @@ -1231,30 +1874,36 @@ } function createForEach(isReadonly2, isShallow) { return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + var observed = this; + var target = observed["__v_raw"]; + var rawTarget = toRaw(target); + var wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); + return target.forEach((value, key2) => { + return callback.call(thisArg, wrap(value), wrap(key2), observed); }); }; } function createIterableMethod(method, isReadonly2, isShallow) { return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + var target = this["__v_raw"]; + var rawTarget = toRaw(target); + var targetIsMap = isMap(rawTarget); + var isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + var isKeyOnly = method === "keys" && targetIsMap; + var innerIterator = target[method](...args); + var wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); return { next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { + var { + value, + done + } = innerIterator.next(); + return done ? { + value, + done + } : { value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), done }; @@ -1271,9 +1920,9 @@ }; } function createInstrumentations() { - const mutableInstrumentations2 = { - get(key) { - return get$1(this, key); + var mutableInstrumentations2 = { + get(key2) { + return get$1(this, key2); }, get size() { return size(this); @@ -1285,9 +1934,9 @@ clear, forEach: createForEach(false, false) }; - const shallowInstrumentations2 = { - get(key) { - return get$1(this, key, false, true); + var shallowInstrumentations2 = { + get(key2) { + return get$1(this, key2, false, true); }, get size() { return size(this); @@ -1299,15 +1948,15 @@ clear, forEach: createForEach(false, true) }; - const readonlyInstrumentations2 = { - get(key) { - return get$1(this, key, true); + var readonlyInstrumentations2 = { + get(key2) { + return get$1(this, key2, true); }, get size() { return size(this, true); }, - has(key) { - return has$1.call(this, key, true); + has(key2) { + return has$1.call(this, key2, true); }, add: createReadonlyMethod("add"), set: createReadonlyMethod("set"), @@ -1315,15 +1964,15 @@ clear: createReadonlyMethod("clear"), forEach: createForEach(true, false) }; - const shallowReadonlyInstrumentations2 = { - get(key) { - return get$1(this, key, true, true); + var shallowReadonlyInstrumentations2 = { + get(key2) { + return get$1(this, key2, true, true); }, get size() { return size(this, true); }, - has(key) { - return has$1.call(this, key, true); + has(key2) { + return has$1.call(this, key2, true); }, add: createReadonlyMethod("add"), set: createReadonlyMethod("set"), @@ -1331,47 +1980,42 @@ clear: createReadonlyMethod("clear"), forEach: createForEach(true, true) }; - const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + var iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; iteratorMethods.forEach((method) => { mutableInstrumentations2[method] = createIterableMethod(method, false, false); readonlyInstrumentations2[method] = createIterableMethod(method, true, false); shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); }); - return [ - mutableInstrumentations2, - readonlyInstrumentations2, - shallowInstrumentations2, - shallowReadonlyInstrumentations2 - ]; - } - const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); + return [mutableInstrumentations2, readonlyInstrumentations2, shallowInstrumentations2, shallowReadonlyInstrumentations2]; + } + var [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive") { + var instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return (target, key2, receiver) => { + if (key2 === "__v_isReactive") { return !isReadonly2; - } else if (key === "__v_isReadonly") { + } else if (key2 === "__v_isReadonly") { return isReadonly2; - } else if (key === "__v_raw") { + } else if (key2 === "__v_raw") { return target; } - return Reflect.get(hasOwn$1(instrumentations, key) && key in target ? instrumentations : target, key, receiver); + return Reflect.get(hasOwn$1(instrumentations, key2) && key2 in target ? instrumentations : target, key2, receiver); }; } - const mutableCollectionHandlers = { + var mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; - const shallowCollectionHandlers = { + var shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; - const readonlyCollectionHandlers = { + var readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; - const reactiveMap = new WeakMap(); - const shallowReactiveMap = new WeakMap(); - const readonlyMap = new WeakMap(); - const shallowReadonlyMap = new WeakMap(); + var reactiveMap = new WeakMap(); + var shallowReactiveMap = new WeakMap(); + var readonlyMap = new WeakMap(); + var shallowReadonlyMap = new WeakMap(); function targetTypeMap(rawType) { switch (rawType) { case "Object": @@ -1408,15 +2052,15 @@ if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { return target; } - const existingProxy = proxyMap.get(target); + var existingProxy = proxyMap.get(target); if (existingProxy) { return existingProxy; } - const targetType = getTargetType(target); + var targetType = getTargetType(target); if (targetType === 0) { return target; } - const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); + var proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); proxyMap.set(target, proxy); return proxy; } @@ -1439,7 +2083,7 @@ def(value, "__v_skip", true); return value; } - const convert = (val) => isObject$1(val) ? reactive(val) : val; + var convert = (val) => isObject$1(val) ? reactive(val) : val; function isRef(r) { return Boolean(r && r.__v_isRef === true); } @@ -1477,15 +2121,15 @@ function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; + var shallowUnwrapHandlers = { + get: (target, key2, receiver) => unref(Reflect.get(target, key2, receiver)), + set: (target, key2, value, receiver) => { + var oldValue = target[key2]; if (isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } else { - return Reflect.set(target, key, value, receiver); + return Reflect.set(target, key2, value, receiver); } } }; @@ -1509,21 +2153,21 @@ this["__v_isReadonly"] = isReadonly2; } get value() { - const self = toRaw(this); - if (self._dirty) { - self._value = this.effect(); - self._dirty = false; + var self2 = toRaw(this); + if (self2._dirty) { + self2._value = this.effect(); + self2._dirty = false; } - track(self, "get", "value"); - return self._value; + track(self2, "get", "value"); + return self2._value; } set value(newValue) { this._setter(newValue); } } function computed(getterOrOptions) { - let getter; - let setter; + var getter; + var setter; if (isFunction(getterOrOptions)) { getter = getterOrOptions; setter = NOOP; @@ -1533,37 +2177,33 @@ } return new ComputedRefImpl(getter, setter, isFunction(getterOrOptions) || !getterOrOptions.set); } - const stack = []; + var stack = []; function warn(msg, ...args) { pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); + var instance = stack.length ? stack[stack.length - 1].component : null; + var appWarnHandler = instance && instance.appContext.config.warnHandler; + var trace = getComponentTrace(); if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11, [ - msg + args.join(""), - instance && instance.proxy, - trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"), - trace - ]); + callWithErrorHandling(appWarnHandler, instance, 11, [msg + args.join(""), instance && instance.proxy, trace.map(({ + vnode + }) => "at <".concat(formatComponentName(instance, vnode.type), ">")).join("\n"), trace]); } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + var warnArgs = ["[Vue warn]: ".concat(msg), ...args]; if (trace.length && true) { - warnArgs.push(` -`, ...formatTrace(trace)); + warnArgs.push("\n", ...formatTrace(trace)); } console.warn(...warnArgs); } resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; + var currentVNode = stack[stack.length - 1]; if (!currentVNode) { return []; } - const normalizedStack = []; + var normalizedStack = []; while (currentVNode) { - const last = normalizedStack[0]; + var last = normalizedStack[0]; if (last && last.vnode === currentVNode) { last.recurseCount++; } else { @@ -1572,55 +2212,57 @@ recurseCount: 0 }); } - const parentInstance = currentVNode.component && currentVNode.component.parent; + var parentInstance = currentVNode.component && currentVNode.component.parent; currentVNode = parentInstance && parentInstance.vnode; } return normalizedStack; } function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); + var logs = []; + trace.forEach((entry, i2) => { + logs.push(...i2 === 0 ? [] : ["\n"], ...formatTraceEntry(entry)); }); return logs; } - function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; + function formatTraceEntry({ + vnode, + recurseCount + }) { + var postfix = recurseCount > 0 ? "... (".concat(recurseCount, " recursive calls)") : ""; + var isRoot = vnode.component ? vnode.component.parent == null : false; + var open = " at <".concat(formatComponentName(vnode.component, vnode.type, isRoot)); + var close = ">" + postfix; return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } function formatProps(props2) { - const res = []; - const keys = Object.keys(props2); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props2[key])); + var res = []; + var keys = Object.keys(props2); + keys.slice(0, 3).forEach((key2) => { + res.push(...formatProp(key2, props2[key2])); }); if (keys.length > 3) { - res.push(` ...`); + res.push(" ..."); } return res; } - function formatProp(key, value, raw) { + function formatProp(key2, value, raw) { if (isString(value)) { value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; + return raw ? value : ["".concat(key2, "=").concat(value)]; } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; + return raw ? value : ["".concat(key2, "=").concat(value)]; } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; + value = formatProp(key2, toRaw(value.value), true); + return raw ? value : ["".concat(key2, "=Ref<"), value, ">"]; } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + return ["".concat(key2, "=fn").concat(value.name ? "<".concat(value.name, ">") : "")]; } else { value = toRaw(value); - return raw ? value : [`${key}=`, value]; + return raw ? value : ["".concat(key2, "="), value]; } } function callWithErrorHandling(fn, instance, type, args) { - let res; + var res; try { res = args ? fn(...args) : fn(); } catch (err) { @@ -1630,7 +2272,7 @@ } function callWithAsyncErrorHandling(fn, instance, type, args) { if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); + var res = callWithErrorHandling(fn, instance, type, args); if (res && isPromise(res)) { res.catch((err) => { handleError(err, instance, type); @@ -1638,30 +2280,30 @@ } return res; } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + var values = []; + for (var i2 = 0; i2 < fn.length; i2++) { + values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args)); } return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; + var contextVNode = instance ? instance.vnode : null; if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = type; + var cur = instance.parent; + var exposedInstance = instance.proxy; + var errorInfo = type; while (cur) { - const errorCapturedHooks = cur.ec; + var errorCapturedHooks = cur.ec; if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + for (var i2 = 0; i2 < errorCapturedHooks.length; i2++) { + if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) { return; } } } cur = cur.parent; } - const appErrorHandler = instance.appContext.config.errorHandler; + var appErrorHandler = instance.appContext.config.errorHandler; if (appErrorHandler) { callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); return; @@ -1678,38 +2320,38 @@ } } } - let isFlushing = false; - let isFlushPending = false; - const queue = []; - let flushIndex = 0; - const pendingPreFlushCbs = []; - let activePreFlushCbs = null; - let preFlushIndex = 0; - const pendingPostFlushCbs = []; - let activePostFlushCbs = null; - let postFlushIndex = 0; - const resolvedPromise = Promise.resolve(); - let currentFlushPromise = null; - let currentPreFlushParentJob = null; - const RECURSION_LIMIT = 100; + var isFlushing = false; + var isFlushPending = false; + var queue = []; + var flushIndex = 0; + var pendingPreFlushCbs = []; + var activePreFlushCbs = null; + var preFlushIndex = 0; + var pendingPostFlushCbs = []; + var activePostFlushCbs = null; + var postFlushIndex = 0; + var resolvedPromise = Promise.resolve(); + var currentFlushPromise = null; + var currentPreFlushParentJob = null; + var RECURSION_LIMIT = 100; function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; + var p2 = currentFlushPromise || resolvedPromise; return fn ? p2.then(this ? fn.bind(this) : fn) : p2; } function findInsertionIndex(job) { - let start = flushIndex + 1; - let end = queue.length; - const jobId = getId(job); + var start = flushIndex + 1; + var end = queue.length; + var jobId = getId(job); while (start < end) { - const middle = start + end >>> 1; - const middleJobId = getId(queue[middle]); + var middle = start + end >>> 1; + var middleJobId = getId(queue[middle]); middleJobId < jobId ? start = middle + 1 : end = middle; } return start; } function queueJob(job) { if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) { - const pos = findInsertionIndex(job); + var pos = findInsertionIndex(job); if (pos > -1) { queue.splice(pos, 0, job); } else { @@ -1725,9 +2367,9 @@ } } function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); + var i2 = queue.indexOf(job); + if (i2 > flushIndex) { + queue.splice(i2, 1); } } function queueCb(cb, activeQueue, pendingQueue, index2) { @@ -1762,7 +2404,7 @@ } function flushPostFlushCbs(seen) { if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; + var deduped = [...new Set(pendingPostFlushCbs)]; pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); @@ -1777,7 +2419,7 @@ postFlushIndex = 0; } } - const getId = (job) => job.id == null ? Infinity : job.id; + var getId = (job) => job.id == null ? Infinity : job.id; function flushJobs(seen) { isFlushPending = false; isFlushing = true; @@ -1785,7 +2427,7 @@ queue.sort((a2, b) => getId(a2) - getId(b)); try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; + var job = queue[flushIndex]; if (job && job.active !== false) { if (false) ; @@ -1807,34 +2449,34 @@ if (!seen.has(fn)) { seen.set(fn, 1); } else { - const count = seen.get(fn); + var count = seen.get(fn); if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`); + var instance = fn.ownerInstance; + var componentName = instance && getComponentName(instance.type); + warn("Maximum recursive updates exceeded".concat(componentName ? " in component <".concat(componentName, ">") : "", ". ") + "This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function."); return true; } else { seen.set(fn, count + 1); } } } - const globalCompatConfig = { + var globalCompatConfig = { MODE: 2 }; - function getCompatConfigForKey(key, instance) { - const instanceConfig = instance && instance.type.compatConfig; - if (instanceConfig && key in instanceConfig) { - return instanceConfig[key]; + function getCompatConfigForKey(key2, instance) { + var instanceConfig = instance && instance.type.compatConfig; + if (instanceConfig && key2 in instanceConfig) { + return instanceConfig[key2]; } - return globalCompatConfig[key]; + return globalCompatConfig[key2]; } - function isCompatEnabled(key, instance, enableForBuiltIn = false) { + function isCompatEnabled(key2, instance, enableForBuiltIn = false) { if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) { return false; } - const rawMode = getCompatConfigForKey("MODE", instance) || 2; - const val = getCompatConfigForKey(key, instance); - const mode2 = isFunction(rawMode) ? rawMode(instance && instance.type) : rawMode; + var rawMode = getCompatConfigForKey("MODE", instance) || 2; + var val = getCompatConfigForKey(key2, instance); + var mode2 = isFunction(rawMode) ? rawMode(instance && instance.type) : rawMode; if (mode2 === 2) { return val !== false; } else { @@ -1842,28 +2484,31 @@ } } function emit$2(instance, event, ...rawArgs) { - const props2 = instance.vnode.props || EMPTY_OBJ; - let args = rawArgs; - const isModelListener2 = event.startsWith("update:"); - const modelArg = isModelListener2 && event.slice(7); + var props2 = instance.vnode.props || EMPTY_OBJ; + var args = rawArgs; + var isModelListener2 = event.startsWith("update:"); + var modelArg = isModelListener2 && event.slice(7); if (modelArg && modelArg in props2) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number, trim } = props2[modifiersKey] || EMPTY_OBJ; + var modifiersKey = "".concat(modelArg === "modelValue" ? "model" : modelArg, "Modifiers"); + var { + number, + trim + } = props2[modifiersKey] || EMPTY_OBJ; if (trim) { args = rawArgs.map((a2) => a2.trim()); } else if (number) { args = rawArgs.map(toNumber); } } - let handlerName; - let handler = props2[handlerName = toHandlerKey(event)] || props2[handlerName = toHandlerKey(camelize(event))]; + var handlerName; + var handler = props2[handlerName = toHandlerKey(event)] || props2[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { handler = props2[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance, 6, args); } - const onceHandler = props2[handlerName + `Once`]; + var onceHandler = props2[handlerName + "Once"]; if (onceHandler) { if (!instance.emitted) { instance.emitted = {}; @@ -1875,17 +2520,17 @@ } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache2 = appContext.emitsCache; - const cached = cache2.get(comp); + var cache2 = appContext.emitsCache; + var cached = cache2.get(comp); if (cached !== void 0) { return cached; } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; + var raw = comp.emits; + var normalized = {}; + var hasExtends = false; if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + var extendEmits = (raw2) => { + var normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; extend(normalized, normalizedFromExtend); @@ -1906,40 +2551,40 @@ return null; } if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); + raw.forEach((key2) => normalized[key2] = null); } else { extend(normalized, raw); } cache2.set(comp, normalized); return normalized; } - function isEmitListener(options, key) { - if (!options || !isOn(key)) { + function isEmitListener(options, key2) { + if (!options || !isOn(key2)) { return false; } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate(key)) || hasOwn$1(options, key); + key2 = key2.slice(2).replace(/Once$/, ""); + return hasOwn$1(options, key2[0].toLowerCase() + key2.slice(1)) || hasOwn$1(options, hyphenate(key2)) || hasOwn$1(options, key2); } - let currentRenderingInstance = null; - let currentScopeId = null; + var currentRenderingInstance = null; + var currentScopeId = null; function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; + var prev = currentRenderingInstance; currentRenderingInstance = instance; currentScopeId = instance && instance.type.__scopeId || null; return prev; } - function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) + function withCtx(fn, ctx2 = currentRenderingInstance, isNonScopedSlot) { + if (!ctx2) return fn; if (fn._n) { return fn; } - const renderFnWithContext = (...args) => { + var renderFnWithContext = (...args) => { if (renderFnWithContext._d) { setBlockTracking(-1); } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); + var prevInstance = setCurrentRenderingInstance(ctx2); + var res = fn(...args); setCurrentRenderingInstance(prevInstance); if (renderFnWithContext._d) { setBlockTracking(1); @@ -1951,49 +2596,74 @@ renderFnWithContext._d = true; return renderFnWithContext; } - let accessedAttrs = false; + var accessedAttrs = false; function markAttrsAccessed() { accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props: props2, propsOptions: [propsOptions], slots, attrs: attrs2, emit: emit2, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - const prev = setCurrentRenderingInstance(instance); + var { + type: Component, + vnode, + proxy, + withProxy, + props: props2, + propsOptions: [propsOptions], + slots, + attrs: attrs2, + emit: emit2, + render, + renderCache, + data, + setupState, + ctx: ctx2, + inheritAttrs + } = instance; + var result; + var prev = setCurrentRenderingInstance(instance); try { - let fallthroughAttrs; + var fallthroughAttrs; if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx)); + var proxyToUse = withProxy || proxy; + result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx2)); fallthroughAttrs = attrs2; } else { - const render2 = Component; + var _render = Component; if (false) ; - result = normalizeVNode(render2.length > 1 ? render2(props2, false ? { + result = normalizeVNode(_render.length > 1 ? _render(props2, false ? { get attrs() { markAttrsAccessed(); return attrs2; }, slots, emit: emit2 - } : { attrs: attrs2, slots, emit: emit2 }) : render2(props2, null)); + } : { + attrs: attrs2, + slots, + emit: emit2 + }) : _render(props2, null)); fallthroughAttrs = Component.props ? attrs2 : getFunctionalFallthrough(attrs2); } - let root = result; - let setRoot = void 0; + var root = result; + var setRoot = void 0; if (false) ; if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; + var keys = Object.keys(fallthroughAttrs); + var { + shapeFlag + } = root; if (keys.length) { if (shapeFlag & 1 || shapeFlag & 6) { if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root = cloneVNode(root, fallthroughAttrs); - } else if (false) - ; + } else { + var allAttrs, eventAttrs, extraAttrs, i2, l, key2; + if (false) + ; + } } } if (false) @@ -2014,23 +2684,22 @@ result = root; } } catch (err) { - blockStack.length = 0; handleError(err, instance, 1); result = createVNode(Comment$1); } setCurrentRenderingInstance(prev); return result; } - const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); + var getChildRoot = (vnode) => { + var rawChildren = vnode.children; + var dynamicChildren = vnode.dynamicChildren; + var childRoot = filterSingleRoot(rawChildren); if (!childRoot) { return [vnode, void 0]; } - const index2 = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { + var index2 = rawChildren.indexOf(childRoot); + var dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + var setRoot = (updatedRoot) => { rawChildren[index2] = updatedRoot; if (dynamicChildren) { if (dynamicIndex > -1) { @@ -2043,9 +2712,9 @@ return [normalizeVNode(childRoot), setRoot]; }; function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; + var singleRoot; + for (var i2 = 0; i2 < children.length; i2++) { + var child = children[i2]; if (isVNode(child)) { if (child.type !== Comment$1 || child.children === "v-if") { if (singleRoot) { @@ -2060,31 +2729,39 @@ } return singleRoot; } - const getFunctionalFallthrough = (attrs2) => { - let res; - for (const key in attrs2) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs2[key]; + var getFunctionalFallthrough = (attrs2) => { + var res; + for (var key2 in attrs2) { + if (key2 === "class" || key2 === "style" || isOn(key2)) { + (res || (res = {}))[key2] = attrs2[key2]; } } return res; }; - const filterModelListeners = (attrs2, props2) => { - const res = {}; - for (const key in attrs2) { - if (!isModelListener(key) || !(key.slice(9) in props2)) { - res[key] = attrs2[key]; + var filterModelListeners = (attrs2, props2) => { + var res = {}; + for (var key2 in attrs2) { + if (!isModelListener(key2) || !(key2.slice(9) in props2)) { + res[key2] = attrs2[key2]; } } return res; }; - const isElementRoot = (vnode) => { + var isElementRoot = (vnode) => { return vnode.shapeFlag & 6 || vnode.shapeFlag & 1 || vnode.type === Comment$1; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits2 = component.emitsOptions; + var { + props: prevProps, + children: prevChildren, + component + } = prevVNode; + var { + props: nextProps, + children: nextChildren, + patchFlag + } = nextVNode; + var emits2 = component.emitsOptions; if (nextVNode.dirs || nextVNode.transition) { return true; } @@ -2098,10 +2775,10 @@ } return hasPropsChanged(prevProps, nextProps, emits2); } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits2, key)) { + var dynamicProps = nextVNode.dynamicProps; + for (var i2 = 0; i2 < dynamicProps.length; i2++) { + var key2 = dynamicProps[i2]; + if (nextProps[key2] !== prevProps[key2] && !isEmitListener(emits2, key2)) { return true; } } @@ -2126,25 +2803,28 @@ return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); + var nextKeys = Object.keys(nextProps); if (nextKeys.length !== Object.keys(prevProps).length) { return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + for (var i2 = 0; i2 < nextKeys.length; i2++) { + var key2 = nextKeys[i2]; + if (nextProps[key2] !== prevProps[key2] && !isEmitListener(emitsOptions, key2)) { return true; } } return false; } - function updateHOCHostEl({ vnode, parent }, el) { + function updateHOCHostEl({ + vnode, + parent + }, el) { while (parent && parent.subTree === vnode) { (vnode = parent.vnode).el = el; parent = parent.parent; } } - const isSuspense = (type) => type.__isSuspense; + var isSuspense = (type) => type.__isSuspense; function queueEffectWithSuspense(fn, suspense) { if (suspense && suspense.pendingBranch) { if (isArray(fn)) { @@ -2156,24 +2836,24 @@ queuePostFlushCb(fn); } } - function provide(key, value) { + function provide(key2, value) { if (!currentInstance) ; else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; + var provides = currentInstance.provides; + var parentProvides = currentInstance.parent && currentInstance.parent.provides; if (parentProvides === provides) { provides = currentInstance.provides = Object.create(parentProvides); } - provides[key] = value; + provides[key2] = value; } } - function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; + function inject(key2, defaultValue, treatDefaultAsFactory = false) { + var instance = currentInstance || currentRenderingInstance; if (instance) { - const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides; - if (provides && key in provides) { - return provides[key]; + var provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides; + if (provides && key2 in provides) { + return provides[key2]; } else if (arguments.length > 1) { return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue; } else @@ -2183,14 +2863,20 @@ function watchEffect(effect2, options) { return doWatch(effect2, null, options); } - const INITIAL_WATCHER_VALUE = {}; + var INITIAL_WATCHER_VALUE = {}; function watch(source, cb, options) { return doWatch(source, cb, options); } - function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ, instance = currentInstance) { - let getter; - let forceTrigger = false; - let isMultiSource = false; + function doWatch(source, cb, { + immediate, + deep, + flush, + onTrack, + onTrigger + } = EMPTY_OBJ, instance = currentInstance) { + var getter; + var forceTrigger = false; + var isMultiSource = false; if (isRef(source)) { getter = () => source.value; forceTrigger = !!source._shallow; @@ -2228,23 +2914,23 @@ getter = NOOP; } if (cb && deep) { - const baseGetter = getter; + var baseGetter = getter; getter = () => traverse(baseGetter()); } - let cleanup2; - let onInvalidate = (fn) => { + var cleanup2; + var onInvalidate = (fn) => { cleanup2 = runner.options.onStop = () => { callWithErrorHandling(fn, instance, 4); }; }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { + var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; + var job = () => { if (!runner.active) { return; } if (cb) { - const newValue = runner(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i) => hasChanged(v2, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + var newValue = runner(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) { if (cleanup2) { cleanup2(); } @@ -2260,7 +2946,7 @@ } }; job.allowRecurse = !!cb; - let scheduler; + var scheduler; if (flush === "sync") { scheduler = job; } else if (flush === "post") { @@ -2274,7 +2960,7 @@ } }; } - const runner = effect(getter, { + var runner = effect(getter, { lazy: true, onTrack, onTrigger, @@ -2300,9 +2986,9 @@ }; } function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; + var publicThis = this.proxy; + var getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + var cb; if (isFunction(value)) { cb = value; } else { @@ -2311,12 +2997,12 @@ } return doWatch(getter, cb.bind(publicThis), options, this); } - function createPathGetter(ctx, path) { - const segments = path.split("."); + function createPathGetter(ctx2, path) { + var segments = path.split("."); return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; + var cur = ctx2; + for (var i2 = 0; i2 < segments.length && cur; i2++) { + cur = cur[segments[i2]]; } return cur; }; @@ -2329,25 +3015,28 @@ if (isRef(value)) { traverse(value.value, seen); } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); + for (var i2 = 0; i2 < value.length; i2++) { + traverse(value[i2], seen); } } else if (isSet(value) || isMap(value)) { value.forEach((v2) => { traverse(v2, seen); }); } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); + for (var key2 in value) { + traverse(value[key2], seen); } } return value; } function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; + return isFunction(options) ? { + setup: options, + name: options.name + } : options; } - const isAsyncWrapper = (i) => !!i.type.__asyncLoader; - const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; + var isAsyncWrapper = (i2) => !!i2.type.__asyncLoader; + var isKeepAlive = (vnode) => vnode.type.__isKeepAlive; function onActivated(hook, target) { registerKeepAliveHook(hook, "a", target); } @@ -2355,19 +3044,19 @@ registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { + var wrappedHook = hook.__wdc || (hook.__wdc = () => { + var current2 = target; + while (current2) { + if (current2.isDeactivated) { return; } - current = current.parent; + current2 = current2.parent; } hook(); }); injectHook(type, wrappedHook, target); if (target) { - let current = target.parent; + var current = target.parent; while (current && current.parent) { if (isKeepAlive(current.parent.vnode)) { injectToKeepAliveRoot(wrappedHook, type, target, current); @@ -2377,21 +3066,21 @@ } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook(type, hook, keepAliveRoot, true); + var injected = injectHook(type, hook, keepAliveRoot, true); onUnmounted(() => { remove(keepAliveRoot[type], injected); }, target); } function injectHook(type, hook, target = currentInstance, prepend = false) { if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + var hooks = target[type] || (target[type] = []); + var wrappedHook = hook.__weh || (hook.__weh = (...args) => { if (target.isUnmounted) { return; } pauseTracking(); setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); + var res = callWithAsyncErrorHandling(hook, target, type, args); setCurrentInstance(null); resetTracking(); return res; @@ -2404,29 +3093,29 @@ return wrappedHook; } } - const createHook = (lifecycle) => (hook, target = currentInstance) => (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, hook, target); - const onBeforeMount = createHook("bm"); - const onMounted = createHook("m"); - const onBeforeUpdate = createHook("bu"); - const onUpdated = createHook("u"); - const onBeforeUnmount = createHook("bum"); - const onUnmounted = createHook("um"); - const onServerPrefetch = createHook("sp"); - const onRenderTriggered = createHook("rtg"); - const onRenderTracked = createHook("rtc"); + var createHook = (lifecycle) => (hook, target = currentInstance) => (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, hook, target); + var onBeforeMount = createHook("bm"); + var onMounted = createHook("m"); + var onBeforeUpdate = createHook("bu"); + var onUpdated = createHook("u"); + var onBeforeUnmount = createHook("bum"); + var onUnmounted = createHook("um"); + var onServerPrefetch = createHook("sp"); + var onRenderTriggered = createHook("rtg"); + var onRenderTracked = createHook("rtc"); function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } - let shouldCacheAccess = true; + var shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; + var options = resolveMergedOptions(instance); + var publicThis = instance.proxy; + var ctx2 = instance.ctx; shouldCacheAccess = false; if (options.beforeCreate) { callHook(options.beforeCreate, instance, "bc"); } - const { + var { data: dataOptions, computed: computedOptions, methods: methods2, @@ -2455,55 +3144,60 @@ directives, filters } = options; - const checkDuplicateProperties = null; + var checkDuplicateProperties = null; if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); + resolveInjections(injectOptions, ctx2, checkDuplicateProperties); } if (methods2) { - for (const key in methods2) { - const methodHandler = methods2[key]; + for (var _key2 in methods2) { + var methodHandler = methods2[_key2]; if (isFunction(methodHandler)) { { - ctx[key] = methodHandler.bind(publicThis); + ctx2[_key2] = methodHandler.bind(publicThis); } } } } if (dataOptions) { - const data = dataOptions.call(publicThis, publicThis); - if (!isObject$1(data)) - ; - else { - instance.data = reactive(data); - } + (function() { + var data = dataOptions.call(publicThis, publicThis); + if (!isObject$1(data)) + ; + else { + instance.data = reactive(data); + } + })(); } shouldCacheAccess = true; if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; - const c = computed$1({ + var _loop2 = function(_key42) { + var opt = computedOptions[_key42]; + var get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + var set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; + var c = computed$1({ get: get2, set: set2 }); - Object.defineProperty(ctx, key, { + Object.defineProperty(ctx2, _key42, { enumerable: true, configurable: true, get: () => c.value, set: (v2) => c.value = v2 }); + }; + for (var _key4 in computedOptions) { + _loop2(_key4); } } if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); + for (var _key5 in watchOptions) { + createWatcher(watchOptions[_key5], ctx2, publicThis, _key5); } } if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); + var provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key2) => { + provide(key2, provides[key2]); }); } if (created) { @@ -2530,11 +3224,11 @@ registerLifecycleHook(onServerPrefetch, serverPrefetch); if (isArray(expose)) { if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val + var exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key2) => { + Object.defineProperty(exposed, key2, { + get: () => publicThis[key2], + set: (val) => publicThis[key2] = val }); }); } else if (!instance.exposed) { @@ -2552,30 +3246,30 @@ if (directives) instance.directives = directives; } - function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + function resolveInjections(injectOptions, ctx2, checkDuplicateProperties = NOOP) { if (isArray(injectOptions)) { injectOptions = normalizeInject(injectOptions); } - for (const key in injectOptions) { - const opt = injectOptions[key]; + for (var key2 in injectOptions) { + var opt = injectOptions[key2]; if (isObject$1(opt)) { if ("default" in opt) { - ctx[key] = inject(opt.from || key, opt.default, true); + ctx2[key2] = inject(opt.from || key2, opt.default, true); } else { - ctx[key] = inject(opt.from || key); + ctx2[key2] = inject(opt.from || key2); } } else { - ctx[key] = inject(opt); + ctx2[key2] = inject(opt); } } } function callHook(hook, instance, type) { callWithAsyncErrorHandling(isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type); } - function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + function createWatcher(raw, ctx2, publicThis, key2) { + var getter = key2.includes(".") ? createPathGetter(publicThis, key2) : () => publicThis[key2]; if (isString(raw)) { - const handler = ctx[raw]; + var handler = ctx2[raw]; if (isFunction(handler)) { watch(getter, handler); } @@ -2583,22 +3277,31 @@ watch(getter, raw.bind(publicThis)); } else if (isObject$1(raw)) { if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + raw.forEach((r) => createWatcher(r, ctx2, publicThis, key2)); } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); + var _handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx2[raw.handler]; + if (isFunction(_handler)) { + watch(getter, _handler, raw); } } } else ; } function resolveMergedOptions(instance) { - const base2 = instance.type; - const { mixins, extends: extendsOptions } = base2; - const { mixins: globalMixins, optionsCache: cache2, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache2.get(base2); - let resolved; + var base2 = instance.type; + var { + mixins, + extends: extendsOptions + } = base2; + var { + mixins: globalMixins, + optionsCache: cache2, + config: { + optionMergeStrategies + } + } = instance.appContext; + var cached = cache2.get(base2); + var resolved; if (cached) { resolved = cached; } else if (!globalMixins.length && !mixins && !extendsOptions) { @@ -2616,24 +3319,27 @@ return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; + var { + mixins, + extends: extendsOptions + } = from; if (extendsOptions) { mergeOptions(to, extendsOptions, strats, true); } if (mixins) { mixins.forEach((m) => mergeOptions(to, m, strats, true)); } - for (const key in from) { - if (asMixin && key === "expose") + for (var key2 in from) { + if (asMixin && key2 === "expose") ; else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; + var strat = internalOptionMergeStrats[key2] || strats && strats[key2]; + to[key2] = strat ? strat(to[key2], from[key2]) : from[key2]; } } return to; } - const internalOptionMergeStrats = { + var internalOptionMergeStrats = { data: mergeDataFn, props: mergeObjectOptions, emits: mergeObjectOptions, @@ -2673,9 +3379,9 @@ } function normalizeInject(raw) { if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; + var res = {}; + for (var i2 = 0; i2 < raw.length; i2++) { + res[raw[i2]] = raw[i2]; } return res; } @@ -2692,21 +3398,21 @@ return from; if (!from) return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); + var merged = extend(Object.create(null), to); + for (var key2 in from) { + merged[key2] = mergeAsArray(to[key2], from[key2]); } return merged; } function initProps(instance, rawProps, isStateful, isSSR = false) { - const props2 = {}; - const attrs2 = {}; + var props2 = {}; + var attrs2 = {}; def(attrs2, InternalObjectKey, 1); instance.propsDefaults = Object.create(null); setFullProps(instance, rawProps, props2, attrs2); - for (const key in instance.propsOptions[0]) { - if (!(key in props2)) { - props2[key] = void 0; + for (var key2 in instance.propsOptions[0]) { + if (!(key2 in props2)) { + props2[key2] = void 0; } } if (isStateful) { @@ -2721,29 +3427,35 @@ instance.attrs = attrs2; } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props: props2, attrs: attrs2, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props2); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; + var { + props: props2, + attrs: attrs2, + vnode: { + patchFlag + } + } = instance; + var rawCurrentProps = toRaw(props2); + var [options] = instance.propsOptions; + var hasAttrsChanged = false; if ((optimized || patchFlag > 0) && !(patchFlag & 16)) { if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - const value = rawProps[key]; + var propsToUpdate = instance.vnode.dynamicProps; + for (var i2 = 0; i2 < propsToUpdate.length; i2++) { + var key2 = propsToUpdate[i2]; + var value = rawProps[key2]; if (options) { - if (hasOwn$1(attrs2, key)) { - if (value !== attrs2[key]) { - attrs2[key] = value; + if (hasOwn$1(attrs2, key2)) { + if (value !== attrs2[key2]) { + attrs2[key2] = value; hasAttrsChanged = true; } } else { - const camelizedKey = camelize(key); + var camelizedKey = camelize(key2); props2[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false); } } else { - if (value !== attrs2[key]) { - attrs2[key] = value; + if (value !== attrs2[key2]) { + attrs2[key2] = value; hasAttrsChanged = true; } } @@ -2753,22 +3465,22 @@ if (setFullProps(instance, rawProps, props2, attrs2)) { hasAttrsChanged = true; } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || !hasOwn$1(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn$1(rawProps, kebabKey))) { + var kebabKey; + for (var _key6 in rawCurrentProps) { + if (!rawProps || !hasOwn$1(rawProps, _key6) && ((kebabKey = hyphenate(_key6)) === _key6 || !hasOwn$1(rawProps, kebabKey))) { if (options) { - if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) { - props2[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true); + if (rawPrevProps && (rawPrevProps[_key6] !== void 0 || rawPrevProps[kebabKey] !== void 0)) { + props2[_key6] = resolvePropValue(options, rawCurrentProps, _key6, void 0, instance, true); } } else { - delete props2[key]; + delete props2[_key6]; } } } if (attrs2 !== rawCurrentProps) { - for (const key in attrs2) { - if (!rawProps || !hasOwn$1(rawProps, key)) { - delete attrs2[key]; + for (var _key7 in attrs2) { + if (!rawProps || !hasOwn$1(rawProps, _key7)) { + delete attrs2[_key7]; hasAttrsChanged = true; } } @@ -2779,53 +3491,55 @@ } } function setFullProps(instance, rawProps, props2, attrs2) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; + var [options, needCastKeys] = instance.propsOptions; + var hasAttrsChanged = false; + var rawCastValues; if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { + for (var key2 in rawProps) { + if (isReservedProp(key2)) { continue; } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn$1(options, camelKey = camelize(key))) { + var value = rawProps[key2]; + var camelKey = void 0; + if (options && hasOwn$1(options, camelKey = camelize(key2))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props2[camelKey] = value; } else { (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (value !== attrs2[key]) { - attrs2[key] = value; + } else if (!isEmitListener(instance.emitsOptions, key2)) { + if (value !== attrs2[key2]) { + attrs2[key2] = value; hasAttrsChanged = true; } } } } if (needCastKeys) { - const rawCurrentProps = toRaw(props2); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props2[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key)); + var rawCurrentProps = toRaw(props2); + var castValues = rawCastValues || EMPTY_OBJ; + for (var i2 = 0; i2 < needCastKeys.length; i2++) { + var _key8 = needCastKeys[i2]; + props2[_key8] = resolvePropValue(options, rawCurrentProps, _key8, castValues[_key8], instance, !hasOwn$1(castValues, _key8)); } } return hasAttrsChanged; } - function resolvePropValue(options, props2, key, value, instance, isAbsent) { - const opt = options[key]; + function resolvePropValue(options, props2, key2, value, instance, isAbsent) { + var opt = options[key2]; if (opt != null) { - const hasDefault = hasOwn$1(opt, "default"); + var hasDefault = hasOwn$1(opt, "default"); if (hasDefault && value === void 0) { - const defaultValue = opt.default; + var defaultValue = opt.default; if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; + var { + propsDefaults + } = instance; + if (key2 in propsDefaults) { + value = propsDefaults[key2]; } else { setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props2); + value = propsDefaults[key2] = defaultValue.call(null, props2); setCurrentInstance(null); } } else { @@ -2835,7 +3549,7 @@ if (opt[0]) { if (isAbsent && !hasDefault) { value = false; - } else if (opt[1] && (value === "" || value === hyphenate(key))) { + } else if (opt[1] && (value === "" || value === hyphenate(key2))) { value = true; } } @@ -2843,19 +3557,19 @@ return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache2 = appContext.propsCache; - const cached = cache2.get(comp); + var cache2 = appContext.propsCache; + var cached = cache2.get(comp); if (cached) { return cached; } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; + var raw = comp.props; + var normalized = {}; + var needCastKeys = []; + var hasExtends = false; if (!isFunction(comp)) { - const extendProps = (raw2) => { + var extendProps = (raw2) => { hasExtends = true; - const [props2, keys] = normalizePropsOptions(raw2, appContext, true); + var [props2, keys] = normalizePropsOptions(raw2, appContext, true); extend(normalized, props2); if (keys) needCastKeys.push(...keys); @@ -2875,42 +3589,44 @@ return EMPTY_ARR; } if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - const normalizedKey = camelize(raw[i]); + for (var i2 = 0; i2 < raw.length; i2++) { + var normalizedKey = camelize(raw[i2]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : opt; + for (var key2 in raw) { + var _normalizedKey = camelize(key2); + if (validatePropName(_normalizedKey)) { + var opt = raw[key2]; + var prop = normalized[_normalizedKey] = isArray(opt) || isFunction(opt) ? { + type: opt + } : opt; if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); + var booleanIndex = getTypeIndex(Boolean, prop.type); + var stringIndex = getTypeIndex(String, prop.type); prop[0] = booleanIndex > -1; prop[1] = stringIndex < 0 || booleanIndex < stringIndex; if (booleanIndex > -1 || hasOwn$1(prop, "default")) { - needCastKeys.push(normalizedKey); + needCastKeys.push(_normalizedKey); } } } } } - const res = [normalized, needCastKeys]; + var res = [normalized, needCastKeys]; cache2.set(comp, res); return res; } - function validatePropName(key) { - if (key[0] !== "$") { + function validatePropName(key2) { + if (key2[0] !== "$") { return true; } return false; } function getType$1(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); + var match = ctor && ctor.toString().match(/^\s*function (\w+)/); return match ? match[1] : ""; } function isSameType(a2, b) { @@ -2924,36 +3640,38 @@ } return -1; } - const isInternalKey = (key) => key[0] === "_" || key === "$stable"; - const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; - const normalizeSlot = (key, rawSlot, ctx) => { - const normalized = withCtx((props2) => { + var isInternalKey = (key2) => key2[0] === "_" || key2 === "$stable"; + var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; + var normalizeSlot = (key2, rawSlot, ctx2) => { + var normalized = withCtx((props2) => { return normalizeSlotValue(rawSlot(props2)); - }, ctx); + }, ctx2); normalized._c = false; return normalized; }; - const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) + var normalizeObjectSlots = (rawSlots, slots, instance) => { + var ctx2 = rawSlots._ctx; + for (var key2 in rawSlots) { + if (isInternalKey(key2)) continue; - const value = rawSlots[key]; + var value = rawSlots[key2]; if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); + slots[key2] = normalizeSlot(key2, value, ctx2); } else if (value != null) { - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; + (function() { + var normalized = normalizeSlotValue(value); + slots[key2] = () => normalized; + })(); } } }; - const normalizeVNodeSlots = (instance, children) => { - const normalized = normalizeSlotValue(children); + var normalizeVNodeSlots = (instance, children) => { + var normalized = normalizeSlotValue(children); instance.slots.default = () => normalized; }; - const initSlots = (instance, children) => { + var initSlots = (instance, children) => { if (instance.vnode.shapeFlag & 32) { - const type = children._; + var type = children._; if (type) { instance.slots = toRaw(children); def(children, "_", type); @@ -2968,12 +3686,15 @@ } def(instance.slots, InternalObjectKey, 1); }; - const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; + var updateSlots = (instance, children, optimized) => { + var { + vnode, + slots + } = instance; + var needDeletionCheck = true; + var deletionComparisonTarget = EMPTY_OBJ; if (vnode.shapeFlag & 32) { - const type = children._; + var type = children._; if (type) { if (optimized && type === 1) { needDeletionCheck = false; @@ -2990,25 +3711,27 @@ deletionComparisonTarget = children; } else if (children) { normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; + deletionComparisonTarget = { + default: 1 + }; } if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; + for (var key2 in slots) { + if (!isInternalKey(key2) && !(key2 in deletionComparisonTarget)) { + delete slots[key2]; } } } }; function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; + var internalInstance = currentRenderingInstance; if (internalInstance === null) { return vnode; } - const instance = internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + var instance = internalInstance.proxy; + var bindings = vnode.dirs || (vnode.dirs = []); + for (var i2 = 0; i2 < directives.length; i2++) { + var [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i2]; if (isFunction(dir)) { dir = { mounted: dir, @@ -3027,22 +3750,17 @@ return vnode; } function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; + var bindings = vnode.dirs; + var oldBindings = prevVNode && prevVNode.dirs; + for (var i2 = 0; i2 < bindings.length; i2++) { + var binding = bindings[i2]; if (oldBindings) { - binding.oldValue = oldBindings[i].value; + binding.oldValue = oldBindings[i2].value; } - let hook = binding.dir[name]; + var hook = binding.dir[name]; if (hook) { pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 8, [vnode.el, binding, vnode, prevVNode]); resetTracking(); } } @@ -3068,16 +3786,16 @@ emitsCache: new WeakMap() }; } - let uid$1 = 0; + var uid$1 = 0; function createAppAPI(render, hydrate) { return function createApp2(rootComponent, rootProps = null) { if (rootProps != null && !isObject$1(rootProps)) { rootProps = null; } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = context.app = { + var context = createAppContext(); + var installedPlugins = new Set(); + var isMounted = false; + var app = context.app = { _uid: uid$1++, _component: rootComponent, _props: rootProps, @@ -3127,7 +3845,7 @@ }, mount(rootContainer, isHydrate, isSVG) { if (!isMounted) { - const vnode = createVNode(rootComponent, rootProps); + var vnode = createVNode(rootComponent, rootProps); vnode.appContext = context; if (isHydrate && hydrate) { hydrate(vnode, rootContainer); @@ -3146,33 +3864,36 @@ delete app._container.__vue_app__; } }, - provide(key, value) { - context.provides[key] = value; + provide(key2, value) { + context.provides[key2] = value; return app; } }; return app; }; } - const prodEffectOptions = { + var prodEffectOptions = { scheduler: queueJob, allowRecurse: true }; - const queuePostRenderEffect = queueEffectWithSuspense; - const setRef = (rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) => { + var queuePostRenderEffect = queueEffectWithSuspense; + var setRef = (rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) => { if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); + rawRef.forEach((r, i2) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i2] : oldRawRef), parentSuspense, vnode, isUnmount)); return; } if (isAsyncWrapper(vnode) && !isUnmount) { return; } - const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref2 } = rawRef; - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; + var refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + var value = isUnmount ? null : refValue; + var { + i: owner, + r: ref2 + } = rawRef; + var oldRef = oldRawRef && oldRawRef.r; + var refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + var setupState = owner.setupState; if (oldRef != null && oldRef !== ref2) { if (isString(oldRef)) { refs[oldRef] = null; @@ -3184,7 +3905,7 @@ } } if (isString(ref2)) { - const doSet = () => { + var doSet = () => { { refs[ref2] = value; } @@ -3199,14 +3920,14 @@ doSet(); } } else if (isRef(ref2)) { - const doSet = () => { + var _doSet = () => { ref2.value = value; }; if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); + _doSet.id = -1; + queuePostRenderEffect(_doSet, parentSuspense); } else { - doSet(); + _doSet(); } } else if (isFunction(ref2)) { callWithErrorHandling(ref2, owner, 12, [value, refs]); @@ -3217,8 +3938,23 @@ return baseCreateRenderer(options); } function baseCreateRenderer(options, createHydrationFns) { - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, forcePatchProp: hostForcePatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = false) => { + var { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + forcePatchProp: hostForcePatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + cloneNode: hostCloneNode, + insertStaticContent: hostInsertStaticContent + } = options; + var patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = false) => { if (n1 && !isSameVNodeType(n1, n2)) { anchor = getNextHostNode(n1); unmount(n1, parentComponent, parentSuspense, true); @@ -3228,7 +3964,11 @@ optimized = false; n2.dynamicChildren = null; } - const { type, ref: ref2, shapeFlag } = n2; + var { + type, + ref: ref2, + shapeFlag + } = n2; switch (type) { case Text$1: processText(n1, n2, container, anchor); @@ -3260,33 +4000,36 @@ setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2); } }; - const processText = (n1, n2, container, anchor) => { + var processText = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateText(n2.children), container, anchor); } else { - const el = n2.el = n1.el; + var el = n2.el = n1.el; if (n2.children !== n1.children) { hostSetText(el, n2.children); } } }; - const processCommentNode = (n1, n2, container, anchor) => { + var processCommentNode = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor); } else { n2.el = n1.el; } }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - const nodes = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.staticCache); + var mountStaticNode = (n2, container, anchor, isSVG) => { + var nodes = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.staticCache); if (!n2.el) { n2.staticCache = nodes; } n2.el = nodes[0]; n2.anchor = nodes[nodes.length - 1]; }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; + var moveStaticNode = ({ + el, + anchor + }, container, nextSibling) => { + var next; while (el && el !== anchor) { next = hostNextSibling(el); hostInsert(el, container, nextSibling); @@ -3294,8 +4037,11 @@ } hostInsert(anchor, container, nextSibling); }; - const removeStaticNode = ({ el, anchor }) => { - let next; + var removeStaticNode = ({ + el, + anchor + }) => { + var next; while (el && el !== anchor) { next = hostNextSibling(el); hostRemove(el); @@ -3303,7 +4049,7 @@ } hostRemove(anchor); }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { isSVG = isSVG || n2.type === "svg"; if (n1 == null) { mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); @@ -3311,10 +4057,17 @@ patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { type, props: props2, shapeFlag, transition, patchFlag, dirs } = vnode; + var mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var el; + var vnodeHook; + var { + type, + props: props2, + shapeFlag, + transition, + patchFlag, + dirs + } = vnode; if (vnode.el && hostCloneNode !== void 0 && patchFlag === -1) { el = vnode.el = hostCloneNode(vnode.el); } else { @@ -3328,9 +4081,9 @@ invokeDirectiveHook(vnode, null, parentComponent, "created"); } if (props2) { - for (const key in props2) { - if (!isReservedProp(key)) { - hostPatchProp(el, key, null, props2[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); + for (var key2 in props2) { + if (!isReservedProp(key2)) { + hostPatchProp(el, key2, null, props2[key2], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (vnodeHook = props2.onVnodeBeforeMount) { @@ -3346,7 +4099,7 @@ if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); } - const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; + var needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; if (needCallTransitionHooks) { transition.beforeEnter(el); } @@ -3359,36 +4112,40 @@ }, parentSuspense); } }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + var setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { if (scopeId) { hostSetScopeId(el, scopeId); } if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); + for (var i2 = 0; i2 < slotScopeIds.length; i2++) { + hostSetScopeId(el, slotScopeIds[i2]); } } if (parentComponent) { - let subTree = parentComponent.subTree; + var subTree = parentComponent.subTree; if (vnode === subTree) { - const parentVNode = parentComponent.vnode; + var parentVNode = parentComponent.vnode; setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); } } }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + var mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { + for (var i2 = start; i2 < children.length; i2++) { + var child = children[i2] = optimized ? cloneIfMounted(children[i2]) : normalizeVNode(children[i2]); patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - let { patchFlag, dynamicChildren, dirs } = n2; + var patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var el = n2.el = n1.el; + var { + patchFlag, + dynamicChildren, + dirs + } = n2; patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; + var oldProps = n1.props || EMPTY_OBJ; + var newProps = n2.props || EMPTY_OBJ; + var vnodeHook; if (vnodeHook = newProps.onVnodeBeforeUpdate) { invokeVNodeHook(vnodeHook, parentComponent, n2, n1); } @@ -3408,13 +4165,13 @@ hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG); } if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key)) { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); + var propsToUpdate = n2.dynamicProps; + for (var i2 = 0; i2 < propsToUpdate.length; i2++) { + var key2 = propsToUpdate[i2]; + var prev = oldProps[key2]; + var next = newProps[key2]; + if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key2)) { + hostPatchProp(el, key2, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); } } } @@ -3427,7 +4184,7 @@ } else if (!optimized && dynamicChildren == null) { patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); } - const areChildrenSVG = isSVG && n2.type !== "foreignObject"; + var areChildrenSVG = isSVG && n2.type !== "foreignObject"; if (dynamicChildren) { patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); } else if (!optimized) { @@ -3440,38 +4197,42 @@ }, parentSuspense); } }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 6 || oldVNode.shapeFlag & 64) ? hostParentNode(oldVNode.el) : fallbackContainer; + var patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { + for (var i2 = 0; i2 < newChildren.length; i2++) { + var oldVNode = oldChildren[i2]; + var newVNode = newChildren[i2]; + var container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 6 || oldVNode.shapeFlag & 64) ? hostParentNode(oldVNode.el) : fallbackContainer; patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); } }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { + var patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { if (oldProps !== newProps) { - for (const key in newProps) { - if (isReservedProp(key)) + for (var key2 in newProps) { + if (isReservedProp(key2)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key)) { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); + var next = newProps[key2]; + var prev = oldProps[key2]; + if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key2)) { + hostPatchProp(el, key2, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); + for (var _key9 in oldProps) { + if (!isReservedProp(_key9) && !(_key9 in newProps)) { + hostPatchProp(el, _key9, oldProps[_key9], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } } } }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + var processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + var fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + var { + patchFlag, + dynamicChildren, + slotScopeIds: fragmentSlotScopeIds + } = n2; if (dynamicChildren) { optimized = true; } @@ -3493,7 +4254,7 @@ } } }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { n2.slotScopeIds = slotScopeIds; if (n1 == null) { if (n2.shapeFlag & 512) { @@ -3505,8 +4266,8 @@ updateComponent(n1, n2, optimized); } }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense); + var mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { + var instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense); if (isKeepAlive(initialVNode)) { instance.ctx.renderer = internals; } @@ -3516,15 +4277,15 @@ if (instance.asyncDep) { parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); if (!initialVNode.el) { - const placeholder = instance.subTree = createVNode(Comment$1); + var placeholder = instance.subTree = createVNode(Comment$1); processCommentNode(null, placeholder, container, anchor); } return; } setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); }; - const updateComponent = (n1, n2, optimized) => { - const instance = n2.component = n1.component; + var updateComponent = (n1, n2, optimized) => { + var instance = n2.component = n1.component; if (shouldUpdateComponent(n1, n2, optimized)) { if (instance.asyncDep && !instance.asyncResolved) { updateComponentPreRender(instance, n2, optimized); @@ -3540,12 +4301,19 @@ instance.vnode = n2; } }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { + var setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { instance.update = effect(function componentEffect() { if (!instance.isMounted) { - let vnodeHook; - const { el, props: props2 } = initialVNode; - const { bm, m, parent } = instance; + var vnodeHook; + var { + el, + props: props2 + } = initialVNode; + var { + bm, + m, + parent + } = instance; if (bm) { invokeArrayFns(bm); } @@ -3553,7 +4321,7 @@ invokeVNodeHook(vnodeHook, parent, initialVNode); } if (el && hydrateNode) { - const hydrateSubTree = () => { + var hydrateSubTree = () => { instance.subTree = renderComponentRoot(instance); hydrateNode(el, instance.subTree, instance, parentSuspense, null); }; @@ -3563,7 +4331,7 @@ hydrateSubTree(); } } else { - const subTree = instance.subTree = renderComponentRoot(instance); + var subTree = instance.subTree = renderComponentRoot(instance); patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); initialVNode.el = subTree.el; } @@ -3571,7 +4339,7 @@ queuePostRenderEffect(m, parentSuspense); } if (vnodeHook = props2 && props2.onVnodeMounted) { - const scopedInitialVNode = initialVNode; + var scopedInitialVNode = initialVNode; queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); } if (initialVNode.shapeFlag & 256) { @@ -3580,9 +4348,15 @@ instance.isMounted = true; initialVNode = container = anchor = null; } else { - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; + var { + next, + bu, + u, + parent: _parent, + vnode + } = instance; + var originNext = next; + var _vnodeHook; if (next) { next.el = vnode.el; updateComponentPreRender(instance, next, optimized); @@ -3592,11 +4366,11 @@ if (bu) { invokeArrayFns(bu); } - if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parent, next, vnode); + if (_vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(_vnodeHook, _parent, next, vnode); } - const nextTree = renderComponentRoot(instance); - const prevTree = instance.subTree; + var nextTree = renderComponentRoot(instance); + var prevTree = instance.subTree; instance.subTree = nextTree; patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, isSVG); next.el = nextTree.el; @@ -3606,15 +4380,15 @@ if (u) { queuePostRenderEffect(u, parentSuspense); } - if (vnodeHook = next.props && next.props.onVnodeUpdated) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); + if (_vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect(() => invokeVNodeHook(_vnodeHook, _parent, next, vnode), parentSuspense); } } }, prodEffectOptions); }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { + var updateComponentPreRender = (instance, nextVNode, optimized) => { nextVNode.component = instance; - const prevProps = instance.vnode.props; + var prevProps = instance.vnode.props; instance.vnode = nextVNode; instance.next = null; updateProps(instance, nextVNode.props, prevProps, optimized); @@ -3623,11 +4397,14 @@ flushPreFlushCbs(void 0, instance.update); resetTracking(); }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; + var patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { + var c1 = n1 && n1.children; + var prevShapeFlag = n1 ? n1.shapeFlag : 0; + var c2 = n2.children; + var { + patchFlag, + shapeFlag + } = n2; if (patchFlag > 0) { if (patchFlag & 128) { patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); @@ -3661,16 +4438,16 @@ } } }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { c1 = c1 || EMPTY_ARR; c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + var oldLength = c1.length; + var newLength = c2.length; + var commonLength = Math.min(oldLength, newLength); + var i2; + for (i2 = 0; i2 < commonLength; i2++) { + var nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]); + patch(c1[i2], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } if (oldLength > newLength) { unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); @@ -3678,71 +4455,72 @@ mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); } }; - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; - let e2 = l2 - 1; - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + var patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { + var i2 = 0; + var l2 = c2.length; + var e1 = c1.length - 1; + var e2 = l2 - 1; + while (i2 <= e1 && i2 <= e2) { + var n1 = c1[i2]; + var n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]); if (isSameVNodeType(n1, n2)) { patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { break; } - i++; + i2++; } - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + while (i2 <= e1 && i2 <= e2) { + var _n = c1[e1]; + var _n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(_n, _n2)) { + patch(_n, _n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { break; } e1--; e2--; } - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; + if (i2 > e1) { + if (i2 <= e2) { + var nextPos = e2 + 1; + var anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i2 <= e2) { + patch(null, c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + i2++; } } - } else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; + } else if (i2 > e2) { + while (i2 <= e1) { + unmount(c1[i2], parentComponent, parentSuspense, true); + i2++; } } else { - const s1 = i; - const s2 = i; - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + var s1 = i2; + var s2 = i2; + var keyToNewIndexMap = new Map(); + for (i2 = s2; i2 <= e2; i2++) { + var nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]); if (nextChild.key != null) { - keyToNewIndexMap.set(nextChild.key, i); + keyToNewIndexMap.set(nextChild.key, i2); } } - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - let maxNewIndexSoFar = 0; - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; + var j; + var patched = 0; + var toBePatched = e2 - s2 + 1; + var moved = false; + var maxNewIndexSoFar = 0; + var newIndexToOldIndexMap = new Array(toBePatched); + for (i2 = 0; i2 < toBePatched; i2++) { + newIndexToOldIndexMap[i2] = 0; + } + for (i2 = s1; i2 <= e1; i2++) { + var prevChild = c1[i2]; if (patched >= toBePatched) { unmount(prevChild, parentComponent, parentSuspense, true); continue; } - let newIndex; + var newIndex = void 0; if (prevChild.key != null) { newIndex = keyToNewIndexMap.get(prevChild.key); } else { @@ -3756,7 +4534,7 @@ if (newIndex === void 0) { unmount(prevChild, parentComponent, parentSuspense, true); } else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; + newIndexToOldIndexMap[newIndex - s2] = i2 + 1; if (newIndex >= maxNewIndexSoFar) { maxNewIndexSoFar = newIndex; } else { @@ -3766,17 +4544,17 @@ patched++; } } - const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + var increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; j = increasingNewIndexSequence.length - 1; - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + for (i2 = toBePatched - 1; i2 >= 0; i2--) { + var nextIndex = s2 + i2; + var _nextChild = c2[nextIndex]; + var _anchor2 = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i2] === 0) { + patch(null, _nextChild, container, _anchor2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (moved) { - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2); + if (j < 0 || i2 !== increasingNewIndexSequence[j]) { + move(_nextChild, container, _anchor2, 2); } else { j--; } @@ -3784,8 +4562,14 @@ } } }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; + var move = (vnode, container, anchor, moveType, parentSuspense = null) => { + var { + el, + type, + transition, + children, + shapeFlag + } = vnode; if (shapeFlag & 6) { move(vnode.component.subTree, container, anchor, moveType); return; @@ -3800,8 +4584,8 @@ } if (type === Fragment) { hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); + for (var i2 = 0; i2 < children.length; i2++) { + move(children[i2], container, anchor, moveType); } hostInsert(vnode.anchor, container, anchor); return; @@ -3810,23 +4594,27 @@ moveStaticNode(vnode, container, anchor); return; } - const needTransition = moveType !== 2 && shapeFlag & 1 && transition; + var needTransition = moveType !== 2 && shapeFlag & 1 && transition; if (needTransition) { if (moveType === 0) { transition.beforeEnter(el); hostInsert(el, container, anchor); queuePostRenderEffect(() => transition.enter(el), parentSuspense); } else { - const { leave, delayLeave, afterLeave } = transition; - const remove3 = () => hostInsert(el, container, anchor); - const performLeave = () => { + var { + leave, + delayLeave, + afterLeave + } = transition; + var _remove = () => hostInsert(el, container, anchor); + var performLeave = () => { leave(el, () => { - remove3(); + _remove(); afterLeave && afterLeave(); }); }; if (delayLeave) { - delayLeave(el, remove3, performLeave); + delayLeave(el, _remove, performLeave); } else { performLeave(); } @@ -3835,8 +4623,17 @@ hostInsert(el, container, anchor); } }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props: props2, ref: ref2, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; + var unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + var { + type, + props: props2, + ref: ref2, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; if (ref2 != null) { setRef(ref2, null, parentSuspense, vnode, true); } @@ -3844,8 +4641,8 @@ parentComponent.ctx.deactivate(vnode); return; } - const shouldInvokeDirs = shapeFlag & 1 && dirs; - let vnodeHook; + var shouldInvokeDirs = shapeFlag & 1 && dirs; + var vnodeHook; if (vnodeHook = props2 && props2.onVnodeBeforeUnmount) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } @@ -3877,8 +4674,13 @@ }, parentSuspense); } }; - const remove2 = (vnode) => { - const { type, el, anchor, transition } = vnode; + var remove2 = (vnode) => { + var { + type, + el, + anchor, + transition + } = vnode; if (type === Fragment) { removeFragment(el, anchor); return; @@ -3887,15 +4689,18 @@ removeStaticNode(vnode); return; } - const performRemove = () => { + var performRemove = () => { hostRemove(el); if (transition && !transition.persisted && transition.afterLeave) { transition.afterLeave(); } }; if (vnode.shapeFlag & 1 && transition && !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); + var { + leave, + delayLeave + } = transition; + var performLeave = () => leave(el, performRemove); if (delayLeave) { delayLeave(vnode.el, performRemove, performLeave); } else { @@ -3905,8 +4710,8 @@ performRemove(); } }; - const removeFragment = (cur, end) => { - let next; + var removeFragment = (cur, end) => { + var next; while (cur !== end) { next = hostNextSibling(cur); hostRemove(cur); @@ -3914,14 +4719,20 @@ } hostRemove(end); }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - const { bum, effects, update, subTree, um } = instance; + var unmountComponent = (instance, parentSuspense, doRemove) => { + var { + bum, + effects, + update, + subTree, + um + } = instance; if (bum) { invokeArrayFns(bum); } if (effects) { - for (let i = 0; i < effects.length; i++) { - stop(effects[i]); + for (var i2 = 0; i2 < effects.length; i2++) { + stop(effects[i2]); } } if (update) { @@ -3941,12 +4752,12 @@ } } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + var unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (var i2 = start; i2 < children.length; i2++) { + unmount(children[i2], parentComponent, parentSuspense, doRemove, optimized); } }; - const getNextHostNode = (vnode) => { + var getNextHostNode = (vnode) => { if (vnode.shapeFlag & 6) { return getNextHostNode(vnode.component.subTree); } @@ -3955,18 +4766,18 @@ } return hostNextSibling(vnode.anchor || vnode.el); }; - const render = (vnode, container, isSVG) => { + var render = (vnode, container, isSVG) => { if (vnode == null) { if (container._vnode) { unmount(container._vnode, null, null, true); } } else { - const p2 = container.__vueParent; - patch(container._vnode || null, vnode, container, null, p2, null, isSVG); + var _p = container.__vueParent; + patch(container._vnode || null, vnode, container, null, _p, null, isSVG); } container._vnode = vnode; }; - const internals = { + var internals = { p: patch, um: unmount, m: move, @@ -3978,8 +4789,8 @@ n: getNextHostNode, o: options }; - let hydrate; - let hydrateNode; + var hydrate; + var hydrateNode; if (createHydrationFns) { [hydrate, hydrateNode] = createHydrationFns(internals); } @@ -3990,21 +4801,18 @@ }; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]); } function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; + var ch1 = n1.children; + var ch2 = n2.children; if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - const c1 = ch1[i]; - let c2 = ch2[i]; + for (var i2 = 0; i2 < ch1.length; i2++) { + var c1 = ch1[i2]; + var c2 = ch2[i2]; if (c2.shapeFlag & 1 && !c2.dynamicChildren) { if (c2.patchFlag <= 0 || c2.patchFlag === 32) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2 = ch2[i2] = cloneIfMounted(ch2[i2]); c2.el = c1.el; } if (!shallow) @@ -4014,17 +4822,17 @@ } } function getSequence(arr) { - const p2 = arr.slice(); - const result = [0]; - let i, j, u, v2, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; + var p2 = arr.slice(); + var result = [0]; + var i2, j, u, v2, c; + var len = arr.length; + for (i2 = 0; i2 < len; i2++) { + var arrI = arr[i2]; if (arrI !== 0) { j = result[result.length - 1]; if (arr[j] < arrI) { - p2[i] = j; - result.push(i); + p2[i2] = j; + result.push(i2); continue; } u = 0; @@ -4039,9 +4847,9 @@ } if (arrI < arr[result[u]]) { if (u > 0) { - p2[i] = result[u - 1]; + p2[i2] = result[u - 1]; } - result[u] = i; + result[u] = i2; } } } @@ -4053,52 +4861,42 @@ } return result; } - const isTeleport = (type) => type.__isTeleport; - const NULL_DYNAMIC_COMPONENT = Symbol(); - const Fragment = Symbol(void 0); - const Text$1 = Symbol(void 0); - const Comment$1 = Symbol(void 0); - const Static = Symbol(void 0); - const blockStack = []; - let currentBlock = null; - function openBlock(disableTracking = false) { - blockStack.push(currentBlock = disableTracking ? null : []); - } - function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; - } - let isBlockTreeEnabled = 1; + var isTeleport = (type) => type.__isTeleport; + var NULL_DYNAMIC_COMPONENT = Symbol(); + var Fragment = Symbol(void 0); + var Text$1 = Symbol(void 0); + var Comment$1 = Symbol(void 0); + var Static = Symbol(void 0); + var currentBlock = null; + var isBlockTreeEnabled = 1; function setBlockTracking(value) { isBlockTreeEnabled += value; } - function createBlock(type, props2, children, patchFlag, dynamicProps) { - const vnode = createVNode(type, props2, children, patchFlag, dynamicProps, true); - vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - closeBlock(); - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; - } function isVNode(value) { return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { return n1.type === n2.type && n1.key === n2.key; } - const InternalObjectKey = `__vInternal`; - const normalizeKey = ({ key }) => key != null ? key : null; - const normalizeRef = ({ ref: ref2 }) => { - return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2 } : ref2 : null; + var InternalObjectKey = "__vInternal"; + var normalizeKey = ({ + key: key2 + }) => key2 != null ? key2 : null; + var normalizeRef = ({ + ref: ref2 + }) => { + return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { + i: currentRenderingInstance, + r: ref2 + } : ref2 : null; }; - const createVNode = _createVNode; + var createVNode = _createVNode; function _createVNode(type, props2 = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { if (!type || type === NULL_DYNAMIC_COMPONENT) { type = Comment$1; } if (isVNode(type)) { - const cloned = cloneVNode(type, props2, true); + var cloned = cloneVNode(type, props2, true); if (children) { normalizeChildren(cloned, children); } @@ -4111,7 +4909,10 @@ if (isProxy(props2) || InternalObjectKey in props2) { props2 = extend({}, props2); } - let { class: klass, style } = props2; + var { + class: klass, + style + } = props2; if (klass && !isString(klass)) { props2.class = normalizeClass(klass); } @@ -4122,8 +4923,8 @@ props2.style = normalizeStyle(style); } } - const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction(type) ? 2 : 0; - const vnode = { + var shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction(type) ? 2 : 0; + var vnode = { __v_isVNode: true, __v_skip: true, type, @@ -4159,9 +4960,14 @@ return vnode; } function cloneVNode(vnode, extraProps, mergeRef = false) { - const { props: props2, ref: ref2, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props2 || {}, extraProps) : props2; - const cloned = { + var { + props: props2, + ref: ref2, + patchFlag, + children + } = vnode; + var mergedProps = extraProps ? mergeProps(props2 || {}, extraProps) : props2; + var cloned = { __v_isVNode: true, __v_skip: true, type: vnode.type, @@ -4209,15 +5015,17 @@ return child.el === null ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; + var type = 0; + var { + shapeFlag + } = vnode; if (children == null) { children = null; } else if (isArray(children)) { type = 16; } else if (typeof children === "object") { if (shapeFlag & 1 || shapeFlag & 64) { - const slot = children.default; + var slot = children.default; if (slot) { slot._c && (slot._d = false); normalizeChildren(vnode, slot()); @@ -4226,7 +5034,7 @@ return; } else { type = 32; - const slotFlag = children._; + var slotFlag = children._; if (!slotFlag && !(InternalObjectKey in children)) { children._ctx = currentRenderingInstance; } else if (slotFlag === 3 && currentRenderingInstance) { @@ -4239,7 +5047,10 @@ } } } else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; + children = { + default: children, + _ctx: currentRenderingInstance + }; type = 32; } else { children = String(children); @@ -4254,145 +5065,170 @@ vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = extend({}, args[0]); - for (let i = 1; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === "class") { + var ret = extend({}, args[0]); + for (var i2 = 1; i2 < args.length; i2++) { + var toMerge = args[i2]; + for (var key2 in toMerge) { + if (key2 === "class") { if (ret.class !== toMerge.class) { ret.class = normalizeClass([ret.class, toMerge.class]); } - } else if (key === "style") { + } else if (key2 === "style") { ret.style = normalizeStyle([ret.style, toMerge.style]); - } else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; + } else if (isOn(key2)) { + var existing = ret[key2]; + var incoming = toMerge[key2]; if (existing !== incoming) { - ret[key] = existing ? [].concat(existing, incoming) : incoming; + ret[key2] = existing ? [].concat(existing, incoming) : incoming; } - } else if (key !== "") { - ret[key] = toMerge[key]; + } else if (key2 !== "") { + ret[key2] = toMerge[key2]; } } } return ret; } - const getPublicInstance = (i) => { - if (!i) + var getPublicInstance = (i2) => { + if (!i2) return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (isStatefulComponent(i2)) + return getExposeProxy(i2) || i2.proxy; + return getPublicInstance(i2.parent); }; - const publicPropertiesMap = extend(Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => i.props, - $attrs: (i) => i.attrs, - $slots: (i) => i.slots, - $refs: (i) => i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i), - $forceUpdate: (i) => () => queueJob(i.update), - $nextTick: (i) => nextTick.bind(i.proxy), - $watch: (i) => instanceWatch.bind(i) + var publicPropertiesMap = extend(Object.create(null), { + $: (i2) => i2, + $el: (i2) => i2.vnode.el, + $data: (i2) => i2.data, + $props: (i2) => i2.props, + $attrs: (i2) => i2.attrs, + $slots: (i2) => i2.slots, + $refs: (i2) => i2.refs, + $parent: (i2) => getPublicInstance(i2.parent), + $root: (i2) => getPublicInstance(i2.root), + $emit: (i2) => i2.emit, + $options: (i2) => resolveMergedOptions(i2), + $forceUpdate: (i2) => () => queueJob(i2.update), + $nextTick: (i2) => nextTick.bind(i2.proxy), + $watch: (i2) => instanceWatch.bind(i2) }); - const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props: props2, accessCache, type, appContext } = instance; - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; + var PublicInstanceProxyHandlers = { + get({ + _: instance + }, key2) { + var { + ctx: ctx2, + setupState, + data, + props: props2, + accessCache, + type, + appContext + } = instance; + var normalizedProps; + if (key2[0] !== "$") { + var n = accessCache[key2]; if (n !== void 0) { switch (n) { case 0: - return setupState[key]; + return setupState[key2]; case 1: - return data[key]; + return data[key2]; case 3: - return ctx[key]; + return ctx2[key2]; case 2: - return props2[key]; + return props2[key2]; } - } else if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key)) { - accessCache[key] = 0; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { - accessCache[key] = 1; - return data[key]; - } else if ((normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key)) { - accessCache[key] = 2; - return props2[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { - accessCache[key] = 3; - return ctx[key]; + } else if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key2)) { + accessCache[key2] = 0; + return setupState[key2]; + } else if (data !== EMPTY_OBJ && hasOwn$1(data, key2)) { + accessCache[key2] = 1; + return data[key2]; + } else if ((normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key2)) { + accessCache[key2] = 2; + return props2[key2]; + } else if (ctx2 !== EMPTY_OBJ && hasOwn$1(ctx2, key2)) { + accessCache[key2] = 3; + return ctx2[key2]; } else if (shouldCacheAccess) { - accessCache[key] = 4; + accessCache[key2] = 4; } } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; + var publicGetter = publicPropertiesMap[key2]; + var cssModule, globalProperties; if (publicGetter) { - if (key === "$attrs") { - track(instance, "get", key); + if (key2 === "$attrs") { + track(instance, "get", key2); } return publicGetter(instance); - } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) { + } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key2])) { return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { - accessCache[key] = 3; - return ctx[key]; - } else if (globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key)) { + } else if (ctx2 !== EMPTY_OBJ && hasOwn$1(ctx2, key2)) { + accessCache[key2] = 3; + return ctx2[key2]; + } else if (globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key2)) { { - return globalProperties[key]; + return globalProperties[key2]; } } else ; }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key)) { - setupState[key] = value; - } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { - data[key] = value; - } else if (hasOwn$1(instance.props, key)) { + set({ + _: instance + }, key2, value) { + var { + data, + setupState, + ctx: ctx2 + } = instance; + if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key2)) { + setupState[key2] = value; + } else if (data !== EMPTY_OBJ && hasOwn$1(data, key2)) { + data[key2] = value; + } else if (hasOwn$1(instance.props, key2)) { return false; } - if (key[0] === "$" && key.slice(1) in instance) { + if (key2[0] === "$" && key2.slice(1) in instance) { return false; } else { { - ctx[key] = value; + ctx2[key2] = value; } } return true; }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return accessCache[key] !== void 0 || data !== EMPTY_OBJ && hasOwn$1(data, key) || setupState !== EMPTY_OBJ && hasOwn$1(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key); + has({ + _: { + data, + setupState, + accessCache, + ctx: ctx2, + appContext, + propsOptions + } + }, key2) { + var normalizedProps; + return accessCache[key2] !== void 0 || data !== EMPTY_OBJ && hasOwn$1(data, key2) || setupState !== EMPTY_OBJ && hasOwn$1(setupState, key2) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key2) || hasOwn$1(ctx2, key2) || hasOwn$1(publicPropertiesMap, key2) || hasOwn$1(appContext.config.globalProperties, key2); } }; - const RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { + var RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, { + get(target, key2) { + if (key2 === Symbol.unscopables) { return; } - return PublicInstanceProxyHandlers.get(target, key, target); + return PublicInstanceProxyHandlers.get(target, key2, target); }, - has(_, key) { - const has2 = key[0] !== "_" && !isGloballyWhitelisted(key); + has(_, key2) { + var has2 = key2[0] !== "_" && !isGloballyWhitelisted(key2); return has2; } }); - const emptyAppContext = createAppContext(); - let uid$2 = 0; + var emptyAppContext = createAppContext(); + var uid$2 = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { + var type = vnode.type; + var appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + var instance = { uid: uid$2++, vnode, type, @@ -4450,45 +5286,52 @@ sp: null }; { - instance.ctx = { _: instance }; + instance.ctx = { + _: instance + }; } instance.root = parent ? parent.root : instance; instance.emit = emit$2.bind(null, instance); return instance; } - let currentInstance = null; - const getCurrentInstance = () => currentInstance || currentRenderingInstance; - const setCurrentInstance = (instance) => { + var currentInstance = null; + var getCurrentInstance = () => currentInstance || currentRenderingInstance; + var setCurrentInstance = (instance) => { currentInstance = instance; }; function isStatefulComponent(instance) { return instance.vnode.shapeFlag & 4; } - let isInSSRComponentSetup = false; + var isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { isInSSRComponentSetup = isSSR; - const { props: props2, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); + var { + props: props2, + children + } = instance.vnode; + var isStateful = isStatefulComponent(instance); initProps(instance, props2, isStateful, isSSR); initSlots(instance, children); - const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + var setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; isInSSRComponentSetup = false; return setupResult; } function setupStatefulComponent(instance, isSSR) { - const Component = instance.type; + var Component = instance.type; instance.accessCache = Object.create(null); instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - const { setup } = Component; + var { + setup + } = Component; if (setup) { - const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + var setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; currentInstance = instance; pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]); + var setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]); resetTracking(); currentInstance = null; if (isPromise(setupResult)) { - const unsetInstance = () => { + var unsetInstance = () => { currentInstance = null; }; setupResult.then(unsetInstance, unsetInstance); @@ -4520,7 +5363,7 @@ finishComponentSetup(instance); } function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; + var Component = instance.type; if (!instance.render) { instance.render = Component.render || NOOP; if (instance.render._rc) { @@ -4536,7 +5379,7 @@ } } function createSetupContext(instance) { - const expose = (exposed) => { + var expose = (exposed) => { instance.exposed = exposed || {}; }; { @@ -4551,11 +5394,11 @@ function getExposeProxy(instance) { if (instance.exposed) { return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); + get(target, key2) { + if (key2 in target) { + return target[key2]; + } else if (key2 in publicPropertiesMap) { + return publicPropertiesMap[key2](instance); } } })); @@ -4566,41 +5409,41 @@ (instance.effects || (instance.effects = [])).push(effect2); } } - const classifyRE = /(?:^|[-_])(\w)/g; - const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + var classifyRE = /(?:^|[-_])(\w)/g; + var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); function getComponentName(Component) { return isFunction(Component) ? Component.displayName || Component.name : Component.name; } function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); + var name = getComponentName(Component); if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); + var match = Component.__file.match(/([^/\\]+)\.\w+$/); if (match) { name = match[1]; } } if (!name && instance && instance.parent) { - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; + var inferFromRegistry = (registry) => { + for (var key2 in registry) { + if (registry[key2] === Component) { + return key2; } } }; name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components); } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + return name ? classify(name) : isRoot ? "App" : "Anonymous"; } function isClassComponent(value) { return isFunction(value) && "__vccOpts" in value; } function computed$1(getterOrOptions) { - const c = computed(getterOrOptions); + var c = computed(getterOrOptions); recordInstanceBoundEffect(c.effect); return c; } function h(type, propsOrChildren, children) { - const l = arguments.length; + var l = arguments.length; if (l === 2) { if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) { if (isVNode(propsOrChildren)) { @@ -4619,21 +5462,23 @@ return createVNode(type, propsOrChildren, children); } } - const version = "3.1.4"; - const svgNS = "http://www.w3.org/2000/svg"; - const doc = typeof document !== "undefined" ? document : null; - const nodeOps = { + var version = "3.1.4"; + var svgNS = "http://www.w3.org/2000/svg"; + var doc = typeof document !== "undefined" ? document : null; + var nodeOps = { insert: (child, parent, anchor) => { parent.insertBefore(child, anchor || null); }, remove: (child) => { - const parent = child.parentNode; + var parent = child.parentNode; if (parent) { parent.removeChild(child); } }, - createElement: (tag, isSVG, is, props2) => { - const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0); + createElement: (tag, isSVG, is2, props2) => { + var el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is2 ? { + is: is2 + } : void 0); if (tag === "select" && props2 && props2.multiple != null) { el.setAttribute("multiple", props2.multiple); } @@ -4654,32 +5499,32 @@ el.setAttribute(id2, ""); }, cloneNode(el) { - const cloned = el.cloneNode(true); - if (`_value` in el) { + var cloned = el.cloneNode(true); + if ("_value" in el) { cloned._value = el._value; } return cloned; }, insertStaticContent(content, parent, anchor, isSVG, cached) { if (cached) { - let first2; - let last2; - let i = 0; - let l = cached.length; - for (; i < l; i++) { - const node = cached[i].cloneNode(true); - if (i === 0) - first2 = node; - if (i === l - 1) - last2 = node; + var _first; + var _last; + var i2 = 0; + var l = cached.length; + for (; i2 < l; i2++) { + var node = cached[i2].cloneNode(true); + if (i2 === 0) + _first = node; + if (i2 === l - 1) + _last = node; parent.insertBefore(node, anchor); } - return [first2, last2]; + return [_first, _last]; } - const before = anchor ? anchor.previousSibling : parent.lastChild; + var before = anchor ? anchor.previousSibling : parent.lastChild; if (anchor) { - let insertionPoint; - let usingTempInsertionPoint = false; + var insertionPoint; + var usingTempInsertionPoint = false; if (anchor instanceof Element) { insertionPoint = anchor; } else { @@ -4694,9 +5539,9 @@ } else { parent.insertAdjacentHTML("beforeend", content); } - let first = before ? before.nextSibling : parent.firstChild; - const last = anchor ? anchor.previousSibling : parent.lastChild; - const ret = []; + var first = before ? before.nextSibling : parent.firstChild; + var last = anchor ? anchor.previousSibling : parent.lastChild; + var ret = []; while (first) { ret.push(first); if (first === last) @@ -4713,7 +5558,7 @@ if (isSVG) { el.setAttribute("class", value); } else { - const transitionClasses = el._vtc; + var transitionClasses = el._vtc; if (transitionClasses) { value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); } @@ -4721,31 +5566,31 @@ } } function patchStyle$1(el, prev, next) { - const style = el.style; + var style = el.style; if (!next) { el.removeAttribute("style"); } else if (isString(next)) { if (prev !== next) { - const current = style.display; + var current = style.display; style.cssText = normalizeRpx(next); if ("_vod" in el) { style.display = current; } } } else { - for (const key in next) { - setStyle$1(style, key, next[key]); + for (var key2 in next) { + setStyle$1(style, key2, next[key2]); } if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle$1(style, key, ""); + for (var _key10 in prev) { + if (next[_key10] == null) { + setStyle$1(style, _key10, ""); } } } } } - const importantRE$1 = /\s*!important$/; + var importantRE$1 = /\s*!important$/; function setStyle$1(style, name, val) { if (isArray(val)) { val.forEach((v2) => setStyle$1(style, name, v2)); @@ -4754,7 +5599,7 @@ if (name.startsWith("--")) { style.setProperty(name, val); } else { - const prefixed = autoPrefix$1(style, name); + var prefixed = autoPrefix$1(style, name); if (importantRE$1.test(val)) { style.setProperty(hyphenate(prefixed), val.replace(importantRE$1, ""), "important"); } else { @@ -4763,28 +5608,28 @@ } } } - const prefixes$1 = ["Webkit", "Moz", "ms"]; - const prefixCache$1 = {}; + var prefixes$1 = ["Webkit", "Moz", "ms"]; + var prefixCache$1 = {}; function autoPrefix$1(style, rawName) { - const cached = prefixCache$1[rawName]; + var cached = prefixCache$1[rawName]; if (cached) { return cached; } - let name = camelize(rawName); + var name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache$1[rawName] = name; } name = capitalize(name); - for (let i = 0; i < prefixes$1.length; i++) { - const prefixed = prefixes$1[i] + name; + for (var i2 = 0; i2 < prefixes$1.length; i2++) { + var prefixed = prefixes$1[i2] + name; if (prefixed in style) { return prefixCache$1[rawName] = prefixed; } } return rawName; } - const rpxRE = /\b([+-]?\d+(\.\d+)?)[r|u]px\b/g; - const normalizeRpx = (val) => { + var rpxRE = /\b([+-]?\d+(\.\d+)?)[r|u]px\b/g; + var normalizeRpx = (val) => { if (typeof rpx2px !== "function") { return val; } @@ -4795,77 +5640,77 @@ } return val; }; - const xlinkNS = "http://www.w3.org/1999/xlink"; - function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith("xlink:")) { + var xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key2, value, isSVG, instance) { + if (isSVG && key2.startsWith("xlink:")) { if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + el.removeAttributeNS(xlinkNS, key2.slice(6, key2.length)); } else { - el.setAttributeNS(xlinkNS, key, value); + el.setAttributeNS(xlinkNS, key2, value); } } else { - const isBoolean2 = isSpecialBooleanAttr(key); - if (value == null || isBoolean2 && value === false) { - el.removeAttribute(key); + var _isBoolean = isSpecialBooleanAttr(key2); + if (value == null || _isBoolean && value === false) { + el.removeAttribute(key2); } else { - el.setAttribute(key, isBoolean2 ? "" : value); + el.setAttribute(key2, _isBoolean ? "" : value); } } } - function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === "innerHTML" || key === "textContent") { + function patchDOMProp(el, key2, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key2 === "innerHTML" || key2 === "textContent") { if (prevChildren) { unmountChildren(prevChildren, parentComponent, parentSuspense); } - el[key] = value == null ? "" : value; + el[key2] = value == null ? "" : value; return; } - if (key === "value" && el.tagName !== "PROGRESS") { + if (key2 === "value" && el.tagName !== "PROGRESS") { el._value = value; - const newValue = value == null ? "" : value; + var newValue = value == null ? "" : value; if (el.value !== newValue) { el.value = newValue; } if (value == null) { - el.removeAttribute(key); + el.removeAttribute(key2); } return; } if (value === "" || value == null) { - const type = typeof el[key]; + var type = typeof el[key2]; if (value === "" && type === "boolean") { - el[key] = true; + el[key2] = true; return; } else if (value == null && type === "string") { - el[key] = ""; - el.removeAttribute(key); + el[key2] = ""; + el.removeAttribute(key2); return; } else if (type === "number") { - el[key] = 0; - el.removeAttribute(key); + el[key2] = 0; + el.removeAttribute(key2); return; } } try { - el[key] = value; + el[key2] = value; } catch (e2) { } } - let _getNow = Date.now; - let skipTimestampCheck = false; + var _getNow = Date.now; + var skipTimestampCheck = false; if (typeof window !== "undefined") { if (_getNow() > document.createEvent("Event").timeStamp) { _getNow = () => performance.now(); } - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); + var ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); } - let cachedNow = 0; - const p$1 = Promise.resolve(); - const reset = () => { + var cachedNow = 0; + var p$1 = Promise.resolve(); + var reset = () => { cachedNow = 0; }; - const getNow = () => cachedNow || (p$1.then(reset), cachedNow = _getNow()); + var getNow = () => cachedNow || (p$1.then(reset), cachedNow = _getNow()); function addEventListener$1(el, event, handler, options) { el.addEventListener(event, handler, options); } @@ -4873,14 +5718,14 @@ el.removeEventListener(event, handler, options); } function patchEvent$1(el, rawName, prevValue, nextValue, instance = null) { - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; + var invokers = el._vei || (el._vei = {}); + var existingInvoker = invokers[rawName]; if (nextValue && existingInvoker) { existingInvoker.value = nextValue; } else { - const [name, options] = parseName(rawName); + var [name, options] = parseName(rawName); if (nextValue) { - const invoker = invokers[rawName] = createInvoker$1(nextValue, instance); + var invoker = invokers[rawName] = createInvoker$1(nextValue, instance); addEventListener$1(el, name, invoker, options); } else if (existingInvoker) { removeEventListener(el, name, existingInvoker, options); @@ -4888,12 +5733,12 @@ } } } - const optionsModifierRE = /(?:Once|Passive|Capture)$/; + var optionsModifierRE = /(?:Once|Passive|Capture)$/; function parseName(name) { - let options; + var options; if (optionsModifierRE.test(name)) { options = {}; - let m; + var m; while (m = name.match(optionsModifierRE)) { name = name.slice(0, name.length - m[0].length); options[m[0].toLowerCase()] = true; @@ -4902,8 +5747,8 @@ return [hyphenate(name.slice(2)), options]; } function createInvoker$1(initialValue, instance) { - const invoker = (e2) => { - const timeStamp = e2.timeStamp || _getNow(); + var invoker = (e2) => { + var timeStamp = e2.timeStamp || _getNow(); if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, invoker.value), instance, 5, [e2]); } @@ -4914,7 +5759,7 @@ } function patchStopImmediatePropagation(e2, value) { if (isArray(value)) { - const originalStop = e2.stopImmediatePropagation; + var originalStop = e2.stopImmediatePropagation; e2.stopImmediatePropagation = () => { originalStop.call(e2); e2._stopped = true; @@ -4924,10 +5769,10 @@ return value; } } - const nativeOnRE = /^on[a-z]/; - const forcePatchProp = (_, key) => key === "value"; - const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - switch (key) { + var nativeOnRE = /^on[a-z]/; + var forcePatchProp = (_, key2) => key2 === "value"; + var patchProp = (el, key2, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + switch (key2) { case "class": patchClass$1(el, nextValue, isSVG); break; @@ -4935,52 +5780,52 @@ patchStyle$1(el, prevValue, nextValue); break; default: - if (isOn(key)) { - if (!isModelListener(key)) { - patchEvent$1(el, key, prevValue, nextValue, parentComponent); + if (isOn(key2)) { + if (!isModelListener(key2)) { + patchEvent$1(el, key2, prevValue, nextValue, parentComponent); } - } else if (shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); + } else if (shouldSetAsProp(el, key2, nextValue, isSVG)) { + patchDOMProp(el, key2, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); } else { - if (key === "true-value") { + if (key2 === "true-value") { el._trueValue = nextValue; - } else if (key === "false-value") { + } else if (key2 === "false-value") { el._falseValue = nextValue; } - patchAttr(el, key, nextValue, isSVG); + patchAttr(el, key2, nextValue, isSVG); } break; } }; - function shouldSetAsProp(el, key, value, isSVG) { + function shouldSetAsProp(el, key2, value, isSVG) { if (isSVG) { - if (key === "innerHTML") { + if (key2 === "innerHTML") { return true; } - if (key in el && nativeOnRE.test(key) && isFunction(value)) { + if (key2 in el && nativeOnRE.test(key2) && isFunction(value)) { return true; } return false; } - if (key === "spellcheck" || key === "draggable") { + if (key2 === "spellcheck" || key2 === "draggable") { return false; } - if (key === "form") { + if (key2 === "form") { return false; } - if (key === "list" && el.tagName === "INPUT") { + if (key2 === "list" && el.tagName === "INPUT") { return false; } - if (key === "type" && el.tagName === "TEXTAREA") { + if (key2 === "type" && el.tagName === "TEXTAREA") { return false; } - if (nativeOnRE.test(key) && isString(value)) { + if (nativeOnRE.test(key2) && isString(value)) { return false; } - return key in el; + return key2 in el; } - const systemModifiers = ["ctrl", "shift", "alt", "meta"]; - const modifierGuards = { + var systemModifiers = ["ctrl", "shift", "alt", "meta"]; + var modifierGuards = { stop: (e2) => e2.stopPropagation(), prevent: (e2) => e2.preventDefault(), self: (e2) => e2.target !== e2.currentTarget, @@ -4991,20 +5836,24 @@ left: (e2) => "button" in e2 && e2.button !== 0, middle: (e2) => "button" in e2 && e2.button !== 1, right: (e2) => "button" in e2 && e2.button !== 2, - exact: (e2, modifiers) => systemModifiers.some((m) => e2[`${m}Key`] && !modifiers.includes(m)) + exact: (e2, modifiers) => systemModifiers.some((m) => e2["".concat(m, "Key")] && !modifiers.includes(m)) }; - const withModifiers = (fn, modifiers) => { + var withModifiers = (fn, modifiers) => { return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; + for (var i2 = 0; i2 < modifiers.length; i2++) { + var guard = modifierGuards[modifiers[i2]]; if (guard && guard(event, modifiers)) return; } return fn(event, ...args); }; }; - const vShow = { - beforeMount(el, { value }, { transition }) { + var vShow = { + beforeMount(el, { + value + }, { + transition + }) { el._vod = el.style.display === "none" ? "" : el.style.display; if (transition && value) { transition.beforeEnter(el); @@ -5012,12 +5861,21 @@ setDisplay(el, value); } }, - mounted(el, { value }, { transition }) { + mounted(el, { + value + }, { + transition + }) { if (transition && value) { transition.enter(el); } }, - updated(el, { value, oldValue }, { transition }) { + updated(el, { + value, + oldValue + }, { + transition + }) { if (!value === !oldValue) return; if (transition) { @@ -5034,31 +5892,38 @@ setDisplay(el, value); } }, - beforeUnmount(el, { value }) { + beforeUnmount(el, { + value + }) { setDisplay(el, value); } }; function setDisplay(el, value) { el.style.display = value ? el._vod : "none"; } - const rendererOptions = extend({ patchProp, forcePatchProp }, nodeOps); - let renderer; + var rendererOptions = extend({ + patchProp, + forcePatchProp + }, nodeOps); + var renderer; function ensureRenderer() { return renderer || (renderer = createRenderer(rendererOptions)); } - const createApp = (...args) => { - const app = ensureRenderer().createApp(...args); - const { mount } = app; + var createApp = (...args) => { + var app = ensureRenderer().createApp(...args); + var { + mount + } = app; app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); + var container = normalizeContainer(containerOrSelector); if (!container) return; - const component = app._component; + var component = app._component; if (!isFunction(component) && !component.render && !component.template) { component.template = container.innerHTML; } container.innerHTML = ""; - const proxy = mount(container, false, container instanceof SVGElement); + var proxy = mount(container, false, container instanceof SVGElement); if (container instanceof Element) { container.removeAttribute("v-cloak"); container.setAttribute("data-v-app", ""); @@ -5069,7 +5934,7 @@ }; function normalizeContainer(container) { if (isString(container)) { - const res = document.querySelector(container); + var res = document.querySelector(container); return res; } return container; @@ -5100,9 +5965,9 @@ } function setStyle2(el, style) { var elStyle = el.style; - Object.keys(style).forEach(function(key) { - var val = style[key]; - elStyle[key] = val; + Object.keys(style).forEach(function(key2) { + var val = style[key2]; + elStyle[key2] = val; }); } var cbs = []; @@ -5119,7 +5984,9 @@ try { var opts = Object.defineProperty({}, "passive", { get: function() { - passiveEvents = { passive: true }; + passiveEvents = { + passive: true + }; } }); window.addEventListener("test", null, opts); @@ -5193,8 +6060,8 @@ overflow: "hidden", visibility: "hidden" }); - attrs.forEach(function(key) { - addChild(parentDiv, key); + attrs.forEach(function(key2) { + addChild(parentDiv, key2); }); document.body.appendChild(parentDiv); parentReady(); @@ -5260,14 +6127,14 @@ offChange }; var out = safeAreaInsets; - const onEventPrevent = /* @__PURE__ */ withModifiers(() => { + var onEventPrevent = /* @__PURE__ */ withModifiers(() => { }, ["prevent"]); function getWindowOffset() { - const style = document.documentElement.style; - const top = parseInt(style.getPropertyValue("--window-top")); - const bottom = parseInt(style.getPropertyValue("--window-bottom")); - const left = parseInt(style.getPropertyValue("--window-left")); - const right = parseInt(style.getPropertyValue("--window-right")); + var style = document.documentElement.style; + var top = parseInt(style.getPropertyValue("--window-top")); + var bottom = parseInt(style.getPropertyValue("--window-bottom")); + var left = parseInt(style.getPropertyValue("--window-left")); + var right = parseInt(style.getPropertyValue("--window-right")); return { top: top ? top + out.top : 0, bottom: bottom ? bottom + out.bottom : 0, @@ -5276,7 +6143,7 @@ }; } function updateCssVar(cssVars) { - const style = document.documentElement.style; + var style = document.documentElement.style; Object.keys(cssVars).forEach((name) => { style.setProperty(name, cssVars[name]); }); @@ -5293,7 +6160,7 @@ return rpx2pxWithReplace(str); } if (typeof str === "string") { - const res = parseInt(str) || 0; + var res = parseInt(str) || 0; if (hasRpx(str)) { return uni.upx2px(res); } @@ -5309,26 +6176,24 @@ return uni.upx2px(parseFloat(b)) + "px"; }); } - const ICON_PATH_CANCEL = "M20.928 10.176l-4.928 4.928-4.928-4.928-0.896 0.896 4.928 4.928-4.928 4.928 0.896 0.896 4.928-4.928 4.928 4.928 0.896-0.896-4.928-4.928 4.928-4.928-0.896-0.896zM16 2.080q-3.776 0-7.040 1.888-3.136 1.856-4.992 4.992-1.888 3.264-1.888 7.040t1.888 7.040q1.856 3.136 4.992 4.992 3.264 1.888 7.040 1.888t7.040-1.888q3.136-1.856 4.992-4.992 1.888-3.264 1.888-7.040t-1.888-7.040q-1.856-3.136-4.992-4.992-3.264-1.888-7.040-1.888zM16 28.64q-3.424 0-6.4-1.728-2.848-1.664-4.512-4.512-1.728-2.976-1.728-6.4t1.728-6.4q1.664-2.848 4.512-4.512 2.976-1.728 6.4-1.728t6.4 1.728q2.848 1.664 4.512 4.512 1.728 2.976 1.728 6.4t-1.728 6.4q-1.664 2.848-4.512 4.512-2.976 1.728-6.4 1.728z"; - const ICON_PATH_CLEAR = "M16 0q-4.352 0-8.064 2.176-3.616 2.144-5.76 5.76-2.176 3.712-2.176 8.064t2.176 8.064q2.144 3.616 5.76 5.76 3.712 2.176 8.064 2.176t8.064-2.176q3.616-2.144 5.76-5.76 2.176-3.712 2.176-8.064t-2.176-8.064q-2.144-3.616-5.76-5.76-3.712-2.176-8.064-2.176zM22.688 21.408q0.32 0.32 0.304 0.752t-0.336 0.736-0.752 0.304-0.752-0.32l-5.184-5.376-5.376 5.184q-0.32 0.32-0.752 0.304t-0.736-0.336-0.304-0.752 0.32-0.752l5.376-5.184-5.184-5.376q-0.32-0.32-0.304-0.752t0.336-0.752 0.752-0.304 0.752 0.336l5.184 5.376 5.376-5.184q0.32-0.32 0.752-0.304t0.752 0.336 0.304 0.752-0.336 0.752l-5.376 5.184 5.184 5.376z"; - const ICON_PATH_DOWNLOAD = "M15.808 1.696q-3.776 0-7.072 1.984-3.2 1.888-5.088 5.152-1.952 3.392-1.952 7.36 0 3.776 1.952 7.072 1.888 3.2 5.088 5.088 3.296 1.952 7.072 1.952 3.968 0 7.36-1.952 3.264-1.888 5.152-5.088 1.984-3.296 1.984-7.072 0-4-1.984-7.36-1.888-3.264-5.152-5.152-3.36-1.984-7.36-1.984zM20.864 18.592l-3.776 4.928q-0.448 0.576-1.088 0.576t-1.088-0.576l-3.776-4.928q-0.448-0.576-0.24-0.992t0.944-0.416h2.976v-8.928q0-0.256 0.176-0.432t0.4-0.176h1.216q0.224 0 0.4 0.176t0.176 0.432v8.928h2.976q0.736 0 0.944 0.416t-0.24 0.992z"; - const ICON_PATH_INFO = "M15.808 0.128q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.176 3.776-2.176 8.16 0 4.224 2.176 7.872 2.080 3.552 5.632 5.632 3.648 2.176 7.872 2.176 4.384 0 8.16-2.176 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.416-2.176-8.16-2.112-3.616-5.728-5.728-3.744-2.176-8.16-2.176zM16.864 23.776q0 0.064-0.064 0.064h-1.568q-0.096 0-0.096-0.064l-0.256-11.328q0-0.064 0.064-0.064h2.112q0.096 0 0.064 0.064l-0.256 11.328zM16 10.88q-0.576 0-0.976-0.4t-0.4-0.96 0.4-0.96 0.976-0.4 0.976 0.4 0.4 0.96-0.4 0.96-0.976 0.4z"; - const ICON_PATH_SEARCH = "M20.928 22.688q-1.696 1.376-3.744 2.112-2.112 0.768-4.384 0.768-3.488 0-6.464-1.728-2.88-1.696-4.576-4.608-1.76-2.976-1.76-6.464t1.76-6.464q1.696-2.88 4.576-4.576 2.976-1.76 6.464-1.76t6.464 1.76q2.912 1.696 4.608 4.576 1.728 2.976 1.728 6.464 0 2.272-0.768 4.384-0.736 2.048-2.112 3.744l9.312 9.28-1.824 1.824-9.28-9.312zM12.8 23.008q2.784 0 5.184-1.376 2.304-1.376 3.68-3.68 1.376-2.4 1.376-5.184t-1.376-5.152q-1.376-2.336-3.68-3.68-2.4-1.408-5.184-1.408t-5.152 1.408q-2.336 1.344-3.68 3.68-1.408 2.368-1.408 5.152t1.408 5.184q1.344 2.304 3.68 3.68 2.368 1.376 5.152 1.376zM12.8 23.008v0z"; - const ICON_PATH_SUCCESS_NO_CIRCLE = "M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z"; - const ICON_PATH_SUCCESS = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM24.832 11.328l-11.264 11.104q-0.032 0.032-0.112 0.032t-0.112-0.032l-5.216-5.376q-0.096-0.128 0-0.288l0.704-0.96q0.032-0.064 0.112-0.064t0.112 0.032l4.256 3.264q0.064 0.032 0.144 0.032t0.112-0.032l10.336-8.608q0.064-0.064 0.144-0.064t0.112 0.064l0.672 0.672q0.128 0.128 0 0.224z"; - const ICON_PATH_WAITING = "M15.84 0.096q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM23.008 21.92l-0.512 0.896q-0.096 0.128-0.224 0.064l-8-3.808q-0.096-0.064-0.16-0.128-0.128-0.096-0.128-0.288l0.512-12.096q0-0.064 0.048-0.112t0.112-0.048h1.376q0.064 0 0.112 0.048t0.048 0.112l0.448 10.848 6.304 4.256q0.064 0.064 0.080 0.128t-0.016 0.128z"; - const ICON_PATH_WARN = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z"; + var ICON_PATH_CANCEL = "M20.928 10.176l-4.928 4.928-4.928-4.928-0.896 0.896 4.928 4.928-4.928 4.928 0.896 0.896 4.928-4.928 4.928 4.928 0.896-0.896-4.928-4.928 4.928-4.928-0.896-0.896zM16 2.080q-3.776 0-7.040 1.888-3.136 1.856-4.992 4.992-1.888 3.264-1.888 7.040t1.888 7.040q1.856 3.136 4.992 4.992 3.264 1.888 7.040 1.888t7.040-1.888q3.136-1.856 4.992-4.992 1.888-3.264 1.888-7.040t-1.888-7.040q-1.856-3.136-4.992-4.992-3.264-1.888-7.040-1.888zM16 28.64q-3.424 0-6.4-1.728-2.848-1.664-4.512-4.512-1.728-2.976-1.728-6.4t1.728-6.4q1.664-2.848 4.512-4.512 2.976-1.728 6.4-1.728t6.4 1.728q2.848 1.664 4.512 4.512 1.728 2.976 1.728 6.4t-1.728 6.4q-1.664 2.848-4.512 4.512-2.976 1.728-6.4 1.728z"; + var ICON_PATH_CLEAR = "M16 0q-4.352 0-8.064 2.176-3.616 2.144-5.76 5.76-2.176 3.712-2.176 8.064t2.176 8.064q2.144 3.616 5.76 5.76 3.712 2.176 8.064 2.176t8.064-2.176q3.616-2.144 5.76-5.76 2.176-3.712 2.176-8.064t-2.176-8.064q-2.144-3.616-5.76-5.76-3.712-2.176-8.064-2.176zM22.688 21.408q0.32 0.32 0.304 0.752t-0.336 0.736-0.752 0.304-0.752-0.32l-5.184-5.376-5.376 5.184q-0.32 0.32-0.752 0.304t-0.736-0.336-0.304-0.752 0.32-0.752l5.376-5.184-5.184-5.376q-0.32-0.32-0.304-0.752t0.336-0.752 0.752-0.304 0.752 0.336l5.184 5.376 5.376-5.184q0.32-0.32 0.752-0.304t0.752 0.336 0.304 0.752-0.336 0.752l-5.376 5.184 5.184 5.376z"; + var ICON_PATH_DOWNLOAD = "M15.808 1.696q-3.776 0-7.072 1.984-3.2 1.888-5.088 5.152-1.952 3.392-1.952 7.36 0 3.776 1.952 7.072 1.888 3.2 5.088 5.088 3.296 1.952 7.072 1.952 3.968 0 7.36-1.952 3.264-1.888 5.152-5.088 1.984-3.296 1.984-7.072 0-4-1.984-7.36-1.888-3.264-5.152-5.152-3.36-1.984-7.36-1.984zM20.864 18.592l-3.776 4.928q-0.448 0.576-1.088 0.576t-1.088-0.576l-3.776-4.928q-0.448-0.576-0.24-0.992t0.944-0.416h2.976v-8.928q0-0.256 0.176-0.432t0.4-0.176h1.216q0.224 0 0.4 0.176t0.176 0.432v8.928h2.976q0.736 0 0.944 0.416t-0.24 0.992z"; + var ICON_PATH_INFO = "M15.808 0.128q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.176 3.776-2.176 8.16 0 4.224 2.176 7.872 2.080 3.552 5.632 5.632 3.648 2.176 7.872 2.176 4.384 0 8.16-2.176 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.416-2.176-8.16-2.112-3.616-5.728-5.728-3.744-2.176-8.16-2.176zM16.864 23.776q0 0.064-0.064 0.064h-1.568q-0.096 0-0.096-0.064l-0.256-11.328q0-0.064 0.064-0.064h2.112q0.096 0 0.064 0.064l-0.256 11.328zM16 10.88q-0.576 0-0.976-0.4t-0.4-0.96 0.4-0.96 0.976-0.4 0.976 0.4 0.4 0.96-0.4 0.96-0.976 0.4z"; + var ICON_PATH_SEARCH = "M20.928 22.688q-1.696 1.376-3.744 2.112-2.112 0.768-4.384 0.768-3.488 0-6.464-1.728-2.88-1.696-4.576-4.608-1.76-2.976-1.76-6.464t1.76-6.464q1.696-2.88 4.576-4.576 2.976-1.76 6.464-1.76t6.464 1.76q2.912 1.696 4.608 4.576 1.728 2.976 1.728 6.464 0 2.272-0.768 4.384-0.736 2.048-2.112 3.744l9.312 9.28-1.824 1.824-9.28-9.312zM12.8 23.008q2.784 0 5.184-1.376 2.304-1.376 3.68-3.68 1.376-2.4 1.376-5.184t-1.376-5.152q-1.376-2.336-3.68-3.68-2.4-1.408-5.184-1.408t-5.152 1.408q-2.336 1.344-3.68 3.68-1.408 2.368-1.408 5.152t1.408 5.184q1.344 2.304 3.68 3.68 2.368 1.376 5.152 1.376zM12.8 23.008v0z"; + var ICON_PATH_SUCCESS_NO_CIRCLE = "M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z"; + var ICON_PATH_SUCCESS = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM24.832 11.328l-11.264 11.104q-0.032 0.032-0.112 0.032t-0.112-0.032l-5.216-5.376q-0.096-0.128 0-0.288l0.704-0.96q0.032-0.064 0.112-0.064t0.112 0.032l4.256 3.264q0.064 0.032 0.144 0.032t0.112-0.032l10.336-8.608q0.064-0.064 0.144-0.064t0.112 0.064l0.672 0.672q0.128 0.128 0 0.224z"; + var ICON_PATH_WAITING = "M15.84 0.096q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM23.008 21.92l-0.512 0.896q-0.096 0.128-0.224 0.064l-8-3.808q-0.096-0.064-0.16-0.128-0.128-0.096-0.128-0.288l0.512-12.096q0-0.064 0.048-0.112t0.112-0.048h1.376q0.064 0 0.112 0.048t0.048 0.112l0.448 10.848 6.304 4.256q0.064 0.064 0.080 0.128t-0.016 0.128z"; + var ICON_PATH_WARN = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z"; function createSvgIconVNode(path, color = "#000", size2 = 27) { return createVNode("svg", { width: size2, height: size2, viewBox: "0 0 32 32" - }, [ - createVNode("path", { - d: path, - fill: color - }, null, 8, ["d", "fill"]) - ], 8, ["width", "height"]); + }, [createVNode("path", { + d: path, + fill: color + }, null, 8, ["d", "fill"])], 8, ["width", "height"]); } function useCurrentPageId() { { @@ -5351,22 +6216,24 @@ function disableScrollListener(evt) { evt.preventDefault(); } - let testReachBottomTimer; - let lastScrollHeight = 0; + var testReachBottomTimer; + var lastScrollHeight = 0; function createScrollListener({ onPageScroll, onReachBottom, onReachBottomDistance }) { - let ticking = false; - let hasReachBottom = false; - let reachBottomLocking = true; - const isReachBottom = () => { - const { scrollHeight } = document.documentElement; - const windowHeight = window.innerHeight; - const scrollY = window.scrollY; - const isBottom = scrollY > 0 && scrollHeight > windowHeight && scrollY + windowHeight + onReachBottomDistance >= scrollHeight; - const heightChanged = Math.abs(scrollHeight - lastScrollHeight) > onReachBottomDistance; + var ticking = false; + var hasReachBottom = false; + var reachBottomLocking = true; + var isReachBottom = () => { + var { + scrollHeight + } = document.documentElement; + var windowHeight = window.innerHeight; + var scrollY = window.scrollY; + var isBottom = scrollY > 0 && scrollHeight > windowHeight && scrollY + windowHeight + onReachBottomDistance >= scrollHeight; + var heightChanged = Math.abs(scrollHeight - lastScrollHeight) > onReachBottomDistance; if (isBottom && (!hasReachBottom || heightChanged)) { lastScrollHeight = scrollHeight; hasReachBottom = true; @@ -5377,7 +6244,7 @@ } return false; }; - const trigger2 = () => { + var trigger2 = () => { onPageScroll && onPageScroll(window.pageYOffset); function testReachBottom() { if (isReachBottom()) { @@ -5413,31 +6280,35 @@ if (toRoute.indexOf("./") === 0) { return getRealRoute(fromRoute, toRoute.substr(2)); } - const toRouteArray = toRoute.split("/"); - const toRouteLength = toRouteArray.length; - let i = 0; - for (; i < toRouteLength && toRouteArray[i] === ".."; i++) { + var toRouteArray = toRoute.split("/"); + var toRouteLength = toRouteArray.length; + var i2 = 0; + for (; i2 < toRouteLength && toRouteArray[i2] === ".."; i2++) { } - toRouteArray.splice(0, i); + toRouteArray.splice(0, i2); toRoute = toRouteArray.join("/"); - const fromRouteArray = fromRoute.length > 0 ? fromRoute.split("/") : []; - fromRouteArray.splice(fromRouteArray.length - i - 1, i + 1); + var fromRouteArray = fromRoute.length > 0 ? fromRoute.split("/") : []; + fromRouteArray.splice(fromRouteArray.length - i2 - 1, i2 + 1); return "/" + fromRouteArray.concat(toRouteArray).join("/"); } - const isClickEvent = (val) => val.type === "click"; + var isClickEvent = (val) => val.type === "click"; function $nne(evt) { - const { currentTarget } = evt; + var { + currentTarget + } = evt; if (!(evt instanceof Event) || !(currentTarget instanceof HTMLElement)) { return evt; } if (currentTarget.tagName.indexOf("UNI-") !== 0) { return evt; } - const res = createNativeEvent(evt); + var res = createNativeEvent(evt); if (isClickEvent(evt)) { normalizeClickEvent(res, evt); } else if (evt instanceof TouchEvent) { - const { top } = getWindowOffset(); + var { + top + } = getWindowOffset(); res.touches = normalizeTouchEvent(evt.touches, top); res.changedTouches = normalizeTouchEvent(evt.changedTouches, top); } @@ -5450,8 +6321,13 @@ return target; } function createNativeEvent(evt) { - const { type, timeStamp, target, currentTarget } = evt; - const event = { + var { + type, + timeStamp, + target, + currentTarget + } = evt; + var event = { type, timeStamp, target: normalizeTarget(findUniTarget(target)), @@ -5468,9 +6344,17 @@ return event; } function normalizeClickEvent(evt, mouseEvt) { - const { x, y } = mouseEvt; - const { top } = getWindowOffset(); - evt.detail = { x, y: y - top }; + var { + x, + y + } = mouseEvt; + var { + top + } = getWindowOffset(); + evt.detail = { + x, + y: y - top + }; evt.touches = evt.changedTouches = [createTouchEvent(mouseEvt)]; } function createTouchEvent(evt) { @@ -5484,9 +6368,16 @@ }; } function normalizeTouchEvent(touches, top) { - const res = []; - for (let i = 0; i < touches.length; i++) { - const { identifier, pageX, pageY, clientX, clientY, force } = touches[i]; + var res = []; + for (var i2 = 0; i2 < touches.length; i2++) { + var { + identifier, + pageX, + pageY, + clientX, + clientY, + force + } = touches[i2]; res.push({ identifier, pageX, @@ -5498,21 +6389,20 @@ } return res; } - [ON_PAGE_SCROLL, ON_REACH_BOTTOM]; - const VD_SYNC = "vdSync"; - const APP_SERVICE_ID = "__uniapp__service"; - const ON_WEBVIEW_READY = "onWebviewReady"; - const ACTION_TYPE_DICT = 0; - const WEBVIEW_INSERTED = "webviewInserted"; - const WEBVIEW_REMOVED = "webviewRemoved"; - const WEBVIEW_ID_PREFIX = "webviewId"; - const UniViewJSBridge$1 = /* @__PURE__ */ extend(ViewJSBridge, { + var VD_SYNC = "vdSync"; + var APP_SERVICE_ID = "__uniapp__service"; + var ON_WEBVIEW_READY = "onWebviewReady"; + var ACTION_TYPE_DICT = 0; + var WEBVIEW_INSERTED = "webviewInserted"; + var WEBVIEW_REMOVED = "webviewRemoved"; + var WEBVIEW_ID_PREFIX = "webviewId"; + var UniViewJSBridge$1 = /* @__PURE__ */ extend(ViewJSBridge, { publishHandler }); function publishHandler(event, args = {}) { - const pageId = getCurrentPageId() + ""; + var pageId = getCurrentPageId() + ""; { - console.log(`[${Date.now()}][View]: ` + pageId + " " + event + " " + JSON.stringify(args)); + console.log("[".concat(Date.now(), "][View]: ") + pageId + " " + event + " " + JSON.stringify(args)); } plus.webview.postMessageToUniNView({ type: "subscribeHandler", @@ -5524,14 +6414,14 @@ }, APP_SERVICE_ID); } function validateProtocolFail(name, msg) { - console.warn(`${name}: ${msg}`); + console.warn("".concat(name, ": ").concat(msg)); } function validateProtocol(name, data, protocol, onFail) { if (!onFail) { onFail = validateProtocolFail; } - for (const key in protocol) { - const errMsg = validateProp(key, data[key], protocol[key], !hasOwn$1(data, key)); + for (var key2 in protocol) { + var errMsg = validateProp(key2, data[key2], protocol[key2], !hasOwn$1(data, key2)); if (isString(errMsg)) { onFail(name, errMsg); } @@ -5544,22 +6434,30 @@ if (!isArray(protocol)) { return validateProtocol(name, args[0] || Object.create(null), protocol, onFail); } - const len = protocol.length; - const argsLen = args.length; - for (let i = 0; i < len; i++) { - const opts = protocol[i]; - const data = Object.create(null); - if (argsLen > i) { - data[opts.name] = args[i]; + var len = protocol.length; + var argsLen = args.length; + for (var i2 = 0; i2 < len; i2++) { + var opts = protocol[i2]; + var data = Object.create(null); + if (argsLen > i2) { + data[opts.name] = args[i2]; } - validateProtocol(name, data, { [opts.name]: opts }, onFail); + validateProtocol(name, data, { + [opts.name]: opts + }, onFail); } } function validateProp(name, value, prop, isAbsent) { if (!isPlainObject(prop)) { - prop = { type: prop }; + prop = { + type: prop + }; } - const { type, required, validator } = prop; + var { + type, + required, + validator + } = prop; if (required && isAbsent) { return 'Missing required args: "' + name + '"'; } @@ -5567,11 +6465,14 @@ return; } if (type != null) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); + var isValid = false; + var types = isArray(type) ? type : [type]; + var expectedTypes = []; + for (var i2 = 0; i2 < types.length && !isValid; i2++) { + var { + valid, + expectedType + } = assertType(value, types[i2]); expectedTypes.push(expectedType || ""); isValid = valid; } @@ -5583,12 +6484,12 @@ return validator(value); } } - const isSimpleType = /* @__PURE__ */ makeMap$1("String,Number,Boolean,Function,Symbol"); + var isSimpleType = /* @__PURE__ */ makeMap$1("String,Number,Boolean,Function,Symbol"); function assertType(value, type) { - let valid; - const expectedType = getType(type); + var valid; + var expectedType = getType(type); if (isSimpleType(expectedType)) { - const t2 = typeof value; + var t2 = typeof value; valid = t2 === expectedType.toLowerCase(); if (!valid && t2 === "object") { valid = value instanceof type; @@ -5608,52 +6509,52 @@ }; } function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid args: type check failed for args "${name}". Expected ${expectedTypes.map(capitalize).join(", ")}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); + var message = 'Invalid args: type check failed for args "'.concat(name, '". Expected ').concat(expectedTypes.map(capitalize).join(", ")); + var expectedType = expectedTypes[0]; + var receivedType = toRawType(value); + var expectedValue = styleValue(value, expectedType); + var receivedValue = styleValue(value, receivedType); if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; + message += " with value ".concat(expectedValue); } - message += `, got ${receivedType} `; + message += ", got ".concat(receivedType, " "); if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; + message += "with value ".concat(receivedValue, "."); } return message; } function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); + var match = ctor && ctor.toString().match(/^\s*function (\w+)/); return match ? match[1] : ""; } function styleValue(value, type) { if (type === "String") { - return `"${value}"`; + return '"'.concat(value, '"'); } else if (type === "Number") { - return `${Number(value)}`; + return "".concat(Number(value)); } else { - return `${value}`; + return "".concat(value); } } function isExplicable(type) { - const explicitTypes = ["string", "number", "boolean"]; + var explicitTypes = ["string", "number", "boolean"]; return explicitTypes.some((elem) => type.toLowerCase() === elem); } function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === "boolean"); } function formatApiArgs(args, options) { - const params = args[0]; + var params = args[0]; if (!options || !isPlainObject(options.formatArgs) && isPlainObject(params)) { return; } - const formatArgs = options.formatArgs; - const keys = Object.keys(formatArgs); - for (let i = 0; i < keys.length; i++) { - const name = keys[i]; - const formatterOrDefaultValue = formatArgs[name]; + var formatArgs = options.formatArgs; + var keys = Object.keys(formatArgs); + for (var i2 = 0; i2 < keys.length; i2++) { + var name = keys[i2]; + var formatterOrDefaultValue = formatArgs[name]; if (isFunction(formatterOrDefaultValue)) { - const errMsg = formatterOrDefaultValue(args[0][name], params); + var errMsg = formatterOrDefaultValue(args[0][name], params); if (isString(errMsg)) { return errMsg; } @@ -5669,19 +6570,19 @@ validateProtocols(name, args, protocol); } if (options && options.beforeInvoke) { - const errMsg2 = options.beforeInvoke(args); + var errMsg2 = options.beforeInvoke(args); if (isString(errMsg2)) { return errMsg2; } } - const errMsg = formatApiArgs(args, options); + var errMsg = formatApiArgs(args, options); if (errMsg) { return errMsg; } } function wrapperSyncApi(name, fn, protocol, options) { return (...args) => { - const errMsg = beforeInvokeApi(name, args, protocol, options); + var errMsg = beforeInvokeApi(name, args, protocol, options); if (errMsg) { throw new Error(errMsg); } @@ -5695,7 +6596,9 @@ if (typeof __SYSTEM_INFO__ !== "undefined") { return window.__SYSTEM_INFO__; } - const { resolutionWidth } = plus.screen.getCurrentSize(); + var { + resolutionWidth + } = plus.screen.getCurrentSize(); return { platform: (plus.os.name || "").toLowerCase(), pixelRatio: plus.screen.scale, @@ -5712,7 +6615,7 @@ if (isSystemURL(filepath)) { return "file://" + normalizeLocalPath(filepath); } - const wwwPath = "file://" + normalizeLocalPath("_www"); + var wwwPath = "file://" + normalizeLocalPath("_www"); if (filepath.indexOf("/") === 0) { if (filepath.startsWith("/storage/") || filepath.includes("/Containers/Data/Application/")) { return "file://" + filepath; @@ -5723,7 +6626,7 @@ if (typeof __id__ === "string") { return wwwPath + getRealRoute("/" + __id__, filepath); } else { - const page = getCurrentPage(); + var page = getCurrentPage(); if (page) { return wwwPath + getRealRoute("/" + page.route, filepath); } @@ -5731,7 +6634,7 @@ } return filepath; } - const normalizeLocalPath = cacheStringFunction((filepath) => { + var normalizeLocalPath = cacheStringFunction((filepath) => { return plus.io.convertLocalFileSystemURL(filepath).replace(/^\/?apps\//, "/android_asset/apps/").replace(/\/$/, ""); }); function isSystemURL(filepath) { @@ -5745,30 +6648,32 @@ function getSameOriginUrl(url) { return Promise.resolve(url); } - const API_UPX2PX = "upx2px"; - const Upx2pxProtocol = [ - { - name: "upx", - type: [Number, String], - required: true - } - ]; - const EPS = 1e-4; - const BASE_DEVICE_WIDTH = 750; - let isIOS = false; - let deviceWidth = 0; - let deviceDPR = 0; + var API_UPX2PX = "upx2px"; + var Upx2pxProtocol = [{ + name: "upx", + type: [Number, String], + required: true + }]; + var EPS = 1e-4; + var BASE_DEVICE_WIDTH = 750; + var isIOS = false; + var deviceWidth = 0; + var deviceDPR = 0; function checkDeviceWidth() { - const { platform, pixelRatio: pixelRatio2, windowWidth } = getBaseSystemInfo(); + var { + platform, + pixelRatio: pixelRatio2, + windowWidth + } = getBaseSystemInfo(); deviceWidth = windowWidth; deviceDPR = pixelRatio2; isIOS = platform === "ios"; } function checkValue(value, defaultValue) { - const newValue = Number(value); + var newValue = Number(value); return isNaN(newValue) ? defaultValue : newValue; } - const upx2px = /* @__PURE__ */ defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => { + var upx2px = /* @__PURE__ */ defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => { if (deviceWidth === 0) { checkDeviceWidth(); } @@ -5776,14 +6681,14 @@ if (number === 0) { return 0; } - let width = newDeviceWidth || deviceWidth; + var width = newDeviceWidth || deviceWidth; { - const config = __uniConfig.globalStyle || {}; - const maxWidth = checkValue(config.rpxCalcMaxDeviceWidth, 960); - const baseWidth = checkValue(config.rpxCalcBaseDeviceWidth, 375); + var config = __uniConfig.globalStyle || {}; + var maxWidth = checkValue(config.rpxCalcMaxDeviceWidth, 960); + var baseWidth = checkValue(config.rpxCalcBaseDeviceWidth, 375); width = width <= maxWidth ? width : baseWidth; } - let result = number / BASE_DEVICE_WIDTH * width; + var result = number / BASE_DEVICE_WIDTH * width; if (result < 0) { result = -result; } @@ -5797,33 +6702,39 @@ } return number < 0 ? -result : result; }, Upx2pxProtocol); - const API_LOAD_FONT_FACE = "loadFontFace"; - const API_PAGE_SCROLL_TO = "pageScrollTo"; - ({ - beforeInvoke() { - initI18nShowModalMsgsOnce(); - }, - formatArgs: { - title: "", - content: "", - showCancel: true, - cancelText(_value, params) { - if (!hasOwn$1(params, "cancelText")) { - const { t: t2 } = useI18n(); - params.cancelText = t2("uni.showModal.cancel"); - } - }, - cancelColor: "#000", - confirmText(_value, params) { - if (!hasOwn$1(params, "confirmText")) { - const { t: t2 } = useI18n(); - params.confirmText = t2("uni.showModal.confirm"); + var _objectPie = {}; + _objectPie.f = {}.propertyIsEnumerable; + var DESCRIPTORS = _descriptors; + var getKeys = _objectKeys; + var toIObject = _toIobject; + var isEnum = _objectPie.f; + var _objectToArray = function(isEntries) { + return function(it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i2 = 0; + var result = []; + var key2; + while (length > i2) { + key2 = keys[i2++]; + if (!DESCRIPTORS || isEnum.call(O, key2)) { + result.push(isEntries ? [key2, O[key2]] : O[key2]); } - }, - confirmColor: PRIMARY_COLOR + } + return result; + }; + }; + var $export = _export; + var $values = _objectToArray(false); + $export($export.S, "Object", { + values: function values(it) { + return $values(it); } }); - const initIntersectionObserverPolyfill = function() { + var API_LOAD_FONT_FACE = "loadFontFace"; + var API_PAGE_SCROLL_TO = "pageScrollTo"; + var initIntersectionObserverPolyfill = function() { if (typeof window !== "object") { return; } @@ -5927,7 +6838,10 @@ throw new Error("target must be an Element"); } this._registerInstance(); - this._observationTargets.push({ element: target, entry: null }); + this._observationTargets.push({ + element: target, + entry: null + }); this._monitorIntersections(target.ownerDocument); this._checkForIntersections(); }; @@ -5954,11 +6868,11 @@ var threshold = opt_threshold || [0]; if (!Array.isArray(threshold)) threshold = [threshold]; - return threshold.sort().filter(function(t2, i, a2) { + return threshold.sort().filter(function(t2, i2, a2) { if (typeof t2 != "number" || isNaN(t2) || t2 < 0 || t2 > 1) { throw new Error("threshold must be a number between 0 and 1 inclusively"); } - return t2 !== a2[i - 1]; + return t2 !== a2[i2 - 1]; }); }; IntersectionObserver2.prototype._parseRootMargin = function(opt_rootMargin) { @@ -5968,7 +6882,10 @@ if (!parts) { throw new Error("rootMargin must be specified in pixels or percent"); } - return { value: parseFloat(parts[1]), unit: parts[2] }; + return { + value: parseFloat(parts[1]), + unit: parts[2] + }; }); margins[1] = margins[1] || margins[0]; margins[2] = margins[2] || margins[0]; @@ -6061,8 +6978,8 @@ var unsubscribes = this._monitoringUnsubscribes.slice(0); this._monitoringDocuments.length = 0; this._monitoringUnsubscribes.length = 0; - for (var i = 0; i < unsubscribes.length; i++) { - unsubscribes[i](); + for (var i2 = 0; i2 < unsubscribes.length; i2++) { + unsubscribes[i2](); } }; IntersectionObserver2.prototype._checkForIntersections = function() { @@ -6178,8 +7095,8 @@ return this._expandRectByRootMargin(rootRect); }; IntersectionObserver2.prototype._expandRectByRootMargin = function(rect) { - var margins = this._rootMarginValues.map(function(margin, i) { - return margin.unit == "px" ? margin.value : margin.value * (i % 2 ? rect.width : rect.height) / 100; + var margins = this._rootMarginValues.map(function(margin, i2) { + return margin.unit == "px" ? margin.value : margin.value * (i2 % 2 ? rect.width : rect.height) / 100; }); var newRect = { top: rect.top - margins[0], @@ -6196,8 +7113,8 @@ var newRatio = newEntry.isIntersecting ? newEntry.intersectionRatio || 0 : -1; if (oldRatio === newRatio) return; - for (var i = 0; i < this.thresholds.length; i++) { - var threshold = this.thresholds[i]; + for (var i2 = 0; i2 < this.thresholds.length; i2++) { + var threshold = this.thresholds[i2]; if (threshold == oldRatio || threshold == newRatio || threshold < oldRatio !== threshold < newRatio) { return true; } @@ -6350,7 +7267,14 @@ window.IntersectionObserverEntry = IntersectionObserverEntry; }; function normalizeRect(rect) { - const { bottom, height, left, right, top, width } = rect || {}; + var { + bottom, + height, + left, + right, + top, + width + } = rect || {}; return { bottom, height, @@ -6362,8 +7286,8 @@ } function requestComponentObserver($el, options, callback) { initIntersectionObserverPolyfill(); - const root = options.relativeToSelector ? $el.querySelector(options.relativeToSelector) : null; - const intersectionObserver = new IntersectionObserver((entries2) => { + var root = options.relativeToSelector ? $el.querySelector(options.relativeToSelector) : null; + var intersectionObserver = new IntersectionObserver((entries2) => { entries2.forEach((entrie) => { callback({ intersectionRatio: entrie.intersectionRatio, @@ -6382,15 +7306,15 @@ }); if (options.observeAll) { intersectionObserver.USE_MUTATION_OBSERVER = true; - const nodeList = $el.querySelectorAll(options.selector); - for (let i = 0; i < nodeList.length; i++) { - intersectionObserver.observe(nodeList[i]); + var nodeList = $el.querySelectorAll(options.selector); + for (var i2 = 0; i2 < nodeList.length; i2++) { + intersectionObserver.observe(nodeList[i2]); } } else { intersectionObserver.USE_MUTATION_OBSERVER = false; - const el = $el.querySelector(options.selector); + var el = $el.querySelector(options.selector); if (!el) { - console.warn(`Node ${options.selector} is not found. Intersection observer will not trigger.`); + console.warn("Node ".concat(options.selector, " is not found. Intersection observer will not trigger.")); } else { intersectionObserver.observe(el); } @@ -6424,11 +7348,11 @@ }); function preventDoubleTap() { if (String(navigator.vendor).indexOf("Apple") === 0) { - let firstEvent = null; - let timeout; + var firstEvent = null; + var timeout; document.documentElement.addEventListener("click", (event) => { - const TIME_MAX = 450; - const PAGE_MAX = 44; + var TIME_MAX = 450; + var PAGE_MAX = 44; clearTimeout(timeout); if (firstEvent && Math.abs(event.pageX - firstEvent.pageX) <= PAGE_MAX && Math.abs(event.pageY - firstEvent.pageY) <= PAGE_MAX && event.timeStamp - firstEvent.timeStamp <= TIME_MAX) { event.preventDefault(); @@ -6444,11 +7368,11 @@ if (!dict.length) { return (v2) => v2; } - const getDict = (value, includeValue = true) => { + var getDict = (value, includeValue = true) => { if (typeof value === "number") { return dict[value]; } - const res = {}; + var res = {}; value.forEach(([n, v2]) => { if (includeValue) { res[getDict(n)] = getDict(v2); @@ -6498,8 +7422,8 @@ this.$.textContent = text2; } insert(parentNodeId, refNodeId) { - const node = this.$; - const parentNode = $(parentNodeId); + var node = this.$; + var parentNode = $(parentNodeId); if (refNodeId === -1) { parentNode.appendChild(node); } else { @@ -6508,7 +7432,9 @@ this.isMounted = true; } remove() { - const { $: $2 } = this; + var { + $: $2 + } = this; $2.parentNode.removeChild($2); this.isUnmounted = true; removeElement(this.id); @@ -6524,7 +7450,7 @@ el.className = clazz; } function patchStyle(el, value) { - const style = el.style; + var style = el.style; if (isString(value)) { if (value === "") { el.removeAttribute("style"); @@ -6532,12 +7458,12 @@ style.cssText = rpx2px$1(value, true); } } else { - for (const key in value) { - setStyle(style, key, value[key]); + for (var key2 in value) { + setStyle(style, key2, value[key2]); } } } - const importantRE = /\s*!important$/; + var importantRE = /\s*!important$/; function setStyle(style, name, val) { if (isArray(val)) { val.forEach((v2) => setStyle(style, name, v2)); @@ -6546,7 +7472,7 @@ if (name.startsWith("--")) { style.setProperty(name, val); } else { - const prefixed = autoPrefix(style, name); + var prefixed = autoPrefix(style, name); if (importantRE.test(val)) { style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important"); } else { @@ -6555,20 +7481,20 @@ } } } - const prefixes = ["Webkit"]; - const prefixCache = {}; + var prefixes = ["Webkit"]; + var prefixCache = {}; function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; + var cached = prefixCache[rawName]; if (cached) { return cached; } - let name = camelize(rawName); + var name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache[rawName] = name; } name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; + for (var i2 = 0; i2 < prefixes.length; i2++) { + var prefixed = prefixes[i2] + name; if (prefixed in style) { return prefixCache[rawName] = prefixed; } @@ -6576,18 +7502,18 @@ return rawName; } function patchEvent(el, name, flag) { - const [type, options] = parseEventName(name); + var [type, options] = parseEventName(name); if (flag === -1) { - const listener = el.__listeners[type]; + var listener = el.__listeners[type]; if (listener) { el.removeEventListener(type, listener); } else { - console.error(formatLog(`tag`, el.tagName, el.__id, "event[" + type + "] not found")); + console.error(formatLog("tag", el.tagName, el.__id, "event[" + type + "] not found")); } } else { if (el.__listeners[type]) { { - console.error(formatLog(`tag`, el.tagName, el.__id, "event[" + type + "] already registered")); + console.error(formatLog("tag", el.tagName, el.__id, "event[" + type + "] already registered")); } return; } @@ -6596,8 +7522,8 @@ } } function createInvoker(id2, flag, options) { - const invoker = (evt) => { - const event = $nne(evt); + var invoker = (evt) => { + var event = $nne(evt); event.type = normalizeEventType(evt.type, options); UniViewJSBridge.publishHandler(VD_SYNC, [[ACTION_TYPE_EVENT, id2, event]]); }; @@ -6607,7 +7533,7 @@ return withModifiers(invoker, resolveModifier(flag)); } function resolveModifier(flag) { - const modifiers = []; + var modifiers = []; if (flag & EventModifierFlags.prevent) { modifiers.push("prevent"); } @@ -6619,13 +7545,13 @@ } return modifiers; } - const postActionJobs = new Set(); + var postActionJobs = new Set(); function queuePostActionJob(job) { postActionJobs.add(job); } function flushPostActionJobs() { { - console.log(formatLog(`flushPostActionJobs`, postActionJobs.size)); + console.log(formatLog("flushPostActionJobs", postActionJobs.size)); } try { postActionJobs.forEach((fn) => fn()); @@ -6633,7 +7559,7 @@ postActionJobs.clear(); } } - const JSON_PROTOCOL_LEN = JSON_PROTOCOL.length; + var JSON_PROTOCOL_LEN = JSON_PROTOCOL.length; function decodeAttr(value) { if (isString(value) && value.indexOf(JSON_PROTOCOL) === 0) { value = JSON.parse(value.substr(JSON_PROTOCOL_LEN)); @@ -6668,7 +7594,9 @@ super.init(nodeJson); watch(this.$props, () => { queuePostActionJob(this._update); - }, { flush: "sync" }); + }, { + flush: "sync" + }); this.update(true); } setAttrs(attrs2) { @@ -6736,50 +7664,12 @@ } } var text$1 = "uni-text[selectable] {\n cursor: auto;\n -webkit-user-select: text;\n user-select: text;\n}\n"; - var subscriber = { - mounted() { - this._toggleListeners("subscribe", this.id); - this.$watch("id", (newId, oldId) => { - this._toggleListeners("unsubscribe", oldId, true); - this._toggleListeners("subscribe", newId, true); - }); - }, - beforeDestroy() { - this._toggleListeners("unsubscribe", this.id); - if (this._contextId) { - this._toggleListeners("unsubscribe", this._contextId); - } - }, - methods: { - _toggleListeners(type, id2, watch2) { - if (watch2 && !id2) { - return; - } - if (!isFunction(this._handleSubscribe)) { - return; - } - UniViewJSBridge[type](this.$page.id + "-" + this.$options.name.replace(/VUni([A-Z])/, "$1").toLowerCase() + "-" + id2, this._handleSubscribe); - }, - _getContextInfo() { - const id2 = `context-${this._uid}`; - if (!this._contextId) { - this._toggleListeners("subscribe", id2); - this._contextId = id2; - } - return { - name: this.$options.name.replace(/VUni([A-Z])/, "$1").toLowerCase(), - id: id2, - page: this.$page.id - }; - } - } - }; function throttle(fn, wait) { - let last = 0; - let timeout; - let waitCallback; - const newFn = function(...arg) { - const now = Date.now(); + var last = 0; + var timeout; + var waitCallback; + var newFn = function(...arg) { + var now = Date.now(); clearTimeout(timeout); waitCallback = () => { waitCallback = null; @@ -6802,247 +7692,69 @@ }; return newFn; } - const _sfc_main = { - name: "Audio", - mixins: [subscriber], - props: { - id: { - type: String, - default: "" - }, - src: { - type: String, - default: "" - }, - loop: { - type: [Boolean, String], - default: false - }, - controls: { - type: [Boolean, String], - default: false - }, - poster: { - type: String, - default: "" - }, - name: { - type: String, - default: "" - }, - author: { - type: String, - default: "" - } - }, - data() { - return { - playing: false, - currentTime: this.getTime(0) - }; - }, - watch: { - src(val) { - if (this.$refs.audio) { - this.$refs.audio.src = this.$getRealPath(val); - } - } - }, - mounted() { - const audio2 = this.$refs.audio; - audio2.addEventListener("error", ($event) => { - this.playing = false; - this.$trigger("error", $event, {}); - }); - audio2.addEventListener("play", ($event) => { - this.playing = true; - this.$trigger("play", $event, {}); - }); - audio2.addEventListener("pause", ($event) => { - this.playing = false; - this.$trigger("pause", $event, {}); - }); - audio2.addEventListener("ended", ($event) => { - this.playing = false; - this.$trigger("ended", $event, {}); - }); - audio2.addEventListener("timeupdate", ($event) => { - var currentTime = audio2.currentTime; - this.currentTime = this.getTime(currentTime); - var duration = audio2.duration; - this.$trigger("timeupdate", $event, { - currentTime, - duration - }); - }); - audio2.src = this.$getRealPath(this.src); - }, - methods: { - _handleSubscribe({ - type, - data = {} - }) { - var audio2 = this.$refs.audio; - switch (type) { - case "setSrc": - audio2.src = this.$getRealPath(data.src); - this.$emit("update:src", data.src); - break; - case "play": - audio2.play(); - break; - case "pause": - audio2.pause(); - break; - case "seek": - audio2.currentTime = data.position; - break; - } - }, - trigger() { - if (this.playing) { - this.$refs.audio.pause(); - } else { - this.$refs.audio.play(); - } - }, - getTime(time) { - var h2 = Math.floor(time / 3600); - var m = Math.floor(time % 3600 / 60); - var s = Math.floor(time % 3600 % 60); - h2 = (h2 < 10 ? "0" : "") + h2; - m = (m < 10 ? "0" : "") + m; - s = (s < 10 ? "0" : "") + s; - var str = m + ":" + s; - if (h2 !== "00") { - str = h2 + ":" + str; - } - return str; - } - } - }; - const _hoisted_1 = { class: "uni-audio-default" }; - const _hoisted_2 = { class: "uni-audio-right" }; - const _hoisted_3 = { class: "uni-audio-time" }; - const _hoisted_4 = { class: "uni-audio-info" }; - const _hoisted_5 = { class: "uni-audio-name" }; - const _hoisted_6 = { class: "uni-audio-author" }; - function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createBlock("uni-audio", mergeProps({ - id: $props.id, - controls: !!$props.controls - }, _ctx.$attrs), [ - createVNode("audio", { - ref: "audio", - loop: $props.loop, - style: { "display": "none" } - }, null, 8, ["loop"]), - createVNode("div", _hoisted_1, [ - createVNode("div", { - style: "background-image: url(" + _ctx.$getRealPath($props.poster) + ");", - class: "uni-audio-left" - }, [ - createVNode("div", { - class: [{ play: !$data.playing, pause: $data.playing }, "uni-audio-button"], - onClick: _cache[1] || (_cache[1] = (...args) => $options.trigger && $options.trigger(...args)) - }, null, 2) - ], 4), - createVNode("div", _hoisted_2, [ - createVNode("div", _hoisted_3, toDisplayString($data.currentTime), 1), - createVNode("div", _hoisted_4, [ - createVNode("div", _hoisted_5, toDisplayString($props.name), 1), - createVNode("div", _hoisted_6, toDisplayString($props.author), 1) - ]) - ]) - ]) - ], 16, ["id", "controls"]); - } - _sfc_main.render = _sfc_render; function converPx(value) { if (/^-?\d+[ur]px$/i.test(value)) { return value.replace(/(^-?\d+)[ur]px$/i, (text2, num) => { - return `${uni.upx2px(parseFloat(num))}px`; + return "".concat(uni.upx2px(parseFloat(num)), "px"); }); } else if (/^-?[\d\.]+$/.test(value)) { - return `${value}px`; + return "".concat(value, "px"); } return value || ""; } function converType(type) { return type.replace(/[A-Z]/g, (text2) => { - return `-${text2.toLowerCase()}`; + return "-".concat(text2.toLowerCase()); }).replace("webkit", "-webkit"); } function getStyle(action) { - const animateTypes1 = [ - "matrix", - "matrix3d", - "scale", - "scale3d", - "rotate3d", - "skew", - "translate", - "translate3d" - ]; - const animateTypes2 = [ - "scaleX", - "scaleY", - "scaleZ", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skewX", - "skewY", - "translateX", - "translateY", - "translateZ" - ]; - const animateTypes3 = ["opacity", "background-color"]; - const animateTypes4 = ["width", "height", "left", "right", "top", "bottom"]; - const animates = action.animates; - const option = action.option; - const transition = option.transition; - const style = {}; - const transform = []; + var animateTypes1 = ["matrix", "matrix3d", "scale", "scale3d", "rotate3d", "skew", "translate", "translate3d"]; + var animateTypes2 = ["scaleX", "scaleY", "scaleZ", "rotate", "rotateX", "rotateY", "rotateZ", "skewX", "skewY", "translateX", "translateY", "translateZ"]; + var animateTypes3 = ["opacity", "background-color"]; + var animateTypes4 = ["width", "height", "left", "right", "top", "bottom"]; + var animates = action.animates; + var option = action.option; + var transition = option.transition; + var style = {}; + var transform = []; animates.forEach((animate) => { - let type = animate.type; - let args = [...animate.args]; + var type = animate.type; + var args = [...animate.args]; if (animateTypes1.concat(animateTypes2).includes(type)) { if (type.startsWith("rotate") || type.startsWith("skew")) { - args = args.map((value) => parseFloat(value) + "deg"); + args = args.map((value2) => parseFloat(value2) + "deg"); } else if (type.startsWith("translate")) { args = args.map(converPx); } if (animateTypes2.indexOf(type) >= 0) { args.length = 1; } - transform.push(`${type}(${args.join(",")})`); + transform.push("".concat(type, "(").concat(args.join(","), ")")); } else if (animateTypes3.concat(animateTypes4).includes(args[0])) { type = args[0]; - const value = args[1]; + var value = args[1]; style[type] = animateTypes4.includes(type) ? converPx(value) : value; } }); style.transform = style.webkitTransform = transform.join(" "); - style.transition = style.webkitTransition = Object.keys(style).map((type) => `${converType(type)} ${transition.duration}ms ${transition.timingFunction} ${transition.delay}ms`).join(","); + style.transition = style.webkitTransition = Object.keys(style).map((type) => "".concat(converType(type), " ").concat(transition.duration, "ms ").concat(transition.timingFunction, " ").concat(transition.delay, "ms")).join(","); style.transformOrigin = style.webkitTransformOrigin = option.transformOrigin; return style; } function startAnimation(context) { - const animation2 = context.animation; + var animation2 = context.animation; if (!animation2 || !animation2.actions || !animation2.actions.length) { return; } - let index2 = 0; - const actions = animation2.actions; - const length = animation2.actions.length; + var index2 = 0; + var actions = animation2.actions; + var length = animation2.actions.length; function animate() { - const action = actions[index2]; - const transition = action.option.transition; - const style = getStyle(action); - Object.keys(style).forEach((key) => { - context.$el.style[key] = style[key]; + var action = actions[index2]; + var transition = action.option.transition; + var style = getStyle(action); + Object.keys(style).forEach((key2) => { + context.$el.style[key2] = style[key2]; }); index2 += 1; if (index2 < length) { @@ -7067,20 +7779,23 @@ startAnimation(this); } }; - const defineBuiltInComponent = (options) => { - const { props: props2, mixins } = options; + var defineBuiltInComponent = (options) => { + var { + props: props2, + mixins + } = options; if (!props2 || !props2.animation) { (mixins || (options.mixins = [])).push(animation); } return defineSystemComponent(options); }; - const defineSystemComponent = (options) => { + var defineSystemComponent = (options) => { options.compatConfig = { MODE: 3 }; return defineComponent(options); }; - const hoverProps = { + var hoverProps = { hoverClass: { type: String, default: "none" @@ -7099,10 +7814,10 @@ } }; function useHover(props2) { - const hovering = ref(false); - let hoverTouch = false; - let hoverStartTimer; - let hoverStayTimer; + var hovering = ref(false); + var hoverTouch = false; + var hoverStartTimer; + var hoverStayTimer; function hoverReset() { requestAnimationFrame(() => { clearTimeout(hoverStayTimer); @@ -7156,9 +7871,9 @@ if (isString(keys)) { keys = [keys]; } - return keys.reduce((res, key) => { - if (props2[key]) { - res[key] = true; + return keys.reduce((res, key2) => { + if (props2[key2]) { + res[key2] = true; } return res; }, Object.create(null)); @@ -7179,7 +7894,7 @@ }; } function normalizeCustomEvent(name, domEvt, el, detail) { - const target = normalizeTarget(el); + var target = normalizeTarget(el); return { type: detail.type || name, timeStamp: domEvt.timeStamp || 0, @@ -7188,7 +7903,7 @@ detail }; } - const uniFormKey = PolySymbol("uniForm"); + var uniFormKey = PolySymbol("uniForm"); var Form = /* @__PURE__ */ defineBuiltInComponent({ name: "Form", emits: ["submit", "reset"], @@ -7196,7 +7911,7 @@ slots, emit: emit2 }) { - const rootRef = ref(null); + var rootRef = ref(null); provideForm(useCustomEvent(rootRef, emit2)); return () => createVNode("uni-form", { "ref": rootRef @@ -7206,7 +7921,7 @@ } }); function provideForm(trigger2) { - const fields2 = []; + var fields2 = []; provide(uniFormKey, { addField(field) { fields2.push(field); @@ -7218,7 +7933,7 @@ trigger2("submit", evt, { value: fields2.reduce((res, field) => { if (field.submit) { - const [name, value] = field.submit(); + var [name, value] = field.submit(); name && (res[name] = value); } return res; @@ -7232,8 +7947,8 @@ }); return fields2; } - const uniLabelKey = PolySymbol("uniLabel"); - const props$r = { + var uniLabelKey = PolySymbol("uniLabel"); + var props$r = { for: { type: String, default: "" @@ -7245,12 +7960,12 @@ setup(props2, { slots }) { - const pageId = useCurrentPageId(); - const handlers = useProvideLabel(); - const pointer = computed$1(() => props2.for || slots.default && slots.default.length); - const _onClick = withWebEvent(($event) => { - const EventTarget = $event.target; - let stopPropagation = /^uni-(checkbox|radio|switch)-/.test(EventTarget.className); + var pageId = useCurrentPageId(); + var handlers = useProvideLabel(); + var pointer = computed$1(() => props2.for || slots.default && slots.default.length); + var _onClick = withWebEvent(($event) => { + var EventTarget = $event.target; + var stopPropagation = /^uni-(checkbox|radio|switch)-/.test(EventTarget.className); if (!stopPropagation) { stopPropagation = /^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(EventTarget.tagName); } @@ -7274,7 +7989,7 @@ } }); function useProvideLabel() { - const handlers = []; + var handlers = []; provide(uniLabelKey, { addHandler(handler) { handlers.push(handler); @@ -7296,7 +8011,7 @@ }); } function _addListeners(id2, listeners, watch2) { - const pageId = useCurrentPageId(); + var pageId = useCurrentPageId(); if (watch2 && !id2) { return; } @@ -7306,19 +8021,19 @@ Object.keys(listeners).forEach((name) => { if (watch2) { if (name.indexOf("@") !== 0 && name.indexOf("uni-") !== 0) { - UniViewJSBridge.on(`uni-${name}-${pageId}-${id2}`, listeners[name]); + UniViewJSBridge.on("uni-".concat(name, "-").concat(pageId, "-").concat(id2), listeners[name]); } } else { if (name.indexOf("uni-") === 0) { UniViewJSBridge.on(name, listeners[name]); } else if (id2) { - UniViewJSBridge.on(`uni-${name}-${pageId}-${id2}`, listeners[name]); + UniViewJSBridge.on("uni-".concat(name, "-").concat(pageId, "-").concat(id2), listeners[name]); } } }); } function _removeListeners(id2, listeners, watch2) { - const pageId = useCurrentPageId(); + var pageId = useCurrentPageId(); if (watch2 && !id2) { return; } @@ -7328,13 +8043,13 @@ Object.keys(listeners).forEach((name) => { if (watch2) { if (name.indexOf("@") !== 0 && name.indexOf("uni-") !== 0) { - UniViewJSBridge.off(`uni-${name}-${pageId}-${id2}`, listeners[name]); + UniViewJSBridge.off("uni-".concat(name, "-").concat(pageId, "-").concat(id2), listeners[name]); } } else { if (name.indexOf("uni-") === 0) { UniViewJSBridge.off(name, listeners[name]); } else if (id2) { - UniViewJSBridge.off(`uni-${name}-${pageId}-${id2}`, listeners[name]); + UniViewJSBridge.off("uni-".concat(name, "-").concat(pageId, "-").concat(id2), listeners[name]); } } }); @@ -7382,26 +8097,26 @@ setup(props2, { slots }) { - const rootRef = ref(null); + var rootRef = ref(null); { initI18nButtonMsgsOnce(); } - const uniForm = inject(uniFormKey, false); - const { + var uniForm = inject(uniFormKey, false); + var { hovering, binding } = useHover(props2); - const { + var { t: t2 } = useI18n(); - const onClick = withWebEvent((e2, isLabelClick) => { + var onClick = withWebEvent((e2, isLabelClick) => { if (props2.disabled) { return e2.stopImmediatePropagation(); } if (isLabelClick) { rootRef.value.click(); } - const formType = props2.formType; + var formType = props2.formType; if (formType) { if (!uniForm) { return; @@ -7417,7 +8132,7 @@ openFeedback(t2("uni.button.feedback.title"), t2("uni.button.feedback.send")); } }); - const uniLabel = inject(uniLabelKey, false); + var uniLabel = inject(uniLabelKey, false); if (uniLabel) { uniLabel.addHandler(onClick); onBeforeUnmount(() => { @@ -7428,10 +8143,10 @@ "label-click": onClick }); return () => { - const hoverClass = props2.hoverClass; - const booleanAttrs = useBooleanAttr(props2, "disabled"); - const loadingAttrs = useBooleanAttr(props2, "loading"); - const hasHoverClass = hoverClass && hoverClass !== "none"; + var hoverClass = props2.hoverClass; + var booleanAttrs = useBooleanAttr(props2, "disabled"); + var loadingAttrs = useBooleanAttr(props2, "loading"); + var hasHoverClass = hoverClass && hoverClass !== "none"; return createVNode("uni-button", mergeProps({ "ref": rootRef, "onClick": onClick, @@ -7443,7 +8158,7 @@ } }); function openFeedback(titleText, sendText) { - const feedback = plus.webview.create("https://service.dcloud.net.cn/uniapp/feedback.html", "feedback", { + var feedback = plus.webview.create("https://service.dcloud.net.cn/uniapp/feedback.html", "feedback", { titleNView: { titleText, autoBackButton: true, @@ -7474,9 +8189,9 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const reset2 = useResizeSensorReset(rootRef); - const update = useResizeSensorUpdate(rootRef, emit2, reset2); + var rootRef = ref(null); + var reset2 = useResizeSensorReset(rootRef); + var update = useResizeSensorUpdate(rootRef, emit2, reset2); useResizeSensorLifecycle(rootRef, props2, update, reset2); return () => createVNode("uni-resize-sensor", { "ref": rootRef, @@ -7492,13 +8207,13 @@ } }); function useResizeSensorUpdate(rootRef, emit2, reset2) { - const size2 = reactive({ + var size2 = reactive({ width: -1, height: -1 }); watch(() => extend({}, size2), (value) => emit2("resize", value)); return () => { - const rootEl = rootRef.value; + var rootEl = rootRef.value; size2.width = rootEl.offsetWidth; size2.height = rootEl.offsetHeight; reset2(); @@ -7506,7 +8221,7 @@ } function useResizeSensorReset(rootRef) { return () => { - const { + var { firstElementChild, lastElementChild } = rootRef.value; @@ -7522,7 +8237,7 @@ if (props2.initial) { nextTick(update); } - const rootEl = rootRef.value; + var rootEl = rootRef.value; if (rootEl.offsetParent !== rootEl.parentElement) { rootEl.parentElement.style.position = "relative"; } @@ -7531,11 +8246,11 @@ } }); } - const pixelRatio = /* @__PURE__ */ function() { - const canvas2 = document.createElement("canvas"); + var pixelRatio = /* @__PURE__ */ function() { + var canvas2 = document.createElement("canvas"); canvas2.height = canvas2.width = 0; - const context = canvas2.getContext("2d"); - const backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + var context = canvas2.getContext("2d"); + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; return (window.devicePixelRatio || 1) / backingStore; }(); function wrapper(canvas2) { @@ -7543,20 +8258,20 @@ canvas2.height = canvas2.offsetHeight * pixelRatio; canvas2.getContext("2d").__hidpi__ = true; } - let isHidpi = false; + var isHidpi = false; function initHidpi() { if (isHidpi) { return; } isHidpi = true; - const forEach = function(obj, func) { - for (const key in obj) { - if (hasOwn$1(obj, key)) { - func(obj[key], key); + var forEach = function(obj, func) { + for (var key2 in obj) { + if (hasOwn$1(obj, key2)) { + func(obj[key2], key2); } } }; - const ratioArgs = { + var ratioArgs = { fillRect: "all", clearRect: "all", strokeRect: "all", @@ -7574,8 +8289,8 @@ createLinearGradient: "all", setTransform: [4, 5] }; - const proto = CanvasRenderingContext2D.prototype; - proto.drawImageByCanvas = function(_super) { + var proto2 = CanvasRenderingContext2D.prototype; + proto2.drawImageByCanvas = function(_super) { return function(canvas2, srcx, srcy, srcw, srch, desx, desy, desw, desh, isScale) { if (!this.__hidpi__) { return _super.apply(this, arguments); @@ -7590,29 +8305,29 @@ desh = isScale ? desh * pixelRatio : desh; _super.call(this, canvas2, srcx, srcy, srcw, srch, desx, desy, desw, desh); }; - }(proto.drawImage); + }(proto2.drawImage); if (pixelRatio !== 1) { - forEach(ratioArgs, function(value, key) { - proto[key] = function(_super) { + forEach(ratioArgs, function(value, key2) { + proto2[key2] = function(_super) { return function() { if (!this.__hidpi__) { return _super.apply(this, arguments); } - let args = Array.prototype.slice.call(arguments); + var args = Array.prototype.slice.call(arguments); if (value === "all") { args = args.map(function(a2) { return a2 * pixelRatio; }); } else if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - args[value[i]] *= pixelRatio; + for (var i2 = 0; i2 < value.length; i2++) { + args[value[i2]] *= pixelRatio; } } return _super.apply(this, args); }; - }(proto[key]); + }(proto2[key2]); }); - proto.stroke = function(_super) { + proto2.stroke = function(_super) { return function() { if (!this.__hidpi__) { return _super.apply(this, arguments); @@ -7621,13 +8336,13 @@ _super.apply(this, arguments); this.lineWidth /= pixelRatio; }; - }(proto.stroke); - proto.fillText = function(_super) { + }(proto2.stroke); + proto2.fillText = function(_super) { return function() { if (!this.__hidpi__) { return _super.apply(this, arguments); } - const args = Array.prototype.slice.call(arguments); + var args = Array.prototype.slice.call(arguments); args[1] *= pixelRatio; args[2] *= pixelRatio; var font2 = this.font; @@ -7637,8 +8352,8 @@ _super.apply(this, args); this.font = font2; }; - }(proto.fillText); - proto.strokeText = function(_super) { + }(proto2.fillText); + proto2.strokeText = function(_super) { return function() { if (!this.__hidpi__) { return _super.apply(this, arguments); @@ -7653,8 +8368,8 @@ _super.apply(this, args); this.font = font2; }; - }(proto.strokeText); - proto.drawImage = function(_super) { + }(proto2.strokeText); + proto2.drawImage = function(_super) { return function() { if (!this.__hidpi__) { return _super.apply(this, arguments); @@ -7663,10 +8378,10 @@ _super.apply(this, arguments); this.scale(1 / pixelRatio, 1 / pixelRatio); }; - }(proto.drawImage); + }(proto2.drawImage); } } - const initHidpiOnce = /* @__PURE__ */ once(() => { + var initHidpiOnce = /* @__PURE__ */ once(() => { return initHidpi(); }); function $getRealPath(src) { @@ -7678,9 +8393,9 @@ return "rgba(" + color.join(",") + ")"; } function processTouches(target, touches) { - const eventTarget = target; + var eventTarget = target; return Array.from(touches).map((touch) => { - let boundingClientRect = eventTarget.getBoundingClientRect(); + var boundingClientRect = eventTarget.getBoundingClientRect(); return { identifier: touch.identifier, x: touch.clientX - boundingClientRect.left, @@ -7688,7 +8403,7 @@ }; }); } - let tempCanvas; + var tempCanvas; function getTempCanvas(width = 0, height = 0) { if (!tempCanvas) { tempCanvas = document.createElement("canvas"); @@ -7697,7 +8412,7 @@ tempCanvas.height = height; return tempCanvas; } - const props$q = { + var props$q = { canvasId: { type: String, default: "" @@ -7724,21 +8439,21 @@ slots }) { initHidpiOnce(); - const canvas2 = ref(null); - const sensor = ref(null); - const actionsWaiting = ref(false); - const trigger2 = useNativeEvent(emit2); - const { + var canvas2 = ref(null); + var sensor = ref(null); + var actionsWaiting = ref(false); + var trigger2 = useNativeEvent(emit2); + var { $attrs, $excludeAttrs, $listeners } = useAttrs({ excludeListeners: true }); - const { + var { _listeners } = useListeners(props2, $listeners, trigger2); - const { + var { _handleSubscribe, _resize } = useMethods(canvas2, actionsWaiting); @@ -7747,7 +8462,7 @@ _resize(); }); return () => { - const { + var { canvasId, disableScroll } = props2; @@ -7772,28 +8487,28 @@ } }); function useListeners(props2, Listeners, trigger2) { - const _listeners = computed$1(() => { - let events = ["onTouchstart", "onTouchmove", "onTouchend"]; - let _$listeners = Listeners.value; - let $listeners = extend({}, (() => { - let obj = {}; - for (const key in _$listeners) { - if (Object.prototype.hasOwnProperty.call(_$listeners, key)) { - const event = _$listeners[key]; - obj[key] = event; + var _listeners = computed$1(() => { + var events = ["onTouchstart", "onTouchmove", "onTouchend"]; + var _$listeners = Listeners.value; + var $listeners = extend({}, (() => { + var obj = {}; + for (var key2 in _$listeners) { + if (Object.prototype.hasOwnProperty.call(_$listeners, key2)) { + var event = _$listeners[key2]; + obj[key2] = event; } } return obj; })()); events.forEach((event) => { - let existing = $listeners[event]; - let eventHandler = []; + var existing = $listeners[event]; + var eventHandler = []; if (existing) { eventHandler.push(withWebEvent(($event) => { trigger2(event.replace("on", "").toLocaleLowerCase(), extend({}, (() => { - let obj = {}; - for (const key in $event) { - obj[key] = $event[key]; + var obj = {}; + for (var key2 in $event) { + obj[key2] = $event[key2]; } return obj; })(), { @@ -7814,8 +8529,8 @@ }; } function useMethods(canvasRef, actionsWaiting) { - let _actionsDefer = []; - let _images = {}; + var _actionsDefer = []; + var _images = {}; function _resize() { var canvas2 = canvasRef.value; if (canvas2.width > 0 && canvas2.height > 0) { @@ -7851,56 +8566,56 @@ c2d.clearRect(0, 0, canvas2.width, canvas2.height); } preloadImage(actions); - for (let index2 = 0; index2 < actions.length; index2++) { - const action = actions[index2]; - let method = action.method; - const data = action.data; + var _loop = function(index3) { + var action = actions[index3]; + var method = action.method; + var data = action.data; if (/^set/.test(method) && method !== "setTransform") { - const method1 = method[3].toLowerCase() + method.slice(4); - let color; + var method1 = method[3].toLowerCase() + method.slice(4); + var color; if (method1 === "fillStyle" || method1 === "strokeStyle") { if (data[0] === "normal") { color = resolveColor(data[1]); } else if (data[0] === "linear") { - const LinearGradient = c2d.createLinearGradient(...data[1]); + var LinearGradient = c2d.createLinearGradient(...data[1]); data[2].forEach(function(data2) { - const offset = data2[0]; - const color2 = resolveColor(data2[1]); + var offset = data2[0]; + var color2 = resolveColor(data2[1]); LinearGradient.addColorStop(offset, color2); }); color = LinearGradient; } else if (data[0] === "radial") { - const x = data[1][0]; - const y = data[1][1]; - const r = data[1][2]; - const LinearGradient = c2d.createRadialGradient(x, y, 0, x, y, r); + var x = data[1][0]; + var y = data[1][1]; + var r = data[1][2]; + var _LinearGradient = c2d.createRadialGradient(x, y, 0, x, y, r); data[2].forEach(function(data2) { - const offset = data2[0]; - const color2 = resolveColor(data2[1]); - LinearGradient.addColorStop(offset, color2); + var offset = data2[0]; + var color2 = resolveColor(data2[1]); + _LinearGradient.addColorStop(offset, color2); }); - color = LinearGradient; + color = _LinearGradient; } else if (data[0] === "pattern") { - const loaded = checkImageLoaded(data[1], actions.slice(index2 + 1), resolve, function(image2) { + var loaded = checkImageLoaded(data[1], actions.slice(index3 + 1), resolve, function(image2) { if (image2) { c2d[method1] = c2d.createPattern(image2, data[2]); } }); if (!loaded) { - break; + return "break"; } - continue; + return "continue"; } c2d[method1] = color; } else if (method1 === "globalAlpha") { c2d[method1] = Number(data[0]) / 255; } else if (method1 === "shadow") { - var _ = ["shadowOffsetX", "shadowOffsetY", "shadowBlur", "shadowColor"]; + _ = ["shadowOffsetX", "shadowOffsetY", "shadowBlur", "shadowColor"]; data.forEach(function(color_, method_) { c2d[_[method_]] = _[method_] === "shadowColor" ? resolveColor(color_) : color_; }); } else if (method1 === "fontSize") { - const font2 = c2d.__font__ || c2d.font; + var font2 = c2d.__font__ || c2d.font; c2d.__font__ = c2d.font = font2.replace(/\d+\.?\d*px/, data[0] + "px"); } else if (method1 === "lineDash") { c2d.setLineDash(data[0]); @@ -7925,12 +8640,12 @@ } else if (method === "fillText") { c2d.fillText.apply(c2d, data); } else if (method === "drawImage") { - var A = function() { + A = function() { var dataArray = [...data]; var url = dataArray[0]; var otherData = dataArray.slice(1); _images = _images || {}; - if (checkImageLoaded(url, actions.slice(index2 + 1), resolve, function(image2) { + if (checkImageLoaded(url, actions.slice(index3 + 1), resolve, function(image2) { if (image2) { c2d.drawImage.apply(c2d, [image2].concat([...otherData.slice(4, 8)], [...otherData.slice(0, 4)])); } @@ -7938,7 +8653,7 @@ return "break"; }(); if (A === "break") { - break; + return "break"; } } else { if (method === "clip") { @@ -7950,6 +8665,15 @@ c2d[method].apply(c2d, data); } } + }; + for (var index2 = 0; index2 < actions.length; index2++) { + var _; + var A; + var _ret = _loop(index2); + if (_ret === "break") + break; + if (_ret === "continue") + continue; } if (!actionsWaiting.value) { resolve({ @@ -7975,7 +8699,7 @@ loadImage(); } function loadImage() { - const image2 = _images[src] = new Image(); + var image2 = _images[src] = new Image(); image2.onload = function() { image2.ready = true; }; @@ -8031,11 +8755,11 @@ quality = 1, type = "png" }, resolve) { - const canvas2 = canvasRef.value; - let data; - const maxWidth = canvas2.offsetWidth - x; + var canvas2 = canvasRef.value; + var data; + var maxWidth = canvas2.offsetWidth - x; width = width ? Math.min(width, maxWidth) : maxWidth; - const maxHeight = canvas2.offsetHeight - y; + var maxHeight = canvas2.offsetHeight - y; height = height ? Math.min(height, maxHeight) : maxHeight; if (!hidpi) { if (!destWidth && !destHeight) { @@ -8050,8 +8774,8 @@ destWidth = width; destHeight = height; } - const newCanvas = getTempCanvas(destWidth, destHeight); - const context = newCanvas.getContext("2d"); + var newCanvas = getTempCanvas(destWidth, destHeight); + var context = newCanvas.getContext("2d"); if (type === "jpeg" || type === "jpg") { type = "jpeg"; context.fillStyle = "#fff"; @@ -8059,15 +8783,15 @@ } context.__hidpi__ = true; context.drawImageByCanvas(canvas2, x, y, width, height, 0, 0, destWidth, destHeight, false); - let result; + var result; try { - let compressed; + var compressed; if (dataType === "base64") { - data = newCanvas.toDataURL(`image/${type}`, quality); + data = newCanvas.toDataURL("image/".concat(type), quality); } else { - const imgData = context.getImageData(0, 0, destWidth, destHeight); + var imgData = context.getImageData(0, 0, destWidth, destHeight); if (true) { - const pako = require("pako"); + var pako = require("pako"); data = pako.deflateRaw(imgData.data, { to: "string" }); @@ -8082,7 +8806,7 @@ }; } catch (error) { result = { - errMsg: `canvasGetImageData:fail ${error}` + errMsg: "canvasGetImageData:fail ".concat(error) }; } newCanvas.height = newCanvas.width = 0; @@ -8105,10 +8829,10 @@ if (!height) { height = Math.round(data.length / 4 / width); } - const canvas2 = getTempCanvas(width, height); - const context = canvas2.getContext("2d"); + var canvas2 = getTempCanvas(width, height); + var context = canvas2.getContext("2d"); if (compressed) { - const pako = require("pako"); + var pako = require("pako"); data = pako.inflateRaw(data); } context.putImageData(new ImageData(new Uint8ClampedArray(data), width, height), 0, 0); @@ -8135,7 +8859,7 @@ quality, dirname }, resolve) { - const res = getImageData({ + var res = getImageData({ x, y, width, @@ -8155,14 +8879,14 @@ } saveImage(res.data); } - const methods2 = { + var methods2 = { actionsChanged, getImageData, putImageData, toTempFilePath }; function _handleSubscribe(type, data, resolve) { - let method = methods2[type]; + var method = methods2[type]; if (type.indexOf("_") !== 0 && typeof method === "function") { method(data, resolve); } @@ -8172,8 +8896,8 @@ _handleSubscribe }); } - const uniCheckGroupKey = PolySymbol("uniCheckGroup"); - const props$p = { + var uniCheckGroupKey = PolySymbol("uniCheckGroup"); + var props$p = { name: { type: String, default: "" @@ -8187,8 +8911,8 @@ emit: emit2, slots }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); useProvideCheckGroup(props2, trigger2); return () => { return createVNode("uni-checkbox-group", { @@ -8200,8 +8924,8 @@ } }); function useProvideCheckGroup(props2, trigger2) { - const fields2 = []; - const getFieldsValue = () => fields2.reduce((res, field) => { + var fields2 = []; + var getFieldsValue = () => fields2.reduce((res, field) => { if (field.value.checkboxChecked) { res.push(field.value.value); } @@ -8220,11 +8944,11 @@ }); } }); - const uniForm = inject(uniFormKey, false); + var uniForm = inject(uniFormKey, false); if (uniForm) { uniForm.addField({ submit: () => { - let data = ["", null]; + var data = ["", null]; if (props2.name !== "") { data[0] = props2.name; data[1] = getFieldsValue(); @@ -8235,7 +8959,7 @@ } return getFieldsValue; } - const props$o = { + var props$o = { checked: { type: [Boolean, String], default: false @@ -8263,20 +8987,20 @@ setup(props2, { slots }) { - const checkboxChecked = ref(props2.checked); - const checkboxValue = ref(props2.value); + var checkboxChecked = ref(props2.checked); + var checkboxValue = ref(props2.value); watch([() => props2.checked, () => props2.value], ([newChecked, newModelValue]) => { checkboxChecked.value = newChecked; checkboxValue.value = newModelValue; }); - const reset2 = () => { + var reset2 = () => { checkboxChecked.value = false; }; - const { + var { uniCheckGroup, uniLabel } = useCheckboxInject(checkboxChecked, checkboxValue, reset2); - const _onClick = ($event) => { + var _onClick = ($event) => { if (props2.disabled) { return; } @@ -8293,7 +9017,7 @@ "label-click": _onClick }); return () => { - const { + var { booleanAttrs } = useBooleanAttr(props2, "disabled"); return createVNode("uni-checkbox", mergeProps(booleanAttrs, { @@ -8311,22 +9035,22 @@ } }); function useCheckboxInject(checkboxChecked, checkboxValue, reset2) { - const field = computed$1(() => ({ + var field = computed$1(() => ({ checkboxChecked: Boolean(checkboxChecked.value), value: checkboxValue.value })); - const formField = { + var formField = { reset: reset2 }; - const uniCheckGroup = inject(uniCheckGroupKey, false); + var uniCheckGroup = inject(uniCheckGroupKey, false); if (!!uniCheckGroup) { uniCheckGroup.addField(field); } - const uniForm = inject(uniFormKey, false); + var uniForm = inject(uniFormKey, false); if (!!uniForm) { uniForm.addField(formField); } - const uniLabel = inject(uniLabelKey, false); + var uniLabel = inject(uniLabelKey, false); onBeforeUnmount(() => { uniCheckGroup && uniCheckGroup.removeField(field); uniForm && uniForm.removeField(formField); @@ -8337,12 +9061,12 @@ uniLabel }; } - let resetTimer; - let isAndroid; - let osVersion; - let keyboardHeight; - let keyboardChangeCallback; - let webviewStyle; + var resetTimer; + var isAndroid; + var osVersion; + var keyboardHeight; + var keyboardChangeCallback; + var webviewStyle; { plusReady(() => { isAndroid = plus.os.name === "Android"; @@ -8357,12 +9081,12 @@ } function setSoftinputTemporary(props2, el, reset2) { plusReady(() => { - const MODE_ADJUSTRESIZE = "adjustResize"; - const MODE_ADJUSTPAN = "adjustPan"; - const MODE_NOTHING = "nothing"; - const currentWebview = plus.webview.currentWebview(); - const style = webviewStyle || currentWebview.getStyle() || {}; - const options = { + var MODE_ADJUSTRESIZE = "adjustResize"; + var MODE_ADJUSTPAN = "adjustPan"; + var MODE_NOTHING = "nothing"; + var currentWebview = plus.webview.currentWebview(); + var style = webviewStyle || currentWebview.getStyle() || {}; + var options = { mode: reset2 || style.softinputMode === MODE_ADJUSTRESIZE ? MODE_ADJUSTRESIZE : props2.adjustPosition ? MODE_ADJUSTPAN : MODE_NOTHING, position: { top: 0, @@ -8370,7 +9094,7 @@ } }; if (options.mode === MODE_ADJUSTPAN) { - const rect = el.getBoundingClientRect(); + var rect = el.getBoundingClientRect(); options.position.top = rect.top; options.position.height = rect.height + (Number(props2.cursorSpacing) || 0); } @@ -8383,9 +9107,11 @@ return; } plusReady(() => { - const currentWebview = plus.webview.currentWebview(); - const { softinputNavBar } = currentWebview.getStyle() || {}; - const showConfirmBar = softinputNavBar !== "none"; + var currentWebview = plus.webview.currentWebview(); + var { + softinputNavBar + } = currentWebview.getStyle() || {}; + var showConfirmBar = softinputNavBar !== "none"; if (showConfirmBar !== props2.showConfirmBar) { state.softinputNavBar = softinputNavBar || "auto"; currentWebview.setStyle({ @@ -8397,17 +9123,17 @@ }); } function resetSoftinputNavBar(state) { - const softinputNavBar = state.softinputNavBar; + var softinputNavBar = state.softinputNavBar; if (softinputNavBar) { plusReady(() => { - const currentWebview = plus.webview.currentWebview(); + var currentWebview = plus.webview.currentWebview(); currentWebview.setStyle({ softinputNavBar }); }); } } - const props$n = { + var props$n = { cursorSpacing: { type: [Number, String], default: 0 @@ -8425,12 +9151,12 @@ default: false } }; - const emit$1 = ["keyboardheightchange"]; + var emit$1 = ["keyboardheightchange"]; function useKeyboard(props2, elRef, trigger2) { - const state = {}; + var state = {}; function initKeyboard(el) { - let focus; - const keyboardChange = () => { + var focus; + var keyboardChange = () => { trigger2("keyboardheightchange", {}, { height: keyboardHeight, duration: 0.25 @@ -8476,13 +9202,13 @@ } if (parseFloat(osVersion) >= 14.6 && !webviewStyle) { plusReady(() => { - const currentWebview = plus.webview.currentWebview(); + var currentWebview = plus.webview.currentWebview(); webviewStyle = currentWebview.getStyle() || {}; }); } } } - const onKeyboardHide = () => { + var onKeyboardHide = () => { document.removeEventListener("click", iosHideKeyboard, false); { keyboardChangeCallback = null; @@ -8620,9 +9346,9 @@ } } if (pos >= 0) { - for (var i = stack2.length - 1; i >= pos; i--) { + for (var i2 = stack2.length - 1; i2 >= pos; i2--) { if (handler.end) { - handler.end(stack2[i]); + handler.end(stack2[i2]); } } stack2.length = pos; @@ -8632,22 +9358,22 @@ function makeMap(str) { var obj = {}; var items = str.split(","); - for (var i = 0; i < items.length; i++) { - obj[items[i]] = true; + for (var i2 = 0; i2 < items.length; i2++) { + obj[items[i2]] = true; } return obj; } - const scripts = {}; + var scripts = {}; function loadScript(globalName, src, callback) { - const globalObject = typeof globalName === "string" ? window[globalName] : globalName; + var globalObject = typeof globalName === "string" ? window[globalName] : globalName; if (globalObject) { callback(); return; } - let callbacks2 = scripts[src]; + var callbacks2 = scripts[src]; if (!callbacks2) { callbacks2 = scripts[src] = []; - const script = document.createElement("script"); + var script = document.createElement("script"); script.src = src; document.body.appendChild(script); script.onload = function() { @@ -8658,7 +9384,7 @@ callbacks2.push(callback); } function divider(Quill) { - const BlockEmbed = Quill.import("blots/block/embed"); + var BlockEmbed = Quill.import("blots/block/embed"); class Divider extends BlockEmbed { } Divider.blotName = "divider"; @@ -8668,7 +9394,7 @@ }; } function ins(Quill) { - const Inline = Quill.import("blots/inline"); + var Inline = Quill.import("blots/inline"); class Ins extends Inline { } Ins.blotName = "ins"; @@ -8678,35 +9404,41 @@ }; } function align(Quill) { - const { Scope, Attributor } = Quill.import("parchment"); - const config = { + var { + Scope, + Attributor + } = Quill.import("parchment"); + var config = { scope: Scope.BLOCK, whitelist: ["left", "right", "center", "justify"] }; - const AlignStyle = new Attributor.Style("align", "text-align", config); + var AlignStyle = new Attributor.Style("align", "text-align", config); return { "formats/align": AlignStyle }; } function direction(Quill) { - const { Scope, Attributor } = Quill.import("parchment"); - const config = { + var { + Scope, + Attributor + } = Quill.import("parchment"); + var config = { scope: Scope.BLOCK, whitelist: ["rtl"] }; - const DirectionStyle = new Attributor.Style("direction", "direction", config); + var DirectionStyle = new Attributor.Style("direction", "direction", config); return { "formats/direction": DirectionStyle }; } function list(Quill) { - const Parchment = Quill.import("parchment"); - const Container = Quill.import("blots/container"); - const ListItem = Quill.import("formats/list/item"); + var Parchment = Quill.import("parchment"); + var Container = Quill.import("blots/container"); + var ListItem = Quill.import("formats/list/item"); class List extends Container { static create(value) { - const tagName = value === "ordered" ? "OL" : "UL"; - const node = super.create(tagName); + var tagName = value === "ordered" ? "OL" : "UL"; + var node = super.create(tagName); if (value === "checked" || value === "unchecked") { node.setAttribute("data-checked", value === "checked"); } @@ -8726,11 +9458,11 @@ } constructor(domNode) { super(domNode); - const listEventHandler = (e2) => { + var listEventHandler = (e2) => { if (e2.target.parentNode !== domNode) return; - const format = this.statics.formats(domNode); - const blot = Parchment.find(e2.target); + var format = this.statics.formats(domNode); + var blot = Parchment.find(e2.target); if (format === "checked") { blot.format("list", "unchecked"); } else if (format === "unchecked") { @@ -8745,20 +9477,22 @@ } } formats() { - return { [this.statics.blotName]: this.statics.formats(this.domNode) }; + return { + [this.statics.blotName]: this.statics.formats(this.domNode) + }; } insertBefore(blot, ref2) { if (blot instanceof ListItem) { super.insertBefore(blot, ref2); } else { - const index2 = ref2 == null ? this.length() : ref2.offset(this); - const after = this.split(index2); + var index2 = ref2 == null ? this.length() : ref2.offset(this); + var after = this.split(index2); after.parent.insertBefore(blot, after); } } optimize(context) { super.optimize(context); - const next = this.next; + var next = this.next; if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute("data-checked") === this.domNode.getAttribute("data-checked")) { next.moveChildren(this); next.remove(); @@ -8766,7 +9500,7 @@ } replace(target) { if (target.statics.blotName !== this.statics.blotName) { - const item = Parchment.create(this.statics.defaultChild); + var item = Parchment.create(this.statics.defaultChild); target.moveChildren(item); this.appendChild(item); } @@ -8783,9 +9517,11 @@ }; } function background(Quill) { - const { Scope } = Quill.import("parchment"); - const BackgroundStyle = Quill.import("formats/background"); - const BackgroundColorStyle = new BackgroundStyle.constructor("backgroundColor", "background-color", { + var { + Scope + } = Quill.import("parchment"); + var BackgroundStyle = Quill.import("formats/background"); + var BackgroundColorStyle = new BackgroundStyle.constructor("backgroundColor", "background-color", { scope: Scope.INLINE }); return { @@ -8793,87 +9529,68 @@ }; } function box(Quill) { - const { Scope, Attributor } = Quill.import("parchment"); - const config = { + var { + Scope, + Attributor + } = Quill.import("parchment"); + var config = { scope: Scope.BLOCK }; - const margin = [ - "margin", - "marginTop", - "marginBottom", - "marginLeft", - "marginRight" - ]; - const padding = [ - "padding", - "paddingTop", - "paddingBottom", - "paddingLeft", - "paddingRight" - ]; - const result = {}; + var margin = ["margin", "marginTop", "marginBottom", "marginLeft", "marginRight"]; + var padding = ["padding", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight"]; + var result = {}; margin.concat(padding).forEach((name) => { - result[`formats/${name}`] = new Attributor.Style(name, hyphenate(name), config); + result["formats/".concat(name)] = new Attributor.Style(name, hyphenate(name), config); }); return result; } function font(Quill) { - const { Scope, Attributor } = Quill.import("parchment"); - const config = { + var { + Scope, + Attributor + } = Quill.import("parchment"); + var config = { scope: Scope.INLINE }; - const font2 = [ - "font", - "fontSize", - "fontStyle", - "fontVariant", - "fontWeight", - "fontFamily" - ]; - const result = {}; + var font2 = ["font", "fontSize", "fontStyle", "fontVariant", "fontWeight", "fontFamily"]; + var result = {}; font2.forEach((name) => { - result[`formats/${name}`] = new Attributor.Style(name, hyphenate(name), config); + result["formats/".concat(name)] = new Attributor.Style(name, hyphenate(name), config); }); return result; } function text(Quill) { - const { Scope, Attributor } = Quill.import("parchment"); - const text2 = [ - { - name: "lineHeight", - scope: Scope.BLOCK - }, - { - name: "letterSpacing", - scope: Scope.INLINE - }, - { - name: "textDecoration", - scope: Scope.INLINE - }, - { - name: "textIndent", - scope: Scope.BLOCK - } - ]; - const result = {}; - text2.forEach(({ name, scope }) => { - result[`formats/${name}`] = new Attributor.Style(name, hyphenate(name), { + var { + Scope, + Attributor + } = Quill.import("parchment"); + var text2 = [{ + name: "lineHeight", + scope: Scope.BLOCK + }, { + name: "letterSpacing", + scope: Scope.INLINE + }, { + name: "textDecoration", + scope: Scope.INLINE + }, { + name: "textIndent", + scope: Scope.BLOCK + }]; + var result = {}; + text2.forEach(({ + name, + scope + }) => { + result["formats/".concat(name)] = new Attributor.Style(name, hyphenate(name), { scope }); }); return result; } function image$1(Quill) { - const Image2 = Quill.import("formats/image"); - const ATTRIBUTES = [ - "alt", - "height", - "width", - "data-custom", - "class", - "data-local" - ]; + var Image2 = Quill.import("formats/image"); + var ATTRIBUTES = ["alt", "height", "width", "data-custom", "class", "data-local"]; Image2.sanitize = (url) => url; Image2.formats = function formats(domNode) { return ATTRIBUTES.reduce(function(formats2, attribute) { @@ -8883,7 +9600,7 @@ return formats2; }, {}); }; - const format = Image2.prototype.format; + var format = Image2.prototype.format; Image2.prototype.format = function(name, value) { if (ATTRIBUTES.indexOf(name) > -1) { if (value) { @@ -8897,7 +9614,7 @@ }; } function register(Quill) { - const formats = { + var formats = { divider, ins, align, @@ -8909,15 +9626,15 @@ text, image: image$1 }; - const options = {}; + var options = {}; Object.values(formats).forEach((value) => extend(options, value(Quill))); Quill.register(options, true); } function useQuill(props2, rootRef, trigger2) { - let quillReady; - let skipMatcher; - let quill; - let textChanging = false; + var quillReady; + var skipMatcher; + var quill; + var textChanging = false; watch(() => props2.readOnly, (value) => { if (quillReady) { quill.enable(!value); @@ -8932,36 +9649,9 @@ } }); function html2delta(html) { - const tags = [ - "span", - "strong", - "b", - "ins", - "em", - "i", - "u", - "a", - "del", - "s", - "sub", - "sup", - "img", - "div", - "p", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "ol", - "ul", - "li", - "br" - ]; - let content = ""; - let disable; + var tags = ["span", "strong", "b", "ins", "em", "i", "u", "a", "del", "s", "sub", "sup", "img", "div", "p", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ol", "ul", "li", "br"]; + var content = ""; + var disable; HTMLParser(html, { start: function(tag, attrs2, unary) { if (!tags.includes(tag)) { @@ -8969,13 +9659,16 @@ return; } disable = false; - const arrts = attrs2.map(({ name, value }) => `${name}="${value}"`).join(" "); - const start = `<${tag} ${arrts} ${unary ? "/" : ""}>`; + var arrts = attrs2.map(({ + name, + value + }) => "".concat(name, '="').concat(value, '"')).join(" "); + var start = "<".concat(tag, " ").concat(arrts, " ").concat(unary ? "/" : "", ">"); content += start; }, end: function(tag) { if (!disable) { - content += ``; + content += ""); } }, chars: function(text2) { @@ -8985,33 +9678,33 @@ } }); skipMatcher = true; - const delta = quill.clipboard.convert(content); + var delta = quill.clipboard.convert(content); skipMatcher = false; return delta; } function getContents() { - const html = quill.root.innerHTML; - const text2 = quill.getText(); - const delta = quill.getContents(); + var html = quill.root.innerHTML; + var text2 = quill.getText(); + var delta = quill.getContents(); return { html, text: text2, delta }; } - let oldStatus = {}; + var oldStatus = {}; function updateStatus(range) { - const status = range ? quill.getFormat(range) : {}; - const keys = Object.keys(status); - if (keys.length !== Object.keys(oldStatus).length || keys.find((key) => status[key] !== oldStatus[key])) { + var status = range ? quill.getFormat(range) : {}; + var keys = Object.keys(status); + if (keys.length !== Object.keys(oldStatus).length || keys.find((key2) => status[key2] !== oldStatus[key2])) { oldStatus = status; trigger2("statuschange", {}, status); } } function initQuill(imageResizeModules) { - const Quill = window.Quill; + var Quill = window.Quill; register(Quill); - const options = { + var options = { toolbar: false, readOnly: props2.readOnly, placeholder: props2.placeholder @@ -9024,10 +9717,10 @@ } }; } - const rootEl = rootRef.value; + var rootEl = rootRef.value; quill = new Quill(rootEl, options); - const $el = quill.root; - const events = ["focus", "blur", "input"]; + var $el = quill.root; + var events = ["focus", "blur", "input"]; events.forEach((name) => { $el.addEventListener(name, ($event) => { if (name === "input") { @@ -9044,7 +9737,7 @@ }); quill.on("selection-change", updateStatus); quill.on("scroll-optimize", () => { - const range = quill.selection.getRange()[0]; + var range = quill.selection.getRange()[0]; updateStatus(range); }); quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => { @@ -9052,7 +9745,13 @@ return delta; } if (delta.ops) { - delta.ops = delta.ops.filter(({ insert }) => typeof insert === "string").map(({ insert }) => ({ insert })); + delta.ops = delta.ops.filter(({ + insert + }) => typeof insert === "string").map(({ + insert + }) => ({ + insert + })); } return delta; }); @@ -9060,7 +9759,7 @@ trigger2("ready", {}, {}); } onMounted(() => { - const imageResizeModules = []; + var imageResizeModules = []; if (props2.showImgSize) { imageResizeModules.push("DisplaySize"); } @@ -9070,10 +9769,10 @@ if (props2.showImgResize) { imageResizeModules.push("Resize"); } - const quillSrc = "./__uniappquill.js"; + var quillSrc = "./__uniappquill.js"; loadScript(window.Quill, quillSrc, () => { if (imageResizeModules.length) { - const imageResizeSrc = "./__uniappquillimageresize.js"; + var imageResizeSrc = "./__uniappquillimageresize.js"; loadScript(window.ImageResize, imageResizeSrc, () => { initQuill(imageResizeModules); }); @@ -9082,32 +9781,38 @@ } }); }); - const id2 = useContextInfo(); + var id2 = useContextInfo(); useSubscribe((type, data, resolve) => { - const { options, callbackId } = data; - let res; - let range; - let errMsg; + var { + options, + callbackId + } = data; + var res; + var range; + var errMsg; if (quillReady) { - const Quill = window.Quill; + var Quill = window.Quill; switch (type) { case "format": { - let { name = "", value = false } = options; + var { + name = "", + value = false + } = options; range = quill.getSelection(true); - let format = quill.getFormat(range)[name] || false; + var format = quill.getFormat(range)[name] || false; if (["bold", "italic", "underline", "strike", "ins"].includes(name)) { value = !format; } else if (name === "direction") { value = value === "rtl" && format ? false : value; - const align2 = quill.getFormat(range).align; + var align2 = quill.getFormat(range).align; if (value === "rtl" && !align2) { quill.format("align", "right", "user"); } else if (!value && align2 === "right") { quill.format("align", false, "user"); } } else if (name === "indent") { - const rtl = quill.getFormat(range).direction === "rtl"; + var rtl = quill.getFormat(range).direction === "rtl"; value = value === "+1"; if (rtl) { value = !value; @@ -9132,7 +9837,7 @@ case "insertImage": { range = quill.getSelection(true); - const { + var { src = "", alt = "", width = "", @@ -9140,9 +9845,9 @@ extClass = "", data: data2 = {} } = options; - const path = getRealPath(src); + var path = getRealPath(src); quill.insertEmbed(range.index, "image", path, "user"); - const local = /^(file|blob):/.test(path) ? path : false; + var local = /^(file|blob):/.test(path) ? path : false; textChanging = true; quill.formatText(range.index, 1, "data-local", local); quill.formatText(range.index, 1, "alt", alt); @@ -9150,21 +9855,26 @@ quill.formatText(range.index, 1, "height", height); quill.formatText(range.index, 1, "class", extClass); textChanging = false; - quill.formatText(range.index, 1, "data-custom", Object.keys(data2).map((key) => `${key}=${data2[key]}`).join("&")); + quill.formatText(range.index, 1, "data-custom", Object.keys(data2).map((key2) => "".concat(key2, "=").concat(data2[key2])).join("&")); quill.setSelection(range.index + 1, 0, "silent"); } break; case "insertText": { range = quill.getSelection(true); - const { text: text2 = "" } = options; + var { + text: text2 = "" + } = options; quill.insertText(range.index, text2, "user"); quill.setSelection(range.index + text2.length, 0, "silent"); } break; case "setContents": { - const { delta, html } = options; + var { + delta, + html + } = options; if (typeof delta === "object") { quill.setContents(delta, "silent"); } else if (typeof html === "string") { @@ -9183,13 +9893,13 @@ case "removeFormat": { range = quill.getSelection(true); - const parchment = Quill.import("parchment"); + var parchment = Quill.import("parchment"); if (range.length) { quill.removeFormat(range.index, range.length, "user"); } else { - Object.keys(quill.getFormat(range)).forEach((key) => { - if (parchment.query(key, parchment.Scope.INLINE)) { - quill.format(key, false); + Object.keys(quill.getFormat(range)).forEach((key2) => { + if (parchment.query(key2, parchment.Scope.INLINE)) { + quill.format(key2, false); } }); } @@ -9206,7 +9916,9 @@ break; case "getSelectionText": range = quill.selection.savedRange; - res = { text: "" }; + res = { + text: "" + }; if (range && range.length !== 0) { res.text = quill.getText(range.index, range.length); } @@ -9223,13 +9935,13 @@ resolve({ callbackId, data: extend({}, res, { - errMsg: `${type}:${errMsg ? "fail " + errMsg : "ok"}` + errMsg: "".concat(type, ":").concat(errMsg ? "fail " + errMsg : "ok") }) }); } }, id2, true); } - const props$m = /* @__PURE__ */ extend({}, props$n, { + var props$m = /* @__PURE__ */ extend({}, props$n, { id: { type: String, default: "" @@ -9262,8 +9974,8 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); useQuill(props2, rootRef, trigger2); useKeyboard(props2, rootRef, trigger2); return () => { @@ -9275,11 +9987,11 @@ }; } }); - const INFO_COLOR = "#10aeff"; - const WARN_COLOR = "#f76260"; - const GREY_COLOR = "#b2b2b2"; - const CANCEL_COLOR = "#f43530"; - const ICONS = { + var INFO_COLOR = "#10aeff"; + var WARN_COLOR = "#f76260"; + var GREY_COLOR = "#b2b2b2"; + var CANCEL_COLOR = "#f43530"; + var ICONS = { success: { d: ICON_PATH_SUCCESS, c: PRIMARY_COLOR @@ -9335,9 +10047,9 @@ } }, setup(props2) { - const path = computed$1(() => ICONS[props2.type]); + var path = computed$1(() => ICONS[props2.type]); return () => { - const { + var { value } = path; return createVNode("uni-icon", null, { @@ -9346,7 +10058,7 @@ }; } }); - const props$l = { + var props$l = { src: { type: String, default: "" @@ -9364,11 +10076,11 @@ default: true } }; - const FIX_MODES = { + var FIX_MODES = { widthFix: ["offsetWidth", "height"], heightFix: ["offsetHeight", "width"] }; - const IMAGE_MODES = { + var IMAGE_MODES = { aspectFit: ["center center", "contain"], aspectFill: ["center center", "cover"], widthFix: [, "100% 100%"], @@ -9389,10 +10101,10 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const state = useImageState(rootRef, props2); - const trigger2 = useCustomEvent(rootRef, emit2); - const { + var rootRef = ref(null); + var state = useImageState(rootRef, props2); + var trigger2 = useCustomEvent(rootRef, emit2); + var { fixSize } = useImageSize(rootRef, props2, state); useImageLoader(state, { @@ -9400,10 +10112,10 @@ fixSize }); return () => { - const { + var { mode: mode2 } = props2; - const { + var { imgSrc, modeStyle } = state; @@ -9424,11 +10136,11 @@ } }); function useImageState(rootRef, props2) { - const imgSrc = ref(""); - const modeStyleRef = computed$1(() => { - let size2 = "auto"; - let position = ""; - const opts = IMAGE_MODES[props2.mode]; + var imgSrc = ref(""); + var modeStyleRef = computed$1(() => { + var size2 = "auto"; + var position = ""; + var opts = IMAGE_MODES[props2.mode]; if (!opts) { position = "0% 0%"; size2 = "100% 100%"; @@ -9436,10 +10148,10 @@ opts[0] && (position = opts[0]); opts[1] && (size2 = opts[1]); } - const srcVal = imgSrc.value; - return `background-image:${srcVal ? 'url("' + srcVal + '")' : "none"};background-position:${position};background-size:${size2};background-repeat:no-repeat;`; + var srcVal = imgSrc.value; + return "background-image:".concat(srcVal ? 'url("' + srcVal + '")' : "none", ";background-position:").concat(position, ";background-size:").concat(size2, ";background-repeat:no-repeat;"); }); - const state = reactive({ + var state = reactive({ rootEl: rootRef, src: computed$1(() => props2.src ? getRealPath(props2.src) : ""), origWidth: 0, @@ -9452,8 +10164,8 @@ imgSrc }); onMounted(() => { - const rootEl = rootRef.value; - const style = rootEl.style; + var rootEl = rootRef.value; + var style = rootEl.style; state.origWidth = Number(style.width) || 0; state.origHeight = Number(style.height) || 0; }); @@ -9463,13 +10175,13 @@ trigger: trigger2, fixSize }) { - let img; - const setState = (width = 0, height = 0, imgSrc = "") => { + var img; + var setState = (width = 0, height = 0, imgSrc = "") => { state.origWidth = width; state.origHeight = height; state.imgSrc = imgSrc; }; - const loadImage = (src) => { + var loadImage = (src) => { if (!src) { resetImage(); setState(); @@ -9479,7 +10191,7 @@ img = new Image(); } img.onload = (evt) => { - const { + var { width, height } = img; @@ -9495,12 +10207,12 @@ setState(); resetImage(); trigger2("error", evt, { - errMsg: `GET ${state.src} 404 (Not Found)` + errMsg: "GET ".concat(state.src, " 404 (Not Found)") }); }; img.src = src; }; - const resetImage = () => { + var resetImage = () => { if (img) { img.onload = null; img.onerror = null; @@ -9511,7 +10223,7 @@ onMounted(() => loadImage(state.src)); onBeforeUnmount(() => resetImage()); } - const isChrome = navigator.vendor === "Google Inc."; + var isChrome = navigator.vendor === "Google Inc."; function fixNumber(num) { if (isChrome && num > 10) { num = Math.round(num / 2) * 2; @@ -9519,24 +10231,24 @@ return num; } function useImageSize(rootRef, props2, state) { - const fixSize = () => { - const { + var fixSize = () => { + var { mode: mode2 } = props2; - const names = FIX_MODES[mode2]; + var names = FIX_MODES[mode2]; if (!names) { return; } - const { + var { origWidth, origHeight } = state; - const ratio = origWidth && origHeight ? origWidth / origHeight : 0; + var ratio = origWidth && origHeight ? origWidth / origHeight : 0; if (!ratio) { return; } - const rootEl = rootRef.value; - const value = rootEl[names[0]]; + var rootEl = rootRef.value; + var value = rootEl[names[0]]; if (value) { rootEl.style[names[1]] = fixNumber(value / ratio) + "px"; } @@ -9544,11 +10256,11 @@ window.dispatchEvent(new CustomEvent("updateview")); } }; - const resetSize = () => { - const { + var resetSize = () => { + var { style } = rootRef.value; - const { + var { origStyle: { width, height @@ -9570,19 +10282,13 @@ resetSize }; } - const passiveOptions$1 = passive(true); - const states = []; - let userInteract = 0; - let inited; + var passiveOptions$1 = passive(true); + var states = []; + var userInteract = 0; + var inited; function addInteractListener(vm) { if (!inited) { - const eventNames = [ - "touchstart", - "touchmove", - "touchend", - "mousedown", - "mouseup" - ]; + var eventNames = ["touchstart", "touchmove", "touchend", "mousedown", "mouseup"]; eventNames.forEach((eventName) => { document.addEventListener(eventName, function() { states.forEach((vm2) => { @@ -9602,13 +10308,13 @@ states.push(vm); } function removeInteractListener(vm) { - const index2 = states.indexOf(vm); + var index2 = states.indexOf(vm); if (index2 >= 0) { states.splice(index2, 1); } } function useUserAction() { - const state = reactive({ + var state = reactive({ userAction: false }); onMounted(() => { @@ -9622,13 +10328,13 @@ }; } function useScopedAttrs() { - const state = reactive({ + var state = reactive({ attrs: {} }); onMounted(() => { - let instance = getCurrentInstance(); + var instance = getCurrentInstance(); while (instance) { - const scopeId = instance.type.__scopeId; + var scopeId = instance.type.__scopeId; if (scopeId) { state.attrs[scopeId] = ""; } @@ -9640,18 +10346,15 @@ }; } function useFormField(nameKey, value) { - const uniForm = inject(uniFormKey, false); + var uniForm = inject(uniFormKey, false); if (!uniForm) { return; } - const instance = getCurrentInstance(); - const ctx = { + var instance = getCurrentInstance(); + var ctx2 = { submit() { - const proxy = instance.proxy; - return [ - proxy[nameKey], - typeof value === "string" ? proxy[value] : value.value - ]; + var proxy = instance.proxy; + return [proxy[nameKey], typeof value === "string" ? proxy[value] : value.value]; }, reset() { if (typeof value === "string") { @@ -9661,32 +10364,32 @@ } } }; - uniForm.addField(ctx); + uniForm.addField(ctx2); onBeforeUnmount(() => { - uniForm.removeField(ctx); + uniForm.removeField(ctx2); }); } function getSelectedTextRange(_, resolve) { - const activeElement = document.activeElement; + var activeElement = document.activeElement; if (!activeElement) { return resolve({}); } - const data = {}; + var data = {}; if (["input", "textarea"].includes(activeElement.tagName.toLowerCase())) { data.start = activeElement.selectionStart; data.end = activeElement.selectionEnd; } resolve(data); } - const UniViewJSBridgeSubscribe = function() { + var UniViewJSBridgeSubscribe = function() { registerViewMethod(getCurrentPageId(), "getSelectedTextRange", getSelectedTextRange); }; - const FOCUS_DELAY = 200; - let startTime; + var FOCUS_DELAY = 200; + var startTime; function getValueString(value) { return value === null ? "" : String(value); } - const props$k = /* @__PURE__ */ extend({}, { + var props$k = /* @__PURE__ */ extend({}, { name: { type: String, default: "" @@ -9752,36 +10455,28 @@ default: "done" } }, props$n); - const emit = [ - "input", - "focus", - "blur", - "update:value", - "update:modelValue", - "update:focus", - ...emit$1 - ]; + var emit = ["input", "focus", "blur", "update:value", "update:modelValue", "update:focus", ...emit$1]; function useBase(props2, rootRef, emit2) { - const fieldRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const selectionStart = computed$1(() => { - const selectionStart2 = Number(props2.selectionStart); + var fieldRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var selectionStart = computed$1(() => { + var selectionStart2 = Number(props2.selectionStart); return isNaN(selectionStart2) ? -1 : selectionStart2; }); - const selectionEnd = computed$1(() => { - const selectionEnd2 = Number(props2.selectionEnd); + var selectionEnd = computed$1(() => { + var selectionEnd2 = Number(props2.selectionEnd); return isNaN(selectionEnd2) ? -1 : selectionEnd2; }); - const cursor = computed$1(() => { - const cursor2 = Number(props2.cursor); + var cursor = computed$1(() => { + var cursor2 = Number(props2.cursor); return isNaN(cursor2) ? -1 : cursor2; }); - const maxlength = computed$1(() => { + var maxlength = computed$1(() => { var maxlength2 = Number(props2.maxlength); return isNaN(maxlength2) ? 140 : maxlength2; }); - const value = getValueString(props2.modelValue) || getValueString(props2.value); - const state = reactive({ + var value = getValueString(props2.modelValue) || getValueString(props2.value); + var state = reactive({ value, valueOrigin: value, maxlength, @@ -9800,18 +10495,18 @@ }; } function useValueSync(props2, state, emit2, trigger2) { - const valueChangeFn = debounce((val) => { + var valueChangeFn = debounce((val) => { state.value = getValueString(val); }, 100); watch(() => props2.modelValue, valueChangeFn); watch(() => props2.value, valueChangeFn); - const triggerInputFn = throttle((event, detail) => { + var triggerInputFn = throttle((event, detail) => { valueChangeFn.cancel(); emit2("update:modelValue", detail.value); emit2("update:value", detail.value); trigger2("input", event, detail); }, 100); - const triggerInput = (event, detail, force) => { + var triggerInput = (event, detail, force) => { valueChangeFn.cancel(); triggerInputFn(event, detail); if (force) { @@ -9828,19 +10523,21 @@ }; } function useAutoFocus(props2, fieldRef) { - const { state: userActionState } = useUserAction(); - const needFocus = computed$1(() => props2.autoFocus || props2.focus); + var { + state: userActionState + } = useUserAction(); + var needFocus = computed$1(() => props2.autoFocus || props2.focus); function focus() { if (!needFocus.value) { return; } - const field = fieldRef.value; + var field = fieldRef.value; if (!field || !("plus" in window)) { setTimeout(focus, 100); return; } { - const timeout = FOCUS_DELAY - (Date.now() - startTime); + var timeout = FOCUS_DELAY - (Date.now() - startTime); if (timeout > 0) { setTimeout(focus, timeout); return; @@ -9852,7 +10549,7 @@ } } function blur() { - const field = fieldRef.value; + var field = fieldRef.value; if (field) { field.blur(); } @@ -9873,21 +10570,21 @@ } function useEvent(fieldRef, state, trigger2, triggerInput, beforeInput) { function checkSelection() { - const field = fieldRef.value; + var field = fieldRef.value; if (field && state.focus && state.selectionStart > -1 && state.selectionEnd > -1) { field.selectionStart = state.selectionStart; field.selectionEnd = state.selectionEnd; } } function checkCursor() { - const field = fieldRef.value; + var field = fieldRef.value; if (field && state.focus && state.selectionStart < 0 && state.selectionEnd < 0 && state.cursor > -1) { field.selectionEnd = field.selectionStart = state.cursor; } } function initField() { - const field = fieldRef.value; - const onFocus = function(event) { + var field = fieldRef.value; + var onFocus = function(event) { state.focus = true; trigger2("focus", event, { value: state.value @@ -9895,7 +10592,7 @@ checkSelection(); checkCursor(); }; - const onInput = function(event, force) { + var onInput = function(event, force) { event.stopPropagation(); if (typeof beforeInput === "function" && beforeInput(event, state) === false) { return; @@ -9908,7 +10605,7 @@ }, force); } }; - const onBlur = function(event) { + var onBlur = function(event) { if (state.composing) { state.composing = false; onInput(event, true); @@ -9941,14 +10638,22 @@ } function useField(props2, rootRef, emit2, beforeInput) { UniViewJSBridgeSubscribe(); - const { fieldRef, state, trigger: trigger2 } = useBase(props2, rootRef, emit2); - const { triggerInput } = useValueSync(props2, state, emit2, trigger2); + var { + fieldRef, + state, + trigger: trigger2 + } = useBase(props2, rootRef, emit2); + var { + triggerInput + } = useValueSync(props2, state, emit2, trigger2); useAutoFocus(props2, fieldRef); useKeyboard(props2, fieldRef, trigger2); - const { state: scopedAttrsState } = useScopedAttrs(); + var { + state: scopedAttrsState + } = useScopedAttrs(); useFormField("name", state); useEvent(fieldRef, state, trigger2, triggerInput, beforeInput); - const fixDisabledColor = String(navigator.vendor).indexOf("Apple") === 0 && CSS.supports("image-orientation:from-image"); + var fixDisabledColor = String(navigator.vendor).indexOf("Apple") === 0 && CSS.supports("image-orientation:from-image"); return { fieldRef, state, @@ -9957,7 +10662,7 @@ trigger: trigger2 }; } - const props$j = /* @__PURE__ */ extend({}, props$k, { + var props$j = /* @__PURE__ */ extend({}, props$k, { placeholderClass: { type: String, default: "input-placeholder" @@ -9974,10 +10679,10 @@ setup(props2, { emit: emit2 }) { - const INPUT_TYPES = ["text", "number", "idcard", "digit", "password", "tel"]; - const AUTOCOMPLETES = ["off", "one-time-code"]; - const type = computed$1(() => { - let type2 = ""; + var INPUT_TYPES = ["text", "number", "idcard", "digit", "password", "tel"]; + var AUTOCOMPLETES = ["off", "one-time-code"]; + var type = computed$1(() => { + var type2 = ""; switch (props2.type) { case "text": if (props2.confirmType === "search") { @@ -9996,23 +10701,23 @@ } return props2.password ? "password" : type2; }); - const autocomplete = computed$1(() => { - const camelizeIndex = AUTOCOMPLETES.indexOf(props2.textContentType); - const kebabCaseIndex = AUTOCOMPLETES.indexOf(hyphenate(props2.textContentType)); - const index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0; + var autocomplete = computed$1(() => { + var camelizeIndex = AUTOCOMPLETES.indexOf(props2.textContentType); + var kebabCaseIndex = AUTOCOMPLETES.indexOf(hyphenate(props2.textContentType)); + var index2 = camelizeIndex !== -1 ? camelizeIndex : kebabCaseIndex !== -1 ? kebabCaseIndex : 0; return AUTOCOMPLETES[index2]; }); - let cache2 = ref(""); - let resetCache; - const rootRef = ref(null); - const { + var cache2 = ref(""); + var resetCache; + var rootRef = ref(null); + var { fieldRef, state, scopedAttrsState, fixDisabledColor, trigger: trigger2 } = useField(props2, rootRef, emit2, (event, state2) => { - const input2 = event.target; + var input2 = event.target; if (type.value === "number") { if (resetCache) { input2.removeEventListener("blur", resetCache); @@ -10033,7 +10738,7 @@ } else { cache2.value = input2.value; } - const maxlength = state2.maxlength; + var maxlength = state2.maxlength; if (maxlength > 0 && input2.value.length > maxlength) { input2.value = input2.value.slice(0, maxlength); state2.value = input2.value; @@ -10041,8 +10746,8 @@ } } }); - const NUMBER_TYPES = ["number", "digit"]; - const step = computed$1(() => NUMBER_TYPES.includes(props2.type) ? "0.000000000000000001" : ""); + var NUMBER_TYPES = ["number", "digit"]; + var step2 = computed$1(() => NUMBER_TYPES.includes(props2.type) ? "0.000000000000000001" : ""); function onKeyUpEnter(event) { if (event.key !== "Enter") { return; @@ -10053,14 +10758,14 @@ }); } return () => { - let inputNode = props2.disabled && fixDisabledColor ? createVNode("input", { + var inputNode = props2.disabled && fixDisabledColor ? createVNode("input", { "ref": fieldRef, "value": state.value, "tabindex": "-1", "readonly": !!props2.disabled, "type": type.value, "maxlength": state.maxlength, - "step": step.value, + "step": step2.value, "class": "uni-input-input", "onFocus": (event) => event.target.blur() }, null, 40, ["value", "readonly", "type", "maxlength", "step", "onFocus"]) : createVNode("input", { @@ -10069,7 +10774,7 @@ "disabled": !!props2.disabled, "type": type.value, "maxlength": state.maxlength, - "step": step.value, + "step": step2.value, "enterkeyhint": props2.confirmType, "pattern": props2.type === "number" ? "[0-9]*" : void 0, "class": "uni-input-input", @@ -10094,29 +10799,32 @@ } }); function entries(obj) { - return Object.keys(obj).map((key) => [key, obj[key]]); - } - const DEFAULT_EXCLUDE_KEYS = ["class", "style"]; - const LISTENER_PREFIX = /^on[A-Z]+/; - const useAttrs = (params = {}) => { - const { excludeListeners = false, excludeKeys = [] } = params; - const instance = getCurrentInstance(); - const attrs2 = shallowRef({}); - const listeners = shallowRef({}); - const excludeAttrs = shallowRef({}); - const allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS); + return Object.keys(obj).map((key2) => [key2, obj[key2]]); + } + var DEFAULT_EXCLUDE_KEYS = ["class", "style"]; + var LISTENER_PREFIX = /^on[A-Z]+/; + var useAttrs = (params = {}) => { + var { + excludeListeners = false, + excludeKeys = [] + } = params; + var instance = getCurrentInstance(); + var attrs2 = shallowRef({}); + var listeners = shallowRef({}); + var excludeAttrs = shallowRef({}); + var allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS); instance.attrs = reactive(instance.attrs); watchEffect(() => { - const res = entries(instance.attrs).reduce((acc, [key, val]) => { - if (allExcludeKeys.includes(key)) { - acc.exclude[key] = val; - } else if (LISTENER_PREFIX.test(key)) { + var res = entries(instance.attrs).reduce((acc, [key2, val]) => { + if (allExcludeKeys.includes(key2)) { + acc.exclude[key2] = val; + } else if (LISTENER_PREFIX.test(key2)) { if (!excludeListeners) { - acc.attrs[key] = val; + acc.attrs[key2] = val; } - acc.listeners[key] = val; + acc.listeners[key2] = val; } else { - acc.attrs[key] = val; + acc.attrs[key2] = val; } return acc; }, { @@ -10128,10 +10836,14 @@ listeners.value = res.listeners; excludeAttrs.value = res.exclude; }); - return { $attrs: attrs2, $listeners: listeners, $excludeAttrs: excludeAttrs }; + return { + $attrs: attrs2, + $listeners: listeners, + $excludeAttrs: excludeAttrs + }; }; - let webview$2; - let pullToRefreshStyle; + var webview$2; + var pullToRefreshStyle; function initScrollBounce() { { plusReady(() => { @@ -10144,7 +10856,9 @@ }); } } - function disableScrollBounce({ disable }) { + function disableScrollBounce({ + disable + }) { { if (pullToRefreshStyle && pullToRefreshStyle.support) { webview$2.setPullToRefresh(Object.assign({}, pullToRefreshStyle, { @@ -10154,7 +10868,7 @@ } } function flatVNode(nodes) { - const array = []; + var array = []; if (Array.isArray(nodes)) { nodes.forEach((vnode) => { if (isVNode(vnode)) { @@ -10171,10 +10885,10 @@ return array; } function useRebuild(callback) { - const instance = getCurrentInstance(); + var instance = getCurrentInstance(); instance.rebuild = callback; } - const props$i = { + var props$i = { scaleArea: { type: Boolean, default: false @@ -10187,22 +10901,22 @@ setup(props2, { slots }) { - const rootRef = ref(null); - const _isMounted = ref(false); - let { + var rootRef = ref(null); + var _isMounted = ref(false); + var { setContexts, events: movableAreaEvents } = useMovableAreaState(props2, rootRef); - const { + var { $listeners, $attrs, $excludeAttrs } = useAttrs(); - const _listeners = $listeners.value; - let events = ["onTouchstart", "onTouchmove", "onTouchend"]; + var _listeners = $listeners.value; + var events = ["onTouchstart", "onTouchmove", "onTouchend"]; events.forEach((event) => { - let existing = _listeners[event]; - let ours = movableAreaEvents[`_${event}`]; + var existing = _listeners[event]; + var ours = movableAreaEvents["_".concat(event)]; _listeners[event] = existing ? [].concat(existing, ours) : ours; }); onMounted(() => { @@ -10210,19 +10924,22 @@ initScrollBounce(); _isMounted.value = true; }); - let movableViewItems = []; - const originMovableViewContexts = []; + var movableViewItems = []; + var originMovableViewContexts = []; function updateMovableViewContexts() { - const contexts = []; - for (let index2 = 0; index2 < movableViewItems.length; index2++) { - let movableViewItem = movableViewItems[index2]; + var contexts = []; + var _loop = function(index3) { + var movableViewItem = movableViewItems[index3]; if (!(movableViewItem instanceof Element)) { movableViewItem = movableViewItem.el; } - const movableViewContext = originMovableViewContexts.find((context) => movableViewItem === context.rootRef.value); + var movableViewContext = originMovableViewContexts.find((context) => movableViewItem === context.rootRef.value); if (movableViewContext) { contexts.push(markRaw(movableViewContext)); } + }; + for (var index2 = 0; index2 < movableViewItems.length; index2++) { + _loop(index2); } setContexts(contexts); } @@ -10232,12 +10949,12 @@ updateMovableViewContexts(); }); } - const addMovableViewContext = (movableViewContext) => { + var addMovableViewContext = (movableViewContext) => { originMovableViewContexts.push(movableViewContext); updateMovableViewContexts(); }; - const removeMovableViewContext = (movableViewContext) => { - const index2 = originMovableViewContexts.indexOf(movableViewContext); + var removeMovableViewContext = (movableViewContext) => { + var index2 = originMovableViewContexts.indexOf(movableViewContext); if (index2 >= 0) { originMovableViewContexts.splice(index2, 1); updateMovableViewContexts(); @@ -10264,15 +10981,15 @@ return Math.sqrt(e2.x * e2.x + e2.y * e2.y); } function useMovableAreaState(props2, rootRef) { - const width = ref(0); - const height = ref(0); - const gapV = reactive({ + var width = ref(0); + var height = ref(0); + var gapV = reactive({ x: null, y: null }); - const pinchStartLen = ref(null); - let _scaleMovableView = null; - let movableViewContexts = []; + var pinchStartLen = ref(null); + var _scaleMovableView = null; + var movableViewContexts = []; function _updateScale(e2) { if (e2 && e2 !== 1) { if (props2.scaleArea) { @@ -10287,10 +11004,10 @@ } } function _find(target, items = movableViewContexts) { - let root = rootRef.value; + var root = rootRef.value; function get2(node) { - for (let i = 0; i < items.length; i++) { - const item = items[i]; + for (var i2 = 0; i2 < items.length; i2++) { + var item = items[i2]; if (node === item.rootRef.value) { return item; } @@ -10302,51 +11019,51 @@ } return get2(target); } - const _onTouchstart = withWebEvent((t2) => { + var _onTouchstart = withWebEvent((t2) => { disableScrollBounce({ disable: true }); - let i = t2.touches; - if (i) { - if (i.length > 1) { - let r = { - x: i[1].pageX - i[0].pageX, - y: i[1].pageY - i[0].pageY + var i2 = t2.touches; + if (i2) { + if (i2.length > 1) { + var r = { + x: i2[1].pageX - i2[0].pageX, + y: i2[1].pageY - i2[0].pageY }; pinchStartLen.value = calc(r); gapV.x = r.x; gapV.y = r.y; if (!props2.scaleArea) { - let touch0 = _find(i[0].target); - let touch1 = _find(i[1].target); + var touch0 = _find(i2[0].target); + var touch1 = _find(i2[1].target); _scaleMovableView = touch0 && touch0 === touch1 ? touch0 : null; } } } }); - const _onTouchmove = withWebEvent((t2) => { - let n = t2.touches; + var _onTouchmove = withWebEvent((t2) => { + var n = t2.touches; if (n) { if (n.length > 1) { t2.preventDefault(); - let i = { + var i2 = { x: n[1].pageX - n[0].pageX, y: n[1].pageY - n[0].pageY }; if (gapV.x !== null && pinchStartLen.value && pinchStartLen.value > 0) { - let r = calc(i) / pinchStartLen.value; + var r = calc(i2) / pinchStartLen.value; _updateScale(r); } - gapV.x = i.x; - gapV.y = i.y; + gapV.x = i2.x; + gapV.y = i2.y; } } }); - const _onTouchend = withWebEvent((e2) => { + var _onTouchend = withWebEvent((e2) => { disableScrollBounce({ disable: false }); - let t2 = e2.touches; + var t2 = e2.touches; if (!(t2 && t2.length)) { if (e2.changedTouches) { gapV.x = 0; @@ -10371,16 +11088,16 @@ }); } function _getWH() { - let style = window.getComputedStyle(rootRef.value); - let rect = rootRef.value.getBoundingClientRect(); + var style = window.getComputedStyle(rootRef.value); + var rect = rootRef.value.getBoundingClientRect(); width.value = rect.width - ["Left", "Right"].reduce(function(all, item) { - const LEFT = "border" + item + "Width"; - const RIGHT = "padding" + item; + var LEFT = "border" + item + "Width"; + var RIGHT = "padding" + item; return all + parseFloat(style[LEFT]) + parseFloat(style[RIGHT]); }, 0); height.value = rect.height - ["Top", "Bottom"].reduce(function(all, item) { - const TOP = "border" + item + "Width"; - const BOTTOM = "padding" + item; + var TOP = "border" + item + "Width"; + var BOTTOM = "padding" + item; return all + parseFloat(style[TOP]) + parseFloat(style[BOTTOM]); }, 0); } @@ -10398,7 +11115,7 @@ } }; } - const addListenerToElement = function(element, type, callback, capture) { + var addListenerToElement = function(element, type, callback, capture) { element.addEventListener(type, ($event) => { if (typeof callback === "function") { if (callback($event) === false) { @@ -10412,18 +11129,18 @@ passive: false }); }; - let __mouseMoveEventListener; - let __mouseUpEventListener; + var __mouseMoveEventListener; + var __mouseUpEventListener; function useTouchtrack(element, method, useCancel) { onBeforeUnmount(() => { document.removeEventListener("mousemove", __mouseMoveEventListener); document.removeEventListener("mouseup", __mouseUpEventListener); }); - let x0 = 0; - let y0 = 0; - let x1 = 0; - let y1 = 0; - const fn = function($event, state, x, y) { + var x0 = 0; + var y0 = 0; + var x1 = 0; + var y1 = 0; + var fn = function($event, state, x, y) { if (method({ target: $event.target, currentTarget: $event.currentTarget, @@ -10445,9 +11162,9 @@ return false; } }; - let $eventOld = null; - let hasTouchStart; - let hasMouseDown; + var $eventOld = null; + var hasTouchStart; + var hasMouseDown; addListenerToElement(element, "touchstart", function($event) { hasTouchStart = true; if ($event.touches.length === 1 && !$eventOld) { @@ -10468,15 +11185,15 @@ }); addListenerToElement(element, "touchmove", function($event) { if ($event.touches.length === 1 && $eventOld) { - const res = fn($event, "move", $event.touches[0].pageX, $event.touches[0].pageY); + var res = fn($event, "move", $event.touches[0].pageX, $event.touches[0].pageY); x1 = $event.touches[0].pageX; y1 = $event.touches[0].pageY; return res; } }); - const mouseMoveEventListener = __mouseMoveEventListener = function($event) { + var mouseMoveEventListener = __mouseMoveEventListener = function($event) { if (!hasTouchStart && hasMouseDown && $eventOld) { - const res = fn($event, "move", $event.pageX, $event.pageY); + var res = fn($event, "move", $event.pageX, $event.pageY); x1 = $event.pageX; y1 = $event.pageY; return res; @@ -10490,7 +11207,7 @@ return fn($event, "end", $event.changedTouches[0].pageX, $event.changedTouches[0].pageY); } }); - const mouseUpEventListener = __mouseUpEventListener = function($event) { + var mouseUpEventListener = __mouseUpEventListener = function($event) { hasMouseDown = false; if (!hasTouchStart && $eventOld) { $eventOld = null; @@ -10501,7 +11218,7 @@ addListenerToElement(element, "touchcancel", function($event) { if ($eventOld) { hasTouchStart = false; - const $eventTemp = $eventOld; + var $eventTemp = $eventOld; $eventOld = null; return fn($event, useCancel ? "cancel" : "end", $eventTemp.touches[0].pageX, $eventTemp.touches[0].pageY); } @@ -10603,13 +11320,13 @@ } Spring$1.prototype._solve = function(e2, t2) { var n = this._c; - var i = this._m; + var i2 = this._m; var r = this._k; - var o2 = n * n - 4 * i * r; + var o2 = n * n - 4 * i2 * r; if (o2 === 0) { - const a2 = -n / (2 * i); - const s = e2; - const l = t2 / (a2 * e2); + var a2 = -n / (2 * i2); + var s = e2; + var l = t2 / (a2 * e2); return { x: function(e3) { return (s + l * e3) * Math.pow(Math.E, a2 * e3); @@ -10621,10 +11338,10 @@ }; } if (o2 > 0) { - const c = (-n - Math.sqrt(o2)) / (2 * i); - const u = (-n + Math.sqrt(o2)) / (2 * i); - const d = (t2 - c * e2) / (u - c); - const h2 = e2 - d; + var c = (-n - Math.sqrt(o2)) / (2 * i2); + var u = (-n + Math.sqrt(o2)) / (2 * i2); + var d = (t2 - c * e2) / (u - c); + var h2 = e2 - d; return { x: function(e3) { var t3; @@ -10660,8 +11377,8 @@ } }; } - var p2 = Math.sqrt(4 * i * r - n * n) / (2 * i); - var f2 = -n / 2 * i; + var p2 = Math.sqrt(4 * i2 * r - n * n) / (2 * i2); + var f2 = -n / 2 * i2; var v2 = e2; var g2 = (t2 - f2 * e2) / p2; return { @@ -10671,8 +11388,8 @@ dx: function(e3) { var t3 = Math.pow(Math.E, f2 * e3); var n2 = Math.cos(p2 * e3); - var i2 = Math.sin(p2 * e3); - return t3 * (g2 * p2 * n2 - v2 * p2 * i2) + f2 * t3 * (g2 * i2 + v2 * n2); + var i3 = Math.sin(p2 * e3); + return t3 * (g2 * p2 * n2 - v2 * p2 * i3) + f2 * t3 * (g2 * i3 + v2 * n2); } }; }; @@ -10688,18 +11405,18 @@ } return this._solution ? this._solution.dx(e2) : 0; }; - Spring$1.prototype.setEnd = function(e2, n, i) { - if (!i) { - i = new Date().getTime(); + Spring$1.prototype.setEnd = function(e2, n, i2) { + if (!i2) { + i2 = new Date().getTime(); } if (e2 !== this._endPosition || !t(n, 0.1)) { n = n || 0; var r = this._endPosition; if (this._solution) { if (t(n, 0.1)) { - n = this._solution.dx((i - this._startTime) / 1e3); + n = this._solution.dx((i2 - this._startTime) / 1e3); } - r = this._solution.x((i - this._startTime) / 1e3); + r = this._solution.x((i2 - this._startTime) / 1e3); if (t(n, 0.1)) { n = 0; } @@ -10711,7 +11428,7 @@ if (!(this._solution && t(r - e2, 0.1) && t(n, 0.1))) { this._endPosition = e2; this._solution = this._solve(r - this._endPosition, n); - this._startTime = i; + this._startTime = i2; } } }; @@ -10755,22 +11472,19 @@ function t2(e3, t3) { e3.reconfigure(1, e3.springConstant(), t3); } - return [ - { - label: "Spring Constant", - read: this.springConstant.bind(this), - write: e2.bind(this, this), - min: 100, - max: 1e3 - }, - { - label: "Damping", - read: this.damping.bind(this), - write: t2.bind(this, this), - min: 1, - max: 500 - } - ]; + return [{ + label: "Spring Constant", + read: this.springConstant.bind(this), + write: e2.bind(this, this), + min: 100, + max: 1e3 + }, { + label: "Damping", + read: this.damping.bind(this), + write: t2.bind(this, this), + min: 1, + max: 500 + }]; }; function STD(e2, t2, n) { this._springX = new Spring$1(e2, t2, n); @@ -10778,11 +11492,11 @@ this._springScale = new Spring$1(e2, t2, n); this._startTime = 0; } - STD.prototype.setEnd = function(e2, t2, n, i) { + STD.prototype.setEnd = function(e2, t2, n, i2) { var r = new Date().getTime(); - this._springX.setEnd(e2, i, r); - this._springY.setEnd(t2, i, r); - this._springScale.setEnd(n, i, r); + this._springX.setEnd(e2, i2, r); + this._springY.setEnd(t2, i2, r); + this._springScale.setEnd(n, i2, r); this._startTime = r; }; STD.prototype.x = function() { @@ -10802,7 +11516,7 @@ this._springY.reconfigure(e2, t2, n); this._springScale.reconfigure(e2, t2, n); }; - const props$h = { + var props$h = { direction: { type: String, default: "none" @@ -10864,9 +11578,9 @@ slots, emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const { + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var { setParent } = useMovableViewState(props2, trigger2, rootRef); return () => { @@ -10881,7 +11595,7 @@ }; } }); - let requesting = false; + var requesting = false; function _requestAnimationFrame(e2) { if (!requesting) { requesting = true; @@ -10895,25 +11609,25 @@ if (t2 === n) { return 0; } - let i = t2.offsetLeft; - return t2.offsetParent ? i += p(t2.offsetParent, n) : 0; + var i2 = t2.offsetLeft; + return t2.offsetParent ? i2 += p(t2.offsetParent, n) : 0; } function f(t2, n) { if (t2 === n) { return 0; } - let i = t2.offsetTop; - return t2.offsetParent ? i += f(t2.offsetParent, n) : 0; + var i2 = t2.offsetTop; + return t2.offsetParent ? i2 += f(t2.offsetParent, n) : 0; } function v(a2, b) { return +((1e3 * a2 - 1e3 * b) / 1e3).toFixed(1); } function g(friction, execute, endCallback) { - let record = { + var record = { id: 0, cancelled: false }; - let cancel = function(record2) { + var cancel = function(record2) { if (record2 && record2.id) { cancelAnimationFrame(record2.id); } @@ -10924,7 +11638,7 @@ function fn(record2, friction2, execute2, endCallback2) { if (!record2 || !record2.cancelled) { execute2(friction2); - let isDone = friction2.done(); + var isDone = friction2.done(); if (!isDone) { if (!record2.cancelled) { record2.id = requestAnimationFrame(fn.bind(null, record2, friction2, execute2, endCallback2)); @@ -10948,70 +11662,70 @@ return Number(val) || 0; } function useMovableViewState(props2, trigger2, rootRef) { - const movableAreaWidth = inject("movableAreaWidth", ref(0)); - const movableAreaHeight = inject("movableAreaHeight", ref(0)); - const _isMounted = inject("_isMounted", ref(false)); - const movableAreaRootRef = inject("movableAreaRootRef"); - const addMovableViewContext = inject("addMovableViewContext", () => { + var movableAreaWidth = inject("movableAreaWidth", ref(0)); + var movableAreaHeight = inject("movableAreaHeight", ref(0)); + var _isMounted = inject("_isMounted", ref(false)); + var movableAreaRootRef = inject("movableAreaRootRef"); + var addMovableViewContext = inject("addMovableViewContext", () => { }); - const removeMovableViewContext = inject("removeMovableViewContext", () => { + var removeMovableViewContext = inject("removeMovableViewContext", () => { }); - const xSync = ref(_getPx(props2.x)); - const ySync = ref(_getPx(props2.y)); - const scaleValueSync = ref(Number(props2.scaleValue) || 1); - const width = ref(0); - const height = ref(0); - const minX = ref(0); - const minY = ref(0); - const maxX = ref(0); - const maxY = ref(0); - let _SFA = null; - let _FA = null; - const _offset = { + var xSync = ref(_getPx(props2.x)); + var ySync = ref(_getPx(props2.y)); + var scaleValueSync = ref(Number(props2.scaleValue) || 1); + var width = ref(0); + var height = ref(0); + var minX = ref(0); + var minY = ref(0); + var maxX = ref(0); + var maxY = ref(0); + var _SFA = null; + var _FA = null; + var _offset = { x: 0, y: 0 }; - const _scaleOffset = { + var _scaleOffset = { x: 0, y: 0 }; - let _scale = 1; - let _oldScale = 1; - let _translateX = 0; - let _translateY = 0; - let _isScaling = false; - let _isTouching = false; - let __baseX; - let __baseY; - let _checkCanMove = null; - let _firstMoveDirection = null; - const _declineX = new Decline(); - const _declineY = new Decline(); - const __touchInfo = { + var _scale = 1; + var _oldScale = 1; + var _translateX = 0; + var _translateY = 0; + var _isScaling = false; + var _isTouching = false; + var __baseX; + var __baseY; + var _checkCanMove = null; + var _firstMoveDirection = null; + var _declineX = new Decline(); + var _declineY = new Decline(); + var __touchInfo = { historyX: [0, 0], historyY: [0, 0], historyT: [0, 0] }; - const dampingNumber = computed$1(() => { - let val = Number(props2.damping); + var dampingNumber = computed$1(() => { + var val = Number(props2.damping); return isNaN(val) ? 20 : val; }); - const frictionNumber = computed$1(() => { - let val = Number(props2.friction); + var frictionNumber = computed$1(() => { + var val = Number(props2.friction); return isNaN(val) || val <= 0 ? 2 : val; }); - const scaleMinNumber = computed$1(() => { - let val = Number(props2.scaleMin); + var scaleMinNumber = computed$1(() => { + var val = Number(props2.scaleMin); return isNaN(val) ? 0.5 : val; }); - const scaleMaxNumber = computed$1(() => { - let val = Number(props2.scaleMax); + var scaleMaxNumber = computed$1(() => { + var val = Number(props2.scaleMax); return isNaN(val) ? 10 : val; }); - const xMove = computed$1(() => props2.direction === "all" || props2.direction === "horizontal"); - const yMove = computed$1(() => props2.direction === "all" || props2.direction === "vertical"); - const _STD = new STD(1, 9 * Math.pow(dampingNumber.value, 2) / 40, dampingNumber.value); - const _friction = new Friction$1(1, frictionNumber.value); + var xMove = computed$1(() => props2.direction === "all" || props2.direction === "horizontal"); + var yMove = computed$1(() => props2.direction === "all" || props2.direction === "vertical"); + var _STD = new STD(1, 9 * Math.pow(dampingNumber.value, 2) / 40, dampingNumber.value); + var _friction = new Friction$1(1, frictionNumber.value); watch(() => props2.x, (val) => { xSync.value = _getPx(val); }); @@ -11111,8 +11825,8 @@ } function __handleTouchMove(event) { if (!_isScaling && !props2.disabled && _isTouching) { - let x = _translateX; - let y = _translateY; + var x = _translateX; + var y = _translateY; if (_firstMoveDirection === null) { _firstMoveDirection = Math.abs(event.detail.dx / event.detail.dy) > 1 ? "htouchmove" : "vtouchmove"; } @@ -11136,7 +11850,7 @@ __touchInfo.historyT.push(event.detail.timeStamp); if (!_checkCanMove) { event.preventDefault(); - let source = "touch"; + var source = "touch"; if (x < minX.value) { if (props2.outOfBounds) { source = "touch-out-of-bounds"; @@ -11183,14 +11897,14 @@ rootRef.value.style.willChange = "auto"; _isTouching = false; if (!_checkCanMove && !_revise("out-of-bounds") && props2.inertia) { - const xv = 1e3 * (__touchInfo.historyX[1] - __touchInfo.historyX[0]) / (__touchInfo.historyT[1] - __touchInfo.historyT[0]); - const yv = 1e3 * (__touchInfo.historyY[1] - __touchInfo.historyY[0]) / (__touchInfo.historyT[1] - __touchInfo.historyT[0]); + var xv = 1e3 * (__touchInfo.historyX[1] - __touchInfo.historyX[0]) / (__touchInfo.historyT[1] - __touchInfo.historyT[0]); + var yv = 1e3 * (__touchInfo.historyY[1] - __touchInfo.historyY[0]) / (__touchInfo.historyT[1] - __touchInfo.historyT[0]); _friction.setV(xv, yv); _friction.setS(_translateX, _translateY); - const x0 = _friction.delta().x; - const y0 = _friction.delta().y; - let x = x0 + _translateX; - let y = y0 + _translateY; + var x0 = _friction.delta().x; + var y0 = _friction.delta().y; + var x = x0 + _translateX; + var y = y0 + _translateY; if (x < minX.value) { x = minX.value; y = _translateY + (minX.value - _translateX) * y0 / x0; @@ -11211,9 +11925,9 @@ } _friction.setEnd(x, y); _FA = g(_friction, function() { - let t2 = _friction.s(); - let x2 = t2.x; - let y2 = t2.y; + var t2 = _friction.s(); + var x2 = t2.x; + var y2 = t2.y; _setTransform(x2, y2, _scale, "friction"); }, function() { _FA.cancel(); @@ -11225,7 +11939,7 @@ } } function _getLimitXY(x, y) { - let outOfBounds = false; + var outOfBounds = false; if (x > maxX.value) { x = maxX.value; outOfBounds = true; @@ -11257,21 +11971,21 @@ function _updateWH(scale) { scale = scale || _scale; scale = _adjustScale(scale); - let rect = rootRef.value.getBoundingClientRect(); + var rect = rootRef.value.getBoundingClientRect(); height.value = rect.height / _scale; width.value = rect.width / _scale; - let _height = height.value * scale; - let _width = width.value * scale; + var _height = height.value * scale; + var _width = width.value * scale; _scaleOffset.x = (_width - width.value) / 2; _scaleOffset.y = (_height - height.value) / 2; } function _updateBoundary() { - let x = 0 - _offset.x + _scaleOffset.x; - let _width = movableAreaWidth.value - width.value - _offset.x - _scaleOffset.x; + var x = 0 - _offset.x + _scaleOffset.x; + var _width = movableAreaWidth.value - width.value - _offset.x - _scaleOffset.x; minX.value = Math.min(x, _width); maxX.value = Math.max(x, _width); - let y = 0 - _offset.y + _scaleOffset.y; - let _height = movableAreaHeight.value - height.value - _offset.y - _scaleOffset.y; + var y = 0 - _offset.y + _scaleOffset.y; + var _height = movableAreaHeight.value - height.value - _offset.y - _scaleOffset.y; minY.value = Math.min(y, _height); maxY.value = Math.max(y, _height); } @@ -11283,9 +11997,9 @@ scale = _adjustScale(scale); _updateWH(scale); _updateBoundary(); - const limitXY = _getLimitXY(_translateX, _translateY); - const x = limitXY.x; - const y = limitXY.y; + var limitXY = _getLimitXY(_translateX, _translateY); + var x = limitXY.x; + var y = limitXY.y; if (animat) { _animationTo(x, y, scale, "", true, true); } else { @@ -11314,7 +12028,7 @@ if (!props2.scale) { scale = _scale; } - let limitXY = _getLimitXY(x, y); + var limitXY = _getLimitXY(x, y); x = limitXY.x; y = limitXY.y; if (!props2.animation) { @@ -11329,20 +12043,20 @@ _STD._springScale._endPosition = _scale; _STD.setEnd(x, y, scale, 1); _SFA = g(_STD, function() { - let data = _STD.x(); - let x2 = data.x; - let y2 = data.y; - let scale2 = data.scale; + var data = _STD.x(); + var x2 = data.x; + var y2 = data.y; + var scale2 = data.scale; _setTransform(x2, y2, scale2, source, r, o2); }, function() { _SFA.cancel(); }); } function _revise(source) { - let limitXY = _getLimitXY(_translateX, _translateY); - let x = limitXY.x; - let y = limitXY.y; - let outOfBounds = limitXY.outOfBounds; + var limitXY = _getLimitXY(_translateX, _translateY); + var x = limitXY.x; + var y = limitXY.y; + var outOfBounds = limitXY.outOfBounds; if (outOfBounds) { _animationTo(x, y, _scale, source); } @@ -11379,7 +12093,7 @@ scale }); } - let transform = "translateX(" + x + "px) translateY(" + y + "px) translateZ(0px) scale(" + scale + ")"; + var transform = "translateX(" + x + "px) translateY(" + y + "px) translateZ(0px) scale(" + scale + ")"; rootRef.value.style.transform = transform; rootRef.value.style.webkitTransform = transform; _translateX = x; @@ -11391,15 +12105,15 @@ return; } FAandSFACancel(); - let scale = props2.scale ? scaleValueSync.value : 1; + var scale = props2.scale ? scaleValueSync.value : 1; _updateOffset(); _updateWH(scale); _updateBoundary(); _translateX = xSync.value + _scaleOffset.x; _translateY = ySync.value + _scaleOffset.y; - let limitXY = _getLimitXY(_translateX, _translateY); - let x = limitXY.x; - let y = limitXY.y; + var limitXY = _getLimitXY(_translateX, _translateY); + var x = limitXY.x; + var y = limitXY.y; _setTransform(x, y, scale, "", true); _updateOldScale(scale); } @@ -11432,7 +12146,7 @@ _STD.reconfigure(1, 9 * Math.pow(dampingNumber.value, 2) / 40, dampingNumber.value); rootRef.value.style.transformOrigin = "center"; initScrollBounce(); - const context = { + var context = { rootRef, setParent, _endScale, @@ -11450,8 +12164,8 @@ setParent }; } - const OPEN_TYPES = ["navigate", "redirect", "switchTab", "reLaunch", "navigateBack"]; - const props$g = { + var OPEN_TYPES = ["navigate", "redirect", "switchTab", "reLaunch", "navigateBack"]; + var props$g = { hoverClass: { type: String, default: "navigator-hover" @@ -11497,7 +12211,7 @@ setup(props2, { slots }) { - const { + var { hovering, binding } = useHover(props2); @@ -11536,10 +12250,10 @@ } } return () => { - const { + var { hoverClass } = props2; - const hasHoverClass = props2.hoverClass && props2.hoverClass !== "none"; + var hasHoverClass = props2.hoverClass && props2.hoverClass !== "none"; return createVNode("uni-navigator", mergeProps({ "class": hasHoverClass && hovering.value ? hoverClass : "" }, hasHoverClass && binding, { @@ -11550,7 +12264,7 @@ }; } }); - const props$f = { + var props$f = { value: { type: Array, default() { @@ -11578,8 +12292,8 @@ } }; function useState$1(props2) { - const value = reactive([...props2.value]); - const state = reactive({ + var value = reactive([...props2.value]); + var state = reactive({ value, height: 34 }); @@ -11603,38 +12317,38 @@ slots, emit: emit2 }) { - const rootRef = ref(null); - const wrapperRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const state = useState$1(props2); - const resizeSensorRef = ref(null); - const onMountedCallback = () => { - const resizeSensor2 = resizeSensorRef.value; + var rootRef = ref(null); + var wrapperRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var state = useState$1(props2); + var resizeSensorRef = ref(null); + var onMountedCallback = () => { + var resizeSensor2 = resizeSensorRef.value; state.height = resizeSensor2.$el.offsetHeight; }; - let columnsRef = ref([]); + var columnsRef = ref([]); function getItemIndex(vnode) { - const columnVNodes = columnsRef.value; + var columnVNodes = columnsRef.value; if (columnVNodes instanceof HTMLCollection) { return Array.prototype.indexOf.call(columnVNodes, vnode.el); } return columnVNodes.indexOf(vnode); } - const getPickerViewColumn = function(columnInstance) { - const ref2 = computed$1({ + var getPickerViewColumn = function(columnInstance) { + var ref2 = computed$1({ get() { - const index2 = getItemIndex(columnInstance.vnode); + var index2 = getItemIndex(columnInstance.vnode); return state.value[index2] || 0; }, set(current) { - const index2 = getItemIndex(columnInstance.vnode); + var index2 = getItemIndex(columnInstance.vnode); if (index2 < 0) { return; } - const oldCurrent = state.value[index2]; + var oldCurrent = state.value[index2]; if (oldCurrent !== current) { state.value.splice(index2, 1, current); - const value = state.value.map((val) => val); + var value = state.value.map((val) => val); emit2("update:value", value); trigger2("change", {}, { value @@ -11654,7 +12368,7 @@ }); } return () => { - const defaultSlots = slots.default && slots.default(); + var defaultSlots = slots.default && slots.default(); return createVNode("uni-picker-view", { "ref": rootRef }, { @@ -11692,7 +12406,7 @@ if (e2 === void 0) { e2 = (new Date().getTime() - this._startTime) / 1e3; } - const t2 = e2 === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e2); + var t2 = e2 === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e2); this._dt = e2; return this._x + this._v * t2 / this._dragLog - this._v / this._dragLog; } @@ -11700,7 +12414,7 @@ if (e2 === void 0) { e2 = (new Date().getTime() - this._startTime) / 1e3; } - const t2 = e2 === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e2); + var t2 = e2 === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e2); this._dt = e2; return this._v * t2; } @@ -11708,28 +12422,26 @@ return Math.abs(this.dx()) < 3; } reconfigure(e2) { - const t2 = this.x(); - const n = this.dx(); + var t2 = this.x(); + var n = this.dx(); this._drag = e2; this._dragLog = Math.log(e2); this.set(t2, n); } configuration() { - const e2 = this; - return [ - { - label: "Friction", - read: function() { - return e2._drag; - }, - write: function(t2) { - e2.reconfigure(t2); - }, - min: 1e-3, - max: 0.1, - step: 1e-3 - } - ]; + var e2 = this; + return [{ + label: "Friction", + read: function() { + return e2._drag; + }, + write: function(t2) { + e2.reconfigure(t2); + }, + min: 1e-3, + max: 0.1, + step: 1e-3 + }]; } } function o(e2, t2, n) { @@ -11748,33 +12460,33 @@ this._startTime = 0; } _solve(e2, t2) { - const n = this._c; - const i = this._m; - const r = this._k; - const o2 = n * n - 4 * i * r; + var n = this._c; + var i2 = this._m; + var r = this._k; + var o2 = n * n - 4 * i2 * r; if (o2 === 0) { - const a3 = -n / (2 * i); - const s2 = e2; - const l2 = t2 / (a3 * e2); + var a3 = -n / (2 * i2); + var s2 = e2; + var l2 = t2 / (a3 * e2); return { x: function(e22) { return (s2 + l2 * e22) * Math.pow(Math.E, a3 * e22); }, dx: function(e22) { - const t22 = Math.pow(Math.E, a3 * e22); + var t22 = Math.pow(Math.E, a3 * e22); return a3 * (s2 + l2 * e22) * t22 + l2 * t22; } }; } if (o2 > 0) { - const c = (-n - Math.sqrt(o2)) / (2 * i); - const u = (-n + Math.sqrt(o2)) / (2 * i); - const l2 = (t2 - c * e2) / (u - c); - const s2 = e2 - l2; + var c = (-n - Math.sqrt(o2)) / (2 * i2); + var u = (-n + Math.sqrt(o2)) / (2 * i2); + var _l = (t2 - c * e2) / (u - c); + var _s = e2 - _l; return { x: function(e22) { - let t22; - let n2; + var t22; + var n2; if (e22 === this._t) { t22 = this._powER1T; n2 = this._powER2T; @@ -11786,11 +12498,11 @@ if (!n2) { n2 = this._powER2T = Math.pow(Math.E, u * e22); } - return s2 * t22 + l2 * n2; + return _s * t22 + _l * n2; }, dx: function(e22) { - let t22; - let n2; + var t22; + var n2; if (e22 === this._t) { t22 = this._powER1T; n2 = this._powER2T; @@ -11802,23 +12514,23 @@ if (!n2) { n2 = this._powER2T = Math.pow(Math.E, u * e22); } - return s2 * c * t22 + l2 * u * n2; + return _s * c * t22 + _l * u * n2; } }; } - const d = Math.sqrt(4 * i * r - n * n) / (2 * i); - const a2 = -n / 2 * i; - const s = e2; - const l = (t2 - a2 * e2) / d; + var d = Math.sqrt(4 * i2 * r - n * n) / (2 * i2); + var a2 = -n / 2 * i2; + var s = e2; + var l = (t2 - a2 * e2) / d; return { x: function(e22) { return Math.pow(Math.E, a2 * e22) * (s * Math.cos(d * e22) + l * Math.sin(d * e22)); }, dx: function(e22) { - const t22 = Math.pow(Math.E, a2 * e22); - const n2 = Math.cos(d * e22); - const i2 = Math.sin(d * e22); - return t22 * (l * d * n2 - s * d * i2) + a2 * t22 * (l * i2 + s * n2); + var t22 = Math.pow(Math.E, a2 * e22); + var n2 = Math.cos(d * e22); + var i22 = Math.sin(d * e22); + return t22 * (l * d * n2 - s * d * i22) + a2 * t22 * (l * i22 + s * n2); } }; } @@ -11840,23 +12552,23 @@ } if (e2 !== this._endPosition || !a(t2, 0.4)) { t2 = t2 || 0; - let i = this._endPosition; + var i2 = this._endPosition; if (this._solution) { if (a(t2, 0.4)) { t2 = this._solution.dx((n - this._startTime) / 1e3); } - i = this._solution.x((n - this._startTime) / 1e3); + i2 = this._solution.x((n - this._startTime) / 1e3); if (a(t2, 0.4)) { t2 = 0; } - if (a(i, 0.4)) { - i = 0; + if (a(i2, 0.4)) { + i2 = 0; } - i += this._endPosition; + i2 += this._endPosition; } - if (!(this._solution && a(i - e2, 0.4) && a(t2, 0.4))) { + if (!(this._solution && a(i2 - e2, 0.4) && a(t2, 0.4))) { this._endPosition = e2; - this._solution = this._solve(i - this._endPosition, t2); + this._solution = this._solve(i2 - this._endPosition, t2); this._startTime = n; } } @@ -11901,22 +12613,19 @@ function t2(e22, t22) { e22.reconfigure(1, e22.springConstant(), t22); } - return [ - { - label: "Spring Constant", - read: this.springConstant.bind(this), - write: e2.bind(this, this), - min: 100, - max: 1e3 - }, - { - label: "Damping", - read: this.damping.bind(this), - write: t2.bind(this, this), - min: 1, - max: 500 - } - ]; + return [{ + label: "Spring Constant", + read: this.springConstant.bind(this), + write: e2.bind(this, this), + min: 100, + max: 1e3 + }, { + label: "Damping", + read: this.damping.bind(this), + write: t2.bind(this, this), + min: 1, + max: 500 + }]; } } class Scroll { @@ -11963,8 +12672,8 @@ if (this._springing) { return this._spring.x() + this._springOffset; } - let t2 = this._friction.x(e2); - let n = this.dx(e2); + var t2 = this._friction.x(e2); + var n = this.dx(e2); if (t2 > 0 && n >= 0 || t2 < -this._extent && n <= 0) { this._springing = true; this._spring.setEnd(0, n); @@ -11978,7 +12687,7 @@ return t2; } dx(e2) { - let t2; + var t2; if (this._lastTime === e2) { t2 = this._lastDx; } else { @@ -11995,20 +12704,20 @@ this._friction.setVelocityByEnd(e2); } configuration() { - const e2 = this._friction.configuration(); + var e2 = this._friction.configuration(); e2.push.apply(e2, this._spring.configuration()); return e2; } } function createAnimation(scroll, onScroll, onEnd) { - const state = { + var state = { id: 0, cancelled: false }; function startAnimation2(state2, scroll2, onScroll2, onEnd2) { if (!state2 || !state2.cancelled) { onScroll2(scroll2); - const isDone = scroll2.done(); + var isDone = scroll2.done(); if (!isDone) { if (!state2.cancelled) { state2.id = requestAnimationFrame(startAnimation2.bind(null, state2, scroll2, onScroll2, onEnd2)); @@ -12072,7 +12781,7 @@ this.updatePosition(); } onTouchMove(x, y) { - let startPosition = this._startPosition; + var startPosition = this._startPosition; if (this._enableX) { startPosition += x; } else if (this._enableY) { @@ -12103,10 +12812,10 @@ } else if (this._enableY) { this._scroll.set(this._position, o2.y); } - let c; + var c; if (this._enableSnap) { - const s = this._scroll._friction.x(100); - const l = s % this._itemSize; + var s = this._scroll._friction.x(100); + var l = s % this._itemSize; c = Math.abs(l) > this._itemSize / 2 ? s - (this._itemSize - Math.abs(l)) : s - l; if (c <= 0 && c >= -this._extent) { this._scroll.setVelocityByEnd(c); @@ -12118,12 +12827,12 @@ this._lastChangePos = this._position; this._lastIdx = Math.floor(Math.abs(this._position / this._itemSize)); this._animation = createAnimation(this._scroll, () => { - const e2 = Date.now(); - const i = (e2 - this._scroll._startTime) / 1e3; - const r = this._scroll.x(i); + var e2 = Date.now(); + var i2 = (e2 - this._scroll._startTime) / 1e3; + var r = this._scroll.x(i2); this._position = r; this.updatePosition(); - const o22 = this._scroll.dx(i); + var o22 = this._scroll.dx(i2); if (this._shouldDispatchScrollEvent && e2 - this._lastTime > this._lastDelay) { this.dispatchScroll(); this._lastDelay = Math.abs(2e3 / o22); @@ -12155,12 +12864,12 @@ this.dispatchScroll(); } snap() { - const itemSize = this._itemSize; - const position = this._position % itemSize; - const i = Math.abs(position) > this._itemSize / 2 ? this._position - (itemSize - Math.abs(position)) : this._position - position; - if (this._position !== i) { + var itemSize = this._itemSize; + var position = this._position % itemSize; + var i2 = Math.abs(position) > this._itemSize / 2 ? this._position - (itemSize - Math.abs(position)) : this._position - position; + if (this._position !== i2) { this._snapping = true; - this.scrollTo(-i); + this.scrollTo(-i2); if (typeof this._options.onSnap === "function") { this._options.onSnap(Math.floor(Math.abs(this._position) / this._itemSize)); } @@ -12181,7 +12890,7 @@ this._position = 0; } } - const transition = "transform " + (time || 0.2) + "s ease-out"; + var transition = "transform " + (time || 0.2) + "s ease-out"; this._element.style.webkitTransition = "-webkit-" + transition; this._element.style.transition = transition; this.updatePosition(); @@ -12190,7 +12899,7 @@ dispatchScroll() { if (typeof this._options.onScroll === "function" && Math.round(Number(this._lastPos)) !== Math.round(this._position)) { this._lastPos = this._position; - const event = { + var event = { target: { scrollLeft: this._enableX ? -this._position : 0, scrollTop: this._enableY ? -this._position : 0, @@ -12204,8 +12913,8 @@ } } update(height, scrollHeight, itemSize) { - let extent = 0; - const position = this._position; + var extent = 0; + var position = this._position; if (this._enableX) { extent = this._element.childNodes.length ? (scrollHeight || this._element.offsetWidth) - this._element.parentElement.offsetWidth : 0; this._scrollWidth = scrollHeight; @@ -12235,7 +12944,7 @@ this._scroll._extent = extent; } updatePosition() { - let transform = ""; + var transform = ""; if (this._enableX) { transform = "translateX(" + this._position + "px) translateZ(0)"; } else { @@ -12251,15 +12960,15 @@ } } function useScroller(element, options) { - const touchInfo = { + var touchInfo = { trackingID: -1, maxDy: 0, maxDx: 0 }; - const scroller = new Scroller(element, options); + var scroller = new Scroller(element, options); function findDelta(event) { - const touchtrackEvent = event; - const mouseEvent = event; + var touchtrackEvent = event; + var mouseEvent = event; return touchtrackEvent.detail.state === "move" || touchtrackEvent.detail.state === "end" ? { x: touchtrackEvent.detail.dx, y: touchtrackEvent.detail.dy @@ -12269,8 +12978,8 @@ }; } function handleTouchStart(event) { - const touchtrackEvent = event; - const mouseEvent = event; + var touchtrackEvent = event; + var mouseEvent = event; if (touchtrackEvent.detail.state === "start") { touchInfo.trackingID = "touch"; touchInfo.x = touchtrackEvent.detail.x; @@ -12284,9 +12993,7 @@ touchInfo.maxDy = 0; touchInfo.historyX = [0]; touchInfo.historyY = [0]; - touchInfo.historyTime = [ - touchtrackEvent.detail.timeStamp || mouseEvent.timeStamp - ]; + touchInfo.historyTime = [touchtrackEvent.detail.timeStamp || mouseEvent.timeStamp]; touchInfo.listener = scroller; if (scroller.onTouchStart) { scroller.onTouchStart(); @@ -12294,11 +13001,11 @@ event.preventDefault(); } function handleTouchMove(event) { - const touchtrackEvent = event; - const mouseEvent = event; + var touchtrackEvent = event; + var mouseEvent = event; if (touchInfo.trackingID !== -1) { event.preventDefault(); - const delta = findDelta(event); + var delta = findDelta(event); if (delta) { for (touchInfo.maxDy = Math.max(touchInfo.maxDy, Math.abs(delta.y)), touchInfo.maxDx = Math.max(touchInfo.maxDx, Math.abs(delta.x)), touchInfo.historyX.push(delta.x), touchInfo.historyY.push(delta.y), touchInfo.historyTime.push(touchtrackEvent.detail.timeStamp || mouseEvent.timeStamp); touchInfo.historyTime.length > 10; ) { touchInfo.historyTime.shift(); @@ -12314,24 +13021,24 @@ function handleTouchEnd(event) { if (touchInfo.trackingID !== -1) { event.preventDefault(); - const delta = findDelta(event); + var delta = findDelta(event); if (delta) { - const listener = touchInfo.listener; + var listener = touchInfo.listener; touchInfo.trackingID = -1; touchInfo.listener = null; - const length = touchInfo.historyTime.length; - const o2 = { + var length = touchInfo.historyTime.length; + var o2 = { x: 0, y: 0 }; if (length > 2) { - for (let i = touchInfo.historyTime.length - 1, time1 = touchInfo.historyTime[i], x = touchInfo.historyX[i], y = touchInfo.historyY[i]; i > 0; ) { - i--; - const time0 = touchInfo.historyTime[i]; - const time = time1 - time0; + for (var i2 = touchInfo.historyTime.length - 1, time1 = touchInfo.historyTime[i2], x = touchInfo.historyX[i2], y = touchInfo.historyY[i2]; i2 > 0; ) { + i2--; + var time0 = touchInfo.historyTime[i2]; + var time = time1 - time0; if (time > 30 && time < 50) { - o2.x = (x - touchInfo.historyX[i]) / (time / 1e3); - o2.y = (y - touchInfo.historyY[i]) / (time / 1e3); + o2.x = (x - touchInfo.historyX[i2]) / (time / 1e3); + o2.y = (y - touchInfo.historyY[i2]) / (time / 1e3); break; } } @@ -12352,39 +13059,39 @@ handleTouchEnd }; } - let scopedIndex = 0; + var scopedIndex = 0; function useScopedClass(indicatorHeightRef) { - const className = `uni-picker-view-content-${scopedIndex++}`; + var className = "uni-picker-view-content-".concat(scopedIndex++); function updateStyle() { - const style = document.createElement("style"); - style.innerText = `.uni-picker-view-content.${className}>*{height: ${indicatorHeightRef.value}px;overflow: hidden;}`; + var style = document.createElement("style"); + style.innerText = ".uni-picker-view-content.".concat(className, ">*{height: ").concat(indicatorHeightRef.value, "px;overflow: hidden;}"); document.head.appendChild(style); } watch(() => indicatorHeightRef.value, updateStyle); return className; } function useCustomClick(dom) { - const MAX_MOVE = 20; - let x = 0; - let y = 0; + var MAX_MOVE = 20; + var x = 0; + var y = 0; dom.addEventListener("touchstart", (event) => { - const info = event.changedTouches[0]; + var info = event.changedTouches[0]; x = info.clientX; y = info.clientY; }); dom.addEventListener("touchend", (event) => { - const info = event.changedTouches[0]; + var info = event.changedTouches[0]; if (Math.abs(info.clientX - x) < MAX_MOVE && Math.abs(info.clientY - y) < MAX_MOVE) { - const options = { + var options = { bubbles: true, cancelable: true, target: event.target, currentTarget: event.currentTarget }; - const customClick = new CustomEvent("click", options); - const props2 = ["screenX", "screenY", "clientX", "clientY", "pageX", "pageY"]; - props2.forEach((key) => { - customClick[key] = info[key]; + var customClick = new CustomEvent("click", options); + var props2 = ["screenX", "screenY", "clientX", "clientY", "pageX", "pageY"]; + props2.forEach((key2) => { + customClick[key2] = info[key2]; }); event.target.dispatchEvent(customClick); } @@ -12396,36 +13103,36 @@ slots, emit: emit2 }) { - const rootRef = ref(null); - const contentRef = ref(null); - const getPickerViewColumn = inject("getPickerViewColumn"); - const instance = getCurrentInstance(); - const currentRef = getPickerViewColumn ? getPickerViewColumn(instance) : ref(0); - const pickerViewProps = inject("pickerViewProps"); - const pickerViewState = inject("pickerViewState"); - const indicatorHeight = ref(34); - const resizeSensorRef = ref(null); - const initIndicatorHeight = () => { - const resizeSensor2 = resizeSensorRef.value; + var rootRef = ref(null); + var contentRef = ref(null); + var getPickerViewColumn = inject("getPickerViewColumn"); + var instance = getCurrentInstance(); + var currentRef = getPickerViewColumn ? getPickerViewColumn(instance) : ref(0); + var pickerViewProps = inject("pickerViewProps"); + var pickerViewState = inject("pickerViewState"); + var indicatorHeight = ref(34); + var resizeSensorRef = ref(null); + var initIndicatorHeight = () => { + var resizeSensor2 = resizeSensorRef.value; indicatorHeight.value = resizeSensor2.$el.offsetHeight; }; - const maskSize = computed$1(() => (pickerViewState.height - indicatorHeight.value) / 2); - const { + var maskSize = computed$1(() => (pickerViewState.height - indicatorHeight.value) / 2); + var { state: scopedAttrsState } = useScopedAttrs(); - const className = useScopedClass(indicatorHeight); - let scroller; - const state = reactive({ + var className = useScopedClass(indicatorHeight); + var scroller; + var state = reactive({ current: currentRef.value, length: 0 }); - let updatesScrollerRequest; + var updatesScrollerRequest; function updatesScroller() { if (scroller && !updatesScrollerRequest) { updatesScrollerRequest = true; nextTick(() => { updatesScrollerRequest = false; - let current = Math.min(state.current, state.length - 1); + var current = Math.min(state.current, state.length - 1); current = Math.max(current, 0); scroller.update(current * indicatorHeight.value, void 0, indicatorHeight.value); }); @@ -12439,12 +13146,12 @@ }); watch(() => state.current, (current) => currentRef.value = current); watch([() => indicatorHeight.value, () => state.length, () => pickerViewState.height], updatesScroller); - let oldDeltaY = 0; + var oldDeltaY = 0; function handleWheel(event) { - const deltaY = oldDeltaY + event.deltaY; + var deltaY = oldDeltaY + event.deltaY; if (Math.abs(deltaY) > 10) { oldDeltaY = 0; - let current = Math.min(state.current + (deltaY < 0 ? -1 : 1), state.length - 1); + var current = Math.min(state.current + (deltaY < 0 ? -1 : 1), state.length - 1); state.current = current = Math.max(current, 0); scroller.scrollTo(current * indicatorHeight.value); } else { @@ -12455,24 +13162,24 @@ function handleTap({ clientY }) { - const el = rootRef.value; + var el = rootRef.value; if (!scroller.isScrolling()) { - const rect = el.getBoundingClientRect(); - const r = clientY - rect.top - pickerViewState.height / 2; - const o2 = indicatorHeight.value / 2; + var rect = el.getBoundingClientRect(); + var r = clientY - rect.top - pickerViewState.height / 2; + var o2 = indicatorHeight.value / 2; if (!(Math.abs(r) <= o2)) { - const a2 = Math.ceil((Math.abs(r) - o2) / indicatorHeight.value); - const s = r < 0 ? -a2 : a2; - let current = Math.min(state.current + s, state.length - 1); + var a2 = Math.ceil((Math.abs(r) - o2) / indicatorHeight.value); + var s = r < 0 ? -a2 : a2; + var current = Math.min(state.current + s, state.length - 1); state.current = current = Math.max(current, 0); scroller.scrollTo(current * indicatorHeight.value); } } } - const initScroller = () => { - const el = rootRef.value; - const content = contentRef.value; - const { + var initScroller = () => { + var el = rootRef.value; + var content = contentRef.value; + var { scroller: scrollerOrigin, handleTouchStart, handleTouchMove, @@ -12522,8 +13229,8 @@ }); } return () => { - const defaultSlots = slots.default && slots.default(); - const padding = `${maskSize.value}px 0`; + var defaultSlots = slots.default && slots.default(); + var padding = "".concat(maskSize.value, "px 0"); return createVNode("uni-picker-view-column", { "ref": rootRef }, { @@ -12533,7 +13240,7 @@ "class": "uni-picker-view-group" }, [createVNode("div", mergeProps(scopedAttrsState.attrs, { "class": ["uni-picker-view-mask", pickerViewProps.maskClass], - "style": `background-size: 100% ${maskSize.value}px;${pickerViewProps.maskStyle}` + "style": "background-size: 100% ".concat(maskSize.value, "px;").concat(pickerViewProps.maskStyle) }), null, 16), createVNode("div", mergeProps(scopedAttrsState.attrs, { "class": ["uni-picker-view-indicator", pickerViewProps.indicatorClass], "style": pickerViewProps.indicatorStyle @@ -12553,12 +13260,12 @@ }; } }); - const VALUES = { + var VALUES = { activeColor: PRIMARY_COLOR, backgroundColor: "#EBEBEB", activeMode: "backwards" }; - const props$e = { + var props$e = { percent: { type: [Number, String], default: 0, @@ -12609,7 +13316,7 @@ name: "Progress", props: props$e, setup(props2) { - const state = useProgressState(props2); + var state = useProgressState(props2); _activeAnimation(state, props2); watch(() => state.realPercent, (newValue, oldValue) => { state.strokeTimer && clearInterval(state.strokeTimer); @@ -12617,10 +13324,10 @@ _activeAnimation(state, props2); }); return () => { - const { + var { showInfo } = props2; - const { + var { outerBarStyle, innerBarStyle, currentPercent @@ -12643,19 +13350,19 @@ } }); function useProgressState(props2) { - const currentPercent = ref(0); - const outerBarStyle = computed$1(() => `background-color: ${props2.backgroundColor}; height: ${props2.strokeWidth}px;`); - const innerBarStyle = computed$1(() => { - const backgroundColor = props2.color !== VALUES.activeColor && props2.activeColor === VALUES.activeColor ? props2.color : props2.activeColor; - return `width: ${currentPercent.value}%;background-color: ${backgroundColor}`; + var currentPercent = ref(0); + var outerBarStyle = computed$1(() => "background-color: ".concat(props2.backgroundColor, "; height: ").concat(props2.strokeWidth, "px;")); + var innerBarStyle = computed$1(() => { + var backgroundColor = props2.color !== VALUES.activeColor && props2.activeColor === VALUES.activeColor ? props2.color : props2.activeColor; + return "width: ".concat(currentPercent.value, "%;background-color: ").concat(backgroundColor); }); - const realPercent = computed$1(() => { - let realValue = parseFloat(props2.percent); + var realPercent = computed$1(() => { + var realValue = parseFloat(props2.percent); realValue < 0 && (realValue = 0); realValue > 100 && (realValue = 100); return realValue; }); - const state = reactive({ + var state = reactive({ outerBarStyle, innerBarStyle, realPercent, @@ -12680,8 +13387,8 @@ state.currentPercent = state.realPercent; } } - const uniRadioGroupKey = PolySymbol("uniCheckGroup"); - const props$d = { + var uniRadioGroupKey = PolySymbol("uniCheckGroup"); + var props$d = { name: { type: String, default: "" @@ -12694,8 +13401,8 @@ emit: emit2, slots }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); useProvideRadioGroup(props2, trigger2); return () => { return createVNode("uni-radio-group", { @@ -12707,13 +13414,13 @@ } }); function useProvideRadioGroup(props2, trigger2) { - const fields2 = []; + var fields2 = []; onMounted(() => { _resetRadioGroupValue(fields2.length - 1); }); - const getFieldsValue = () => { - var _a; - return (_a = fields2.find((field) => field.value.radioChecked)) == null ? void 0 : _a.value.value; + var getFieldsValue = () => { + var _fields$find; + return (_fields$find = fields2.find((field) => field.value.radioChecked)) === null || _fields$find === void 0 ? void 0 : _fields$find.value.value; }; provide(uniRadioGroupKey, { addField(field) { @@ -12723,17 +13430,17 @@ fields2.splice(fields2.indexOf(field), 1); }, radioChange($event, field) { - const index2 = fields2.indexOf(field); + var index2 = fields2.indexOf(field); _resetRadioGroupValue(index2, true); trigger2("change", $event, { value: getFieldsValue() }); } }); - const uniForm = inject(uniFormKey, false); - const formField = { + var uniForm = inject(uniFormKey, false); + var formField = { submit: () => { - let data = ["", null]; + var data = ["", null]; if (props2.name !== "") { data[0] = props2.name; data[1] = getFieldsValue(); @@ -12753,19 +13460,19 @@ value: field.value.value }; } - function _resetRadioGroupValue(key, change) { + function _resetRadioGroupValue(key2, change) { fields2.forEach((value, index2) => { - if (index2 === key) { + if (index2 === key2) { return; } if (change) { setFieldChecked(fields2[index2], false); } else { - fields2.forEach((v2, i) => { - if (index2 >= i) { + fields2.forEach((v2, i2) => { + if (index2 >= i2) { return; } - if (fields2[i].value.radioChecked) { + if (fields2[i2].value.radioChecked) { setFieldChecked(fields2[index2], false); } }); @@ -12774,7 +13481,7 @@ } return fields2; } - const props$c = { + var props$c = { checked: { type: [Boolean, String], default: false @@ -12802,22 +13509,22 @@ setup(props2, { slots }) { - const radioChecked = ref(props2.checked); - const radioValue = ref(props2.value); - const checkedStyle = computed$1(() => `background-color: ${props2.color};border-color: ${props2.color};`); + var radioChecked = ref(props2.checked); + var radioValue = ref(props2.value); + var checkedStyle = computed$1(() => "background-color: ".concat(props2.color, ";border-color: ").concat(props2.color, ";")); watch([() => props2.checked, () => props2.value], ([newChecked, newModelValue]) => { radioChecked.value = newChecked; radioValue.value = newModelValue; }); - const reset2 = () => { + var reset2 = () => { radioChecked.value = false; }; - const { + var { uniCheckGroup, uniLabel, field } = useRadioInject(radioChecked, radioValue, reset2); - const _onClick = ($event) => { + var _onClick = ($event) => { if (props2.disabled) { return; } @@ -12834,7 +13541,7 @@ "label-click": _onClick }); return () => { - const { + var { booleanAttrs } = useBooleanAttr(props2, "disabled"); return createVNode("uni-radio", mergeProps(booleanAttrs, { @@ -12853,7 +13560,7 @@ } }); function useRadioInject(radioChecked, radioValue, reset2) { - const field = computed$1({ + var field = computed$1({ get: () => ({ radioChecked: Boolean(radioChecked.value), value: radioValue.value @@ -12864,18 +13571,18 @@ radioChecked.value = checked; } }); - const formField = { + var formField = { reset: reset2 }; - const uniCheckGroup = inject(uniRadioGroupKey, false); + var uniCheckGroup = inject(uniRadioGroupKey, false); if (!!uniCheckGroup) { uniCheckGroup.addField(field); } - const uniForm = inject(uniFormKey, false); + var uniForm = inject(uniFormKey, false); if (!!uniForm) { uniForm.addField(formField); } - const uniLabel = inject(uniLabelKey, false); + var uniLabel = inject(uniLabelKey, false); onBeforeUnmount(() => { uniCheckGroup && uniCheckGroup.removeField(field); uniForm && uniForm.removeField(formField); @@ -12892,8 +13599,8 @@ } function parseAttrs(attrs2) { return attrs2.reduce(function(pre, attr2) { - let value = attr2.value; - const name = attr2.name; + var value = attr2.value; + var name = attr2.name; if (value.match(/ /) && name !== "style") { value = value.split(" "); } @@ -12911,21 +13618,21 @@ } function parseHtml(html) { html = removeDOCTYPE(html); - const stacks = []; - const results = { + var stacks = []; + var results = { node: "root", children: [] }; HTMLParser(html, { start: function(tag, attrs2, unary) { - const node = { + var node = { name: tag }; if (attrs2.length !== 0) { node.attrs = parseAttrs(attrs2); } if (unary) { - const parent = stacks[0] || results; + var parent = stacks[0] || results; if (!parent.children) { parent.children = []; } @@ -12935,13 +13642,13 @@ } }, end: function(tag) { - const node = stacks.shift(); + var node = stacks.shift(); if (node.name !== tag) console.error("invalid state: mismatch end tag"); if (stacks.length === 0) { results.children.push(node); } else { - const parent = stacks[0]; + var parent = stacks[0]; if (!parent.children) { parent.children = []; } @@ -12949,14 +13656,14 @@ } }, chars: function(text2) { - const node = { + var node = { type: "text", text: text2 }; if (stacks.length === 0) { results.children.push(node); } else { - const parent = stacks[0]; + var parent = stacks[0]; if (!parent.children) { parent.children = []; } @@ -12964,11 +13671,11 @@ } }, comment: function(text2) { - const node = { + var node = { node: "comment", text: text2 }; - const parent = stacks[0]; + var parent = stacks[0]; if (!parent.children) { parent.children = []; } @@ -12977,7 +13684,7 @@ }); return results.children; } - const TAGS = { + var TAGS = { a: "", abbr: "", b: "", @@ -13022,7 +13729,7 @@ tr: "", ul: "" }; - const CHARS = { + var CHARS = { amp: "&", gt: ">", lt: "<", @@ -13041,7 +13748,7 @@ if (/^#x[0-9a-f]{1,4}$/i.test(stage)) { return String.fromCharCode("0" + stage.slice(1)); } - const wrap = document.createElement("div"); + var wrap = document.createElement("div"); wrap.innerHTML = match; return wrap.innerText || wrap.textContent; }); @@ -13055,19 +13762,19 @@ if (!(typeof node.name === "string" && node.name)) { return; } - const tagName = node.name.toLowerCase(); + var tagName = node.name.toLowerCase(); if (!hasOwn$1(TAGS, tagName)) { return; } - const elem = document.createElement(tagName); + var elem = document.createElement(tagName); if (!elem) { return; } - const attrs2 = node.attrs; + var attrs2 = node.attrs; if (isPlainObject(attrs2)) { - const tagAttrs = TAGS[tagName] || []; + var tagAttrs = TAGS[tagName] || []; Object.keys(attrs2).forEach(function(name) { - let value = attrs2[name]; + var value = attrs2[name]; switch (name) { case "class": Array.isArray(value) && (value = value.join(" ")); @@ -13081,7 +13788,7 @@ } }); } - const children = node.children; + var children = node.children; if (Array.isArray(children) && children.length) { parseNodes(node.children, elem); } @@ -13094,7 +13801,7 @@ }); return parentNode; } - const props$b = { + var props$b = { nodes: { type: [Array, String], default: function() { @@ -13109,12 +13816,12 @@ }, props: props$b, setup(props2) { - const rootRef = ref(null); + var rootRef = ref(null); function _renderNodes(nodes) { if (typeof nodes === "string") { nodes = parseHtml(nodes); } - const nodeList = parseNodes(nodes, document.createDocumentFragment()); + var nodeList = parseNodes(nodes, document.createDocumentFragment()); rootRef.value.firstElementChild.innerHTML = ""; rootRef.value.firstElementChild.appendChild(nodeList); } @@ -13133,8 +13840,8 @@ }; } }); - const passiveOptions = passive(true); - const props$a = { + var passiveOptions = passive(true); + var props$a = { scrollX: { type: [Boolean, String], default: false @@ -13203,31 +13910,31 @@ emit: emit2, slots }) { - const rootRef = ref(null); - const main = ref(null); - const wrap = ref(null); - const content = ref(null); - const refresherinner = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const { + var rootRef = ref(null); + var main = ref(null); + var wrap = ref(null); + var content = ref(null); + var refresherinner = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var { state, scrollTopNumber, scrollLeftNumber } = useScrollViewState(props2); useScrollViewLoader(props2, state, scrollTopNumber, scrollLeftNumber, trigger2, rootRef, main, content, emit2); - const mainStyle = computed$1(() => { - let style = ""; + var mainStyle = computed$1(() => { + var style = ""; props2.scrollX ? style += "overflow-x:auto;" : style += "overflow-x:hidden;"; props2.scrollY ? style += "overflow-y:auto;" : style += "overflow-y:hidden;"; return style; }); return () => { - const { + var { refresherEnabled, refresherBackground, refresherDefaultStyle } = props2; - const { + var { refresherHeight, refreshState, refreshRotate @@ -13290,13 +13997,13 @@ } }); function useScrollViewState(props2) { - const scrollTopNumber = computed$1(() => { + var scrollTopNumber = computed$1(() => { return Number(props2.scrollTop) || 0; }); - const scrollLeftNumber = computed$1(() => { + var scrollLeftNumber = computed$1(() => { return Number(props2.scrollLeft) || 0; }); - const state = reactive({ + var state = reactive({ lastScrollTop: scrollTopNumber.value, lastScrollLeft: scrollLeftNumber.value, lastScrollToUpperTime: 0, @@ -13312,29 +14019,29 @@ }; } function useScrollViewLoader(props2, state, scrollTopNumber, scrollLeftNumber, trigger2, rootRef, main, content, emit2) { - let _lastScrollTime = 0; - let beforeRefreshing = false; - let toUpperNumber = 0; - let triggerAbort = false; - let __transitionEnd = () => { + var _lastScrollTime = 0; + var beforeRefreshing = false; + var toUpperNumber = 0; + var triggerAbort = false; + var __transitionEnd = () => { }; - const upperThresholdNumber = computed$1(() => { - let val = Number(props2.upperThreshold); + var upperThresholdNumber = computed$1(() => { + var val = Number(props2.upperThreshold); return isNaN(val) ? 50 : val; }); - const lowerThresholdNumber = computed$1(() => { - let val = Number(props2.lowerThreshold); + var lowerThresholdNumber = computed$1(() => { + var val = Number(props2.lowerThreshold); return isNaN(val) ? 50 : val; }); function scrollTo2(scrollToValue, direction2) { - const container = main.value; - let transformValue = 0; - let transform = ""; + var container = main.value; + var transformValue = 0; + var transform = ""; scrollToValue < 0 ? scrollToValue = 0 : direction2 === "x" && scrollToValue > container.scrollWidth - container.offsetWidth ? scrollToValue = container.scrollWidth - container.offsetWidth : direction2 === "y" && scrollToValue > container.scrollHeight - container.offsetHeight && (scrollToValue = container.scrollHeight - container.offsetHeight); direction2 === "x" ? transformValue = container.scrollLeft - scrollToValue : direction2 === "y" && (transformValue = container.scrollTop - scrollToValue); if (transformValue === 0) return; - let _content = content.value; + var _content = content.value; _content.style.transition = "transform .3s ease-out"; _content.style.webkitTransition = "-webkit-transform .3s ease-out"; if (direction2 === "x") { @@ -13358,7 +14065,7 @@ function _handleScroll($event) { if ($event.timeStamp - _lastScrollTime > 20) { _lastScrollTime = $event.timeStamp; - const target = $event.target; + var target = $event.target; trigger2("scroll", $event, { scrollLeft: target.scrollLeft, scrollTop: target.scrollTop, @@ -13424,17 +14131,17 @@ function _scrollIntoViewChanged(val) { if (val) { if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) { - console.error(`id error: scroll-into-view=${val}`); + console.error("id error: scroll-into-view=".concat(val)); return; } - let element = rootRef.value.querySelector("#" + val); + var element = rootRef.value.querySelector("#" + val); if (element) { - let mainRect = main.value.getBoundingClientRect(); - let elRect = element.getBoundingClientRect(); + var mainRect = main.value.getBoundingClientRect(); + var elRect = element.getBoundingClientRect(); if (props2.scrollX) { - let left = elRect.left - mainRect.left; - let scrollLeft = main.value.scrollLeft; - let x = scrollLeft + left; + var left = elRect.left - mainRect.left; + var scrollLeft = main.value.scrollLeft; + var x = scrollLeft + left; if (props2.scrollWithAnimation) { scrollTo2(x, "x"); } else { @@ -13442,9 +14149,9 @@ } } if (props2.scrollY) { - let top = elRect.top - mainRect.top; - let scrollTop = main.value.scrollTop; - let y = scrollTop + top; + var top = elRect.top - mainRect.top; + var scrollTop = main.value.scrollTop; + var y = scrollTop + top; if (props2.scrollWithAnimation) { scrollTo2(y, "y"); } else { @@ -13459,7 +14166,7 @@ content.value.style.webkitTransition = ""; content.value.style.transform = ""; content.value.style.webkitTransform = ""; - let _main = main.value; + var _main = main.value; if (direction2 === "x") { _main.style.overflowX = props2.scrollX ? "auto" : "hidden"; _main.scrollLeft = val; @@ -13500,19 +14207,19 @@ _scrollTopChanged(scrollTopNumber.value); _scrollLeftChanged(scrollLeftNumber.value); _scrollIntoViewChanged(props2.scrollIntoView); - let __handleScroll = function(event) { + var __handleScroll = function(event) { event.stopPropagation(); _handleScroll(event); }; - let touchStart = { + var touchStart = { x: 0, y: 0 }; - let needStop = null; - let __handleTouchMove = function(event) { - let x = event.touches[0].pageX; - let y = event.touches[0].pageY; - let _main = main.value; + var needStop = null; + var __handleTouchMove = function(event) { + var x = event.touches[0].pageX; + var y = event.touches[0].pageY; + var _main = main.value; if (Math.abs(x - touchStart.x) > Math.abs(y - touchStart.y)) { if (props2.scrollX) { if (_main.scrollLeft === 0 && x > touchStart.x) { @@ -13549,7 +14256,7 @@ state.refreshState = "pulling"; } if (props2.refresherEnabled && state.refreshState === "pulling") { - const dy = y - touchStart.y; + var dy = y - touchStart.y; if (toUpperNumber === 0) { toUpperNumber = y; } @@ -13565,11 +14272,11 @@ state.refresherHeight = dy + props2.refresherThreshold; triggerAbort = false; } - const route = state.refresherHeight / props2.refresherThreshold; + var route = state.refresherHeight / props2.refresherThreshold; state.refreshRotate = (route > 1 ? 1 : route) * 360; } }; - let __handleTouchStart = function(event) { + var __handleTouchStart = function(event) { if (event.touches.length === 1) { disableScrollBounce({ disable: true @@ -13580,7 +14287,7 @@ }; } }; - let __handleTouchEnd = function(event) { + var __handleTouchEnd = function(event) { touchStart = { x: 0, y: 0 @@ -13627,7 +14334,7 @@ } }); } - const props$9 = { + var props$9 = { name: { type: String, default: "" @@ -13688,16 +14395,16 @@ setup(props2, { emit: emit2 }) { - const sliderRef = ref(null); - const sliderValueRef = ref(null); - const sliderHandleRef = ref(null); - const sliderValue = ref(Number(props2.value)); + var sliderRef = ref(null); + var sliderValueRef = ref(null); + var sliderHandleRef = ref(null); + var sliderValue = ref(Number(props2.value)); watch(() => props2.value, (val) => { sliderValue.value = Number(val); }); - const trigger2 = useCustomEvent(sliderRef, emit2); - const state = useSliderState(props2, sliderValue); - const { + var trigger2 = useCustomEvent(sliderRef, emit2); + var state = useSliderState(props2, sliderValue); + var { _onClick, _onTrack } = useSliderLoader(props2, sliderValue, sliderRef, sliderValueRef, trigger2); @@ -13705,7 +14412,7 @@ useTouchtrack(sliderHandleRef.value, _onTrack); }); return () => { - const { + var { setBgColor, setBlockBg, setActiveColor, @@ -13742,18 +14449,18 @@ } }); function useSliderState(props2, sliderValue) { - const _getValueWidth = () => { - const max = Number(props2.max); - const min = Number(props2.min); - return 100 * (sliderValue.value - min) / (max - min) + "%"; + var _getValueWidth = () => { + var max2 = Number(props2.max); + var min2 = Number(props2.min); + return 100 * (sliderValue.value - min2) / (max2 - min2) + "%"; }; - const _getBgColor = () => { + var _getBgColor = () => { return props2.backgroundColor !== "#e9e9e9" ? props2.backgroundColor : props2.color !== "#007aff" ? props2.color : "#007aff"; }; - const _getActiveColor = () => { + var _getActiveColor = () => { return props2.activeColor !== "#007aff" ? props2.activeColor : props2.selectedColor !== "#e9e9e9" ? props2.selectedColor : "#e9e9e9"; }; - const state = { + var state = { setBgColor: computed$1(() => ({ backgroundColor: _getBgColor() })), @@ -13776,7 +14483,7 @@ return state; } function useSliderLoader(props2, sliderValue, sliderRef, sliderValueRef, trigger2) { - const _onClick = ($event) => { + var _onClick = ($event) => { if (props2.disabled) { return; } @@ -13785,26 +14492,26 @@ value: sliderValue.value }); }; - const _filterValue = (e2) => { - const max = Number(props2.max); - const min = Number(props2.min); - const step = Number(props2.step); - return e2 < min ? min : e2 > max ? max : computeController.mul.call(Math.round((e2 - min) / step), step) + min; + var _filterValue = (e2) => { + var max2 = Number(props2.max); + var min2 = Number(props2.min); + var step2 = Number(props2.step); + return e2 < min2 ? min2 : e2 > max2 ? max2 : computeController.mul.call(Math.round((e2 - min2) / step2), step2) + min2; }; - const _onUserChangedValue = (e2) => { - const max = Number(props2.max); - const min = Number(props2.min); - const sliderRightBox = sliderValueRef.value; - const sliderRightBoxLeft = getComputedStyle(sliderRightBox, null).marginLeft; - let sliderRightBoxWidth = sliderRightBox.offsetWidth; + var _onUserChangedValue = (e2) => { + var max2 = Number(props2.max); + var min2 = Number(props2.min); + var sliderRightBox = sliderValueRef.value; + var sliderRightBoxLeft = getComputedStyle(sliderRightBox, null).marginLeft; + var sliderRightBoxWidth = sliderRightBox.offsetWidth; sliderRightBoxWidth = sliderRightBoxWidth + parseInt(sliderRightBoxLeft); - const slider2 = sliderRef.value; - const offsetWidth = slider2.offsetWidth - (props2.showValue ? sliderRightBoxWidth : 0); - const boxLeft = slider2.getBoundingClientRect().left; - const value = (e2.x - boxLeft) * (max - min) / offsetWidth + min; + var slider2 = sliderRef.value; + var offsetWidth = slider2.offsetWidth - (props2.showValue ? sliderRightBoxWidth : 0); + var boxLeft = slider2.getBoundingClientRect().left; + var value = (e2.x - boxLeft) * (max2 - min2) / offsetWidth + min2; sliderValue.value = _filterValue(value); }; - const _onTrack = (e2) => { + var _onTrack = (e2) => { if (!props2.disabled) { return e2.detail.state === "move" ? (_onUserChangedValue({ x: e2.detail.x @@ -13815,12 +14522,12 @@ }); } }; - const uniForm = inject(uniFormKey, false); + var uniForm = inject(uniFormKey, false); if (!!uniForm) { - const field = { + var field = { reset: () => sliderValue.value = Number(props2.min), submit: () => { - const data = ["", null]; + var data = ["", null]; if (props2.name !== "") { data[0] = props2.name; data[1] = sliderValue.value; @@ -13840,9 +14547,9 @@ } var computeController = { mul: function(arg) { - let m = 0; - let s1 = this.toString(); - let s2 = arg.toString(); + var m = 0; + var s1 = this.toString(); + var s2 = arg.toString(); try { m += s1.split(".")[1].length; } catch (e2) { @@ -13854,7 +14561,7 @@ return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); } }; - const props$8 = { + var props$8 = { indicatorDots: { type: [Boolean, String], default: false @@ -13917,19 +14624,19 @@ } }; function useState(props2) { - const interval = computed$1(() => { - const interval2 = Number(props2.interval); + var interval = computed$1(() => { + var interval2 = Number(props2.interval); return isNaN(interval2) ? 5e3 : interval2; }); - const duration = computed$1(() => { - const duration2 = Number(props2.duration); + var duration = computed$1(() => { + var duration2 = Number(props2.duration); return isNaN(duration2) ? 500 : duration2; }); - const displayMultipleItems = computed$1(() => { - const displayMultipleItems2 = Math.round(props2.displayMultipleItems); + var displayMultipleItems = computed$1(() => { + var displayMultipleItems2 = Math.round(props2.displayMultipleItems); return isNaN(displayMultipleItems2) ? 1 : displayMultipleItems2; }); - const state = reactive({ + var state = reactive({ interval, duration, displayMultipleItems, @@ -13946,29 +14653,29 @@ timer = null; } } - let timer = null; - let invalid = true; - let viewportPosition = 0; - let viewportMoveRatio = 1; - let animating = null; - let requestedAnimation = false; - let contentTrackViewport = 0; - let transitionStart; - let currentChangeSource = ""; - let animationFrame; - const circularEnabled = computed$1(() => props2.circular && swiperContexts.value.length > state.displayMultipleItems); + var timer = null; + var invalid = true; + var viewportPosition = 0; + var viewportMoveRatio = 1; + var animating = null; + var requestedAnimation = false; + var contentTrackViewport = 0; + var transitionStart; + var currentChangeSource = ""; + var animationFrame; + var circularEnabled = computed$1(() => props2.circular && swiperContexts.value.length > state.displayMultipleItems); function checkCircularLayout(index2) { if (!invalid) { - for (let items = swiperContexts.value, n = items.length, i = index2 + state.displayMultipleItems, r = 0; r < n; r++) { - const item = items[r]; - const s = Math.floor(index2 / n) * n + r; - const l = s + n; - const c = s - n; - const u = Math.max(index2 - (s + 1), s - i, 0); - const d = Math.max(index2 - (l + 1), l - i, 0); - const h2 = Math.max(index2 - (c + 1), c - i, 0); - const p2 = Math.min(u, d, h2); - const position = [s, l, c][[u, d, h2].indexOf(p2)]; + for (var items = swiperContexts.value, n = items.length, i2 = index2 + state.displayMultipleItems, r = 0; r < n; r++) { + var item = items[r]; + var s = Math.floor(index2 / n) * n + r; + var l = s + n; + var c = s - n; + var u = Math.max(index2 - (s + 1), s - i2, 0); + var d = Math.max(index2 - (l + 1), l - i2, 0); + var h2 = Math.max(index2 - (c + 1), c - i2, 0); + var p2 = Math.min(u, d, h2); + var position = [s, l, c][[u, d, h2].indexOf(p2)]; item.updatePosition(position, props2.vertical); } } @@ -13979,10 +14686,10 @@ checkCircularLayout(index2); } } - const x = props2.vertical ? "0" : 100 * -index2 * viewportMoveRatio + "%"; - const y = props2.vertical ? 100 * -index2 * viewportMoveRatio + "%" : "0"; - const transform = "translate(" + x + ", " + y + ") translateZ(0)"; - const slideFrame = slideFrameRef.value; + var x = props2.vertical ? "0" : 100 * -index2 * viewportMoveRatio + "%"; + var y = props2.vertical ? 100 * -index2 * viewportMoveRatio + "%" : "0"; + var transform = "translate(" + x + ", " + y + ") translateZ(0)"; + var slideFrame = slideFrameRef.value; if (slideFrame) { slideFrame.style.webkitTransform = transform; slideFrame.style.transform = transform; @@ -13995,7 +14702,7 @@ transitionStart = index2; } index2 -= Math.floor(transitionStart); - const items = swiperContexts.value; + var items = swiperContexts.value; if (index2 <= -(items.length - 1)) { index2 += items.length; } else if (index2 >= items.length) { @@ -14014,11 +14721,11 @@ } } function normalizeCurrentValue(current) { - const length = swiperContexts.value.length; + var length = swiperContexts.value.length; if (!length) { return -1; } - const index2 = (Math.round(current) % length + length) % length; + var index2 = (Math.round(current) % length + length) % length; if (circularEnabled.value) { if (length <= state.displayMultipleItems) { return 0; @@ -14036,20 +14743,20 @@ requestedAnimation = false; return; } - const _animating = animating; - const toPos = _animating.toPos; - const acc = _animating.acc; - const endTime = _animating.endTime; - const source = _animating.source; - const time = endTime - Date.now(); + var _animating = animating; + var toPos = _animating.toPos; + var acc = _animating.acc; + var endTime = _animating.endTime; + var source = _animating.source; + var time = endTime - Date.now(); if (time <= 0) { updateViewport(toPos); animating = null; requestedAnimation = false; transitionStart = null; - const item = swiperContexts.value[state.current]; + var item = swiperContexts.value[state.current]; if (item) { - const currentItemId = item.getItemId(); + var currentItemId = item.getItemId(); trigger2("animationfinish", {}, { current: state.current, currentItemId, @@ -14058,16 +14765,16 @@ } return; } - const s = acc * time * time / 2; - const l = toPos + s; + var s = acc * time * time / 2; + var l = toPos + s; updateViewport(l); animationFrame = requestAnimationFrame(animateFrameFuncProto); } function animateViewport(current, source, n) { cancelViewportAnimation(); - const duration = state.duration; - const length = swiperContexts.value.length; - let position = viewportPosition; + var duration = state.duration; + var length = swiperContexts.value.length; + var position = viewportPosition; if (circularEnabled.value) { if (n < 0) { for (; position < current; ) { @@ -14108,8 +14815,8 @@ } function scheduleAutoplay() { cancelSchedule(); - const items = swiperContexts.value; - const callback = function() { + var items = swiperContexts.value; + var callback = function() { timer = null; currentChangeSource = "autoplay"; if (circularEnabled.value) { @@ -14127,23 +14834,23 @@ function resetLayout() { cancelSchedule(); endViewportAnimation(); - const items = swiperContexts.value; - for (let i = 0; i < items.length; i++) { - items[i].updatePosition(i, props2.vertical); + var items = swiperContexts.value; + for (var i2 = 0; i2 < items.length; i2++) { + items[i2].updatePosition(i2, props2.vertical); } viewportMoveRatio = 1; - const slideFrameEl = slideFrameRef.value; + var slideFrameEl = slideFrameRef.value; if (state.displayMultipleItems === 1 && items.length) { - const itemRect = items[0].getBoundingClientRect(); - const slideFrameRect = slideFrameEl.getBoundingClientRect(); + var itemRect = items[0].getBoundingClientRect(); + var slideFrameRect = slideFrameEl.getBoundingClientRect(); viewportMoveRatio = itemRect.width / slideFrameRect.width; if (!(viewportMoveRatio > 0 && viewportMoveRatio < 1)) { viewportMoveRatio = 1; } } - const position = viewportPosition; + var position = viewportPosition; viewportPosition = -2; - const current = state.current; + var current = state.current; if (current >= 0) { invalid = false; if (state.userTracking) { @@ -14161,12 +14868,12 @@ } } watch([() => props2.current, () => props2.currentItemId, () => [...swiperContexts.value]], () => { - let current = -1; + var current = -1; if (props2.currentItemId) { - for (let i = 0, items = swiperContexts.value; i < items.length; i++) { - const itemId = items[i].getItemId(); + for (var i2 = 0, items = swiperContexts.value; i2 < items.length; i2++) { + var itemId = items[i2].getItemId(); if (itemId === props2.currentItemId) { - current = i; + current = i2; break; } } @@ -14188,16 +14895,16 @@ } }); function currentChanged(current, history) { - const source = currentChangeSource; + var source = currentChangeSource; currentChangeSource = ""; - const items = swiperContexts.value; + var items = swiperContexts.value; if (!source) { - const length = items.length; + var length = items.length; animateViewport(current, "", circularEnabled.value && history + (length - current) % length > length / 2 ? 1 : 0); } - const item = items[current]; + var item = items[current]; if (item) { - const currentItemId = state.currentItemId = item.getItemId(); + var currentItemId = state.currentItemId = item.getItemId(); trigger2("change", {}, { current: state.current, currentItemId, @@ -14222,9 +14929,9 @@ watch(() => props2.autoplay && !state.userTracking, inintAutoplay); inintAutoplay(props2.autoplay && !state.userTracking); onMounted(() => { - let userDirectionChecked = false; - let contentTrackSpeed = 0; - let contentTrackT = 0; + var userDirectionChecked = false; + var contentTrackSpeed = 0; + var contentTrackT = 0; function handleTrackStart() { cancelSchedule(); contentTrackViewport = viewportPosition; @@ -14233,15 +14940,15 @@ cancelViewportAnimation(); } function handleTrackMove(data) { - const oldContentTrackT = contentTrackT; + var oldContentTrackT = contentTrackT; contentTrackT = Date.now(); - const length = swiperContexts.value.length; - const other = length - state.displayMultipleItems; + var length = swiperContexts.value.length; + var other = length - state.displayMultipleItems; function calc2(val) { return 0.5 - 0.25 / (val + 0.5); } function move(oldVal, newVal) { - let val = contentTrackViewport + oldVal; + var val = contentTrackViewport + oldVal; contentTrackSpeed = 0.6 * contentTrackSpeed + 0.4 * newVal; if (!circularEnabled.value) { if (val < 0 || val > other) { @@ -14257,8 +14964,8 @@ } updateViewport(val); } - const time = contentTrackT - oldContentTrackT || 1; - const slideFrameEl = slideFrameRef.value; + var time = contentTrackT - oldContentTrackT || 1; + var slideFrameEl = slideFrameRef.value; if (props2.vertical) { move(-data.dy / slideFrameEl.offsetHeight, -data.ddy / time); } else { @@ -14267,12 +14974,12 @@ } function handleTrackEnd(isCancel) { state.userTracking = false; - const t2 = contentTrackSpeed / Math.abs(contentTrackSpeed); - let n = 0; + var t2 = contentTrackSpeed / Math.abs(contentTrackSpeed); + var n = 0; if (!isCancel && Math.abs(contentTrackSpeed) > 0.2) { n = 0.5 * t2; } - const current = normalizeCurrentValue(viewportPosition + n); + var current = normalizeCurrentValue(viewportPosition + n); if (isCancel) { updateViewport(contentTrackViewport); } else { @@ -14300,8 +15007,8 @@ if (state.userTracking) { if (!userDirectionChecked) { userDirectionChecked = true; - const t2 = Math.abs(event.detail.dx); - const n = Math.abs(event.detail.dy); + var t2 = Math.abs(event.detail.dx); + var n = Math.abs(event.detail.dy); if (t2 >= n && props2.vertical) { state.userTracking = false; } else { @@ -14341,13 +15048,13 @@ slots, emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const slidesWrapperRef = ref(null); - const slideFrameRef = ref(null); - const state = useState(props2); - const slidesStyle = computed$1(() => { - let style = {}; + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var slidesWrapperRef = ref(null); + var slideFrameRef = ref(null); + var state = useState(props2); + var slidesStyle = computed$1(() => { + var style = {}; if (props2.nextMargin || props2.previousMargin) { style = props2.vertical ? { left: 0, @@ -14363,27 +15070,30 @@ } return style; }); - const slideFrameStyle = computed$1(() => { - const value = Math.abs(100 / state.displayMultipleItems) + "%"; + var slideFrameStyle = computed$1(() => { + var value = Math.abs(100 / state.displayMultipleItems) + "%"; return { width: props2.vertical ? "100%" : value, height: !props2.vertical ? "100%" : value }; }); - let swiperItems = []; - const originSwiperContexts = []; - const swiperContexts = ref([]); + var swiperItems = []; + var originSwiperContexts = []; + var swiperContexts = ref([]); function updateSwiperContexts() { - const contexts = []; - for (let index2 = 0; index2 < swiperItems.length; index2++) { - let swiperItem2 = swiperItems[index2]; + var contexts = []; + var _loop = function(index3) { + var swiperItem2 = swiperItems[index3]; if (!(swiperItem2 instanceof Element)) { swiperItem2 = swiperItem2.el; } - const swiperContext = originSwiperContexts.find((context) => swiperItem2 === context.rootRef.value); + var swiperContext = originSwiperContexts.find((context) => swiperItem2 === context.rootRef.value); if (swiperContext) { contexts.push(markRaw(swiperContext)); } + }; + for (var index2 = 0; index2 < swiperItems.length; index2++) { + _loop(index2); } swiperContexts.value = contexts; } @@ -14393,24 +15103,24 @@ updateSwiperContexts(); }); } - const addSwiperContext = function(swiperContext) { + var addSwiperContext = function(swiperContext) { originSwiperContexts.push(swiperContext); updateSwiperContexts(); }; provide("addSwiperContext", addSwiperContext); - const removeSwiperContext = function(swiperContext) { - const index2 = originSwiperContexts.indexOf(swiperContext); + var removeSwiperContext = function(swiperContext) { + var index2 = originSwiperContexts.indexOf(swiperContext); if (index2 >= 0) { originSwiperContexts.splice(index2, 1); updateSwiperContexts(); } }; provide("removeSwiperContext", removeSwiperContext); - const { + var { onSwiperDotClick } = useLayout(props2, state, swiperContexts, slideFrameRef, emit2, trigger2); return () => { - const defaultSlots = slots.default && slots.default(); + var defaultSlots = slots.default && slots.default(); swiperItems = flatVNode(defaultSlots); return createVNode("uni-swiper", { "ref": rootRef @@ -14441,7 +15151,7 @@ }; } }); - const props$7 = { + var props$7 = { itemId: { type: String, default: "" @@ -14453,21 +15163,21 @@ setup(props2, { slots }) { - const rootRef = ref(null); - const context = { + var rootRef = ref(null); + var context = { rootRef, getItemId() { return props2.itemId; }, getBoundingClientRect() { - const el = rootRef.value; + var el = rootRef.value; return el.getBoundingClientRect(); }, updatePosition(position, vertical) { - const x = vertical ? "0" : 100 * position + "%"; - const y = vertical ? 100 * position + "%" : "0"; - const rootEl = rootRef.value; - const value = `translate(${x},${y}) translateZ(0)`; + var x = vertical ? "0" : 100 * position + "%"; + var y = vertical ? 100 * position + "%" : "0"; + var rootEl = rootRef.value; + var value = "translate(".concat(x, ",").concat(y, ") translateZ(0)"); if (rootEl) { rootEl.style.webkitTransform = value; rootEl.style.transform = value; @@ -14475,13 +15185,13 @@ } }; onMounted(() => { - const addSwiperContext = inject("addSwiperContext"); + var addSwiperContext = inject("addSwiperContext"); if (addSwiperContext) { addSwiperContext(context); } }); onUnmounted(() => { - const removeSwiperContext = inject("removeSwiperContext"); + var removeSwiperContext = inject("removeSwiperContext"); if (removeSwiperContext) { removeSwiperContext(context); } @@ -14500,7 +15210,7 @@ }; } }); - const props$6 = { + var props$6 = { name: { type: String, default: "" @@ -14533,14 +15243,14 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const switchChecked = ref(props2.checked); - const uniLabel = useSwitchInject(props2, switchChecked); - const trigger2 = useCustomEvent(rootRef, emit2); + var rootRef = ref(null); + var switchChecked = ref(props2.checked); + var uniLabel = useSwitchInject(props2, switchChecked); + var trigger2 = useCustomEvent(rootRef, emit2); watch(() => props2.checked, (val) => { switchChecked.value = val; }); - const _onClick = ($event) => { + var _onClick = ($event) => { if (props2.disabled) { return; } @@ -14559,11 +15269,11 @@ "label-click": _onClick }); return () => { - const { + var { color, type } = props2; - const { + var { booleanAttrs } = useBooleanAttr(props2, "disabled"); return createVNode("uni-switch", mergeProps({ @@ -14587,11 +15297,11 @@ } }); function useSwitchInject(props2, switchChecked) { - const uniForm = inject(uniFormKey, false); - const uniLabel = inject(uniLabelKey, false); - const formField = { + var uniForm = inject(uniFormKey, false); + var uniLabel = inject(uniLabelKey, false); + var formField = { submit: () => { - const data = ["", null]; + var data = ["", null]; if (props2.name) { data[0] = props2.name; data[1] = switchChecked.value; @@ -14610,7 +15320,7 @@ } return uniLabel; } - const SPACE_UNICODE = { + var SPACE_UNICODE = { ensp: "\u2002", emsp: "\u2003", nbsp: "\xA0" @@ -14620,7 +15330,10 @@ return normalizeText(text22, options); }); } - function normalizeText(text2, { space, decode }) { + function normalizeText(text2, { + space, + decode + }) { if (!text2) { return text2; } @@ -14632,7 +15345,7 @@ } return text2.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'"); } - const props$5 = /* @__PURE__ */ extend({}, props$k, { + var props$5 = /* @__PURE__ */ extend({}, props$k, { placeholderClass: { type: String, default: "input-placeholder" @@ -14646,9 +15359,9 @@ default: "" } }); - let fixMargin = false; + var fixMargin = false; function setFixMargin() { - const DARK_TEST_STRING = "(prefers-color-scheme: dark)"; + var DARK_TEST_STRING = "(prefers-color-scheme: dark)"; fixMargin = String(navigator.platform).indexOf("iP") === 0 && String(navigator.vendor).indexOf("Apple") === 0 && window.matchMedia(DARK_TEST_STRING).media !== DARK_TEST_STRING; } var Textarea = /* @__PURE__ */ defineBuiltInComponent({ @@ -14658,22 +15371,22 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const { + var rootRef = ref(null); + var { fieldRef, state, scopedAttrsState, fixDisabledColor, trigger: trigger2 } = useField(props2, rootRef, emit2); - const valueCompute = computed$1(() => state.value.split("\n")); - const isDone = computed$1(() => ["done", "go", "next", "search", "send"].includes(props2.confirmType)); - const heightRef = ref(0); - const lineRef = ref(null); + var valueCompute = computed$1(() => state.value.split("\n")); + var isDone = computed$1(() => ["done", "go", "next", "search", "send"].includes(props2.confirmType)); + var heightRef = ref(0); + var lineRef = ref(null); watch(() => heightRef.value, (height) => { - const el = rootRef.value; - const lineEl = lineRef.value; - let lineHeight = parseFloat(getComputedStyle(el).lineHeight); + var el = rootRef.value; + var lineEl = lineRef.value; + var lineHeight = parseFloat(getComputedStyle(el).lineHeight); if (isNaN(lineHeight)) { lineHeight = lineEl.offsetHeight; } @@ -14711,7 +15424,7 @@ } if (isDone.value) { confirm(event); - const textarea2 = event.target; + var textarea2 = event.target; textarea2.blur(); } } @@ -14719,7 +15432,7 @@ setFixMargin(); } return () => { - let textareaNode = props2.disabled && fixDisabledColor ? createVNode("textarea", { + var textareaNode = props2.disabled && fixDisabledColor ? createVNode("textarea", { "ref": fieldRef, "value": state.value, "tabindex": "-1", @@ -14780,12 +15493,12 @@ setup(props2, { slots }) { - const { + var { hovering, binding } = useHover(props2); return () => { - const hoverClass = props2.hoverClass; + var hoverClass = props2.hoverClass; if (hoverClass && hoverClass !== "none") { return createVNode("uni-view", mergeProps({ "class": hovering.value ? hoverClass : "" @@ -14812,7 +15525,10 @@ if (!name) { return; } - registerViewMethod(pageId || getCurrentPageId(), name, ({ type, data }, resolve) => { + registerViewMethod(pageId || getCurrentPageId(), name, ({ + type, + data + }, resolve) => { callback(type, data, resolve); }); } @@ -14823,8 +15539,8 @@ unregisterViewMethod(getCurrentPageId(), name); } function useSubscribe(callback, name, multiple, pageId) { - const instance = getCurrentInstance(); - const vm = instance.proxy; + var instance = getCurrentInstance(); + var vm = instance.proxy; onMounted(() => { addSubscribe(name || normalizeEvent(vm), callback, pageId); if (multiple || !name) { @@ -14838,35 +15554,32 @@ removeSubscribe(name || normalizeEvent(vm)); }); } - let index = 0; + var index = 0; function useContextInfo(_id) { - const page = useCurrentPageId(); - const instance = getCurrentInstance(); - const vm = instance.proxy; - const type = vm.$options.name.toLowerCase(); - const id2 = _id || vm.id || `context${index++}`; + var page = useCurrentPageId(); + var instance = getCurrentInstance(); + var vm = instance.proxy; + var type = vm.$options.name.toLowerCase(); + var id2 = _id || vm.id || "context".concat(index++); onMounted(() => { - const el = vm.$el; + var el = vm.$el; el.__uniContextInfo = { id: id2, type, page }; }); - return `${type}.${id2}`; + return "".concat(type, ".").concat(id2); } function getContextInfo(el) { return el.__uniContextInfo; } class UniAnimationElement extends UniElement { constructor(id2, element, parentNodeId, refNodeId, nodeJson, propNames = []) { - super(id2, element, parentNodeId, refNodeId, nodeJson, [ - ...animation.props, - ...propNames - ]); + super(id2, element, parentNodeId, refNodeId, nodeJson, [...animation.props, ...propNames]); } call(fn) { - const context = { + var context = { animation: this.$props.animation, $el: this.$ }; @@ -14891,7 +15604,7 @@ } } } - const PROP_NAMES_HOVER$1 = ["space", "decode"]; + var PROP_NAMES_HOVER$1 = ["space", "decode"]; class UniTextElement extends UniAnimationElement { constructor(id2, parentNodeId, refNodeId, nodeJson) { super(id2, document.createElement("uni-text"), parentNodeId, refNodeId, nodeJson, PROP_NAMES_HOVER$1); @@ -14906,8 +15619,11 @@ this.update(); } update(isMounted = false) { - const { - $props: { space, decode } + var { + $props: { + space, + decode + } } = this; this.$.innerHTML = parseText(this._text, { space, @@ -14924,21 +15640,13 @@ } } var view = "uni-view {\n display: block;\n}\nuni-view[hidden] {\n display: none;\n}\n"; - const PROP_NAMES_HOVER = [ - "hover-class", - "hover-stop-propagation", - "hover-start-time", - "hover-stay-time" - ]; + var PROP_NAMES_HOVER = ["hover-class", "hover-stop-propagation", "hover-start-time", "hover-stay-time"]; class UniHoverElement extends UniAnimationElement { constructor(id2, element, parentNodeId, refNodeId, nodeJson, propNames = []) { - super(id2, element, parentNodeId, refNodeId, nodeJson, [ - ...PROP_NAMES_HOVER, - ...propNames - ]); + super(id2, element, parentNodeId, refNodeId, nodeJson, [...PROP_NAMES_HOVER, ...propNames]); } update(isMounted = false) { - const hoverClass = this.$props["hover-class"]; + var hoverClass = this.$props["hover-class"]; if (hoverClass && hoverClass !== "none") { if (!this._hover) { this._hover = new Hover(this.$, this.$props); @@ -14968,7 +15676,7 @@ } set hovering(hovering) { this._hovering = hovering; - const hoverClass = this.props["hover-class"]; + var hoverClass = this.props["hover-class"]; if (hovering) { this.$.classList.add(hoverClass); } else { @@ -15003,7 +15711,7 @@ if (evt._hoverPropagationStopped) { return; } - const hoverClass = this.props["hover-class"]; + var hoverClass = this.props["hover-class"]; if (!hoverClass || hoverClass === "none" || this.$.disabled) { return; } @@ -15050,20 +15758,20 @@ return plus.navigator.isImmersedStatusbar() ? Math.round(plus.os.name === "iOS" ? plus.navigator.getSafeAreaInsets().top : plus.navigator.getStatusbarHeight()) : 0; } function getNavigationBarHeight() { - const webview2 = plus.webview.currentWebview(); - const style = webview2.getStyle(); - const titleNView = style && style.titleNView; + var webview2 = plus.webview.currentWebview(); + var style = webview2.getStyle(); + var titleNView = style && style.titleNView; if (titleNView && titleNView.type === "default") { return NAVBAR_HEIGHT + getStatusbarHeight(); } return 0; } - const onDrawKey = Symbol("onDraw"); + var onDrawKey = Symbol("onDraw"); function getFixed($el) { - let fixed; + var fixed; while ($el) { - const style = getComputedStyle($el); - const transform = style.transform || style.webkitTransform; + var style = getComputedStyle($el); + var transform = style.transform || style.webkitTransform; fixed = transform && transform !== "none" ? false : fixed; fixed = style.position === "fixed" ? true : fixed; $el = $el.parentElement; @@ -15072,43 +15780,43 @@ } function useNativeAttrs(props2, ignore) { return computed$1(() => { - const object = {}; - Object.keys(props2).forEach((key) => { - if (ignore && ignore.includes(key)) { + var object = {}; + Object.keys(props2).forEach((key2) => { + if (ignore && ignore.includes(key2)) { return; } - let val = props2[key]; - val = key === "src" ? getRealPath(val) : val; - object[key.replace(/[A-Z]/g, (str) => "-" + str.toLowerCase())] = val; + var val = props2[key2]; + val = key2 === "src" ? getRealPath(val) : val; + object[key2.replace(/[A-Z]/g, (str) => "-" + str.toLowerCase())] = val; }); return object; }); } function useNative(rootRef) { - const position = reactive({ + var position = reactive({ top: "0px", left: "0px", width: "0px", height: "0px", position: "static" }); - const hidden = ref(false); + var hidden = ref(false); function updatePosition() { - const el = rootRef.value; - const rect = el.getBoundingClientRect(); - const keys = ["width", "height"]; + var el = rootRef.value; + var rect = el.getBoundingClientRect(); + var keys = ["width", "height"]; hidden.value = rect.width === 0 || rect.height === 0; if (!hidden.value) { position.position = getFixed(el) ? "absolute" : "static"; keys.push("top", "left"); } - keys.forEach((key) => { - let val = rect[key]; - val = key === "top" ? val + (position.position === "static" ? document.documentElement.scrollTop || document.body.scrollTop || 0 : getNavigationBarHeight()) : val; - position[key] = val + "px"; + keys.forEach((key2) => { + var val = rect[key2]; + val = key2 === "top" ? val + (position.position === "static" ? document.documentElement.scrollTop || document.body.scrollTop || 0 : getNavigationBarHeight()) : val; + position[key2] = val + "px"; }); } - let request = null; + var request = null; function requestPositionUpdate() { if (request) { cancelAnimationFrame(request); @@ -15119,8 +15827,8 @@ }); } window.addEventListener("updateview", requestPositionUpdate); - let onDrawCallbacks = []; - let onSelfReadyCallbacks = []; + var onDrawCallbacks = []; + var onSelfReadyCallbacks = []; function onSelfReady(callback) { if (onSelfReadyCallbacks) { onSelfReadyCallbacks.push(callback); @@ -15129,8 +15837,8 @@ } } function onParentReady(callback) { - const onDraw2 = inject(onDrawKey); - const newCallback = (parentPosition) => { + var onDraw2 = inject(onDrawKey); + var newCallback = (parentPosition) => { callback(parentPosition); onDrawCallbacks.forEach((callback2) => callback2(position)); onDrawCallbacks = null; @@ -15149,7 +15857,7 @@ } }); } - const onDraw = function(callback) { + var onDraw = function(callback) { if (onDrawCallbacks) { onDrawCallbacks.push(callback); } else { @@ -15191,15 +15899,15 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const containerRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const attrs2 = useNativeAttrs(props2, ["id"]); - const { + var rootRef = ref(null); + var containerRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var attrs2 = useNativeAttrs(props2, ["id"]); + var { position, onParentReady } = useNative(containerRef); - let adView; + var adView; onParentReady(() => { adView = plus.ad.createAdView(Object.assign({}, attrs2.value, position)); plus.webview.currentWebview().append(adView); @@ -15235,7 +15943,7 @@ } }); function loadData() { - let args = { + var args = { adpid: props2.adpid, width: position.width, count: props2.dataCount @@ -15283,7 +15991,7 @@ class UniComponent extends UniNode { constructor(id2, tag, component, parentNodeId, refNodeId, nodeJson, selector) { super(id2, tag, parentNodeId); - const container = document.createElement("div"); + var container = document.createElement("div"); container.__vueParent = getVueParent(this); this.$props = reactive({}); this.init(nodeJson); @@ -15308,7 +16016,10 @@ flushPostFlushCbs(); } init(nodeJson) { - const { a: a2, e: e2 } = nodeJson; + var { + a: a2, + e: e2 + } = nodeJson; if (a2) { Object.keys(a2).forEach((n) => { this.setAttr(n, a2[n]); @@ -15327,7 +16038,7 @@ (this.$holder || this.$).textContent = text2; } addEvent(name, value) { - const decoded = name; + var decoded = name; this.$props[decoded] = createInvoker(this.id, value, parseEventName(decoded)[1]); } removeEvent(name) { @@ -15339,8 +16050,8 @@ patchVShow(this.$, value); } } else if (name === ATTR_STYLE) { - const newStyle = decodeAttr(value); - const oldStyle = this.$props.style; + var newStyle = decodeAttr(value); + var oldStyle = this.$props.style; if (isPlainObject(newStyle) && isPlainObject(oldStyle)) { Object.keys(newStyle).forEach((n) => { oldStyle[n] = newStyle[n]; @@ -15393,7 +16104,7 @@ { console.log(formatLog("rebuild", this.id, this.tag)); } - const vm = this.$.__vueParentComponent; + var vm = this.$.__vueParentComponent; if (vm.rebuild) { vm.rebuild(); } @@ -15403,7 +16114,9 @@ while (node && node.pid > 0) { node = $(node.pid); if (node) { - const { __vueParentComponent } = node.$; + var { + __vueParentComponent + } = node.$; if (__vueParentComponent) { return __vueParentComponent; } @@ -15428,12 +16141,6 @@ super(id2, "uni-ad", Ad, parentNodeId, refNodeId, nodeJson); } } - var audio = "uni-audio {\n display: none;\n}\n\nuni-audio[controls] {\n display: inline-block;\n}\n\nuni-audio[hidden] {\n display: none;\n}\n\n.uni-audio-default {\n max-width: 100%;\n min-width: 302px;\n height: 65px;\n background: #fcfcfc;\n border: 1px solid #e0e0e0;\n border-radius: 2.5px;\n display: inline-block;\n overflow: hidden;\n}\n\n.uni-audio-left {\n width: 65px;\n height: 65px;\n float: left;\n background-color: #e6e6e6;\n background-size: 100% 100%;\n background-position: 50% 50%;\n}\n\n.uni-audio-button {\n width: 24px;\n height: 24px;\n margin: 20.5px;\n background-size: cover;\n}\n\n.uni-audio-button.play {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAB4dJREFUaAXNWg1MlVUYvpcfIRCJ+MnCaOBl8dOcOCEQZ9kmI5cQG5Yb6MifKbMaGVobOtlibTWHDpgpxBUwF07826iFsMkYJhg559JdGiQSkUzSBA0QkZ7n4/u+nXsvwf3jwru99/y/3/N+3znvec97rlbjABofH38GYtaAV4MjwDqwH9gHTBoE3wd3gA3gi+B6rVY7hHR2CKD9wFngs+BHYGuJYziWMqiscwgP8wLvBQ+AHUWURZle1mqhtXQAhLui7xZwPvgFsBENDg7+Drp069at2z09Pf03b978u6mpqZ+dVq1aFRAVFeW/aNGigNDQ0JfDwsISfXx8wowETBT+QpIPLsf0GpuomvrXIgUAPhhizoGXi+II+tq1az/o9fpLFRUVd8S26fJZWVkLN2/enBgTE/PW/PnzF5v0b0P5HSjxp0m9WXFaBQD+NYw6C1bf+vDwcF9DQ4N+/fr19ciPm0m1osLT01N76tSpNaD3PTw8FgpD+TXSoESrUGeWnVIBgM/EiDKwJ0eiPNrS0nJsw4YNNd3d3aOscxSFhIS4V1dXpyckJGRB5jxZ7jDSbVDiW7lslriY1cgVMvjjKErgR0dH/zl06NCuFStWfOdo8HwkZVL2wYMHP3ny5AlNLonPPi5jkSpMfyb9AhjAadMIlsBjrndmZ2fnnThxos9UwEyUMzIynj9y5EgB1gb3ExK/xBuTTSczBQCeC/ZnsDTnCR6f9YMbN25QiNMoOjras7W1tcjb2ztcfijXRKzpwjaaQgBPU0lrI4HntOGbdzZ4AuYzt2/fvm9sbOweyyBiOidjlCr4Y6QAyrTzkqlEx9GSkpJ9zpo2BGNKfHZRUdF+1D+W24iNGFVSpxAAcxekryK9/cuXLx/FoqpWe85iBlPpvbi4uB0yBE4lHabSvyyLX2AXyhJ42nmYytPsMBcI+80ZWKZeGQsxEqtEkgJ4+3Sm9sh1Gm5SM2EqFfnWpsRSV1dXIYzbI2NWv0AqGiXXl+4Bd1ihs0XZu3fvHhgYGNBXVVUlWDTAyk7p6ekNIyMj7fIwYiVmIwWkNvo2trgHAQEBy+CghW7cuPGLvr6+L3fu3PmSJNBBP8R09erVHwVxEwrgU/AwkqQ00DFT8lamqkEICgqKKy4u1sMU7li6dKnVLvL/Pbe0tLRFaEsidi1+UlB5ng3ctBYsWLBV6GRxFnJ4yjIj7CX36uvrS1NTU+uwEM3ara3Al/gaTl+EPC6Vi/hNRUhHR8dPSt5Rqbu7+3Nr1679rL+//3BBQYHyYJvFd3V1iTNkNRV4RZF2G6TkHZ36+vpG5uXlHcah59Pk5GSbj5AY3y1gi6ACisOk4UlKaJyJrBYnsuTa2trjzc3N7/r7+9N1sYo6OzsfCAN0VEB9GzwGCo0zlnV1dfVOTEzMhn3Xl5eXx1rzIBOMflRAsv8UopxhrRFoT18vL68QHCu/am9vz7FUjglGHyow6xQcHBxjKwgqwKCTRIweKHlnpZhGDfC7LP4CJhgH3QCUxzd/AmboA0kP8zNNcDt+w8ZUvHv37l+tedaSJUueFfrfpwJ0oSVLxLiN0DgjWWxsDxobG79JSUn53haXRafT+QrAOjiFDEoFg05K3tEpduoxg8FweuXKlRlJSUm1toAnpvDwcB55FTJQAdUFYMRMaXFkil34l9zc3K2RkZElV65ceWSPbCz414XxF6kAXWfpdMNwHyNmQge7skNDQ3dOnjy5PzAwMLewsLDLLmEYDJMb5ObmFiXLIeZ6FxzNGOK+IFeyk91f4enTpyNtbW3HIiIiNsHCNCmy7U1zcnKWCTIuEDu/AOn8RKLRMFbJcJ9StjRlBIN94Y40ZmZmboqNja3iScrS8dP1IyaEWt4W+kmYaYVILHA/8GGglbHKdevWqV+FHaYjOGofw811hcfZOV1fW9pxzE1wcXGJlscSq6SA+qZhJfai8nN2wNHtDhb0pt7eXoe9Qcq1lRg3hRvNkLtyytuHfAHlKVOI+UIwQxYaRolramrSmZ8LhLefJIAnRmKVSFUAHbiq8yeqNRpGiWE5XlXKs5WWlZUthu3/SHh+voxVqlKnEEuYRvTPee5czjKjxDCr2bMVnYNF9IO7fRRQAokHxIuPeCig3t4YKcAeUCIYiRrcffjwYUd8fPyHzo6PwuJ4XL9+/QAWrjILOHWmDu5SAWjHa500sBSNZoibUWKGvNnuDOKbNwFPLLytITYjUteAWIuOvNbZptQxxF1ZWXnYGWuCc57TRnjzhMFbGmIyI7MpJPbAdMpEuQzsKdc/hi+jT0tLO+NoE0tTSWsjL9h58vP45qe8YppSAQqBEmaXfAy0MlbJcJ+tXqUMUMMdlpsUIuE78JYVO89mznn7LvmUh8gL+xzKknVS6hmrZLiPETNrr1npmNG3oXsg7LCKaFobx1yzKhKhBE3sFnA+mCFuI4IyBuyWzYjb/MHQh+lFN09SPIxgirxIlxhepeIWiHL41vPBFl90i4MtykOROfVXA4tAT9YJisyJP3tMu4gnA29aB2UY4V4DXg1m/FMH9gMrMSd6jwwe8PxtAPMU6JC/2/wHuyI2cMsNBRIAAAAASUVORK5CYII=);\n}\n\n.uni-audio-button.pause {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABatJREFUaAXVWl1IpFUYnllZGUf3wlz6MXER1ES7s83VUDJw6KpdaSTDwMnYFSK6KNirooHullKQCNzQRjZ/wom1u9ALQ0mT1ktFdEBWXLdibaH1jwmx5zme83W+z2Hm+7bZmc8X3jl/73vO837n/z3j9aSBjo6O8lBNC7gZXAUuBxeCz4FJj8APwTHwCngaPOX1evcRZocAuhAcAt8G74KdEnWoyzpobGYIjfnBn4D/BqeLWBfr9Du1wmtXAZXnQPY9cBj8HNhEe3t7sbW1tfn19fW7m5ubD5aXl7dnZmYeUKipqel8dXV1UUlJyfmysrILFRUV9X6/n8PMSveREQYPYHgdWgsTpW0ZAPDPQ3kC/JJeCUEvLi7+NDg4+EskEvldL0sVD4VCz3Z1db1SW1v7egJj7kD/Coy4l6qelAYAfB0quQ02vno8Hr8/OTkZaWtrmzo4ODhK1Uiycp/P5x0fH28JBAKh3Nxcow3osDdaYcRCMv2kBgD8O1D+BuyTlcTn5+cj7e3t0Y2NjX+SVey0rLS09OzY2Fiwvr4+BN1cqX+A8CqM+E6mTwRnTuTIDAn+FpIC/OHh4V+9vb0fNzQ0jKYbPJtknaybbbAtCYNt35JYZJY5SNgDctj8DFEBfnd3d627u/vT4eHhP8zqTybV0dHxTH9//+f5+fkVsgX2xKuJhtMJAwCeE/Y3sBiPBF9XV/fh0tISK8kY1dTU+BYWFvo0IzgnLlontmkIATyXSq42Ajy7kl8+0+D5ldgm29aGEzFNSIwUEWQyADlc59VSGe/r6/ssU8PmGI75l20TA3LjsoTYiNEgYwjBMu6CPKuIr4/Vph+TasyQzGJkbm7ubaxO1yQEDqVyDKU9pvUe+AhpAZ7rPJbKHyjgBuKyTUwSCzESqyBhAL4+D1PXZZ6Hm9STWCpV/U5DYiEmTe+6xOwRQwiJEAq/pQCPB0VFRdf+7w7LutJJ3LG3t7dvaseOdzGMImoIXVaN8WzjNvDERkzEpnAiFJjP4OvzMhJQBTyYqbjdEDov7+/vf4+6pu0wZQcGBi7arV/JWbAFiN2Lnzcg8COFuGkVFBSo2a70UoYEhC5+OqWgJoAv+mdeXt5bWpat6M7Ozk1tc7vMIfSa0lxdXf1VxZ2ETsGz7sfRoV4sFtMxNtOAF1hAugs6jrn3lxcmDV0VDTBuRrxJaYWujFowltMA40LNa6ArUWugLBgLaYByfXjUHVaTd13UgvEcDTjVRAPodBJE74GKuzW0YHxEA+gxE0TXh4q7NbRgfEgDeIQWRL+Nirs1tGCM0YAVBZZOJxV3a2jBuEIDphVYesxU3EnIY4ETeco+jg71LBinacAUWNxueFSlx4yCTmh0dPRLJ4AoOzIy8oWTNihLbNpxmpin1H2AnrcrFJqdnf0KM901tzFiUoQ94M3GxsYPZHoC94FW9gBJnEYZoa8SBy1hGNNuIWIiNg2PwKwbIPYDdhF9lZqgK6LEpA0fYv3PAHQF94IbCikdrcXFxWdVOtsh/abEpOG4ITGbvBI9EBA3f3qJo9FoUFPIapROX81zTYzEKkgNIQ8s4qwOH2d7PPQS9/T0vKjS2QqJQXqsFYSwxCrSpsmK6yVdi7zx0APmoVuvs7Pz/Wx55+jkHRoa+jonJ+cp4gHdAV+CAcbrjckASsCI0+vcpQGw7h6CVrDwRvMCTS8xvwbLM0Fsy+KZJha+1hCbiYw5oOdCkM86V1UejWBXZmJOsA22pXkeCIOvNAmfmk4MIQWaIYZTwiemYDAY3dracsUTU1IDpBGn95FP9Yac2KfzmVUzgkssHxfCYOGGR2gQvXp0jNG3lOyh+wKosrLykmWMq3q4SYXBth+6laLtEL3hqr8a2AZuFYQhrvizR8pJbAWeKA1j6OFuATeDq8D09hWClc+Jp0ceGHn/5hWWt8C0/N3mX15C4bDnCIuAAAAAAElFTkSuQmCC);\n}\n\n.uni-audio-right {\n box-sizing: border-box;\n height: 65px;\n margin-left: 65px;\n padding: 11px 16.5px 13.5px 15px;\n overflow: hidden;\n}\n\n.uni-audio-time {\n margin-top: 3.5px;\n height: 16.5px;\n font-size: 12px;\n color: #888888;\n float: right;\n}\n\n.uni-audio-info {\n margin-right: 70px;\n overflow: hidden;\n}\n\n.uni-audio-name {\n height: 22.5px;\n line-height: 22.5px;\n margin-bottom: 3.5px;\n font-size: 14px;\n color: #353535;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.uni-audio-author {\n height: 14.5px;\n line-height: 14.5px;\n font-size: 12px;\n color: #888888;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n"; - class UniAudio extends UniComponent { - constructor(id2, parentNodeId, refNodeId, nodeJson) { - super(id2, "uni-audio", _sfc_main, parentNodeId, refNodeId, nodeJson); - } - } var button = "uni-button {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n padding-left: 14px;\n padding-right: 14px;\n box-sizing: border-box;\n font-size: 18px;\n text-align: center;\n text-decoration: none;\n line-height: 2.55555556;\n border-radius: 5px;\n -webkit-tap-highlight-color: transparent;\n overflow: hidden;\n color: #000000;\n background-color: #f8f8f8;\n cursor: pointer;\n}\n\nuni-button[hidden] {\n display: none !important;\n}\n\nuni-button:after {\n content: ' ';\n width: 200%;\n height: 200%;\n position: absolute;\n top: 0;\n left: 0;\n border: 1px solid rgba(0, 0, 0, 0.2);\n transform: scale(0.5);\n transform-origin: 0 0;\n box-sizing: border-box;\n border-radius: 10px;\n}\n\nuni-button[native] {\n padding-left: 0;\n padding-right: 0;\n}\n\nuni-button[native] .uni-button-cover-view-wrapper {\n border: inherit;\n border-color: inherit;\n border-radius: inherit;\n background-color: inherit;\n}\n\nuni-button[native] .uni-button-cover-view-inner {\n padding-left: 14px;\n padding-right: 14px;\n}\n\nuni-button uni-cover-view {\n line-height: inherit;\n white-space: inherit;\n}\n\nuni-button[type='default'] {\n color: #000000;\n background-color: #f8f8f8;\n}\n\nuni-button[type='primary'] {\n color: #ffffff;\n background-color: #007aff;\n}\n\nuni-button[type='warn'] {\n color: #ffffff;\n background-color: #e64340;\n}\n\nuni-button[disabled] {\n color: rgba(255, 255, 255, 0.6);\n cursor: not-allowed;\n}\n\nuni-button[disabled][type='default'],\nuni-button[disabled]:not([type]) {\n color: rgba(0, 0, 0, 0.3);\n background-color: #f7f7f7;\n}\n\nuni-button[disabled][type='primary'] {\n background-color: rgba(0, 122, 255, 0.6);\n}\n\nuni-button[disabled][type='warn'] {\n background-color: #ec8b89;\n}\n\nuni-button[type='primary'][plain] {\n color: #007aff;\n border: 1px solid #007aff;\n background-color: transparent;\n}\n\nuni-button[type='primary'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='primary'][plain]:after {\n border-width: 0;\n}\n\nuni-button[type='default'][plain] {\n color: #353535;\n border: 1px solid #353535;\n background-color: transparent;\n}\n\nuni-button[type='default'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='default'][plain]:after {\n border-width: 0;\n}\n\nuni-button[plain] {\n color: #353535;\n border: 1px solid #353535;\n background-color: transparent;\n}\n\nuni-button[plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[plain]:after {\n border-width: 0;\n}\n\nuni-button[plain][native] .uni-button-cover-view-inner {\n padding: 0;\n}\n\nuni-button[type='warn'][plain] {\n color: #e64340;\n border: 1px solid #e64340;\n background-color: transparent;\n}\n\nuni-button[type='warn'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='warn'][plain]:after {\n border-width: 0;\n}\n\nuni-button[size='mini'] {\n display: inline-block;\n line-height: 2.3;\n font-size: 13px;\n padding: 0 1.34em;\n}\n\nuni-button[size='mini'][native] {\n padding: 0;\n}\n\nuni-button[size='mini'][native] .uni-button-cover-view-inner {\n padding: 0 1.34em;\n}\n\nuni-button[loading]:not([disabled]) {\n cursor: progress;\n}\n\nuni-button[loading]:before {\n content: ' ';\n display: inline-block;\n width: 18px;\n height: 18px;\n vertical-align: middle;\n animation: uni-loading 1s steps(12, end) infinite;\n background-size: 100%;\n}\n\nuni-button[loading][type='primary'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #0062cc;\n}\n\nuni-button[loading][type='primary'][plain] {\n color: #007aff;\n background-color: transparent;\n}\n\nuni-button[loading][type='default'] {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\nuni-button[loading][type='default'][plain] {\n color: #353535;\n background-color: transparent;\n}\n\nuni-button[loading][type='warn'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #ce3c39;\n}\n\nuni-button[loading][type='warn'][plain] {\n color: #e64340;\n background-color: transparent;\n}\n\nuni-button[loading][native]:before {\n content: none;\n}\n\n.button-hover {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\n.button-hover[plain] {\n color: rgba(53, 53, 53, 0.6);\n border-color: rgba(53, 53, 53, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='primary'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #0062cc;\n}\n\n.button-hover[type='primary'][plain] {\n color: rgba(26, 173, 25, 0.6);\n border-color: rgba(26, 173, 25, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='default'] {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\n.button-hover[type='default'][plain] {\n color: rgba(53, 53, 53, 0.6);\n border-color: rgba(53, 53, 53, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='warn'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #ce3c39;\n}\n\n.button-hover[type='warn'][plain] {\n color: rgba(230, 67, 64, 0.6);\n border-color: rgba(230, 67, 64, 0.6);\n background-color: transparent;\n}\n"; class UniButton extends UniComponent { constructor(id2, parentNodeId, refNodeId, nodeJson) { @@ -15473,61 +16180,51 @@ } } var coverImage = "uni-cover-image {\n display: block;\n line-height: 1.2;\n overflow: hidden;\n height: 100%;\n width: 100%;\n pointer-events: auto;\n}\n\nuni-cover-image[hidden] {\n display: none;\n}\n\nuni-cover-image .uni-cover-image {\n width: 100%;\n height: 100%;\n}\n"; - let id = 0; + var id = 0; function useCover(rootRef, trigger2, content) { - const { position, hidden, onParentReady } = useNative(rootRef); - let cover; + var { + position, + hidden, + onParentReady + } = useNative(rootRef); + var cover; onParentReady((parentPosition) => { - const viewPosition = computed$1(() => { - const object = {}; - for (const key in position) { - let val = position[key]; - const valNumber = parseFloat(val); - const parentValNumber = parseFloat(parentPosition[key]); - if (key === "top" || key === "left") { + var viewPosition = computed$1(() => { + var object = {}; + for (var key2 in position) { + var val = position[key2]; + var valNumber = parseFloat(val); + var parentValNumber = parseFloat(parentPosition[key2]); + if (key2 === "top" || key2 === "left") { val = Math.max(valNumber, parentValNumber) + "px"; - } else if (key === "width" || key === "height") { - const base2 = key === "width" ? "left" : "top"; - const parentStart = parseFloat(parentPosition[base2]); - const viewStart = parseFloat(position[base2]); - const diff1 = Math.max(parentStart - viewStart, 0); - const diff2 = Math.max(viewStart + valNumber - (parentStart + parentValNumber), 0); + } else if (key2 === "width" || key2 === "height") { + var base2 = key2 === "width" ? "left" : "top"; + var parentStart = parseFloat(parentPosition[base2]); + var viewStart = parseFloat(position[base2]); + var diff1 = Math.max(parentStart - viewStart, 0); + var diff2 = Math.max(viewStart + valNumber - (parentStart + parentValNumber), 0); val = Math.max(valNumber - diff1 - diff2, 0) + "px"; } - object[key] = val; + object[key2] = val; } return object; }); - const baseStyle = [ - "borderRadius", - "borderColor", - "borderWidth", - "backgroundColor" - ]; - const textStyle = [ - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "color", - "textAlign", - "lineHeight", - "fontSize", - "fontWeight", - "textOverflow", - "whiteSpace" - ]; - const imageStyle = []; - const textAlign = { start: "left", end: "right" }; + var baseStyle = ["borderRadius", "borderColor", "borderWidth", "backgroundColor"]; + var textStyle = ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "color", "textAlign", "lineHeight", "fontSize", "fontWeight", "textOverflow", "whiteSpace"]; + var imageStyle = []; + var textAlign = { + start: "left", + end: "right" + }; function updateStyle(style2) { - const computedStyle = getComputedStyle(rootRef.value); - baseStyle.concat(textStyle, imageStyle).forEach((key) => { - style2[key] = computedStyle[key]; + var computedStyle = getComputedStyle(rootRef.value); + baseStyle.concat(textStyle, imageStyle).forEach((key2) => { + style2[key2] = computedStyle[key2]; }); return style2; } - const style = reactive(updateStyle({})); - let request = null; + var style = reactive(updateStyle({})); + var request = null; function requestStyleUpdate() { if (request) { cancelAnimationFrame(request); @@ -15539,30 +16236,28 @@ } window.addEventListener("updateview", requestStyleUpdate); function getTagPosition() { - const position2 = {}; - for (const key in position2) { - let val = position2[key]; - if (key === "top" || key === "left") { - val = Math.min(parseFloat(val) - parseFloat(parentPosition[key]), 0) + "px"; + var position2 = {}; + for (var key2 in position2) { + var val = position2[key2]; + if (key2 === "top" || key2 === "left") { + val = Math.min(parseFloat(val) - parseFloat(parentPosition[key2]), 0) + "px"; } - position2[key] = val; + position2[key2] = val; } return position2; } - const tags = computed$1(() => { - const position2 = getTagPosition(); - const tags2 = [ - { - tag: "rect", - position: position2, - rectStyles: { - color: style.backgroundColor, - radius: style.borderRadius, - borderColor: style.borderColor, - borderWidth: style.borderWidth - } + var tags = computed$1(() => { + var position2 = getTagPosition(); + var tags2 = [{ + tag: "rect", + position: position2, + rectStyles: { + color: style.backgroundColor, + radius: style.borderRadius, + borderColor: style.borderColor, + borderWidth: style.borderWidth } - ]; + }]; if ("src" in content) { if (content.src) { tags2.push({ @@ -15572,24 +16267,24 @@ }); } } else { - const lineSpacing = parseFloat(style.lineHeight) - parseFloat(style.fontSize); - let width = parseFloat(position2.width) - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight); + var lineSpacing = parseFloat(style.lineHeight) - parseFloat(style.fontSize); + var width = parseFloat(position2.width) - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight); width = width < 0 ? 0 : width; - let height = parseFloat(position2.height) - parseFloat(style.paddingTop) - lineSpacing / 2 - parseFloat(style.paddingBottom); + var height = parseFloat(position2.height) - parseFloat(style.paddingTop) - lineSpacing / 2 - parseFloat(style.paddingBottom); height = height < 0 ? 0 : height; tags2.push({ tag: "font", position: { - top: `${parseFloat(position2.top) + parseFloat(style.paddingTop) + lineSpacing / 2}px`, - left: `${parseFloat(position2.left) + parseFloat(style.paddingLeft)}px`, - width: `${width}px`, - height: `${height}px` + top: "".concat(parseFloat(position2.top) + parseFloat(style.paddingTop) + lineSpacing / 2, "px"), + left: "".concat(parseFloat(position2.left) + parseFloat(style.paddingLeft), "px"), + width: "".concat(width, "px"), + height: "".concat(height, "px") }, textStyles: { align: textAlign[style.textAlign] || style.textAlign, color: style.color, decoration: "none", - lineSpacing: `${lineSpacing}px`, + lineSpacing: "".concat(lineSpacing, "px"), margin: "0px", overflow: style.textOverflow, size: style.fontSize, @@ -15602,7 +16297,7 @@ } return tags2; }); - cover = new plus.nativeObj.View(`cover-${Date.now()}-${id++}`, viewPosition.value, tags.value); + cover = new plus.nativeObj.View("cover-".concat(Date.now(), "-").concat(id++), viewPosition.value, tags.value); { console.log(formatLog("Cover", cover.id, viewPosition.value, tags.value)); } @@ -15618,11 +16313,15 @@ }); watch(() => viewPosition.value, (val) => { cover.setStyle(val); - }, { deep: true }); + }, { + deep: true + }); watch(() => tags.value, () => { cover.reset(); cover.draw(tags.value); - }, { deep: true }); + }, { + deep: true + }); }); onBeforeUnmount(() => { if (cover) { @@ -15630,8 +16329,8 @@ } }); } - const TEMP_PATH = "_doc/uniapp_temp/"; - const props$4 = { + var TEMP_PATH = "_doc/uniapp_temp/"; + var props$4 = { src: { type: String, default: "" @@ -15642,12 +16341,12 @@ } }; function useImageLoad(props2, content, trigger2) { - const style = ref(""); - let downloaTask; + var style = ref(""); + var downloaTask; function loadImage() { content.src = ""; style.value = props2.autoSize ? "width:0;height:0;" : ""; - const realPath = props2.src ? getRealPath(props2.src) : ""; + var realPath = props2.src ? getRealPath(props2.src) : ""; if (realPath.indexOf("http://") === 0 || realPath.indexOf("https://") === 0) { downloaTask = plus.downloader.createDownload(realPath, { filename: TEMP_PATH + "/download/" @@ -15674,7 +16373,7 @@ height }) => { if (props2.autoSize) { - style.value = `width:${width}px;height:${height}px;`; + style.value = "width:".concat(width, "px;height:").concat(height, "px;"); window.dispatchEvent(new CustomEvent("updateview")); } trigger2("load", {}, { @@ -15707,12 +16406,12 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - let content = reactive({ + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var content = reactive({ src: "" }); - const style = useImageLoad(props2, content, trigger2); + var style = useImageLoad(props2, content, trigger2); useCover(rootRef, trigger2, content); return () => { return createVNode("uni-cover-image", { @@ -15738,15 +16437,15 @@ setup(_, { emit: emit2 }) { - const rootRef = ref(null); - const textRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - let content = reactive({ + var rootRef = ref(null); + var textRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var content = reactive({ text: "" }); useCover(rootRef, trigger2, content); useRebuild(() => { - const node = textRef.value.childNodes[0]; + var node = textRef.value.childNodes[0]; content.text = node && node instanceof Text ? node.textContent : ""; }); return () => { @@ -15818,7 +16517,7 @@ } } var map = "uni-map {\n width: 300px;\n height: 225px;\n display: inline-block;\n line-height: 0;\n overflow: hidden;\n position: relative;\n}\n\nuni-map[hidden] {\n display: none;\n}\n\n.uni-map-container {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n background-color: black;\n}\n\n.uni-map-slot {\n position: absolute;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n pointer-events: none;\n}"; - const convertCoordinates = (lng, lat, callback) => { + var convertCoordinates = (lng, lat, callback) => { callback({ coord: { latitude: lat, @@ -15833,13 +16532,13 @@ opacity: 1 }; } - const opacity = color.substr(7, 2); + var opacity = color.substr(7, 2); return { color: color.substr(0, 7), opacity: opacity ? Number("0x" + opacity) / 255 : 1 }; } - const props$3 = { + var props$3 = { id: { type: String, default: "" @@ -15888,17 +16587,17 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const containerRef = ref(null); - const attrs2 = useNativeAttrs(props2, ["id"]); - const { + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var containerRef = ref(null); + var attrs2 = useNativeAttrs(props2, ["id"]); + var { position, hidden, onParentReady } = useNative(containerRef); - let map2; - const { + var map2; + var { _addMarkers, _addMapLines, _addMapCircles, @@ -15964,13 +16663,13 @@ deep: true }); }); - const mapControls = computed$1(() => props2.controls.map((control) => { - const position2 = { + var mapControls = computed$1(() => props2.controls.map((control) => { + var position2 = { position: "absolute" }; - ["top", "left", "width", "height"].forEach((key) => { - if (control.position[key]) { - position2[key] = control.position[key] + "px"; + ["top", "left", "width", "height"].forEach((key2) => { + if (control.position[key2]) { + position2[key2] = control.position[key2] + "px"; } }); return { @@ -16011,7 +16710,7 @@ } }); function useMapMethods(props2, trigger2) { - let map2; + var map2; function moveToLocation(resolve, { longitude, latitude @@ -16037,7 +16736,7 @@ function getRegion(resolve) { if (!map2) return; - const rect = map2.getBounds(); + var rect = map2.getBounds(); resolve({ southwest: rect.getSouthWest(), northeast: rect.getNorthEast(), @@ -16055,7 +16754,7 @@ function _addMarker(marker) { if (!map2) return; - const { + var { id: id2, latitude, longitude, @@ -16064,18 +16763,19 @@ label: label2 } = marker; convertCoordinates(longitude, latitude, (res) => { - const { + var _map2; + var { latitude: latitude2, longitude: longitude2 } = res.coord; - const nativeMarker = new plus.maps.Marker(new plus.maps.Point(longitude2, latitude2)); + var nativeMarker = new plus.maps.Marker(new plus.maps.Point(longitude2, latitude2)); if (iconPath) { nativeMarker.setIcon(getRealPath(iconPath)); } if (label2 && label2.content) { nativeMarker.setLabel(label2.content); } - let nativeBubble = void 0; + var nativeBubble = void 0; if (callout && callout.content) { nativeBubble = new plus.maps.Bubble(callout.content); } @@ -16096,16 +16796,17 @@ }; } } - map2 == null ? void 0 : map2.addOverlay(nativeMarker); + (_map2 = map2) === null || _map2 === void 0 ? void 0 : _map2.addOverlay(nativeMarker); map2.__markers__.push(nativeMarker); }); } function _clearMarkers() { if (!map2) return; - const markers = map2.__markers__; + var markers = map2.__markers__; markers.forEach((marker) => { - map2 == null ? void 0 : map2.removeOverlay(marker); + var _map3; + (_map3 = map2) === null || _map3 === void 0 ? void 0 : _map3.removeOverlay(marker); }); map2.__markers__ = []; } @@ -16122,26 +16823,28 @@ return; if (map2.__lines__.length > 0) { map2.__lines__.forEach((circle) => { - map2 == null ? void 0 : map2.removeOverlay(circle); + var _map4; + (_map4 = map2) === null || _map4 === void 0 ? void 0 : _map4.removeOverlay(circle); }); map2.__lines__ = []; } lines.forEach((line) => { - const { + var _map5; + var { color, width } = line; - const points = line.points.map((point) => new plus.maps.Point(point.longitude, point.latitude)); - const polyline = new plus.maps.Polyline(points); + var points = line.points.map((point) => new plus.maps.Point(point.longitude, point.latitude)); + var polyline = new plus.maps.Polyline(points); if (color) { - const strokeStyle = parseHex(color); + var strokeStyle = parseHex(color); polyline.setStrokeColor(strokeStyle.color); polyline.setStrokeOpacity(strokeStyle.opacity); } if (width) { polyline.setLineWidth(width); } - map2 == null ? void 0 : map2.addOverlay(polyline); + (_map5 = map2) === null || _map5 === void 0 ? void 0 : _map5.addOverlay(polyline); map2.__lines__.push(polyline); }); } @@ -16150,12 +16853,14 @@ return; if (map2.__circles__.length > 0) { map2.__circles__.forEach((circle) => { - map2 == null ? void 0 : map2.removeOverlay(circle); + var _map6; + (_map6 = map2) === null || _map6 === void 0 ? void 0 : _map6.removeOverlay(circle); }); map2.__circles__ = []; } circles.forEach((circle) => { - const { + var _map7; + var { latitude, longitude, color, @@ -16163,25 +16868,25 @@ radius, strokeWidth } = circle; - const nativeCircle = new plus.maps.Circle(new plus.maps.Point(longitude, latitude), radius); + var nativeCircle = new plus.maps.Circle(new plus.maps.Point(longitude, latitude), radius); if (color) { - const strokeStyle = parseHex(color); + var strokeStyle = parseHex(color); nativeCircle.setStrokeColor(strokeStyle.color); nativeCircle.setStrokeOpacity(strokeStyle.opacity); } if (fillColor) { - const fillStyle = parseHex(fillColor); + var fillStyle = parseHex(fillColor); nativeCircle.setFillColor(fillStyle.color); nativeCircle.setFillOpacity(fillStyle.opacity); } if (strokeWidth) { nativeCircle.setLineWidth(strokeWidth); } - map2 == null ? void 0 : map2.addOverlay(nativeCircle); + (_map7 = map2) === null || _map7 === void 0 ? void 0 : _map7.addOverlay(nativeCircle); map2.__circles__.push(nativeCircle); }); } - const methods2 = { + var methods2 = { moveToLocation, getCenterLocation, getRegion, @@ -16232,25 +16937,25 @@ super(id2, "uni-open-data", parentNodeId, refNodeId); } } - let plus_; - let weex_; - let BroadcastChannel_; + var plus_; + var weex_; + var BroadcastChannel_; function getRuntime() { return typeof window === "object" && typeof navigator === "object" && typeof document === "object" ? "webview" : "v8"; } function getPageId() { return plus_.webview.currentWebview().id; } - let channel; - let globalEvent; - const callbacks = {}; + var channel; + var globalEvent; + var callbacks = {}; function onPlusMessage(res) { - const message = res.data && res.data.__message; + var message = res.data && res.data.__message; if (!message || !message.__page) { return; } - const pageId = message.__page; - const callback = callbacks[pageId]; + var pageId = message.__page; + var callback = callbacks[pageId]; callback && callback(message); if (!message.keep) { delete callbacks[pageId]; @@ -16276,14 +16981,14 @@ this.webview = webview2; } sendMessage(data) { - const message = JSON.parse(JSON.stringify({ + var message = JSON.parse(JSON.stringify({ __message: { data } })); - const id2 = this.webview.id; + var id2 = this.webview.id; if (BroadcastChannel_) { - const channel2 = new BroadcastChannel_(id2); + var channel2 = new BroadcastChannel_(id2); channel2.postMessage(message); } else { plus_.webview.postMessageToUniNView && plus_.webview.postMessageToUniNView(message, id2); @@ -16304,16 +17009,16 @@ plus_ = context.plus || plus; weex_ = context.weex || (typeof weex === "object" ? weex : null); BroadcastChannel_ = context.BroadcastChannel || (typeof BroadcastChannel === "object" ? BroadcastChannel : null); - const titleNView = { + var titleNView = { autoBackButton: true, titleSize: "17px" }; - const pageId = `page${Date.now()}`; + var pageId = "page".concat(Date.now()); style = extend({}, style); if (style.titleNView !== false && style.titleNView !== "none") { style.titleNView = extend(titleNView, style.titleNView); } - const defaultStyle = { + var defaultStyle = { top: 0, bottom: 0, usingComponents: {}, @@ -16322,13 +17027,13 @@ animationType: "pop-in", animationDuration: 200, uniNView: { - path: `${typeof process === "object" && process.env && {}.VUE_APP_TEMPLATE_PATH || ""}/${url}.js`, + path: "".concat(typeof process === "object" && process.env && {}.VUE_APP_TEMPLATE_PATH || "", "/").concat(url, ".js"), defaultFontSize: plus_.screen.resolutionWidth / 20, viewport: plus_.screen.resolutionWidth } }; style = extend(defaultStyle, style); - const page = plus_.webview.create("", pageId, style, { + var page = plus_.webview.create("", pageId, style, { extras: { from: getPageId(), runtime: getRuntime(), @@ -16348,32 +17053,32 @@ page.show(style.animationType, style.animationDuration); return new Page(page); } - const mode = { + var mode = { SELECTOR: "selector", MULTISELECTOR: "multiSelector", TIME: "time", DATE: "date" }; - const fields = { + var fields = { YEAR: "year", MONTH: "month", DAY: "day" }; function padLeft(num) { - return num > 9 ? num : `0${num}`; + return num > 9 ? num : "0".concat(num); } function getDate(str, _mode) { str = String(str || ""); - const date = new Date(); + var date = new Date(); if (_mode === mode.TIME) { - const strs = str.split(":"); + var strs = str.split(":"); if (strs.length === 2) { date.setHours(parseInt(strs[0]), parseInt(strs[1])); } } else { - const strs = str.split("-"); - if (strs.length === 3) { - date.setFullYear(parseInt(strs[0]), parseInt(String(parseFloat(strs[1]) - 1)), parseInt(strs[2])); + var _strs = str.split("-"); + if (_strs.length === 3) { + date.setFullYear(parseInt(_strs[0]), parseInt(String(parseFloat(_strs[1]) - 1)), parseInt(_strs[2])); } } return date; @@ -16383,7 +17088,7 @@ return "00:00"; } if (props2.mode === mode.DATE) { - const year = new Date().getFullYear() - 100; + var year = new Date().getFullYear() - 100; switch (props2.fields) { case fields.YEAR: return year; @@ -16400,7 +17105,7 @@ return "23:59"; } if (props2.mode === mode.DATE) { - const year = new Date().getFullYear() + 100; + var year = new Date().getFullYear() + 100; switch (props2.fields) { case fields.YEAR: return year; @@ -16412,7 +17117,7 @@ } return ""; } - const props$2 = { + var props$2 = { name: { type: String, default: "" @@ -16463,16 +17168,16 @@ emit: emit2 }) { initI18nPickerMsgsOnce(); - const { + var { t: t2, getLocale } = useI18n(); - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const valueSync = ref(null); - const page = ref(null); - const _setValueSync = () => { - let val = props2.value; + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var valueSync = ref(null); + var page = ref(null); + var _setValueSync = () => { + var val = props2.value; switch (props2.mode) { case mode.MULTISELECTOR: { @@ -16482,11 +17187,11 @@ if (!Array.isArray(valueSync.value)) { valueSync.value = []; } - const length = valueSync.value.length = Math.max(val.length, props2.range.length); - for (let index2 = 0; index2 < length; index2++) { - const val0 = Number(val[index2]); - const val1 = Number(valueSync.value[index2]); - const val2 = isNaN(val0) ? isNaN(val1) ? 0 : val1 : val0; + var length = valueSync.value.length = Math.max(val.length, props2.range.length); + for (var index2 = 0; index2 < length; index2++) { + var val0 = Number(val[index2]); + var val1 = Number(valueSync.value[index2]); + var val2 = isNaN(val0) ? isNaN(val1) ? 0 : val1 : val0; valueSync.value.splice(index2, 1, val2 < 0 ? 0 : val2); } } @@ -16496,17 +17201,17 @@ valueSync.value = String(val); break; default: { - const _valueSync = Number(val); + var _valueSync = Number(val); valueSync.value = _valueSync < 0 ? 0 : _valueSync; break; } } }; - const _updatePicker = (data) => { + var _updatePicker = (data) => { page.value && page.value.sendMessage(data); }; - const _showWeexPicker = (data) => { - let res = { + var _showWeexPicker = (data) => { + var res = { event: "cancel" }; page.value = showPage({ @@ -16520,7 +17225,7 @@ popGesture: "none" }, onMessage: (message) => { - const event = message.event; + var event = message.event; if (event === "created") { _updatePicker(data); return; @@ -16534,17 +17239,17 @@ }, onClose: () => { page.value = null; - const event = res.event; + var event = res.event; delete res.event; event && trigger2(event, {}, res); } }); }; - const _showNativePicker = (data, popover) => { + var _showNativePicker = (data, popover) => { plus.nativeUI[props2.mode === mode.TIME ? "pickTime" : "pickDate"]((res) => { - const date = res.date; + var date = res.date; trigger2("change", {}, { - value: props2.mode === mode.TIME ? `${padLeft(date.getHours())}:${padLeft(date.getMinutes())}` : `${date.getFullYear()}-${padLeft(date.getMonth() + 1)}-${padLeft(date.getDate())}` + value: props2.mode === mode.TIME ? "".concat(padLeft(date.getHours()), ":").concat(padLeft(date.getMinutes())) : "".concat(date.getFullYear(), "-").concat(padLeft(date.getMonth() + 1), "-").concat(padLeft(date.getDate())) }); }, () => { trigger2("cancel", {}, {}); @@ -16558,7 +17263,7 @@ popover }); }; - const _showPicker = (data, popover) => { + var _showPicker = (data, popover) => { if ((data.mode === mode.TIME || data.mode === mode.DATE) && !data.fields) { _showNativePicker(data, popover); } else { @@ -16566,12 +17271,12 @@ _showWeexPicker(data); } }; - const _show = (event) => { + var _show = (event) => { if (props2.disabled) { return; } - const eventTarget = event.currentTarget; - const rect = eventTarget.getBoundingClientRect(); + var eventTarget = event.currentTarget; + var rect = eventTarget.getBoundingClientRect(); _showPicker(Object.assign({}, props2, { value: valueSync.value, locale: getLocale(), @@ -16586,8 +17291,8 @@ height: rect.height }); }; - const uniForm = inject(uniFormKey, false); - const formField = { + var uniForm = inject(uniFormKey, false); + var formField = { submit: () => [props2.name, valueSync.value], reset: () => { switch (props2.mode) { @@ -16608,11 +17313,11 @@ uniForm.addField(formField); onBeforeUnmount(() => uniForm.removeField(formField)); } - Object.keys(props2).forEach((key) => { - if (key !== "name") { - watch(() => props2[key], (val) => { - const data = {}; - data[key] = val; + Object.keys(props2).forEach((key2) => { + if (key2 !== "name") { + watch(() => props2[key2], (val) => { + var data = {}; + data[key2] = val; _updatePicker(data); }, { deep: true @@ -16715,7 +17420,7 @@ } } var video = "uni-video {\n width: 300px;\n height: 225px;\n display: inline-block;\n line-height: 0;\n overflow: hidden;\n position: relative;\n}\n\nuni-video[hidden] {\n display: none;\n}\n\n.uni-video-container {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n background-color: black;\n}\n\n.uni-video-slot {\n position: absolute;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n pointer-events: none;\n}\n"; - const props$1 = { + var props$1 = { id: { type: String, default: "" @@ -16831,8 +17536,8 @@ } } }; - const emits = ["play", "pause", "ended", "timeupdate", "fullscreenchange", "fullscreenclick", "waiting", "error"]; - const methods = ["play", "pause", "stop", "seek", "sendDanmu", "playbackRate", "requestFullScreen", "exitFullScreen"]; + var emits = ["play", "pause", "ended", "timeupdate", "fullscreenchange", "fullscreenclick", "waiting", "error"]; + var methods = ["play", "pause", "stop", "seek", "sendDanmu", "playbackRate", "requestFullScreen", "exitFullScreen"]; var Video = /* @__PURE__ */ defineBuiltInComponent({ name: "Video", props: props$1, @@ -16840,25 +17545,25 @@ setup(props2, { emit: emit2 }) { - const rootRef = ref(null); - const trigger2 = useCustomEvent(rootRef, emit2); - const containerRef = ref(null); - const attrs2 = useNativeAttrs(props2, ["id"]); - const { + var rootRef = ref(null); + var trigger2 = useCustomEvent(rootRef, emit2); + var containerRef = ref(null); + var attrs2 = useNativeAttrs(props2, ["id"]); + var { position, hidden, onParentReady } = useNative(containerRef); - let video2; + var video2; onParentReady(() => { video2 = plus.video.createVideoPlayer("video" + Date.now(), Object.assign({}, attrs2.value, position)); plus.webview.currentWebview().append(video2); if (hidden.value) { video2.hide(); } - emits.forEach((key) => { - video2.addEventListener(key, (event) => { - trigger2(key, {}, event.detail); + emits.forEach((key2) => { + video2.addEventListener(key2, (event) => { + trigger2(key2, {}, event.detail); }); }); watch(() => attrs2.value, (attrs3) => video2.setStyles(attrs3), { @@ -16874,10 +17579,10 @@ } }); }); - const id2 = useContextInfo(); + var id2 = useContextInfo(); useSubscribe((type, data) => { if (methods.includes(type)) { - let options; + var options; switch (type) { case "seek": options = data.position; @@ -16921,7 +17626,7 @@ } } var webview$1 = "uni-web-view {\n display: inline-block;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n"; - const props = { + var props = { src: { type: String, default: "" @@ -16933,20 +17638,20 @@ } } }; - let webview; - const insertHTMLWebView = ({ + var webview; + var insertHTMLWebView = ({ htmlId, src, webviewStyles }) => { - const parentWebview = plus.webview.currentWebview(); - const styles = extend(webviewStyles, { + var parentWebview = plus.webview.currentWebview(); + var styles = extend(webviewStyles, { "uni-app": "none", isUniH5: true }); - const parentTitleNView = parentWebview.getTitleNView(); + var parentTitleNView = parentWebview.getTitleNView(); if (parentTitleNView) { - let defaultTop = NAVBAR_HEIGHT + parseFloat(styles.top || "0"); + var defaultTop = NAVBAR_HEIGHT + parseFloat(styles.top || "0"); if (plus.navigator.isImmersedStatusbar()) { defaultTop += getStatusbarHeight(); } @@ -16956,7 +17661,8 @@ webview = plus.webview.create(src, htmlId, styles); if (parentTitleNView) { webview.addEventListener("titleUpdate", function() { - const title = webview == null ? void 0 : webview.getTitle(); + var _webview; + var title = (_webview = webview) === null || _webview === void 0 ? void 0 : _webview.getTitle(); parentWebview.setStyle({ titleNView: { titleText: !title || title === "null" ? " " : title @@ -16966,25 +17672,27 @@ } plus.webview.currentWebview().append(webview); }; - const removeHTMLWebView = () => { + var removeHTMLWebView = () => { + var _webview2; plus.webview.currentWebview().remove(webview); - webview == null ? void 0 : webview.close("none"); + (_webview2 = webview) === null || _webview2 === void 0 ? void 0 : _webview2.close("none"); webview = null; }; var WebView = /* @__PURE__ */ defineBuiltInComponent({ name: "WebView", props, setup(props2) { - const pageId = getCurrentPageId(); - const containerRef = ref(null); - const { + var pageId = getCurrentPageId(); + var containerRef = ref(null); + var { position, hidden, onParentReady } = useNative(containerRef); - const webviewStyles = computed$1(() => props2.webviewStyles); + var webviewStyles = computed$1(() => props2.webviewStyles); onParentReady(() => { - const htmlId = ref(WEBVIEW_ID_PREFIX + pageId); + var _webview3; + var htmlId = ref(WEBVIEW_ID_PREFIX + pageId); insertHTMLWebView({ htmlId: htmlId.value, src: getRealPath(props2.src), @@ -16992,28 +17700,31 @@ }); UniViewJSBridge.publishHandler(WEBVIEW_INSERTED, {}, pageId); if (hidden.value) - webview == null ? void 0 : webview.hide(); + (_webview3 = webview) === null || _webview3 === void 0 ? void 0 : _webview3.hide(); }); onBeforeUnmount(() => { removeHTMLWebView(); UniViewJSBridge.publishHandler(WEBVIEW_REMOVED, {}, pageId); }); watch(() => props2.src, (val) => { - const realPath = getRealPath(val) || ""; + var _webview5; + var realPath = getRealPath(val) || ""; if (!realPath) { return; } if (/^(http|https):\/\//.test(realPath) && props2.webviewStyles.progress) { - webview == null ? void 0 : webview.setStyle({ + var _webview4; + (_webview4 = webview) === null || _webview4 === void 0 ? void 0 : _webview4.setStyle({ progress: { color: props2.webviewStyles.progress.color } }); } - webview == null ? void 0 : webview.loadURL(realPath); + (_webview5 = webview) === null || _webview5 === void 0 ? void 0 : _webview5.loadURL(realPath); }); watch(webviewStyles, (webviewStyles2) => { - webview == null ? void 0 : webview.setStyle(webviewStyles2); + var _webview6; + (_webview6 = webview) === null || _webview6 === void 0 ? void 0 : _webview6.setStyle(webviewStyles2); }); watch(hidden, (val) => { webview && webview[val ? "hide" : "show"](); @@ -17028,7 +17739,7 @@ super(id2, "uni-web-view", WebView, parentNodeId, refNodeId, nodeJson); } } - const BuiltInComponents = { + var BuiltInComponents = { "#text": UniTextNode, "#comment": UniComment, VIEW: UniViewElement, @@ -17043,7 +17754,6 @@ CHECKBOX: UniCheckbox, "CHECKBOX-GROUP": UniCheckboxGroup, AD: UniAd, - AUDIO: UniAudio, CAMERA: UniCamera, CANVAS: UniCanvas, "COVER-IMAGE": UniCoverImage, @@ -17076,7 +17786,7 @@ function createWrapper(component, props2) { return () => h(component, props2); } - const elements = new Map(); + var elements = new Map(); function $(id2) { return elements.get(id2); } @@ -17087,11 +17797,11 @@ return elements.delete(id2); } function createElement(id2, tag, parentNodeId, refNodeId, nodeJson = {}) { - let element; + var element; if (id2 === 0) { element = new UniNode(id2, tag, parentNodeId, document.createElement(tag)); } else { - const Component = BuiltInComponents[tag]; + var Component = BuiltInComponents[tag]; if (Component) { element = new Component(id2, parentNodeId, refNodeId, nodeJson); } else { @@ -17101,8 +17811,8 @@ elements.set(id2, element); return element; } - const pageReadyCallbacks = []; - let isPageReady = false; + var pageReadyCallbacks = []; + var isPageReady = false; function onPageReady(callback) { if (isPageReady) { return callback(); @@ -17133,9 +17843,9 @@ initPageInfo(route); initSystemInfo(platform, pixelRatio2, windowWidth); initPageElement(); - const pageId = plus.webview.currentWebview().id; + var pageId = plus.webview.currentWebview().id; window.__id__ = pageId; - document.title = `${route}[${pageId}]`; + document.title = "".concat(route, "[").concat(pageId, "]"); initCssVar(statusbarHeight, windowTop, windowBottom); if (disableScroll) { document.addEventListener("touchmove", disableScrollListener); @@ -17165,7 +17875,7 @@ { console.log(formatLog("initPageCss", route + ".css")); } - const element = document.createElement("link"); + var element = document.createElement("link"); element.type = "text/css"; element.rel = "stylesheet"; element.href = route + ".css"; @@ -17174,7 +17884,7 @@ document.head.appendChild(element); } function initCssVar(statusbarHeight, windowTop, windowBottom) { - const cssVars = { + var cssVars = { "--window-left": "0px", "--window-right": "0px", "--window-top": windowTop + "px", @@ -17186,16 +17896,18 @@ } updateCssVar(cssVars); } - let isPageScrollInited = false; + var isPageScrollInited = false; function initPageScroll(onReachBottomDistance) { if (isPageScrollInited) { return; } isPageScrollInited = true; - const opts = { + var opts = { onReachBottomDistance, onPageScroll(scrollTop) { - UniViewJSBridge.publishHandler(ON_PAGE_SCROLL, { scrollTop }); + UniViewJSBridge.publishHandler(ON_PAGE_SCROLL, { + scrollTop + }); }, onReachBottom() { UniViewJSBridge.publishHandler(ON_REACH_BOTTOM); @@ -17215,7 +17927,7 @@ { console.log(formatLog("onVdSync", actions)); } - const firstAction = actions[0]; + var firstAction = actions[0]; if (firstAction[0] === ACTION_TYPE_PAGE_CREATE) { onPageCreateSync(firstAction); } else { @@ -17226,8 +17938,8 @@ return onPageCreate(action[1]); } function onPageUpdateSync(actions) { - const dictAction = actions[0]; - const getDict = createGetDict(dictAction[0] === ACTION_TYPE_DICT ? dictAction[1] : []); + var dictAction = actions[0]; + var getDict = createGetDict(dictAction[0] === ACTION_TYPE_DICT ? dictAction[1] : []); actions.forEach((action) => { switch (action[0]) { case ACTION_TYPE_PAGE_CREATE: @@ -17255,7 +17967,9 @@ flushPostActionJobs(); } function initSubscribeHandlers() { - const { subscribe } = UniViewJSBridge; + var { + subscribe + } = UniViewJSBridge; subscribe(VD_SYNC, onVdSync); } function findElem(vm) { @@ -17264,7 +17978,7 @@ } } function getRootInfo(fields2) { - const info = {}; + var info = {}; if (fields2.id) { info.id = ""; } @@ -17282,8 +17996,8 @@ info.height = document.documentElement.clientHeight; } if (fields2.scrollOffset) { - const documentElement = document.documentElement; - const body = document.body; + var documentElement = document.documentElement; + var body = document.body; info.scrollLeft = documentElement.scrollLeft || body.scrollLeft || 0; info.scrollTop = documentElement.scrollTop || body.scrollTop || 0; info.scrollHeight = documentElement.scrollHeight || body.scrollHeight || 0; @@ -17292,8 +18006,10 @@ return info; } function getNodeInfo(el, fields2) { - const info = {}; - const { top } = getWindowOffset(); + var info = {}; + var { + top + } = getWindowOffset(); if (fields2.id) { info.id = el.id; } @@ -17301,7 +18017,7 @@ info.dataset = getCustomDataset(el); } if (fields2.rect || fields2.size) { - const rect = el.getBoundingClientRect(); + var rect = el.getBoundingClientRect(); if (fields2.rect) { info.left = rect.left; info.right = rect.right; @@ -17322,7 +18038,7 @@ } if (fields2.scrollOffset) { if (el.tagName === "UNI-SCROLL-VIEW") { - const scroll = el.children[0].children[0]; + var scroll = el.children[0].children[0]; info.scrollLeft = scroll.scrollLeft; info.scrollTop = scroll.scrollTop; info.scrollHeight = scroll.scrollHeight; @@ -17335,7 +18051,7 @@ } } if (Array.isArray(fields2.computedStyle)) { - const sytle = getComputedStyle(el); + var sytle = getComputedStyle(el); fields2.computedStyle.forEach((name) => { info[name] = sytle[name]; }); @@ -17354,35 +18070,37 @@ } } function matches(element, selectors) { - const matches2 = element.matches || element.matchesSelector || element.mozMatchesSelector || element.msMatchesSelector || element.oMatchesSelector || element.webkitMatchesSelector || function(selectors2) { - const matches3 = this.parentElement.querySelectorAll(selectors2); - let i = matches3.length; - while (--i >= 0 && matches3.item(i) !== this) { + var matches2 = element.matches || element.matchesSelector || element.mozMatchesSelector || element.msMatchesSelector || element.oMatchesSelector || element.webkitMatchesSelector || function(selectors2) { + var matches3 = this.parentElement.querySelectorAll(selectors2); + var i2 = matches3.length; + while (--i2 >= 0 && matches3.item(i2) !== this) { } - return i > -1; + return i2 > -1; }; return matches2.call(element, selectors); } function getNodesInfo(pageVm2, component, selector, single, fields2) { - const selfElement = findElm(component, pageVm2); - const parentElement = selfElement.parentElement; + var selfElement = findElm(component, pageVm2); + var parentElement = selfElement.parentElement; if (!parentElement) { return single ? null : []; } - const { nodeType } = selfElement; - const maybeFragment = nodeType === 3 || nodeType === 8; + var { + nodeType + } = selfElement; + var maybeFragment = nodeType === 3 || nodeType === 8; if (single) { - const node = maybeFragment ? parentElement.querySelector(selector) : matches(selfElement, selector) ? selfElement : selfElement.querySelector(selector); + var node = maybeFragment ? parentElement.querySelector(selector) : matches(selfElement, selector) ? selfElement : selfElement.querySelector(selector); if (node) { return getNodeInfo(node, fields2); } return null; } else { - let infos = []; - const nodeList = (maybeFragment ? parentElement : selfElement).querySelectorAll(selector); + var infos = []; + var nodeList = (maybeFragment ? parentElement : selfElement).querySelectorAll(selector); if (nodeList && nodeList.length) { - [].forEach.call(nodeList, (node) => { - infos.push(getNodeInfo(node, fields2)); + [].forEach.call(nodeList, (node2) => { + infos.push(getNodeInfo(node2, fields2)); }); } if (!maybeFragment && matches(selfElement, selector)) { @@ -17392,8 +18110,13 @@ } } function requestComponentInfo(page, reqs, callback) { - const result = []; - reqs.forEach(({ component, selector, single, fields: fields2 }) => { + var result = []; + reqs.forEach(({ + component, + selector, + single, + fields: fields2 + }) => { if (component === null) { result.push(getRootInfo(fields2)); } else { @@ -17402,13 +18125,21 @@ }); callback(result); } - function addIntersectionObserver({ reqId, component, options, callback }, _pageId) { - const $el = findElem(component); + function addIntersectionObserver({ + reqId, + component, + options, + callback + }, _pageId) { + var $el = findElem(component); ($el.__io || ($el.__io = {}))[reqId] = requestComponentObserver($el, options, callback); } - function removeIntersectionObserver({ reqId, component }, _pageId) { - const $el = findElem(component); - const intersectionObserver = $el.__io && $el.__io[reqId]; + function removeIntersectionObserver({ + reqId, + component + }, _pageId) { + var $el = findElem(component); + var intersectionObserver = $el.__io && $el.__io[reqId]; if (intersectionObserver) { intersectionObserver.disconnect(); delete $el.__io[reqId]; @@ -17425,9 +18156,11 @@ publish(err.toString()); }); } - const pageVm = { $el: document.body }; + var pageVm = { + $el: document.body + }; function initViewMethods() { - const pageId = getCurrentPageId(); + var pageId = getCurrentPageId(); subscribeViewMethod(pageId, (fn) => { return (...args) => { onPageReady(() => { diff --git a/packages/uni-app-plus/src/view/framework/dom/components/index.ts b/packages/uni-app-plus/src/view/framework/dom/components/index.ts index 775bdf3b27b4c4dbd80c82e8bd1da3dfc84dfa0b..180d39dfea0b52a10d680a5df5e0e7b1094da627 100644 --- a/packages/uni-app-plus/src/view/framework/dom/components/index.ts +++ b/packages/uni-app-plus/src/view/framework/dom/components/index.ts @@ -4,7 +4,7 @@ import { UniTextElement } from '../elements/UniTextElement' import { UniTextNode } from '../elements/UniTextNode' import { UniViewElement } from '../elements/UniViewElement' import { UniAd } from './UniAd' -import { UniAudio } from './UniAudio' +// import { UniAudio } from './UniAudio' import { UniButton } from './UniButton' import { UniCamera } from './UniCamera' import { UniCanvas } from './UniCanvas' @@ -64,7 +64,7 @@ export const BuiltInComponents = { CHECKBOX: UniCheckbox, 'CHECKBOX-GROUP': UniCheckboxGroup, AD: UniAd, - AUDIO: UniAudio, + // AUDIO: UniAudio, CAMERA: UniCamera, CANVAS: UniCanvas, 'COVER-IMAGE': UniCoverImage, diff --git a/packages/uni-app-plus/vite.config.ts b/packages/uni-app-plus/vite.config.ts index 1bf94e94e9faf88e6d920ad7d712d688682bdf33..09c5045266c8f6586a5421259992120d37b3bd14 100644 --- a/packages/uni-app-plus/vite.config.ts +++ b/packages/uni-app-plus/vite.config.ts @@ -6,6 +6,7 @@ import jscc from 'rollup-plugin-jscc' import replace from '@rollup/plugin-replace' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' +import babel from '@rollup/plugin-babel' import { isCustomElement } from '@dcloudio/uni-shared' @@ -26,7 +27,6 @@ const rollupPlugins = [ }, preventAssignment: true, }), - jscc({ values: { // 该插件限制了不能以__开头 @@ -35,6 +35,20 @@ const rollupPlugins = [ // 忽略 pako 内部条件编译 exclude: [resolve('../../node_modules/pako/**')], }), + babel({ + babelHelpers: 'bundled', + extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'], + presets: [ + [ + '@babel/preset-env', + { + corejs: 2, + useBuiltIns: 'usage', + targets: ['ios >= 10'], + }, + ], + ], + }), ] export default defineConfig({ diff --git a/yarn.lock b/yarn.lock index 0a213e53a7ebe06a0628778d4bedae98d32d64e9..b632a9ea7ff8ef3f32260d74e4264fee8a46487b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3971,6 +3971,11 @@ core-js-compat@^3.14.0, core-js-compat@^3.16.0: browserslist "^4.16.6" semver "7.0.0" +core-js@2: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + core-js@^3.16.0: version "3.16.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.0.tgz#1d46fb33720bc1fa7f90d20431f36a5540858986"