diff --git a/README.md b/README.md index b9c8bf0..0200c59 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # gamutable + ## Stockage >On utilise maintenant la lib localforage : https://localforage.github.io/localForage/ Dans cette nouvelle version, on découpe le stockage en 2: @@ -50,14 +51,14 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev env }> -[(#SET{filtrerselect,#ARRAY{ - 0,#ARRAY{champ,secteur,valeurs,#LISTE{Le chat}}, - 1,#ARRAY{champ,voie,valeurs,#LISTE{Turlut, man}} - }|json_encode|rawurlencode})] - aaaa ``` - **url_sort_asc** et **url_sort_desc** => surcharge possible des icones de tri de colonnes +## les filtrages par url sont : +- &trier=champ1|asc => OK +- &filtre=champ1|valeur1 => OK +- &afficher=50 => OK +- &rechercher=toto => OK ## Personnalisation du contenu : surcharger `json_gamutable.json.html` en suivant son modele - pour le header c'est de la forme : "champ":"label" @@ -84,6 +85,17 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev "nom" : "desc" } ``` +- recharger qu'une partie du json via le timestamp (maj), il faut ajouter le critere : `{maj > #ENV{maj,0}}` et la clé dans le header : +```json +"maj": [(#CONFIG{derniere_modif_osdve_intervention}|tsEnDate|json_encode)] +``` + +- On peut ajouter des elements que l'on veut supprimer si on utilise le {maj} +```json +"a_supprimer" : [ #ENV{maj}}> #ID_ARTICLE ] +``` + + ## Utiliser les actions : ```html diff --git a/action/pdf_gamutable.php b/action/pdf_gamutable.php index 0936b20..b463194 100644 --- a/action/pdf_gamutable.php +++ b/action/pdf_gamutable.php @@ -11,6 +11,7 @@ function action_pdf_gamutable_dist() { } $fichierpdf = _request('fichierpdf') ?? ''; + $langpdf = _request('langpdf'); $namepdf = _request('namepdf') ?? $fichierpdf; $namepdf = str_replace('/', '_', $namepdf); $header = _request('header') ?? []; @@ -31,7 +32,7 @@ function action_pdf_gamutable_dist() { if (find_in_path('gamutable_pdf/' . $fichierpdf . '.html')) { $set = [ 'arg' => $arg, - 'lang' => $GLOBALS['meta']['langue_site'] ?? 'fr' + 'lang' => $langpdf ?? $GLOBALS['meta']['langue_site'] ?? 'fr' ]; if (!empty($Tcles)) { $set = array_merge($set, ['Tids' => $Tcles]); diff --git a/certs/vite.crt.pem b/certs/vite.crt.pem new file mode 100644 index 0000000..475ad0a --- /dev/null +++ b/certs/vite.crt.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID+zCCAmOgAwIBAgIRAOOJzMD8sw5q19A4zphuQV0wDQYJKoZIhvcNAQELBQAw +TzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMRIwEAYDVQQLDAl0b2ZA +c2lyYWMxGTAXBgNVBAMMEG1rY2VydCB0b2ZAc2lyYWMwHhcNMjIxMjA4MDcwNTMw +WhcNMjUwMzA4MDcwNTMwWjA9MScwJQYDVQQKEx5ta2NlcnQgZGV2ZWxvcG1lbnQg +Y2VydGlmaWNhdGUxEjAQBgNVBAsMCXRvZkBzaXJhYzCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBALz7kaH4NETNItBjcBiV6xt3Z+djb+06AdPOitG14lGU +NZRXNZ/tFLrncN9ptPyU2wkgqQCNuZzyK9d/K/BRiVahXl+6YqKLR5jeg6s2RLIp +DYs1k63OJhmvGMSNjO+UWmBaI7zGqLgmrY0qCV8tTfLHfisi7/G7sUH9m+eV0Eih +RIYjXXf9k3ZeEnLsTK297JPlwipLEZ5Io3wI1+x2Easovxfl6urCHtrpyyUJE4L5 +Y/o2VhfFcEIrIIpyJyrQdn3M3jSEvJWKvK2etJoXezgXnMjh/YhMg7HZj5CeKCPq +IdNjZare2xWwu4X5AdaZbAN04G8gc77VDjqt4XYm/KcCAwEAAaNkMGIwDgYDVR0P +AQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFIVU0l9v +NM0nWDIGPGYOgJdkOxjRMBoGA1UdEQQTMBGCCWxvY2FsaG9zdIcEfwAAATANBgkq +hkiG9w0BAQsFAAOCAYEAj9Cab99vgqXfCIsCMc2oMPWLL0iZ9O9DgeAGu/nUNfI1 +fVgkus+WS2TVmTD828N/uo/tBBY+yjH8a79bAClK5aCcsom4OFFzPod9PhfLqqSv +RsgvgZEHPZNF/Jobsf1f3nN6Xz+AX3RUQrbHlm8QqK3ir8u43VBRH56A1FT3Hob6 +MtxqCHuhUFV0WRIb8E73Q6n69k+IAfaZvY3wZUXVH78FFlYK3SIv/NU1HC2FByXF +FKejQ9vYJV0QmY/sDZYM66A0qB03oEyGIC3Fk+ze4+gHyuVi1XwcYmxiYQgYwFMQ +ZEDjPy64s1t1lpbmbPtrp7pIAAYIYXOEWlTB2re0GmiYTFpcDuZYicxw5Ng9uL/e +lRqXCDooF8jr2H+H8zoqEfvNMX6eMslsfrOca30MZxHUL+Vwqukt+va6uGzDJBDU +AzvCw1Y4kKxnlSgaTrCnu/aT2ejxhhCv6WNVW2WxZiIwaNJxh4ZjOpcEiD9xxxfw +fko5gu7B+lELkHZ8f4cE +-----END CERTIFICATE----- diff --git a/certs/vite.key.pem b/certs/vite.key.pem new file mode 100644 index 0000000..5ce1ad8 --- /dev/null +++ b/certs/vite.key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC8+5Gh+DREzSLQ +Y3AYlesbd2fnY2/tOgHTzorRteJRlDWUVzWf7RS653DfabT8lNsJIKkAjbmc8ivX +fyvwUYlWoV5fumKii0eY3oOrNkSyKQ2LNZOtziYZrxjEjYzvlFpgWiO8xqi4Jq2N +KglfLU3yx34rIu/xu7FB/ZvnldBIoUSGI113/ZN2XhJy7EytveyT5cIqSxGeSKN8 +CNfsdhGrKL8X5erqwh7a6cslCROC+WP6NlYXxXBCKyCKcicq0HZ9zN40hLyViryt +nrSaF3s4F5zI4f2ITIOx2Y+Qnigj6iHTY2Wq3tsVsLuF+QHWmWwDdOBvIHO+1Q46 +reF2JvynAgMBAAECggEBAJPq1DJSc5bmeTlim3qi3ULCUzFpQ1IK9SMzprQ+CMaR +mt5g5Dgo+PDR9iboNiD84fRi++TTCVUut+IUR+/x4e1MoPGMkWdoXMHqaGS6NUq9 +lzw+0zhXArtXsasmoAlltNd1tkMruyNoIq87F9rHOxurybU5w1UR88wTFNRPDpfJ +SRiowKbeI5dF+qGIBfRYMb+dEG7CSsjSBmna+wP9jQM/aeaNBVg9sl2xr2qGuVGx +lFhBoyjBuwdGWfZzIJIXZm2yPCoKJXOzl9HzdSbr9evHOKXGWfUZ8T3tk78PtvZ4 +mmb9kJfX2yhr57ignz6ABoYhAzhYxRvTaQ6RWzSLkwECgYEAzWp3RBokQHlZor4b +OdygrPJCFgdnmyYf+4+w7zJXgz+pJg/lzKg2xV0Zi+9PPw3Wyz+ncEqGpi1Wt54T +d31g3bnRZvXtVbf0/1bZFiCacE2ND4lkgpDCOvV2yPoMXJ9lRJt7/BX+4ME4nrDn +4ocMUzK14kBS86IJ3aC0mvQ7XusCgYEA64UlL3ytWrTx0l0gugqdng4pa+Ct1eoz +cIcWFpD0JpxOBmV4eRpxvprb1vG+H2UcVpBJnEmgqrwwZCX02X40YpoEhP9RiQ1e +vr+jkT9aFX9leqhrHbl6H2n8eqrVjszyA94xPHBrx9z6WQRL7sQi3vkc2aUATERG +7vRkYr67gjUCgYB3qpVOXDhQQyF/2GX+AFSuS/dJ5Ahsbvpkz6HQxzAKKvT8Unia +EEjQE1uFlOVCo2pFP5DortHgTztcfr9ydd0PbmfaJlyb+i3E7rBK3rV5xQPvUCf4 +lCJCvKr1jA3Vi5owLLA+/AVeo9G7SO3dnrUEZt9krfplKjm7Hhr4xl0r/wKBgQDY +ZeXc0/mUNl1apCbFyas45lo4vJ/8xMuuwPASm+047LTkO6eN3jZUo4UK4eOGhSic +gMahyyTMu0zbN+TZUZRgZJNygAUyoA5FxV9MvaDPz9Y19Tk2fo0u//rz2rOOGdDk +rOsgVUsywF9mGwSJxb0kkk9nyquTZ8ilFfiGoik3YQKBgFmE/CObkleRUNOAW6Ca +mZOfx+zDMb/tsUKvgFUJ3KEtGvUEkvYA/mz+iiPCD7PlkU4+VvNAjhptFGizgIEw +Y+JYYiATaFBnCqsqoidmn/XTbRj6Oo3ggKniI1/tIibMp6MtSwtVQdYTNlR4IBMt +xufynO21rb9zTSRqwMsMkRAE +-----END PRIVATE KEY----- diff --git a/css/gamutable.css b/css/gamutable.css index bb15394..aa1a388 100644 --- a/css/gamutable.css +++ b/css/gamutable.css @@ -1,879 +1,899 @@ .gamutable__input--rechercher { - padding: 0.25rem 1rem; + padding: 0.25rem 1em; } .vue-tags .vue-tag.selected { - font-size: 1.2rem; + font-size: 1.2rem; } -div.vue-input > input { - font-size: 1.2rem; +div.vue-input>input { + font-size: 1.2rem; } .tag--ub { - display: inline-block; + display: inline-block; } .gamutable__input--filtrer { - font-size: 1.2rem; - padding: 5px 5px !important; + font-size: 1.2rem; + padding: 5px 5px !important; } + .gamutable__input--filtrer:valid { - font-size: 1.2rem; - background-color: rgb(153, 153, 153); - color: #000; + font-size: 1.2rem; + background-color: rgb(153, 153, 153); + color: #000; } .gamutable__input--filtrer:-moz-placeholder-shown { - background-color: transparent; - color: inherit; + background-color: transparent; + color: inherit; } .gamutable__input--filtrer:-ms-input-placeholder { - background-color: transparent; - color: inherit; + background-color: transparent; + color: inherit; } .gamutable__input--filtrer:placeholder-shown { - background-color: transparent; - color: inherit; + background-color: transparent; + color: inherit; } th .vue-select { - width: 100%; + width: 100%; } .gamutable--surTable select, .gamutable--surTable input { - margin-bottom: 0; + margin-bottom: 0; } + .gamutable--surTable .gamutable-nbrMax { - margin-left: 2rem; + margin-left: 2rem; } + .gamutable--surTable .includespip { - margin-left: 2rem; + margin-left: 2rem; } .gamutable--sousTable { - display: -ms-flexbox; - display: flex; - -ms-flex-pack: justify; - justify-content: space-between; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: justify; + justify-content: space-between; } .gamutable--pagination { - display: -ms-flexbox; - display: flex; + display: -ms-flexbox; + display: flex; } + .gamutable--pagination .page-item { - display: -ms-flexbox; - display: flex; + display: -ms-flexbox; + display: flex; } + .gamutable--pagination .page-link { - margin: 0 0.2rem; - background-color: #eee; - cursor: pointer; + margin: 0 0.2rem; + background-color: #eee; + cursor: pointer; +} +.gamutable--pagination .page-link.on { + background-color: #cecece; } .h2-like.titregamutable, .h2-like.titregamutable_deux { - font-weight: bold; + font-weight: bold; } .gamutable table { - font-size: 1rem; - table-layout: auto; -} -.gamutable table thead { - border: 1px solid rgb(119, 119, 119); -} -.gamutable table .gt_labels { - display: -ms-flexbox; - display: flex; - -ms-flex-pack: justify; - justify-content: space-between; - -ms-flex-align: center; - align-items: center; -} -.gamutable table th > div { - display: -ms-flexbox; - display: flex; -} -.gamutable table .label_tete_colonne { - -ms-flex-positive: 1; - flex-grow: 1; -} -.gamutable table .iconeTri { - float: right; - width: calc(1rem + 4px); -} -.gamutable table .iconeTri .fa { - padding: 2px 5px; - cursor: pointer; -} -.gamutable table .tri_col { - cursor: pointer; - fill: #cecece; -} -.gamutable table .iconeTri > .active { - fill: rgb(220, 53, 69); - color: rgb(220, 53, 69); -} -.gamutable table tbody tr:hover { - background-color: rgba(179, 209, 67, 0.27); + font-size: 1em; + table-layout: auto; } -#app .select { - background-color: rgba(179, 209, 67, 0.47); +.gamutable table thead { + border: 1px solid rgb(119, 119, 119); +} + +.gamutable table .gt_labels { + display: -ms-flexbox; + display: flex; + -ms-flex-pack: justify; + justify-content: space-between; + -ms-flex-align: center; + align-items: center; +} + +.gamutable table th>div { + display: -ms-flexbox; + display: flex; +} + +.gamutable table .label_tete_colonne { + -ms-flex-positive: 1; + flex-grow: 1; +} + +.gamutable table .iconeTri { + float: right; + width: calc(1em + 4px); +} + +.gamutable table .iconeTri .fa { + padding: 2px 5px; + cursor: pointer; +} + +.gamutable table .tri_col { + cursor: pointer; + fill: #cecece; +} + +.gamutable table .iconeTri>.active { + fill: rgb(220, 53, 69); + color: rgb(220, 53, 69); +} + +.gamutable table tbody tr:hover { + background-color: rgba(179, 209, 67, 0.27); +} + +.vue-gamutable table.table--zebra tr.select { + background-color: rgba(179, 209, 67, 0.47); } td.id { - cursor: pointer; + cursor: pointer; } th.icone { - width: 30px; - text-align: center; + width: 30px; + text-align: center; } tr.filtreColonne th { - padding: 0; + padding: 0; } + tr.filtreColonne th select { - margin: 0; + margin: 0; } -td.icone > * { - width: 100%; - display: block; - padding: 0.5rem; - text-align: center; +td.icone>* { + width: 100%; + display: block; + padding: 0.5rem; + text-align: center; } -.gamutable .url_action { - padding: 0.2rem; - display: -ms-inline-flexbox; - display: inline-flex; - background-color: #f5f5f5; - border: 1px solid #cecece; - border-radius: 5px; +.gamutable .url_action:not(.sans_css) { + padding: 0.2rem; + display: -ms-inline-flexbox; + display: inline-flex; + background-color: #f5f5f5; + border: 1px solid #cecece; + border-radius: 5px; } + .gamutable .url_action:hover { - background-color: #cecece; + background-color: #cecece; } td.icone i { - font-size: 1.8rem; + font-size: 1.8rem; } .vueBlocs { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; } .vueBlocs-unbloc { - width: 23%; - border: 1px solid #cecece; - margin-bottom: 1rem; - margin-right: 1rem; + width: 23%; + border: 1px solid #cecece; + margin-bottom: 1rem; + margin-right: 1rem; } .viderInputSearch { - color: #ff0000; + color: #ff0000; } /* blocks widths (percentage and pixels) */ .w100 { - width: 100%; + width: 100%; } .w95 { - width: 95%; + width: 95%; } .w90 { - width: 90%; + width: 90%; } .w85 { - width: 85%; + width: 85%; } .w80 { - width: 80%; + width: 80%; } .w75 { - width: 75%; + width: 75%; } .w70 { - width: 70%; + width: 70%; } .w65 { - width: 65%; + width: 65%; } .w60 { - width: 60%; + width: 60%; } .w55 { - width: 55%; + width: 55%; } .w50 { - width: 50%; + width: 50%; } .w45 { - width: 45%; + width: 45%; } .w40 { - width: 40%; + width: 40%; } .w35 { - width: 35%; + width: 35%; } .w30 { - width: 30%; + width: 30%; } .w25 { - width: 25%; + width: 25%; } .w20 { - width: 20%; + width: 20%; } .w15 { - width: 15%; + width: 15%; } .w10 { - width: 10%; + width: 10%; } .w5 { - width: 5%; + width: 5%; } .w1000p { - width: 1000px; + width: 1000px; } .minw1000p { - min-width: 1000px; + min-width: 1000px; } .maxw1000p { - max-width: 1000px; + max-width: 1000px; } -.w1000p input { - width: 1000px; +.gamutable .w1000p input { + width: 1000px; } .w950p { - width: 950px; + width: 950px; } .minw950p { - min-width: 950px; + min-width: 950px; } .maxw950p { - max-width: 950px; + max-width: 950px; } -.w950p input { - width: 950px; +.gamutable .w950p input { + width: 950px; } .w900p { - width: 900px; + width: 900px; } .minw900p { - min-width: 900px; + min-width: 900px; } .maxw900p { - max-width: 900px; + max-width: 900px; } -.w900p input { - width: 900px; +.gamutable .w900p input { + width: 900px; } .w850p { - width: 850px; + width: 850px; } .minw850p { - min-width: 850px; + min-width: 850px; } .maxw850p { - max-width: 850px; + max-width: 850px; } -.w850p input { - width: 850px; +.gamutable .w850p input { + width: 850px; } .w800p { - width: 800px; + width: 800px; } .minw800p { - min-width: 800px; + min-width: 800px; } .maxw800p { - max-width: 800px; + max-width: 800px; } -.w800p input { - width: 800px; +.gamutable .w800p input { + width: 800px; } .w750p { - width: 750px; + width: 750px; } .minw750p { - min-width: 750px; + min-width: 750px; } .maxw750p { - max-width: 750px; + max-width: 750px; } -.w750p input { - width: 750px; +.gamutable .w750p input { + width: 750px; } .w700p { - width: 700px; + width: 700px; } .minw700p { - min-width: 700px; + min-width: 700px; } .maxw700p { - max-width: 700px; + max-width: 700px; } -.w700p input { - width: 700px; +.gamutable .w700p input { + width: 700px; } .w650p { - width: 650px; + width: 650px; } .minw650p { - min-width: 650px; + min-width: 650px; } .maxw650p { - max-width: 650px; + max-width: 650px; } -.w650p input { - width: 650px; +.gamutable .w650p input { + width: 650px; } .w600p { - width: 600px; + width: 600px; } .minw600p { - min-width: 600px; + min-width: 600px; } .maxw600p { - max-width: 600px; + max-width: 600px; } -.w600p input { - width: 600px; +.gamutable .w600p input { + width: 600px; } .w550p { - width: 550px; + width: 550px; } .minw550p { - min-width: 550px; + min-width: 550px; } .maxw550p { - max-width: 550px; + max-width: 550px; } -.w550p input { - width: 550px; +.gamutable .w550p input { + width: 550px; } .w500p { - width: 500px; + width: 500px; } .minw500p { - min-width: 500px; + min-width: 500px; } .maxw500p { - max-width: 500px; + max-width: 500px; } -.w500p input { - width: 500px; +.gamutable .w500p input { + width: 500px; } .w450p { - width: 450px; + width: 450px; } .minw450p { - min-width: 450px; + min-width: 450px; } .maxw450p { - max-width: 450px; + max-width: 450px; } -.w450p input { - width: 450px; +.gamutable .w450p input { + width: 450px; } .w400p { - width: 400px; + width: 400px; } .minw400p { - min-width: 400px; + min-width: 400px; } .maxw400p { - max-width: 400px; + max-width: 400px; } -.w400p input { - width: 400px; +.gamutable .w400p input { + width: 400px; } .w350p { - width: 350px; + width: 350px; } .minw350p { - min-width: 350px; + min-width: 350px; } .maxw350p { - max-width: 350px; + max-width: 350px; } -.w350p input { - width: 350px; +.gamutable .w350p input { + width: 350px; } .w300p { - width: 300px; + width: 300px; } .minw300p { - min-width: 300px; + min-width: 300px; } .maxw300p { - max-width: 300px; + max-width: 300px; } -.w300p input { - width: 300px; +.gamutable .w300p input { + width: 300px; } .w250p { - width: 250px; + width: 250px; } .minw250p { - min-width: 250px; + min-width: 250px; } .maxw250p { - max-width: 250px; + max-width: 250px; } -.w250p input { - width: 250px; +.gamutable .w250p input { + width: 250px; } .w200p { - width: 200px; + width: 200px; } .minw200p { - min-width: 200px; + min-width: 200px; } .maxw200p { - max-width: 200px; + max-width: 200px; } -.w200p input { - width: 200px; +.gamutable .w200p input { + width: 200px; } .w190p { - width: 190px; + width: 190px; } .minw190p { - min-width: 190px; + min-width: 190px; } .maxw190p { - max-width: 190px; + max-width: 190px; } -.w190p input { - width: 190px; +.gamutable .w190p input { + width: 190px; } .w180p { - width: 180px; + width: 180px; } .minw180p { - min-width: 180px; + min-width: 180px; } .maxw180p { - max-width: 180px; + max-width: 180px; } -.w180p input { - width: 180px; +.gamutable .w180p input { + width: 180px; } .w170p { - width: 170px; + width: 170px; } .minw170p { - min-width: 170px; + min-width: 170px; } .maxw170p { - max-width: 170px; + max-width: 170px; } -.w170p input { - width: 170px; +.gamutable .w170p input { + width: 170px; } .w160p { - width: 160px; + width: 160px; } .minw160p { - min-width: 160px; + min-width: 160px; } .maxw160p { - max-width: 160px; + max-width: 160px; } -.w160p input { - width: 160px; +.gamutable .w160p input { + width: 160px; } .w150p { - width: 150px; + width: 150px; } .minw150p { - min-width: 150px; + min-width: 150px; } .maxw150p { - max-width: 150px; + max-width: 150px; } -.w150p input { - width: 150px; +.gamutable .w150p input { + width: 150px; } .w140p { - width: 140px; + width: 140px; } .minw140p { - min-width: 140px; + min-width: 140px; } .maxw140p { - max-width: 140px; + max-width: 140px; } -.w140p input { - width: 140px; +.gamutable .w140p input { + width: 140px; } .w130p { - width: 130px; + width: 130px; } .minw130p { - min-width: 130px; + min-width: 130px; } .maxw130p { - max-width: 130px; + max-width: 130px; } -.w130p input { - width: 130px; +.gamutable .w130p input { + width: 130px; } .w120p { - width: 120px; + width: 120px; } .minw120p { - min-width: 120px; + min-width: 120px; } .maxw120p { - max-width: 120px; + max-width: 120px; } -.w120p input { - width: 120px; +.gamutable .w120p input { + width: 120px; } .w110p { - width: 110px; + width: 110px; } .minw110p { - min-width: 110px; + min-width: 110px; } .maxw110p { - max-width: 110px; + max-width: 110px; } -.w110p input { - width: 110px; +.gamutable .w110p input { + width: 110px; } .w100p { - width: 100px; + width: 100px; } .minw100p { - min-width: 100px; + min-width: 100px; } .maxw100p { - max-width: 100px; + max-width: 100px; } -.w100p input { - width: 100px; +.gamutable .w100p input { + width: 100px; } .w90p { - width: 90px; + width: 90px; } .minw90p { - min-width: 90px; + min-width: 90px; } .maxw90p { - max-width: 90px; + max-width: 90px; } -.w90p input { - width: 90px; +.gamutable .w90p input { + width: 90px; } .w80p { - width: 80px; + width: 80px; } .minw80p { - min-width: 80px; + min-width: 80px; } .maxw80p { - max-width: 80px; + max-width: 80px; } -.w80p input { - width: 80px; +.gamutable .w80p input { + width: 80px; } .w70p { - width: 70px; + width: 70px; } .minw70p { - min-width: 70px; + min-width: 70px; } .maxw70p { - max-width: 70px; + max-width: 70px; } -.w70p input { - width: 70px; +.gamutable .w70p input { + width: 70px; } .w60p { - width: 60px; + width: 60px; } .minw60p { - min-width: 60px; + min-width: 60px; } .maxw60p { - max-width: 60px; + max-width: 60px; } -.w60p input { - width: 60px; +.gamutable .w60p input { + width: 60px; } .w50p { - width: 50px; + width: 50px; } .minw50p { - min-width: 50px; + min-width: 50px; } .maxw50p { - max-width: 50px; + max-width: 50px; } -.w50p input { - width: 50px; +.gamutable .w50p input { + width: 50px; } .w40p { - width: 40px; + width: 40px; } .minw40p { - min-width: 40px; + min-width: 40px; } .maxw40p { - max-width: 40px; + max-width: 40px; } -.w40p input { - width: 40px; +.gamutable .w40p input { + width: 40px; } .w30p { - width: 30px; + width: 30px; } .minw30p { - min-width: 30px; + min-width: 30px; } .maxw30p { - max-width: 30px; + max-width: 30px; } -.w30p input { - width: 30px; +.gamutable .w30p input { + width: 30px; } .w20p { - width: 20px; + width: 20px; } .minw20p { - min-width: 20px; + min-width: 20px; } .maxw20p { - max-width: 20px; + max-width: 20px; } -.w20p input { - width: 20px; +.gamutable .w20p input { + width: 20px; } .w10p { - width: 10px; + width: 10px; } .minw10p { - min-width: 10px; + min-width: 10px; } .maxw10p { - max-width: 10px; + max-width: 10px; } -.w10p input { - width: 10px; +.gamutable .w10p input { + width: 10px; } .w66 { - width: 66.6666666667%; + width: 66.6666666667%; } .w33 { - width: 33.3333333333%; + width: 33.3333333333%; } .wauto { - width: auto; + width: auto; } .w960p { - width: 960px; + width: 960px; } .minw960p { - min-width: 960px; + min-width: 960px; } .maxw960p { - max-width: 960px; + max-width: 960px; } .w1140p { - width: 1140px; + width: 1140px; } .minw1140p { - min-width: 1140px; + min-width: 1140px; } .maxw1140p { - max-width: 1140px; + max-width: 1140px; } + /*# sourceMappingURL=gamutable.css.map */ diff --git a/css/gamutable.css.map b/css/gamutable.css.map deleted file mode 100644 index 1594d63..0000000 --- a/css/gamutable.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["gamutable.scss","gamutable.css"],"names":[],"mappings":"AAGA;EACC,qBAAA;ACFD;;ADIA;EACC,iBAAA;ACDD;;ADGA;EACC,iBAAA;ACAD;;ADEA;EACC,qBAAA;ACCD;;ADCA;EACC,iBAAA;EAEA,2BAAA;ACCD;ADAC;EACC,iBAAA;EACA,oCAAA;EACA,WAAA;ACEF;;ADCA;EACC,6BAAA;EACA,cAAA;ACED;;ADJA;EACC,6BAAA;EACA,cAAA;ACED;;ADJA;EACC,6BAAA;EACA,cAAA;ACED;;ADAA;EACC,WAAA;ACGD;;ADGC;;EAEC,gBAAA;ACAF;ADEC;EACC,iBAAA;ACAF;ADEC;EACC,iBAAA;ACAF;;ADGA;EACC,oBAAA;EAAA,aAAA;EACA,sBAAA;MAAA,8BAAA;ACAD;;ADEA;EACC,oBAAA;EAAA,aAAA;ACCD;ADAC;EACC,oBAAA;EAAA,aAAA;ACEF;ADAC;EACC,gBAAA;EACA,sBAAA;EACA,eAAA;ACEF;;ADEA;;EAEC,iBAAA;ACCD;;ADCA;EAOC,eAAA;EACA,kBAAA;ACJD;ADKC;EACC,oCAAA;ACHF;ADKC;EACC,oBAAA;EAAA,aAAA;EACA,sBAAA;MAAA,8BAAA;EACA,sBAAA;MAAA,mBAAA;ACHF;ADKC;EACC,oBAAA;EAAA,aAAA;ACHF;ADKC;EACC,oBAAA;MAAA,YAAA;ACHF;ADKC;EACC,YAAA;EACA,uBAAA;ACHF;ADKE;EACC,gBAAA;EACA,eAAA;ACHH;ADMC;EACC,eAAA;EACA,aAAA;ACJF;ADMC;EACC,sBAAA;EACA,uBAAA;ACJF;ADMC;EACC,0CAAA;ACJF;;ADOA;EACC,0CAAA;ACJD;;ADOA;EACC,eAAA;ACJD;;ADOA;EACC,WAAA;EACA,kBAAA;ACJD;;ADOA;EACC,UAAA;ACJD;ADKC;EACC,SAAA;ACHF;;ADOA;EACC,WAAA;EACA,cAAA;EACA,eAAA;EACA,kBAAA;ACJD;;ADMA;EACC,eAAA;EACA,2BAAA;EAAA,oBAAA;EACA,yBAAA;EACA,yBAAA;EACA,kBAAA;ACHD;ADIC;EACC,yBAAA;ACFF;;ADMA;EACC,iBAAA;ACHD;;ADMA;EACC,oBAAA;EAAA,aAAA;EACA,mBAAA;MAAA,eAAA;ACHD;;ADKA;EACC,UAAA;EACA,yBAAA;EACA,mBAAA;EACA,kBAAA;ACFD;;ADKA;EACC,cAAA;ACFD;;ADKA,0CAAA;AAGC;EACC,WAAA;ACJF;;ADGC;EACC,UAAA;ACAF;;ADDC;EACC,UAAA;ACIF;;ADLC;EACC,UAAA;ACQF;;ADTC;EACC,UAAA;ACYF;;ADbC;EACC,UAAA;ACgBF;;ADjBC;EACC,UAAA;ACoBF;;ADrBC;EACC,UAAA;ACwBF;;ADzBC;EACC,UAAA;AC4BF;;AD7BC;EACC,UAAA;ACgCF;;ADjCC;EACC,UAAA;ACoCF;;ADrCC;EACC,UAAA;ACwCF;;ADzCC;EACC,UAAA;AC4CF;;AD7CC;EACC,UAAA;ACgDF;;ADjDC;EACC,UAAA;ACoDF;;ADrDC;EACC,UAAA;ACwDF;;ADzDC;EACC,UAAA;AC4DF;;AD7DC;EACC,UAAA;ACgEF;;ADjEC;EACC,UAAA;ACoEF;;ADrEC;EACC,SAAA;ACwEF;;ADjEC;EACC,aAAA;ACoEF;;ADlEC;EACC,iBAAA;ACqEF;;ADnEC;EACC,iBAAA;ACsEF;;ADpEC;EACC,aAAA;ACuEF;;ADjFC;EACC,YAAA;ACoFF;;ADlFC;EACC,gBAAA;ACqFF;;ADnFC;EACC,gBAAA;ACsFF;;ADpFC;EACC,YAAA;ACuFF;;ADjGC;EACC,YAAA;ACoGF;;ADlGC;EACC,gBAAA;ACqGF;;ADnGC;EACC,gBAAA;ACsGF;;ADpGC;EACC,YAAA;ACuGF;;ADjHC;EACC,YAAA;ACoHF;;ADlHC;EACC,gBAAA;ACqHF;;ADnHC;EACC,gBAAA;ACsHF;;ADpHC;EACC,YAAA;ACuHF;;ADjIC;EACC,YAAA;ACoIF;;ADlIC;EACC,gBAAA;ACqIF;;ADnIC;EACC,gBAAA;ACsIF;;ADpIC;EACC,YAAA;ACuIF;;ADjJC;EACC,YAAA;ACoJF;;ADlJC;EACC,gBAAA;ACqJF;;ADnJC;EACC,gBAAA;ACsJF;;ADpJC;EACC,YAAA;ACuJF;;ADjKC;EACC,YAAA;ACoKF;;ADlKC;EACC,gBAAA;ACqKF;;ADnKC;EACC,gBAAA;ACsKF;;ADpKC;EACC,YAAA;ACuKF;;ADjLC;EACC,YAAA;ACoLF;;ADlLC;EACC,gBAAA;ACqLF;;ADnLC;EACC,gBAAA;ACsLF;;ADpLC;EACC,YAAA;ACuLF;;ADjMC;EACC,YAAA;ACoMF;;ADlMC;EACC,gBAAA;ACqMF;;ADnMC;EACC,gBAAA;ACsMF;;ADpMC;EACC,YAAA;ACuMF;;ADjNC;EACC,YAAA;ACoNF;;ADlNC;EACC,gBAAA;ACqNF;;ADnNC;EACC,gBAAA;ACsNF;;ADpNC;EACC,YAAA;ACuNF;;ADjOC;EACC,YAAA;ACoOF;;ADlOC;EACC,gBAAA;ACqOF;;ADnOC;EACC,gBAAA;ACsOF;;ADpOC;EACC,YAAA;ACuOF;;ADjPC;EACC,YAAA;ACoPF;;ADlPC;EACC,gBAAA;ACqPF;;ADnPC;EACC,gBAAA;ACsPF;;ADpPC;EACC,YAAA;ACuPF;;ADjQC;EACC,YAAA;ACoQF;;ADlQC;EACC,gBAAA;ACqQF;;ADnQC;EACC,gBAAA;ACsQF;;ADpQC;EACC,YAAA;ACuQF;;ADjRC;EACC,YAAA;ACoRF;;ADlRC;EACC,gBAAA;ACqRF;;ADnRC;EACC,gBAAA;ACsRF;;ADpRC;EACC,YAAA;ACuRF;;ADjSC;EACC,YAAA;ACoSF;;ADlSC;EACC,gBAAA;ACqSF;;ADnSC;EACC,gBAAA;ACsSF;;ADpSC;EACC,YAAA;ACuSF;;ADjTC;EACC,YAAA;ACoTF;;ADlTC;EACC,gBAAA;ACqTF;;ADnTC;EACC,gBAAA;ACsTF;;ADpTC;EACC,YAAA;ACuTF;;ADjTC;EACC,YAAA;ACoTF;;ADlTC;EACC,gBAAA;ACqTF;;ADnTC;EACC,gBAAA;ACsTF;;ADpTC;EACC,YAAA;ACuTF;;ADjUC;EACC,YAAA;ACoUF;;ADlUC;EACC,gBAAA;ACqUF;;ADnUC;EACC,gBAAA;ACsUF;;ADpUC;EACC,YAAA;ACuUF;;ADjVC;EACC,YAAA;ACoVF;;ADlVC;EACC,gBAAA;ACqVF;;ADnVC;EACC,gBAAA;ACsVF;;ADpVC;EACC,YAAA;ACuVF;;ADjWC;EACC,YAAA;ACoWF;;ADlWC;EACC,gBAAA;ACqWF;;ADnWC;EACC,gBAAA;ACsWF;;ADpWC;EACC,YAAA;ACuWF;;ADjXC;EACC,YAAA;ACoXF;;ADlXC;EACC,gBAAA;ACqXF;;ADnXC;EACC,gBAAA;ACsXF;;ADpXC;EACC,YAAA;ACuXF;;ADjYC;EACC,YAAA;ACoYF;;ADlYC;EACC,gBAAA;ACqYF;;ADnYC;EACC,gBAAA;ACsYF;;ADpYC;EACC,YAAA;ACuYF;;ADjZC;EACC,YAAA;ACoZF;;ADlZC;EACC,gBAAA;ACqZF;;ADnZC;EACC,gBAAA;ACsZF;;ADpZC;EACC,YAAA;ACuZF;;ADjaC;EACC,YAAA;ACoaF;;ADlaC;EACC,gBAAA;ACqaF;;ADnaC;EACC,gBAAA;ACsaF;;ADpaC;EACC,YAAA;ACuaF;;ADjbC;EACC,YAAA;ACobF;;ADlbC;EACC,gBAAA;ACqbF;;ADnbC;EACC,gBAAA;ACsbF;;ADpbC;EACC,YAAA;ACubF;;ADjcC;EACC,YAAA;ACocF;;ADlcC;EACC,gBAAA;ACqcF;;ADncC;EACC,gBAAA;ACscF;;ADpcC;EACC,YAAA;ACucF;;ADjdC;EACC,YAAA;ACodF;;ADldC;EACC,gBAAA;ACqdF;;ADndC;EACC,gBAAA;ACsdF;;ADpdC;EACC,YAAA;ACudF;;ADjeC;EACC,WAAA;ACoeF;;ADleC;EACC,eAAA;ACqeF;;ADneC;EACC,eAAA;ACseF;;ADpeC;EACC,WAAA;ACueF;;ADjfC;EACC,WAAA;ACofF;;ADlfC;EACC,eAAA;ACqfF;;ADnfC;EACC,eAAA;ACsfF;;ADpfC;EACC,WAAA;ACufF;;ADjgBC;EACC,WAAA;ACogBF;;ADlgBC;EACC,eAAA;ACqgBF;;ADngBC;EACC,eAAA;ACsgBF;;ADpgBC;EACC,WAAA;ACugBF;;ADjhBC;EACC,WAAA;ACohBF;;ADlhBC;EACC,eAAA;ACqhBF;;ADnhBC;EACC,eAAA;ACshBF;;ADphBC;EACC,WAAA;ACuhBF;;ADjiBC;EACC,WAAA;ACoiBF;;ADliBC;EACC,eAAA;ACqiBF;;ADniBC;EACC,eAAA;ACsiBF;;ADpiBC;EACC,WAAA;ACuiBF;;ADjjBC;EACC,WAAA;ACojBF;;ADljBC;EACC,eAAA;ACqjBF;;ADnjBC;EACC,eAAA;ACsjBF;;ADpjBC;EACC,WAAA;ACujBF;;ADjkBC;EACC,WAAA;ACokBF;;ADlkBC;EACC,eAAA;ACqkBF;;ADnkBC;EACC,eAAA;ACskBF;;ADpkBC;EACC,WAAA;ACukBF;;ADjlBC;EACC,WAAA;AColBF;;ADllBC;EACC,eAAA;ACqlBF;;ADnlBC;EACC,eAAA;ACslBF;;ADplBC;EACC,WAAA;ACulBF;;ADjmBC;EACC,WAAA;AComBF;;ADlmBC;EACC,eAAA;ACqmBF;;ADnmBC;EACC,eAAA;ACsmBF;;ADpmBC;EACC,WAAA;ACumBF;;ADlmBA;EACC,qBAAA;ACqmBD;;ADnmBA;EACC,qBAAA;ACsmBD;;ADpmBA;EACC,WAAA;ACumBD;;ADrmBA;EACC,YAAA;ACwmBD;;ADtmBA;EACC,gBAAA;ACymBD;;ADvmBA;EACC,gBAAA;AC0mBD;;ADxmBA;EACC,aAAA;AC2mBD;;ADzmBA;EACC,iBAAA;AC4mBD;;AD1mBA;EACC,iBAAA;AC6mBD","file":"gamutable.css","sourcesContent":["// ----------------------------\n// Surcharge de vue-next-select\n// ----------------------------\n.gamutable__input--rechercher {\n\tpadding: 0.25rem 1rem;\n}\n.vue-tags .vue-tag.selected {\n\tfont-size: 1.2rem;\n}\ndiv.vue-input > input {\n\tfont-size: 1.2rem;\n}\n.tag--ub {\n\tdisplay: inline-block;\n}\n.gamutable__input--filtrer {\n\tfont-size: 1.2rem;\n\t//box-shadow: 0 0 0 1px rgb(153, 153, 153) inset;\n\tpadding: 5px 5px !important;\n\t&:valid {\n\t\tfont-size: 1.2rem;\n\t\tbackground-color: rgb(153, 153, 153);\n\t\tcolor: #000;\n\t}\n}\n.gamutable__input--filtrer:placeholder-shown {\n\tbackground-color: transparent;\n\tcolor: inherit;\n}\nth .vue-select {\n\twidth: 100%;\n}\n// ----------------------------\n// Fin de la surcharge de vue-next-select\n// ----------------------------\n.gamutable--surTable {\n\tselect,\n\tinput {\n\t\tmargin-bottom: 0;\n\t}\n\t.gamutable-nbrMax {\n\t\tmargin-left: 2rem;\n\t}\n\t.includespip {\n\t\tmargin-left: 2rem;\n\t}\n}\n.gamutable--sousTable {\n\tdisplay: flex;\n\tjustify-content: space-between;\n}\n.gamutable--pagination {\n\tdisplay: flex;\n\t.page-item {\n\t\tdisplay: flex;\n\t}\n\t.page-link {\n\t\tmargin: 0 0.2rem;\n\t\tbackground-color: #eee;\n\t\tcursor: pointer;\n\t}\n}\n\n.h2-like.titregamutable,\n.h2-like.titregamutable_deux {\n\tfont-weight: bold;\n}\n.gamutable table {\n\t// patch provisoire\n\t// .vue-dropdown-item > span {\n\t// \tdisplay: inline-block;\n\t// \tmin-height: 1rem;\n\t// }\n\n\tfont-size: 1rem;\n\ttable-layout: auto;\n\tthead {\n\t\tborder: 1px solid rgb(119, 119, 119);\n\t}\n\t.gt_labels {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t}\n\tth > div {\n\t\tdisplay: flex;\n\t}\n\t.label_tete_colonne {\n\t\tflex-grow: 1;\n\t}\n\t.iconeTri {\n\t\tfloat: right;\n\t\twidth: calc(1rem + 4px);\n\t\t//position: relative;\n\t\t.fa {\n\t\t\tpadding: 2px 5px;\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n\t.tri_col {\n\t\tcursor: pointer;\n\t\tfill: #cecece;\n\t}\n\t.iconeTri > .active {\n\t\tfill: rgb(220, 53, 69);\n\t\tcolor: rgb(220, 53, 69);\n\t}\n\ttbody tr:hover {\n\t\tbackground-color: rgba(179, 209, 67, 0.27);\n\t}\n}\n#app .select {\n\tbackground-color: rgba(179, 209, 67, 0.47);\n}\n\ntd.id {\n\tcursor: pointer;\n}\n\nth.icone {\n\twidth: 30px;\n\ttext-align: center;\n}\n\ntr.filtreColonne th {\n\tpadding: 0;\n\tselect {\n\t\tmargin: 0;\n\t}\n}\n\ntd.icone > * {\n\twidth: 100%;\n\tdisplay: block;\n\tpadding: 0.5rem;\n\ttext-align: center;\n}\n.gamutable .url_action {\n\tpadding: 0.2rem;\n\tdisplay: inline-flex;\n\tbackground-color: #f5f5f5;\n\tborder: 1px solid #cecece;\n\tborder-radius: 5px;\n\t&:hover {\n\t\tbackground-color: #cecece;\n\t}\n}\n\ntd.icone i {\n\tfont-size: 1.8rem;\n}\n\n.vueBlocs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n.vueBlocs-unbloc {\n\twidth: 23%;\n\tborder: 1px solid #cecece;\n\tmargin-bottom: 1rem;\n\tmargin-right: 1rem;\n}\n\n.viderInputSearch {\n\tcolor: #ff0000;\n}\n\n/* blocks widths (percentage and pixels) */\n$i: 100;\n@while $i > 0 {\n\t.w#{$i} {\n\t\twidth: $i * 1%;\n\t}\n\t$i: $i - 5;\n}\n\n$i: 1000;\n@while $i > 200 {\n\t.w#{$i}p {\n\t\twidth: $i * 1px;\n\t}\n\t.minw#{$i}p {\n\t\tmin-width: $i * 1px;\n\t}\n\t.maxw#{$i}p {\n\t\tmax-width: $i * 1px;\n\t}\n\t.w#{$i}p input {\n\t\twidth: $i * 1px;\n\t}\n\t$i: $i - 50;\n}\n$i: 200;\n@while $i > 0 {\n\t.w#{$i}p {\n\t\twidth: $i * 1px;\n\t}\n\t.minw#{$i}p {\n\t\tmin-width: $i * 1px;\n\t}\n\t.maxw#{$i}p {\n\t\tmax-width: $i * 1px;\n\t}\n\t.w#{$i}p input {\n\t\twidth: $i * 1px;\n\t}\n\t$i: $i - 10;\n}\n\n.w66 {\n\twidth: calc(100% / 3 * 2);\n}\n.w33 {\n\twidth: calc(100% / 3);\n}\n.wauto {\n\twidth: auto;\n}\n.w960p {\n\twidth: 960px;\n}\n.minw960p {\n\tmin-width: 960px;\n}\n.maxw960p {\n\tmax-width: 960px;\n}\n.w1140p {\n\twidth: 1140px;\n}\n.minw1140p {\n\tmin-width: 1140px;\n}\n.maxw1140p {\n\tmax-width: 1140px;\n}\n",".gamutable__input--rechercher {\n padding: 0.25rem 1rem;\n}\n\n.vue-tags .vue-tag.selected {\n font-size: 1.2rem;\n}\n\ndiv.vue-input > input {\n font-size: 1.2rem;\n}\n\n.tag--ub {\n display: inline-block;\n}\n\n.gamutable__input--filtrer {\n font-size: 1.2rem;\n padding: 5px 5px !important;\n}\n.gamutable__input--filtrer:valid {\n font-size: 1.2rem;\n background-color: rgb(153, 153, 153);\n color: #000;\n}\n\n.gamutable__input--filtrer:placeholder-shown {\n background-color: transparent;\n color: inherit;\n}\n\nth .vue-select {\n width: 100%;\n}\n\n.gamutable--surTable select,\n.gamutable--surTable input {\n margin-bottom: 0;\n}\n.gamutable--surTable .gamutable-nbrMax {\n margin-left: 2rem;\n}\n.gamutable--surTable .includespip {\n margin-left: 2rem;\n}\n\n.gamutable--sousTable {\n display: flex;\n justify-content: space-between;\n}\n\n.gamutable--pagination {\n display: flex;\n}\n.gamutable--pagination .page-item {\n display: flex;\n}\n.gamutable--pagination .page-link {\n margin: 0 0.2rem;\n background-color: #eee;\n cursor: pointer;\n}\n\n.h2-like.titregamutable,\n.h2-like.titregamutable_deux {\n font-weight: bold;\n}\n\n.gamutable table {\n font-size: 1rem;\n table-layout: auto;\n}\n.gamutable table thead {\n border: 1px solid rgb(119, 119, 119);\n}\n.gamutable table .gt_labels {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.gamutable table th > div {\n display: flex;\n}\n.gamutable table .label_tete_colonne {\n flex-grow: 1;\n}\n.gamutable table .iconeTri {\n float: right;\n width: calc(1rem + 4px);\n}\n.gamutable table .iconeTri .fa {\n padding: 2px 5px;\n cursor: pointer;\n}\n.gamutable table .tri_col {\n cursor: pointer;\n fill: #cecece;\n}\n.gamutable table .iconeTri > .active {\n fill: rgb(220, 53, 69);\n color: rgb(220, 53, 69);\n}\n.gamutable table tbody tr:hover {\n background-color: rgba(179, 209, 67, 0.27);\n}\n\n#app .select {\n background-color: rgba(179, 209, 67, 0.47);\n}\n\ntd.id {\n cursor: pointer;\n}\n\nth.icone {\n width: 30px;\n text-align: center;\n}\n\ntr.filtreColonne th {\n padding: 0;\n}\ntr.filtreColonne th select {\n margin: 0;\n}\n\ntd.icone > * {\n width: 100%;\n display: block;\n padding: 0.5rem;\n text-align: center;\n}\n\n.gamutable .url_action {\n padding: 0.2rem;\n display: inline-flex;\n background-color: #f5f5f5;\n border: 1px solid #cecece;\n border-radius: 5px;\n}\n.gamutable .url_action:hover {\n background-color: #cecece;\n}\n\ntd.icone i {\n font-size: 1.8rem;\n}\n\n.vueBlocs {\n display: flex;\n flex-wrap: wrap;\n}\n\n.vueBlocs-unbloc {\n width: 23%;\n border: 1px solid #cecece;\n margin-bottom: 1rem;\n margin-right: 1rem;\n}\n\n.viderInputSearch {\n color: #ff0000;\n}\n\n/* blocks widths (percentage and pixels) */\n.w100 {\n width: 100%;\n}\n\n.w95 {\n width: 95%;\n}\n\n.w90 {\n width: 90%;\n}\n\n.w85 {\n width: 85%;\n}\n\n.w80 {\n width: 80%;\n}\n\n.w75 {\n width: 75%;\n}\n\n.w70 {\n width: 70%;\n}\n\n.w65 {\n width: 65%;\n}\n\n.w60 {\n width: 60%;\n}\n\n.w55 {\n width: 55%;\n}\n\n.w50 {\n width: 50%;\n}\n\n.w45 {\n width: 45%;\n}\n\n.w40 {\n width: 40%;\n}\n\n.w35 {\n width: 35%;\n}\n\n.w30 {\n width: 30%;\n}\n\n.w25 {\n width: 25%;\n}\n\n.w20 {\n width: 20%;\n}\n\n.w15 {\n width: 15%;\n}\n\n.w10 {\n width: 10%;\n}\n\n.w5 {\n width: 5%;\n}\n\n.w1000p {\n width: 1000px;\n}\n\n.minw1000p {\n min-width: 1000px;\n}\n\n.maxw1000p {\n max-width: 1000px;\n}\n\n.w1000p input {\n width: 1000px;\n}\n\n.w950p {\n width: 950px;\n}\n\n.minw950p {\n min-width: 950px;\n}\n\n.maxw950p {\n max-width: 950px;\n}\n\n.w950p input {\n width: 950px;\n}\n\n.w900p {\n width: 900px;\n}\n\n.minw900p {\n min-width: 900px;\n}\n\n.maxw900p {\n max-width: 900px;\n}\n\n.w900p input {\n width: 900px;\n}\n\n.w850p {\n width: 850px;\n}\n\n.minw850p {\n min-width: 850px;\n}\n\n.maxw850p {\n max-width: 850px;\n}\n\n.w850p input {\n width: 850px;\n}\n\n.w800p {\n width: 800px;\n}\n\n.minw800p {\n min-width: 800px;\n}\n\n.maxw800p {\n max-width: 800px;\n}\n\n.w800p input {\n width: 800px;\n}\n\n.w750p {\n width: 750px;\n}\n\n.minw750p {\n min-width: 750px;\n}\n\n.maxw750p {\n max-width: 750px;\n}\n\n.w750p input {\n width: 750px;\n}\n\n.w700p {\n width: 700px;\n}\n\n.minw700p {\n min-width: 700px;\n}\n\n.maxw700p {\n max-width: 700px;\n}\n\n.w700p input {\n width: 700px;\n}\n\n.w650p {\n width: 650px;\n}\n\n.minw650p {\n min-width: 650px;\n}\n\n.maxw650p {\n max-width: 650px;\n}\n\n.w650p input {\n width: 650px;\n}\n\n.w600p {\n width: 600px;\n}\n\n.minw600p {\n min-width: 600px;\n}\n\n.maxw600p {\n max-width: 600px;\n}\n\n.w600p input {\n width: 600px;\n}\n\n.w550p {\n width: 550px;\n}\n\n.minw550p {\n min-width: 550px;\n}\n\n.maxw550p {\n max-width: 550px;\n}\n\n.w550p input {\n width: 550px;\n}\n\n.w500p {\n width: 500px;\n}\n\n.minw500p {\n min-width: 500px;\n}\n\n.maxw500p {\n max-width: 500px;\n}\n\n.w500p input {\n width: 500px;\n}\n\n.w450p {\n width: 450px;\n}\n\n.minw450p {\n min-width: 450px;\n}\n\n.maxw450p {\n max-width: 450px;\n}\n\n.w450p input {\n width: 450px;\n}\n\n.w400p {\n width: 400px;\n}\n\n.minw400p {\n min-width: 400px;\n}\n\n.maxw400p {\n max-width: 400px;\n}\n\n.w400p input {\n width: 400px;\n}\n\n.w350p {\n width: 350px;\n}\n\n.minw350p {\n min-width: 350px;\n}\n\n.maxw350p {\n max-width: 350px;\n}\n\n.w350p input {\n width: 350px;\n}\n\n.w300p {\n width: 300px;\n}\n\n.minw300p {\n min-width: 300px;\n}\n\n.maxw300p {\n max-width: 300px;\n}\n\n.w300p input {\n width: 300px;\n}\n\n.w250p {\n width: 250px;\n}\n\n.minw250p {\n min-width: 250px;\n}\n\n.maxw250p {\n max-width: 250px;\n}\n\n.w250p input {\n width: 250px;\n}\n\n.w200p {\n width: 200px;\n}\n\n.minw200p {\n min-width: 200px;\n}\n\n.maxw200p {\n max-width: 200px;\n}\n\n.w200p input {\n width: 200px;\n}\n\n.w190p {\n width: 190px;\n}\n\n.minw190p {\n min-width: 190px;\n}\n\n.maxw190p {\n max-width: 190px;\n}\n\n.w190p input {\n width: 190px;\n}\n\n.w180p {\n width: 180px;\n}\n\n.minw180p {\n min-width: 180px;\n}\n\n.maxw180p {\n max-width: 180px;\n}\n\n.w180p input {\n width: 180px;\n}\n\n.w170p {\n width: 170px;\n}\n\n.minw170p {\n min-width: 170px;\n}\n\n.maxw170p {\n max-width: 170px;\n}\n\n.w170p input {\n width: 170px;\n}\n\n.w160p {\n width: 160px;\n}\n\n.minw160p {\n min-width: 160px;\n}\n\n.maxw160p {\n max-width: 160px;\n}\n\n.w160p input {\n width: 160px;\n}\n\n.w150p {\n width: 150px;\n}\n\n.minw150p {\n min-width: 150px;\n}\n\n.maxw150p {\n max-width: 150px;\n}\n\n.w150p input {\n width: 150px;\n}\n\n.w140p {\n width: 140px;\n}\n\n.minw140p {\n min-width: 140px;\n}\n\n.maxw140p {\n max-width: 140px;\n}\n\n.w140p input {\n width: 140px;\n}\n\n.w130p {\n width: 130px;\n}\n\n.minw130p {\n min-width: 130px;\n}\n\n.maxw130p {\n max-width: 130px;\n}\n\n.w130p input {\n width: 130px;\n}\n\n.w120p {\n width: 120px;\n}\n\n.minw120p {\n min-width: 120px;\n}\n\n.maxw120p {\n max-width: 120px;\n}\n\n.w120p input {\n width: 120px;\n}\n\n.w110p {\n width: 110px;\n}\n\n.minw110p {\n min-width: 110px;\n}\n\n.maxw110p {\n max-width: 110px;\n}\n\n.w110p input {\n width: 110px;\n}\n\n.w100p {\n width: 100px;\n}\n\n.minw100p {\n min-width: 100px;\n}\n\n.maxw100p {\n max-width: 100px;\n}\n\n.w100p input {\n width: 100px;\n}\n\n.w90p {\n width: 90px;\n}\n\n.minw90p {\n min-width: 90px;\n}\n\n.maxw90p {\n max-width: 90px;\n}\n\n.w90p input {\n width: 90px;\n}\n\n.w80p {\n width: 80px;\n}\n\n.minw80p {\n min-width: 80px;\n}\n\n.maxw80p {\n max-width: 80px;\n}\n\n.w80p input {\n width: 80px;\n}\n\n.w70p {\n width: 70px;\n}\n\n.minw70p {\n min-width: 70px;\n}\n\n.maxw70p {\n max-width: 70px;\n}\n\n.w70p input {\n width: 70px;\n}\n\n.w60p {\n width: 60px;\n}\n\n.minw60p {\n min-width: 60px;\n}\n\n.maxw60p {\n max-width: 60px;\n}\n\n.w60p input {\n width: 60px;\n}\n\n.w50p {\n width: 50px;\n}\n\n.minw50p {\n min-width: 50px;\n}\n\n.maxw50p {\n max-width: 50px;\n}\n\n.w50p input {\n width: 50px;\n}\n\n.w40p {\n width: 40px;\n}\n\n.minw40p {\n min-width: 40px;\n}\n\n.maxw40p {\n max-width: 40px;\n}\n\n.w40p input {\n width: 40px;\n}\n\n.w30p {\n width: 30px;\n}\n\n.minw30p {\n min-width: 30px;\n}\n\n.maxw30p {\n max-width: 30px;\n}\n\n.w30p input {\n width: 30px;\n}\n\n.w20p {\n width: 20px;\n}\n\n.minw20p {\n min-width: 20px;\n}\n\n.maxw20p {\n max-width: 20px;\n}\n\n.w20p input {\n width: 20px;\n}\n\n.w10p {\n width: 10px;\n}\n\n.minw10p {\n min-width: 10px;\n}\n\n.maxw10p {\n max-width: 10px;\n}\n\n.w10p input {\n width: 10px;\n}\n\n.w66 {\n width: 66.6666666667%;\n}\n\n.w33 {\n width: 33.3333333333%;\n}\n\n.wauto {\n width: auto;\n}\n\n.w960p {\n width: 960px;\n}\n\n.minw960p {\n min-width: 960px;\n}\n\n.maxw960p {\n max-width: 960px;\n}\n\n.w1140p {\n width: 1140px;\n}\n\n.minw1140p {\n min-width: 1140px;\n}\n\n.maxw1140p {\n max-width: 1140px;\n}"]} \ No newline at end of file diff --git a/css/gamutable.scss b/css/gamutable.scss deleted file mode 100644 index df6c76b..0000000 --- a/css/gamutable.scss +++ /dev/null @@ -1,236 +0,0 @@ -// ---------------------------- -// Surcharge de vue-next-select -// ---------------------------- -.gamutable__input--rechercher { - padding: 0.25rem 1rem; -} -.vue-tags .vue-tag.selected { - font-size: 1.2rem; -} -div.vue-input > input { - font-size: 1.2rem; -} -.tag--ub { - display: inline-block; -} -.gamutable__input--filtrer { - font-size: 1.2rem; - //box-shadow: 0 0 0 1px rgb(153, 153, 153) inset; - padding: 5px 5px !important; - &:valid { - font-size: 1.2rem; - background-color: rgb(153, 153, 153); - color: #000; - } -} -.gamutable__input--filtrer:placeholder-shown { - background-color: transparent; - color: inherit; -} -th .vue-select { - width: 100%; -} -// ---------------------------- -// Fin de la surcharge de vue-next-select -// ---------------------------- -.gamutable--surTable { - select, - input { - margin-bottom: 0; - } - .gamutable-nbrMax { - margin-left: 2rem; - } - .includespip { - margin-left: 2rem; - } -} -.gamutable--sousTable { - display: flex; - justify-content: space-between; -} -.gamutable--pagination { - display: flex; - .page-item { - display: flex; - } - .page-link { - margin: 0 0.2rem; - background-color: #eee; - cursor: pointer; - } -} - -.h2-like.titregamutable, -.h2-like.titregamutable_deux { - font-weight: bold; -} -.gamutable table { - // patch provisoire - // .vue-dropdown-item > span { - // display: inline-block; - // min-height: 1rem; - // } - - font-size: 1rem; - table-layout: auto; - thead { - border: 1px solid rgb(119, 119, 119); - } - .gt_labels { - display: flex; - justify-content: space-between; - align-items: center; - } - th > div { - display: flex; - } - .label_tete_colonne { - flex-grow: 1; - } - .iconeTri { - float: right; - width: calc(1rem + 4px); - //position: relative; - .fa { - padding: 2px 5px; - cursor: pointer; - } - } - .tri_col { - cursor: pointer; - fill: #cecece; - } - .iconeTri > .active { - fill: rgb(220, 53, 69); - color: rgb(220, 53, 69); - } - tbody tr:hover { - background-color: rgba(179, 209, 67, 0.27); - } -} -#app .select { - background-color: rgba(179, 209, 67, 0.47); -} - -td.id { - cursor: pointer; -} - -th.icone { - width: 30px; - text-align: center; -} - -tr.filtreColonne th { - padding: 0; - select { - margin: 0; - } -} - -td.icone > * { - width: 100%; - display: block; - padding: 0.5rem; - text-align: center; -} -.gamutable .url_action { - padding: 0.2rem; - display: inline-flex; - background-color: #f5f5f5; - border: 1px solid #cecece; - border-radius: 5px; - &:hover { - background-color: #cecece; - } -} - -td.icone i { - font-size: 1.8rem; -} - -.vueBlocs { - display: flex; - flex-wrap: wrap; -} -.vueBlocs-unbloc { - width: 23%; - border: 1px solid #cecece; - margin-bottom: 1rem; - margin-right: 1rem; -} - -.viderInputSearch { - color: #ff0000; -} - -/* blocks widths (percentage and pixels) */ -$i: 100; -@while $i > 0 { - .w#{$i} { - width: $i * 1%; - } - $i: $i - 5; -} - -$i: 1000; -@while $i > 200 { - .w#{$i}p { - width: $i * 1px; - } - .minw#{$i}p { - min-width: $i * 1px; - } - .maxw#{$i}p { - max-width: $i * 1px; - } - .w#{$i}p input { - width: $i * 1px; - } - $i: $i - 50; -} -$i: 200; -@while $i > 0 { - .w#{$i}p { - width: $i * 1px; - } - .minw#{$i}p { - min-width: $i * 1px; - } - .maxw#{$i}p { - max-width: $i * 1px; - } - .w#{$i}p input { - width: $i * 1px; - } - $i: $i - 10; -} - -.w66 { - width: calc(100% / 3 * 2); -} -.w33 { - width: calc(100% / 3); -} -.wauto { - width: auto; -} -.w960p { - width: 960px; -} -.minw960p { - min-width: 960px; -} -.maxw960p { - max-width: 960px; -} -.w1140p { - width: 1140px; -} -.minw1140p { - min-width: 1140px; -} -.maxw1140p { - max-width: 1140px; -} diff --git a/css/table_knacss.css b/css/table_knacss.css deleted file mode 100644 index 7ae58a6..0000000 --- a/css/table_knacss.css +++ /dev/null @@ -1,49 +0,0 @@ -/* ----------------------------- */ -/* ==Tables */ -/* ----------------------------- */ -table, -.table { - width: 100%; - max-width: 100%; - table-layout: fixed; - border-collapse: collapse; - vertical-align: top; - margin-bottom: 2rem; -} - -.table { - display: table; - border: 1px solid #acb3c2; - background: transparent; -} - -.table--zebra tbody tr:nth-child(odd) { - background: #e7e9ed; -} - -.table caption { - caption-side: bottom; - padding: 1rem; - color: #333; - font-style: italic; - text-align: right; -} - -.table td, -.table th { - padding: 0.3rem 0.6rem; - min-width: 2rem; - vertical-align: top; - border: 1px #acb3c2 dotted; - text-align: left; - cursor: default; -} - -.table thead { - color: #212529; - background: transparent; -} - -.table--auto { - table-layout: auto; -} diff --git a/dist/assets/gamutable-559fdd12.js b/dist/assets/gamutable-559fdd12.js new file mode 100644 index 0000000..80c088c --- /dev/null +++ b/dist/assets/gamutable-559fdd12.js @@ -0,0 +1 @@ +import{i as Ne,r as v,o as Fe,c as ke,w as le,n as Ge,a as u,b as f,d as i,e as V,v as ze,u as s,f as q,F as N,g as F,t as G,h as Se,j,k as H,l as O,m as B,p as Ke,q as Qe,s as We,Y as Xe,x as Ye,y as xe,V as $e}from"./vendor-f73869ed.js";(function(){const h=document.createElement("link").relList;if(h&&h.supports&&h.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))b(n);new MutationObserver(n=>{for(const g of n)if(g.type==="childList")for(const w of g.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&b(w)}).observe(document,{childList:!0,subtree:!0});function r(n){const g={};return n.integrity&&(g.integrity=n.integrity),n.referrerpolicy&&(g.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?g.credentials="include":n.crossorigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function b(n){if(n.ep)return;n.ep=!0;const g=r(n);fetch(n.href,g)}})();function oe(d,h){let r=-1;return d.forEach((b,n)=>{b.html.id===parseInt(h)&&(r=n)}),r}function je(d){try{return JSON.parse(d)}catch(h){return console.log("erreur recupJson ",h),!1}}function Ze(d,h){let r=document.createElement("a");r.href=d,h&&r.setAttribute("target","_blank"),r.click()}function et(d,h){if((Number.isInteger(d)||parseInt(d)==d)&&(Number.isInteger(h)||parseInt(h)==h))return parseInt(d)-parseInt(h);{let r=toString(d).toLowerCase(),b=toString(h).toLowerCase();return rb?1:0}}const Ie=(d,h,r,b)=>d.sort((n,g)=>h.reduce((w,E,A)=>{if(w===0){let[_,S]=r&&r[A]==="desc"?[g[b][E],n[b][E]]:[n[b][E],g[b][E]];_=typeof _=="string"?_.toLowerCase():_,S=typeof S=="string"?S.toLowerCase():S;let M=/^(\d{2})\/(\d{2})\/(\d{2,4})$/;if(typeof _!="number"){let L=_.match(M);Array.isArray(L)&&(_=L[3]+L[2]+L[1]);let m=S.match(M);Array.isArray(m)&&(S=m[3]+m[2]+m[1])}w=_>S?1:_{localforage.setDriver(localforage[r.stockage.toUpperCase()]),W("maj"),r.urlvuebloc&&fetch(r.urlvuebloc).then(l=>l.text()).then(l=>{re.value=l})});const Te=ke(()=>{if(Q.value){const[l,e]=Q.value.split(" "),[t,a,o]=l.split("-"),[c,y,k]=e.split(":");return`${o}/${a}/${t} à ${c}h${y}min${k}sec`}else return""}),J=ke(()=>{if(Re(),!z.value&&!ue.value)return Ce(n.value);let l=n.value.filter(e=>{let t=!(Object.values(e[x.value]).toString().toLowerCase().indexOf(z.value.toLowerCase())<0);return t?(Object.keys(m.value).forEach(a=>{if(t){let o=m.value[a];if(o!==null){Array.isArray(o)||(o=[o]);let c=[];o.forEach(y=>{Number.isInteger(y)&&c.push(y),y.length>0&&c.push(y.toLowerCase())}),c.length&&(L.value[a]==="select"?c.some(k=>{if(Number.isInteger(k)){if(parseInt(e[x.value][a])===k)return!0}else if(ie[a]){if(e[x.value][a]!==void 0&&!(e[x.value][a].toString().toLowerCase().toString().indexOf(k)===-1||!e[x.value][a].toString().toLowerCase()))return!0}else if(e[x.value][a]!==void 0&&!(k.indexOf(e[x.value][a].toString().toLowerCase().toString())===-1||!e[x.value][a].toString().toLowerCase()))return!0})||(t=!1):e[x.value][a].toString().toLowerCase().indexOf(c.toString())===-1&&(t=!1))}}}),t):!1});return Ce(l)});le(m,()=>{ee()}),le(R,l=>{parseInt(l)?D.value=l:D.value=n.value.length,sessionStorage.setItem("nbItems",D.value),sessionStorage.setItem("nbItemsChaine",R.value)}),le(n,()=>{ee(),localforage.setItem(T,JSON.stringify(n.value))}),le(J,()=>{r.filtrecolmulti==="non"&&M.value.forEach(l=>{let e=[];J.value.forEach(t=>{let a=t[x.value][l];e.indexOf(a)===-1&&(e.push(a),filtreColValOk.value=!0)}),ae.value[l]=e})}),le(m,()=>{let l=[];m.value&&Object.entries(m.value).forEach(([e,t])=>{Array.isArray(t)||(t=[t]),l.push({champ:e,valeurs:t})}),ce||localStorage.setItem("filtreselect_"+T,JSON.stringify(l))},{deep:!0});function ve(l){g.value=l.header,l.crayons!==void 0&&(w.value=l.crayons),l.maj!==void 0&&(Q.value=l.maj),l.classes!==void 0&&(E.value=l.classes),l.checkbox!==void 0&&(A.value=l.checkbox,Object.keys(A.value).forEach(t=>{_.value[t]=[]})),l.ordreCol!==void 0&&(S.value=l.ordreCol);let e=[];return l.filtreCol!==void 0&&(e=l.filtreCol),l.filtreColValeurs!==void 0&&(ie=l.filtreColValeurs),ee(),e}function we(l,e=null){if(parseInt(e)>0)if(l.length>0){let t=oe(n.value,e);t>=0?n.value[t]=l[0]:n.value.unshift(l[0])}else{let t=oe(n.value,e);n.value.splice(t,1)}else e==="maj"?l.length&&(l[0]&&l[0].search&&(x.value="search"),l.length>0&&l.forEach((t,a)=>{let o=oe(n.value,t.html.id);o>=0?n.value[o]=l[a]:n.value.unshift(l[a])})):(n.value=l,l[0]&&l[0].search&&(x.value="search"));localforage.setItem(T,JSON.stringify(n.value))}function he(l){l!==void 0&&(L.value=l,M.value=[],Object.keys(L.value).forEach(e=>{if(M.value.push(e),ie[e])ae.value[e]=ie[e];else{let t=[];n.value.forEach(a=>{let o=a[x.value][e];o&&t.indexOf(o)===-1&&t.push(o)}),ae.value[e]=t.sort()}m.value[e]=[]}))}function Ve(l){l.a_supprimer&&l.a_supprimer.forEach(e=>{let t=oe(n.value,e);t!==-1&&n.value.splice(t,1)})}function W(l){console.log("chargerJson pour ",l),ne.value=!0;let e=r.apiuri;if(parseInt(l)>0)e+="&id="+l;else{let t=localStorage.getItem("header_"+T);t=je(t),t&&t.header!==void 0&&n.value.length===0&&(console.log("charge LS"),localforage.getItem(T).then(function(a){a=je(a);let o=ve(t);n.value=a,he(o),r.nomblocajaxreload&&ajaxReload(r.nomblocajaxreload)}).catch(function(a){console.log(a)})),l==="maj"&&(Q.value?e+="&maj="+Q.value:t&&t.maj?e+="&maj="+t.maj:l=null)}fetch(e).then(t=>t.json()).then(t=>{let a=t.shift();Ve(a);let o=ve(a);we(t,l),he(o),Ge(()=>{ne.value=!1;const c=localStorage.getItem("filtreselect_"+T),y=localStorage.getItem("triCol_"+T);let k=[];if(r.filtreselect?(r.filtreselect.split(",").forEach(C=>{const[I,...P]=C.split("|"),X=k.findIndex(pe=>pe.champ===I);X===-1?k.push({champ:I,valeurs:P}):k[X].valeurs.push(P[0])}),localStorage.setItem("filtreselect_"+T,JSON.stringify(k))):c&&(k=JSON.parse(c)),k.forEach(C=>{M.value.includes(C.champ)&&(m.value[C.champ]=[...m.value[C.champ],...C.valeurs])}),ue.value++,ce=!1,fe&&r.tparpage.includes(fe)&&(R.value=fe),de?(de.split(",").forEach(C=>{const[I,P]=C.split("|");M.value.includes(I)&&te(I,P)}),localStorage.setItem("triCol_"+T,de)):y&&y.split(",").forEach(C=>{const[I,P]=C.split("|");M.value.includes(I)&&te(I,P)}),parseInt(r._id)>0){let C=parseInt(r._id),I=parseInt(D.value);if(parseInt(I)){let P=0;if(Object.values(n.value).forEach((X,pe)=>{C===X.html.id&&(P=pe+1)}),P>I){let X=parseInt(P/I)+1;p.value=X}}me(C,"id")}r.nomblocajaxreload&&ajaxReload(r.nomblocajaxreload),S.value&&Object.entries(S.value).forEach(([C,I])=>{te(C,I)}),$("td.crayon-init").removeClass("crayon-init")})}).catch(t=>console.log(t))}function ee(){let l={header:g.value,crayons:w.value,classes:E.value,filtreCol:L.value,ordreCol:S.value,maj:Q.value};localStorage.setItem("header_"+T,JSON.stringify(l))}function Ee(l){m.value[l]=[],ee()}function Me(){ue.value++}function Pe(){return r.apiuri?r.apiuri.match(/.*page=(.*)/)[1]+"&gamuId="+r.id_auteur:""}function Je(l,e){let t=e.crayons!==void 0&&e.crayons[l]!==void 0?e.crayons[l]:e.html.id;if(Object.keys(w.value).indexOf(l)!==-1)return`crayon ${w.value[l]}-${l}-${t}`}function te(l,e=!1){const t=Y.value.indexOf(l);t!==-1?(e||(e="asc",K.value[t]==="asc"&&(e="desc")),K.value[t]=e):(e||(e="asc"),Y.value.push(l),K.value.push(e)),n.value=Ie(n.value,Y.value,K.value,x.value),S.value[l]=e,ee()}function ge(l,e){const t=Y.value.indexOf(l);if(t!==-1&&K.value[t]===e)return"active"}function Be(){n.value=Ie(n.value,["id"],"",x.value),K.value=[],Y.value=[],S.value=[],Object.keys(L.value).forEach(l=>{m.value[l]=[]}),localStorage.removeItem("filtreselect_"+T),localStorage.removeItem("filtreCol_"+T),localStorage.removeItem("triCol_"+T)}function me(l,e){if(e==="id"&&parseInt(l)){let t=se.value.indexOf(l);t!==-1?se.value.splice(t,1):se.value.push(l)}}function be(l="tableau"){let e=[],t=J.value;l==="table"&&(t=n.value),Object.values(t).forEach(c=>{e.push(c.html)});const a={fichierpdf:r.fichierpdf,langpdf:r.langpdf,namepdf:r.namepdf,header:g.value,arg:r.argpdf,Tdata:e};$.ajax({url:r.pdfuri,type:"POST",dataType:"text",data:a}).done(function(c){c&&Ze(c,!0)})}function _e(l="tableau"){let e=[],t=[],a=[],o=J.value;l==="table"&&(o=n.value),Object.keys(g.value).forEach(c=>t.push(c)),a=o.reduce((c,y)=>{let k=[];return Object.values(y[r.champcsv]).forEach(C=>k.push(C)),[...c,[...k]]},[]),e=[[...t],...a],Ue(e,r.delimitercsv,r.namecsv)}function Ae(l){let e=re.value;return Object.keys(l).forEach(t=>{e=e.replace(`@@${t}@@`,l[t])}),e}function ye(l){Z.value=l}function De(l){_.value[l]!==void 0&&_.value[l].length?_.value[l]=[]:(_.value[l]=[],J.value.forEach(e=>{_.value[l].push(e.html.id)}))}function He(l,e){let t="page";if(e.includes("action=")&&(t="action"),t==="action")$.ajax({url:e,data:{data:_.value[l]},type:"POST"}).done(function(){W("maj")});else{const a=encodeURIComponent(JSON.stringify(_.value[l]));e+="&data="+a,e+="&var_zajax=content";const o={};o.onClose=()=>{W("maj")},$.modalbox(e,o)}}function Ce(l){let e=p.value*D.value-D.value,t=p.value*D.value;return l.slice(e,t)}function Re(){let l=Math.ceil(n.value.length/D.value);U.value=[];for(let e=1;e<=l;e++)U.value.push(e)}function Ue(l,e,t){t.includes(".csv")&&(t=t.split(".")[0]);let a="";e?a=b.unparse(l,{delimiter:e}):a=b.unparse(l),b.download(a,t)}function qe(l,e=!0){console.log("rechargerJson"),ce=e,W(l)}return h({rechargerJson:qe}),(l,e)=>(u(),f("div",tt,[i("div",lt,[V(i("select",{id:"parPage","onUpdate:modelValue":e[0]||(e[0]=t=>q(R)?R.value=t:R=t)},[(u(!0),f(N,null,F(d.tparpage,t=>(u(),f("option",{key:t},G(t),1))),128))],512),[[ze,s(R)]]),V(i("input",{class:"gamutable--rechercher",type:"text","onUpdate:modelValue":e[1]||(e[1]=t=>q(z)?z.value=t:z=t),placeholder:"Rechercher"},null,512),[[Se,s(z)]]),i("button",{class:"btn gamutable--resetOrderBy",type:"button",onClick:e[2]||(e[2]=j(t=>Be(),["stop"])),title:"Réinitialiser les tris des colonnes"},nt),i("button",{class:"btn var_gamutable rouge",type:"button",onClick:e[3]||(e[3]=j(t=>W(),["stop"])),title:"Rechargement complet du tableau"},it),i("button",{class:"btn var_gamutable",type:"button",onClick:e[4]||(e[4]=j(t=>W("maj"),["stop"])),title:"Mise à jour du tableau - dernière version de la base de donnée le : "+s(Te)},ct,8,ot),s(re)?V((u(),f("button",{key:0,class:"btn gamutable--vueTable",title:"Switcher en Vue tableau",onClick:e[5]||(e[5]=j(t=>ye("tableau"),["stop"]))},dt,512)),[[H,s(Z)==="bloc"]]):O("",!0),s(re)?V((u(),f("button",{key:1,class:"btn gamutable--vueBloc",title:"Switcher en Vue Bloc",onClick:e[6]||(e[6]=j(t=>ye("bloc"),["stop"]))},vt,512)),[[H,s(Z)==="tableau"]]):O("",!0),V(i("button",{class:"btn gamutable--exportCSV export--affiche",type:"button",onClick:e[7]||(e[7]=j(t=>_e(),["stop"])),title:"Exporter le tableau affiché en csv"},gt,512),[[H,d.namecsv]]),V(i("button",{class:"btn export--affiche",type:"button",onClick:e[8]||(e[8]=j(t=>be(),["stop"])),title:"Générer le PDF du tableau affiché"},bt,512),[[H,d.fichierpdf]]),V(i("button",{class:"btn gamutable--exportCSV export--complet",type:"button",onClick:e[9]||(e[9]=j(t=>_e("table"),["stop"])),title:"Exporter le tableau complet en csv"},yt,512),[[H,d.namecsv]]),V(i("button",{class:"btn export--complet",type:"button",onClick:e[10]||(e[10]=j(t=>be("table"),["stop"])),title:"Générer le PDF du tableau complet"},kt,512),[[H,d.fichierpdf]]),V(i("span",St,jt,512),[[H,s(ne)]]),V(i("span",It,Lt,512),[[H,!s(ne)]]),i("span",{class:"gamutable-nbrMax","data-nbrmax":s(n).length},G(s(J).length)+" / "+G(s(n).length)+" éléments",9,Tt),i("span",{class:"includespip",innerHTML:d.includespip},null,8,wt)]),s(Z)==="bloc"?(u(),f("div",Vt,[(u(!0),f(N,null,F(s(J),t=>(u(),f("div",{class:"vueBlocs-unbloc",key:t.id,innerHTML:Ae(t.html)},null,8,Et))),128))])):O("",!0),s(Z)==="tableau"?(u(),f("table",Mt,[i("thead",null,[i("tr",null,[(u(!0),f(N,null,F(s(g),(t,a,o)=>(u(),f("th",{key:"head_"+o,class:B([a,s(E)[a]])},[i("span",Pt,[i("span",{innerHTML:t},null,8,Jt),i("span",Bt,[i("i",{class:B(["fa fa-sort-asc fa-sort-up",ge(a,"asc")]),"aria-hidden":"true",onClick:j(c=>te(a,"asc"),["stop"])},null,10,At),i("i",{class:B(["fa fa-sort-desc fa-sort-down",ge(a,"desc")]),"aria-hidden":"true",onClick:j(c=>te(a,"desc"),["stop"])},null,10,Dt)])])],2))),128))]),s(M).length||Object.keys(s(A)).length?(u(),f("tr",Ht,[(u(!0),f(N,null,F(s(g),(t,a,o)=>(u(),f("th",{key:"filtreCol_"+o,class:B(a)},[s(A)[a]!==void 0?(u(),f("div",{key:0,id:"filtreCol_"+a,class:B([s(E)[a],"flex justify-between"])},[i("input",{class:"ml-2",type:"checkbox",onClick:j(c=>De(a),["stop"])},null,8,Ut),i("button",{onClick:j(c=>He(a,s(A)[a]),["stop"])},Ft,8,qt)],10,Rt)):O("",!0),s(M).indexOf(a)!==-1?(u(),f("div",{key:1,id:"filtreCol_"+a,class:B(s(E)[a])},[s(L)[a]==="select"?(u(),Ke(s(Xe),{key:0,modelValue:s(m)[a],"onUpdate:modelValue":c=>s(m)[a]=c,options:s(ae)[a].sort(s(et)),"hide-selected":"",multiple:"",taggable:"","close-on-select":"","clear-on-close":"",searchable:"",onSelected:Me,"onSearch:focus":e[11]||(e[11]=()=>{})},{tag:Qe(({option:c,remove:y})=>[i("div",zt,[We(G(c)+" ",1),i("span",{class:"tag--remove pointer",title:"Cliquer pour supprimer ",onClick:j(y,["stop"])},"x",8,Kt)])]),_:2},1032,["modelValue","onUpdate:modelValue","options"])):O("",!0),s(L)[a]==="input"?V((u(),f("input",{key:1,class:"gamutable__input--filtrer","onUpdate:modelValue":c=>s(m)[a]=c,type:"text",placeholder:"Rechercher",onKeydown:e[12]||(e[12]=()=>{})},null,40,Qt)),[[Se,s(m)[a]]]):O("",!0),s(L)[a]==="input"&&s(m)[a].length!==0?(u(),f("button",{key:2,onClick:j(c=>Ee(a),["stop"]),title:"Vider ce champ",class:"gamutable__input--filtrer"}," X ",8,Wt)):O("",!0)],10,Gt)):O("",!0)],2))),128))])):O("",!0)]),i("tbody",null,[(u(!0),f(N,null,F(s(J),t=>(u(),f("tr",{key:t.html.id,class:B(s(se).indexOf(t.html.id)!==-1?"select":"")},[(u(!0),f(N,null,F(t.html,(a,o,c)=>(u(),f("td",{key:"td_"+c,class:B([Je(o,t),o,s(E)[o],t.classes!==void 0?t.classes[o]:""]),onClick:y=>me(t.html.id,o)},[s(A)[o]!==void 0?(u(),f("div",Yt,[a.split("-")[0]==="dataid"?(u(),f("div",Zt,[i("label",null,[V(i("input",{type:"checkbox","onUpdate:modelValue":y=>s(_)[o]=y,value:a.split("-")[1]},null,8,el),[[Ye,s(_)[o]]])])])):(u(),f("div",{key:1,innerHTML:a},null,8,tl))])):(u(),f("div",{key:1,innerHTML:a},null,8,ll))],10,Xt))),128))],2))),128))])])):O("",!0),i("div",al,[i("div",sl,G(s(J).length)+" / "+G(s(n).length)+" éléments ",1),i("div",nl,[i("div",rl,[s(p)!=1?(u(),f("button",{key:0,type:"button",class:"page-link",onClick:e[13]||(e[13]=t=>q(p)?p.value=1:p=1)}," Premier ")):O("",!0),s(p)!=1?(u(),f("button",{key:1,type:"button",class:"page-link",onClick:e[14]||(e[14]=t=>q(p)?p.value--:p--)}," Précédent ")):O("",!0)]),i("div",il,[(u(!0),f(N,null,F(s(U).slice(s(p)-4<0?0:s(p)-4,s(p)+3),t=>(u(),f("button",{type:"button",class:B(["page-link",{on:t===s(p)}]),onClick:a=>q(p)?p.value=t:p=t},G(t),11,ol))),256))]),i("div",ul,[s(p)q(p)?p.value++:p++),class:"page-link"}," Suivant ")):O("",!0),s(p)q(p)?p.value=s(U).length:p=s(U).length),class:"page-link"}," Dernier ")):O("",!0)])])])]))}},Oe={GamuTable:cl};Le();function Le(){let d=1;for(const h of document.getElementsByClassName("vue-gamutable"))d===1?(window.app=xe({components:Oe,mounted(){app.rechargerJson=this.$refs.montableau.rechargerJson}}),app.use($e),app.provide("$papa",app.config.globalProperties.$papa),app.mount(h)):d===2&&(window.app_deux=xe({components:Oe,mounted(){app_deux.rechargerJson=this.$refs.montableau_deux.rechargerJson}}),app_deux.use($e),app_deux.provide("$papa",app_deux.config.globalProperties.$papa),app_deux.mount(h)),d++}window.gamutable=Le;$("#vueGamutable").on("click",".url_action, .url_action--ss_css",function(d){d.preventDefault(),d.stopPropagation();let h=$(this).data("confirm");if(h!==void 0&&!confirm(h))return;let r=$(this).attr("href"),b=$(this).data("id");$(this).has("i.icon, i.fa")&&$(this).find("i.icon, i.fa").eq(0).replaceWith('');let n=$(this).data("ajaxreload");$.ajax({url:r,dataType:"json",async:!0}).done(function(g){!$.isEmptyObject(g)&&!$.isEmptyObject(g.message_erreur)?alert(g.message_erreur):(parseInt(b)>0?app.rechargerJson(b):app.rechargerJson("maj"),n!==void 0&&ajaxReload(n,{args:{id:b},callback:function(){}}))})}); diff --git a/dist/assets/vendor-f73869ed.js b/dist/assets/vendor-f73869ed.js new file mode 100644 index 0000000..73b3c19 --- /dev/null +++ b/dist/assets/vendor-f73869ed.js @@ -0,0 +1,23 @@ +function Yu(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Je(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const Qu="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",Xu=Je(Qu);function dr(e){if(q(e)){const t={};for(let n=0;n{if(n){const r=n.split(ec);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function wt(e){let t="";if(oe(e))t=e;else if(q(e))for(let n=0;nDt(n,t))}const Xn=e=>oe(e)?e:e==null?"":q(e)||be(e)&&(e.toString===Rl||!re(e.toString))?JSON.stringify(e,Ml,2):String(e),Ml=(e,t)=>t&&t.__v_isRef?Ml(e,t.value):Sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:hn(t)?{[`Set(${t.size})`]:[...t.values()]}:be(t)&&!q(t)&&!Pl(t)?String(t):t,ye={},Cn=[],Ue=()=>{},xr=()=>!1,dc=/^on[^a-z]/,pn=e=>dc.test(e),Ss=e=>e.startsWith("onUpdate:"),he=Object.assign,Ts=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},pc=Object.prototype.hasOwnProperty,fe=(e,t)=>pc.call(e,t),q=Array.isArray,Sn=e=>Ln(e)==="[object Map]",hn=e=>Ln(e)==="[object Set]",wo=e=>Ln(e)==="[object Date]",hc=e=>Ln(e)==="[object RegExp]",re=e=>typeof e=="function",oe=e=>typeof e=="string",xt=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",ws=e=>be(e)&&re(e.then)&&re(e.catch),Rl=Object.prototype.toString,Ln=e=>Rl.call(e),gc=e=>Ln(e).slice(8,-1),Pl=e=>Ln(e)==="[object Object]",Is=e=>oe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,en=Je(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mc=Je("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},yc=/-(\w)/g,Pe=fi(e=>e.replace(yc,(t,n)=>n?n.toUpperCase():"")),vc=/\B([A-Z])/g,Ge=fi(e=>e.replace(vc,"-$1").toLowerCase()),gn=fi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Tn=fi(e=>e?`on${gn(e)}`:""),kn=(e,t)=>!Object.is(e,t),wn=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Wr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},zr=e=>{const t=oe(e)?Number(e):NaN;return isNaN(t)?e:t};let Io;const bc=()=>Io||(Io=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Ye;class Os{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ye,!t&&Ye&&(this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Ye;try{return Ye=this,t()}finally{Ye=n}}}on(){Ye=this}off(){Ye=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Ll=e=>(e.w&$t)>0,Dl=e=>(e.n&$t)>0,Cc=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(f==="length"||f>=a)&&l.push(u)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":q(e)?Is(n)&&l.push(o.get("length")):(l.push(o.get(tn)),Sn(e)&&l.push(o.get(qi)));break;case"delete":q(e)||(l.push(o.get(tn)),Sn(e)&&l.push(o.get(qi)));break;case"set":Sn(e)&&l.push(o.get(tn));break}if(l.length===1)l[0]&&Ji(l[0]);else{const a=[];for(const u of l)u&&a.push(...u);Ji(ks(a))}}function Ji(e,t){const n=q(e)?e:[...e];for(const r of n)r.computed&&ko(r);for(const r of n)r.computed||ko(r)}function ko(e,t){(e!==dt||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function Ic(e,t){var n;return(n=qr.get(e))===null||n===void 0?void 0:n.get(t)}const Oc=Je("__proto__,__v_isRef,__isVue"),Vl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(xt)),kc=di(),Nc=di(!1,!0),Ac=di(!0),Mc=di(!0,!0),No=Rc();function Rc(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ce(this);for(let s=0,o=this.length;s{e[t]=function(...n){Dn();const r=ce(this)[t].apply(this,n);return xn(),r}}),e}function Pc(e){const t=ce(this);return qe(t,"has",e),t.hasOwnProperty(e)}function di(e=!1,t=!1){return function(r,i,s){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&s===(e?t?ql:zl:t?Wl:Kl).get(r))return r;const o=q(r);if(!e){if(o&&fe(No,i))return Reflect.get(No,i,s);if(i==="hasOwnProperty")return Pc}const l=Reflect.get(r,i,s);return(xt(i)?Vl.has(i):Oc(i))||(e||qe(r,"get",i),t)?l:Re(l)?o&&Is(i)?l:l.value:be(l)?e?As(l):hr(l):l}}const Fc=Hl(),Bc=Hl(!0);function Hl(e=!1){return function(n,r,i,s){let o=n[r];if(an(o)&&Re(o)&&!Re(i))return!1;if(!e&&(!Gn(i)&&!an(i)&&(o=ce(o),i=ce(i)),!q(n)&&Re(o)&&!Re(i)))return o.value=i,!0;const l=q(n)&&Is(r)?Number(r)e,pi=e=>Reflect.getPrototypeOf(e);function Sr(e,t,n=!1,r=!1){e=e.__v_raw;const i=ce(e),s=ce(t);n||(t!==s&&qe(i,"get",t),qe(i,"get",s));const{has:o}=pi(i),l=r?Ns:n?Ps:er;if(o.call(i,t))return l(e.get(t));if(o.call(i,s))return l(e.get(s));e!==i&&e.get(t)}function Tr(e,t=!1){const n=this.__v_raw,r=ce(n),i=ce(e);return t||(e!==i&&qe(r,"has",e),qe(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function wr(e,t=!1){return e=e.__v_raw,!t&&qe(ce(e),"iterate",tn),Reflect.get(e,"size",e)}function Ao(e){e=ce(e);const t=ce(this);return pi(t).has.call(t,e)||(t.add(e),It(t,"add",e,e)),this}function Mo(e,t){t=ce(t);const n=ce(this),{has:r,get:i}=pi(n);let s=r.call(n,e);s||(e=ce(e),s=r.call(n,e));const o=i.call(n,e);return n.set(e,t),s?kn(t,o)&&It(n,"set",e,t):It(n,"add",e,t),this}function Ro(e){const t=ce(this),{has:n,get:r}=pi(t);let i=n.call(t,e);i||(e=ce(e),i=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return i&&It(t,"delete",e,void 0),s}function Po(){const e=ce(this),t=e.size!==0,n=e.clear();return t&&It(e,"clear",void 0,void 0),n}function Ir(e,t){return function(r,i){const s=this,o=s.__v_raw,l=ce(o),a=t?Ns:e?Ps:er;return!e&&qe(l,"iterate",tn),o.forEach((u,f)=>r.call(i,a(u),a(f),s))}}function Or(e,t,n){return function(...r){const i=this.__v_raw,s=ce(i),o=Sn(s),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,u=i[e](...r),f=n?Ns:t?Ps:er;return!t&&qe(s,"iterate",a?qi:tn),{next(){const{value:d,done:m}=u.next();return m?{value:d,done:m}:{value:l?[f(d[0]),f(d[1])]:f(d),done:m}},[Symbol.iterator](){return this}}}}function Nt(e){return function(...t){return e==="delete"?!1:this}}function Hc(){const e={get(s){return Sr(this,s)},get size(){return wr(this)},has:Tr,add:Ao,set:Mo,delete:Ro,clear:Po,forEach:Ir(!1,!1)},t={get(s){return Sr(this,s,!1,!0)},get size(){return wr(this)},has:Tr,add:Ao,set:Mo,delete:Ro,clear:Po,forEach:Ir(!1,!0)},n={get(s){return Sr(this,s,!0)},get size(){return wr(this,!0)},has(s){return Tr.call(this,s,!0)},add:Nt("add"),set:Nt("set"),delete:Nt("delete"),clear:Nt("clear"),forEach:Ir(!0,!1)},r={get(s){return Sr(this,s,!0,!0)},get size(){return wr(this,!0)},has(s){return Tr.call(this,s,!0)},add:Nt("add"),set:Nt("set"),delete:Nt("delete"),clear:Nt("clear"),forEach:Ir(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Or(s,!1,!1),n[s]=Or(s,!0,!1),t[s]=Or(s,!1,!0),r[s]=Or(s,!0,!0)}),[e,n,t,r]}const[jc,Uc,Kc,Wc]=Hc();function hi(e,t){const n=t?e?Wc:Kc:e?Uc:jc;return(r,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(fe(n,i)&&i in r?n:r,i,s)}const zc={get:hi(!1,!1)},qc={get:hi(!1,!0)},Jc={get:hi(!0,!1)},Zc={get:hi(!0,!0)},Kl=new WeakMap,Wl=new WeakMap,zl=new WeakMap,ql=new WeakMap;function Yc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qc(e){return e.__v_skip||!Object.isExtensible(e)?0:Yc(gc(e))}function hr(e){return an(e)?e:gi(e,!1,jl,zc,Kl)}function Jl(e){return gi(e,!1,$c,qc,Wl)}function As(e){return gi(e,!0,Ul,Jc,zl)}function Xc(e){return gi(e,!0,Vc,Zc,ql)}function gi(e,t,n,r,i){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const o=Qc(e);if(o===0)return e;const l=new Proxy(e,o===2?r:n);return i.set(e,l),l}function nn(e){return an(e)?nn(e.__v_raw):!!(e&&e.__v_isReactive)}function an(e){return!!(e&&e.__v_isReadonly)}function Gn(e){return!!(e&&e.__v_isShallow)}function Ms(e){return nn(e)||an(e)}function ce(e){const t=e&&e.__v_raw;return t?ce(t):e}function Rs(e){return Kr(e,"__v_skip",!0),e}const er=e=>be(e)?hr(e):e,Ps=e=>be(e)?As(e):e;function Fs(e){Bt&&dt&&(e=ce(e),$l(e.dep||(e.dep=ks())))}function mi(e,t){e=ce(e);const n=e.dep;n&&Ji(n)}function Re(e){return!!(e&&e.__v_isRef===!0)}function Qe(e){return Zl(e,!1)}function Gc(e){return Zl(e,!0)}function Zl(e,t){return Re(e)?e:new ef(e,t)}class ef{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ce(t),this._value=n?t:er(t)}get value(){return Fs(this),this._value}set value(t){const n=this.__v_isShallow||Gn(t)||an(t);t=n?t:ce(t),kn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:er(t),mi(this))}}function tf(e){mi(e)}function Yl(e){return Re(e)?e.value:e}const nf={get:(e,t,n)=>Yl(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Re(i)&&!Re(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Bs(e){return nn(e)?e:new Proxy(e,nf)}class rf{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Fs(this),()=>mi(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function sf(e){return new rf(e)}function of(e){const t=q(e)?new Array(e.length):{};for(const n in e)t[n]=bn(e,n);return t}class lf{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Ic(ce(this._object),this._key)}}function bn(e,t,n){const r=e[t];return Re(r)?r:new lf(e,t,n)}var Ql;class af{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Ql]=!1,this._dirty=!0,this.effect=new pr(t,()=>{this._dirty||(this._dirty=!0,mi(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=ce(this);return Fs(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Ql="__v_isReadonly";function uf(e,t,n=!1){let r,i;const s=re(e);return s?(r=e,i=Ue):(r=e.get,i=e.set),new af(r,i,s||!i,n)}function cf(e,...t){}function ff(e,t){}function St(e,t,n,r){let i;try{i=r?e(...r):e()}catch(s){mn(s,t,n)}return i}function et(e,t,n,r){if(re(e)){const s=St(e,t,n,r);return s&&ws(s)&&s.catch(o=>{mn(o,t,n)}),s}const i=[];for(let s=0;s>>1;nr(De[r])yt&&De.splice(t,1)}function Ds(e){q(e)?In.push(...e):(!_t||!_t.includes(e,e.allowRecurse?qt+1:qt))&&In.push(e),Gl()}function Fo(e,t=tr?yt+1:0){for(;tnr(n)-nr(r)),qt=0;qt<_t.length;qt++)_t[qt]();_t=null,qt=0}}const nr=e=>e.id==null?1/0:e.id,gf=(e,t)=>{const n=nr(e)-nr(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ea(e){Zi=!1,tr=!0,De.sort(gf);const t=Ue;try{for(yt=0;ytvn.emit(i,...s)),kr=[]):typeof window<"u"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{ta(s,t)}),setTimeout(()=>{vn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,kr=[])},3e3)):kr=[]}function mf(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ye;let i=n;const s=t.startsWith("update:"),o=s&&t.slice(7);if(o&&o in r){const f=`${o==="modelValue"?"model":o}Modifiers`,{number:d,trim:m}=r[f]||ye;m&&(i=n.map(b=>oe(b)?b.trim():b)),d&&(i=n.map(Wr))}let l,a=r[l=Tn(t)]||r[l=Tn(Pe(t))];!a&&s&&(a=r[l=Tn(Ge(t))]),a&&et(a,e,6,i);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,et(u,e,6,i)}}function na(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const s=e.emits;let o={},l=!1;if(!re(e)){const a=u=>{const f=na(u,t,!0);f&&(l=!0,he(o,f))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(be(e)&&r.set(e,null),null):(q(s)?s.forEach(a=>o[a]=null):he(o,s),be(e)&&r.set(e,o),o)}function vi(e,t){return!e||!pn(t)?!1:(t=t.slice(2).replace(/Once$/,""),fe(e,t[0].toLowerCase()+t.slice(1))||fe(e,Ge(t))||fe(e,t))}let Be=null,bi=null;function rr(e){const t=Be;return Be=e,bi=e&&e.type.__scopeId||null,t}function yf(e){bi=e}function vf(){bi=null}const bf=e=>ir;function ir(e,t=Be,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&ns(-1);const s=rr(t);let o;try{o=e(...i)}finally{rr(s),r._d&&ns(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function $r(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:s,propsOptions:[o],slots:l,attrs:a,emit:u,render:f,renderCache:d,data:m,setupState:b,ctx:O,inheritAttrs:C}=e;let B,_;const y=rr(e);try{if(n.shapeFlag&4){const F=i||r;B=Xe(f.call(F,F,d,s,b,m,O)),_=a}else{const F=t;B=Xe(F.length>1?F(s,{attrs:a,slots:l,emit:u}):F(s,null)),_=t.props?a:Ef(a)}}catch(F){Jn.length=0,mn(F,e,1),B=ve($e)}let S=B;if(_&&C!==!1){const F=Object.keys(_),{shapeFlag:x}=S;F.length&&x&7&&(o&&F.some(Ss)&&(_=Cf(_,o)),S=vt(S,_))}return n.dirs&&(S=vt(S),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&(S.transition=n.transition),B=S,rr(y),B}function _f(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||pn(n))&&((t||(t={}))[n]=e[n]);return t},Cf=(e,t)=>{const n={};for(const r in e)(!Ss(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Sf(e,t,n){const{props:r,children:i,component:s}=e,{props:o,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?Bo(r,o,u):!!o;if(a&8){const f=t.dynamicProps;for(let d=0;de.__isSuspense,Tf={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,s,o,l,a,u){e==null?If(t,n,r,i,s,o,l,a,u):Of(e,t,n,r,i,o,l,a,u)},hydrate:kf,create:$s,normalize:Nf},wf=Tf;function sr(e,t){const n=e.props&&e.props[t];re(n)&&n()}function If(e,t,n,r,i,s,o,l,a){const{p:u,o:{createElement:f}}=a,d=f("div"),m=e.suspense=$s(e,i,r,t,d,n,s,o,l,a);u(null,m.pendingBranch=e.ssContent,d,null,r,m,s,o),m.deps>0?(sr(e,"onPending"),sr(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,o),On(m,e.ssFallback)):m.resolve()}function Of(e,t,n,r,i,s,o,l,{p:a,um:u,o:{createElement:f}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const m=t.ssContent,b=t.ssFallback,{activeBranch:O,pendingBranch:C,isInFallback:B,isHydrating:_}=d;if(C)d.pendingBranch=m,pt(m,C)?(a(C,m,d.hiddenContainer,null,i,d,s,o,l),d.deps<=0?d.resolve():B&&(a(O,b,n,r,i,null,s,o,l),On(d,b))):(d.pendingId++,_?(d.isHydrating=!1,d.activeBranch=C):u(C,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=f("div"),B?(a(null,m,d.hiddenContainer,null,i,d,s,o,l),d.deps<=0?d.resolve():(a(O,b,n,r,i,null,s,o,l),On(d,b))):O&&pt(m,O)?(a(O,m,n,r,i,d,s,o,l),d.resolve(!0)):(a(null,m,d.hiddenContainer,null,i,d,s,o,l),d.deps<=0&&d.resolve()));else if(O&&pt(m,O))a(O,m,n,r,i,d,s,o,l),On(d,m);else if(sr(t,"onPending"),d.pendingBranch=m,d.pendingId++,a(null,m,d.hiddenContainer,null,i,d,s,o,l),d.deps<=0)d.resolve();else{const{timeout:y,pendingId:S}=d;y>0?setTimeout(()=>{d.pendingId===S&&d.fallback(b)},y):y===0&&d.fallback(b)}}function $s(e,t,n,r,i,s,o,l,a,u,f=!1){const{p:d,m,um:b,n:O,o:{parentNode:C,remove:B}}=u,_=e.props?zr(e.props.timeout):void 0,y={vnode:e,parent:t,parentComponent:n,isSVG:o,container:r,hiddenContainer:i,anchor:s,deps:0,pendingId:0,timeout:typeof _=="number"?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:f,isUnmounted:!1,effects:[],resolve(S=!1){const{vnode:F,activeBranch:x,pendingBranch:K,pendingId:N,effects:c,parentComponent:p,container:v}=y;if(y.isHydrating)y.isHydrating=!1;else if(!S){const R=x&&K.transition&&K.transition.mode==="out-in";R&&(x.transition.afterLeave=()=>{N===y.pendingId&&m(K,v,A,0)});let{anchor:A}=y;x&&(A=O(x),b(x,p,y,!0)),R||m(K,v,A,0)}On(y,K),y.pendingBranch=null,y.isInFallback=!1;let T=y.parent,w=!1;for(;T;){if(T.pendingBranch){T.effects.push(...c),w=!0;break}T=T.parent}w||Ds(c),y.effects=[],sr(F,"onResolve")},fallback(S){if(!y.pendingBranch)return;const{vnode:F,activeBranch:x,parentComponent:K,container:N,isSVG:c}=y;sr(F,"onFallback");const p=O(x),v=()=>{y.isInFallback&&(d(null,S,N,p,K,null,c,l,a),On(y,S))},T=S.transition&&S.transition.mode==="out-in";T&&(x.transition.afterLeave=v),y.isInFallback=!0,b(x,K,null,!0),T||v()},move(S,F,x){y.activeBranch&&m(y.activeBranch,S,F,x),y.container=S},next(){return y.activeBranch&&O(y.activeBranch)},registerDep(S,F){const x=!!y.pendingBranch;x&&y.deps++;const K=S.vnode.el;S.asyncDep.catch(N=>{mn(N,S,0)}).then(N=>{if(S.isUnmounted||y.isUnmounted||y.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:c}=S;rs(S,N,!1),K&&(c.el=K);const p=!K&&S.subTree.el;F(S,c,C(K||S.subTree.el),K?null:O(S.subTree),y,o,a),p&&B(p),xs(S,c.el),x&&--y.deps===0&&y.resolve()})},unmount(S,F){y.isUnmounted=!0,y.activeBranch&&b(y.activeBranch,n,S,F),y.pendingBranch&&b(y.pendingBranch,n,S,F)}};return y}function kf(e,t,n,r,i,s,o,l,a){const u=t.suspense=$s(t,r,n,e.parentNode,document.createElement("div"),null,i,s,o,l,!0),f=a(e,u.pendingBranch=t.ssContent,n,u,s,o);return u.deps===0&&u.resolve(),f}function Nf(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Lo(r?n.default:n),e.ssFallback=r?Lo(n.fallback):ve($e)}function Lo(e){let t;if(re(e)){const n=fn&&e._c;n&&(e._d=!1,Ae()),e=e(),n&&(e._d=!0,t=We,Ma())}return q(e)&&(e=_f(e)),e=Xe(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function ia(e,t){t&&t.pendingBranch?q(e)?t.effects.push(...e):t.effects.push(e):Ds(e)}function On(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,i=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=i,xs(r,i))}function Vs(e,t){if(we){let n=we.provides;const r=we.parent&&we.parent.provides;r===n&&(n=we.provides=Object.create(r)),n[e]=t}}function rn(e,t,n=!1){const r=we||Be;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&re(t)?t.call(r.proxy):t}}function Et(e,t){return gr(e,null,t)}function sa(e,t){return gr(e,null,{flush:"post"})}function Af(e,t){return gr(e,null,{flush:"sync"})}const Nr={};function ft(e,t,n){return gr(e,t,n)}function gr(e,t,{immediate:n,deep:r,flush:i,onTrack:s,onTrigger:o}=ye){const l=Bl()===(we==null?void 0:we.scope)?we:null;let a,u=!1,f=!1;if(Re(e)?(a=()=>e.value,u=Gn(e)):nn(e)?(a=()=>e,r=!0):q(e)?(f=!0,u=e.some(S=>nn(S)||Gn(S)),a=()=>e.map(S=>{if(Re(S))return S.value;if(nn(S))return Qt(S);if(re(S))return St(S,l,2)})):re(e)?t?a=()=>St(e,l,2):a=()=>{if(!(l&&l.isUnmounted))return d&&d(),et(e,l,3,[m])}:a=Ue,t&&r){const S=a;a=()=>Qt(S())}let d,m=S=>{d=_.onStop=()=>{St(S,l,4)}},b;if(An)if(m=Ue,t?n&&et(t,l,3,[a(),f?[]:void 0,m]):a(),i==="sync"){const S=Ka();b=S.__watcherHandles||(S.__watcherHandles=[])}else return Ue;let O=f?new Array(e.length).fill(Nr):Nr;const C=()=>{if(_.active)if(t){const S=_.run();(r||u||(f?S.some((F,x)=>kn(F,O[x])):kn(S,O)))&&(d&&d(),et(t,l,3,[S,O===Nr?void 0:f&&O[0]===Nr?[]:O,m]),O=S)}else _.run()};C.allowRecurse=!!t;let B;i==="sync"?B=C:i==="post"?B=()=>Fe(C,l&&l.suspense):(C.pre=!0,l&&(C.id=l.uid),B=()=>yi(C));const _=new pr(a,B);t?n?C():O=_.run():i==="post"?Fe(_.run.bind(_),l&&l.suspense):_.run();const y=()=>{_.stop(),l&&l.scope&&Ts(l.scope.effects,_)};return b&&b.push(y),y}function Mf(e,t,n){const r=this.proxy,i=oe(e)?e.includes(".")?oa(r,e):()=>r[e]:e.bind(r,r);let s;re(t)?s=t:(s=t.handler,n=t);const o=we;Ht(this);const l=gr(i,s.bind(r),n);return o?Ht(o):Lt(),l}function oa(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Qt(n,t)});else if(Pl(e))for(const n in e)Qt(e[n],t);return e}function Hs(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return $n(()=>{e.isMounted=!0}),Si(()=>{e.isUnmounting=!0}),e}const it=[Function,Array],Rf={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:it,onEnter:it,onAfterEnter:it,onEnterCancelled:it,onBeforeLeave:it,onLeave:it,onAfterLeave:it,onLeaveCancelled:it,onBeforeAppear:it,onAppear:it,onAfterAppear:it,onAppearCancelled:it},setup(e,{slots:t}){const n=kt(),r=Hs();let i;return()=>{const s=t.default&&_i(t.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const C of s)if(C.type!==$e){o=C;break}}const l=ce(e),{mode:a}=l;if(r.isLeaving)return Fi(o);const u=Do(o);if(!u)return Fi(o);const f=Nn(u,l,r,n);un(u,f);const d=n.subTree,m=d&&Do(d);let b=!1;const{getTransitionKey:O}=u.type;if(O){const C=O();i===void 0?i=C:C!==i&&(i=C,b=!0)}if(m&&m.type!==$e&&(!pt(u,m)||b)){const C=Nn(m,l,r,n);if(un(m,C),a==="out-in")return r.isLeaving=!0,C.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},Fi(o);a==="in-out"&&u.type!==$e&&(C.delayLeave=(B,_,y)=>{const S=la(r,m);S[String(m.key)]=m,B._leaveCb=()=>{_(),B._leaveCb=void 0,delete f.delayedLeave},f.delayedLeave=y})}return o}}},js=Rf;function la(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Nn(e,t,n,r){const{appear:i,mode:s,persisted:o=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:d,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:C,onAppear:B,onAfterAppear:_,onAppearCancelled:y}=t,S=String(e.key),F=la(n,e),x=(c,p)=>{c&&et(c,r,9,p)},K=(c,p)=>{const v=p[1];x(c,p),q(c)?c.every(T=>T.length<=1)&&v():c.length<=1&&v()},N={mode:s,persisted:o,beforeEnter(c){let p=l;if(!n.isMounted)if(i)p=C||l;else return;c._leaveCb&&c._leaveCb(!0);const v=F[S];v&&pt(e,v)&&v.el._leaveCb&&v.el._leaveCb(),x(p,[c])},enter(c){let p=a,v=u,T=f;if(!n.isMounted)if(i)p=B||a,v=_||u,T=y||f;else return;let w=!1;const R=c._enterCb=A=>{w||(w=!0,A?x(T,[c]):x(v,[c]),N.delayedLeave&&N.delayedLeave(),c._enterCb=void 0)};p?K(p,[c,R]):R()},leave(c,p){const v=String(e.key);if(c._enterCb&&c._enterCb(!0),n.isUnmounting)return p();x(d,[c]);let T=!1;const w=c._leaveCb=R=>{T||(T=!0,p(),R?x(O,[c]):x(b,[c]),c._leaveCb=void 0,F[v]===e&&delete F[v])};F[v]=e,m?K(m,[c,w]):w()},clone(c){return Nn(c,t,n,r)}};return N}function Fi(e){if(mr(e))return e=vt(e),e.children=null,e}function Do(e){return mr(e)?e.children?e.children[0]:void 0:e}function un(e,t){e.shapeFlag&6&&e.component?un(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _i(e,t=!1,n){let r=[],i=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;function Pf(e){re(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:s,suspensible:o=!0,onError:l}=e;let a=null,u,f=0;const d=()=>(f++,a=null,m()),m=()=>{let b;return a||(b=a=t().catch(O=>{if(O=O instanceof Error?O:new Error(String(O)),l)return new Promise((C,B)=>{l(O,()=>C(d()),()=>B(O),f+1)});throw O}).then(O=>b!==a&&a?a:(O&&(O.__esModule||O[Symbol.toStringTag]==="Module")&&(O=O.default),u=O,O)))};return Ei({name:"AsyncComponentWrapper",__asyncLoader:m,get __asyncResolved(){return u},setup(){const b=we;if(u)return()=>Bi(u,b);const O=y=>{a=null,mn(y,b,13,!r)};if(o&&b.suspense||An)return m().then(y=>()=>Bi(y,b)).catch(y=>(O(y),()=>r?ve(r,{error:y}):null));const C=Qe(!1),B=Qe(),_=Qe(!!i);return i&&setTimeout(()=>{_.value=!1},i),s!=null&&setTimeout(()=>{if(!C.value&&!B.value){const y=new Error(`Async component timed out after ${s}ms.`);O(y),B.value=y}},s),m().then(()=>{C.value=!0,b.parent&&mr(b.parent.vnode)&&yi(b.parent.update)}).catch(y=>{O(y),B.value=y}),()=>{if(C.value&&u)return Bi(u,b);if(B.value&&r)return ve(r,{error:B.value});if(n&&!_.value)return ve(n)}}})}function Bi(e,t){const{ref:n,props:r,children:i,ce:s}=t.vnode,o=ve(e,r,i);return o.ref=n,o.ce=s,delete t.vnode.ce,o}const mr=e=>e.type.__isKeepAlive,Ff={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=kt(),r=n.ctx;if(!r.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const i=new Map,s=new Set;let o=null;const l=n.suspense,{renderer:{p:a,m:u,um:f,o:{createElement:d}}}=r,m=d("div");r.activate=(y,S,F,x,K)=>{const N=y.component;u(y,S,F,0,l),a(N.vnode,y,S,F,N,l,x,y.slotScopeIds,K),Fe(()=>{N.isDeactivated=!1,N.a&&wn(N.a);const c=y.props&&y.props.onVnodeMounted;c&&Ke(c,N.parent,y)},l)},r.deactivate=y=>{const S=y.component;u(y,m,null,1,l),Fe(()=>{S.da&&wn(S.da);const F=y.props&&y.props.onVnodeUnmounted;F&&Ke(F,S.parent,y),S.isDeactivated=!0},l)};function b(y){Li(y),f(y,n,l,!0)}function O(y){i.forEach((S,F)=>{const x=ss(S.type);x&&(!y||!y(x))&&C(F)})}function C(y){const S=i.get(y);!o||!pt(S,o)?b(S):o&&Li(o),i.delete(y),s.delete(y)}ft(()=>[e.include,e.exclude],([y,S])=>{y&&O(F=>Wn(y,F)),S&&O(F=>!Wn(S,F))},{flush:"post",deep:!0});let B=null;const _=()=>{B!=null&&i.set(B,Di(n.subTree))};return $n(_),yr(_),Si(()=>{i.forEach(y=>{const{subTree:S,suspense:F}=n,x=Di(S);if(y.type===x.type&&y.key===x.key){Li(x);const K=x.component.da;K&&Fe(K,F);return}b(y)})}),()=>{if(B=null,!t.default)return null;const y=t.default(),S=y[0];if(y.length>1)return o=null,y;if(!Vt(S)||!(S.shapeFlag&4)&&!(S.shapeFlag&128))return o=null,S;let F=Di(S);const x=F.type,K=ss(sn(F)?F.type.__asyncResolved||{}:x),{include:N,exclude:c,max:p}=e;if(N&&(!K||!Wn(N,K))||c&&K&&Wn(c,K))return o=F,S;const v=F.key==null?x:F.key,T=i.get(v);return F.el&&(F=vt(F),S.shapeFlag&128&&(S.ssContent=F)),B=v,T?(F.el=T.el,F.component=T.component,F.transition&&un(F,F.transition),F.shapeFlag|=512,s.delete(v),s.add(v)):(s.add(v),p&&s.size>parseInt(p,10)&&C(s.values().next().value)),F.shapeFlag|=256,o=F,ra(S.type)?S:F}}},Bf=Ff;function Wn(e,t){return q(e)?e.some(n=>Wn(n,t)):oe(e)?e.split(",").includes(t):hc(e)?e.test(t):!1}function aa(e,t){ca(e,"a",t)}function ua(e,t){ca(e,"da",t)}function ca(e,t,n=we){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Ci(t,r,n),n){let i=n.parent;for(;i&&i.parent;)mr(i.parent.vnode)&&Lf(r,t,n,i),i=i.parent}}function Lf(e,t,n,r){const i=Ci(t,e,r,!0);Ti(()=>{Ts(r[t],i)},n)}function Li(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Di(e){return e.shapeFlag&128?e.ssContent:e}function Ci(e,t,n=we,r=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Dn(),Ht(n);const l=et(t,n,e,o);return Lt(),xn(),l});return r?i.unshift(s):i.push(s),s}}const Ot=e=>(t,n=we)=>(!An||e==="sp")&&Ci(e,(...r)=>t(...r),n),fa=Ot("bm"),$n=Ot("m"),da=Ot("bu"),yr=Ot("u"),Si=Ot("bum"),Ti=Ot("um"),pa=Ot("sp"),ha=Ot("rtg"),ga=Ot("rtc");function ma(e,t=we){Ci("ec",e,t)}function ya(e,t){const n=Be;if(n===null)return e;const r=Oi(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;st(o,l,void 0,s&&s[l]));else{const o=Object.keys(e);i=new Array(o.length);for(let l=0,a=o.length;l{const s=r.fn(...i);return s&&(s.key=r.key),s}:r.fn)}return e}function ot(e,t,n={},r,i){if(Be.isCE||Be.parent&&sn(Be.parent)&&Be.parent.isCE)return t!=="default"&&(n.name=t),ve("slot",n,r&&r());let s=e[t];s&&s._c&&(s._d=!1),Ae();const o=s&&ba(s(n)),l=wi(Se,{key:n.key||o&&o.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function ba(e){return e.some(t=>Vt(t)?!(t.type===$e||t.type===Se&&!ba(t.children)):!0)?e:null}function Hf(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Tn(r)]=e[r];return n}const Yi=e=>e?La(e)?Oi(e)||e.proxy:Yi(e.parent):null,zn=he(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Yi(e.parent),$root:e=>Yi(e.root),$emit:e=>e.emit,$options:e=>zs(e),$forceUpdate:e=>e.f||(e.f=()=>yi(e.update)),$nextTick:e=>e.n||(e.n=Ft.bind(e.proxy)),$watch:e=>Mf.bind(e)}),xi=(e,t)=>e!==ye&&!e.__isScriptSetup&&fe(e,t),Qi={get({_:e},t){const{ctx:n,setupState:r,data:i,props:s,accessCache:o,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const b=o[t];if(b!==void 0)switch(b){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(xi(r,t))return o[t]=1,r[t];if(i!==ye&&fe(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&fe(u,t))return o[t]=3,s[t];if(n!==ye&&fe(n,t))return o[t]=4,n[t];Xi&&(o[t]=0)}}const f=zn[t];let d,m;if(f)return t==="$attrs"&&qe(e,"get",t),f(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==ye&&fe(n,t))return o[t]=4,n[t];if(m=a.config.globalProperties,fe(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return xi(i,t)?(i[t]=n,!0):r!==ye&&fe(r,t)?(r[t]=n,!0):fe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},o){let l;return!!n[o]||e!==ye&&fe(e,o)||xi(t,o)||(l=s[0])&&fe(l,o)||fe(r,o)||fe(zn,o)||fe(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},jf=he({},Qi,{get(e,t){if(t!==Symbol.unscopables)return Qi.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Xu(t)}});let Xi=!0;function Uf(e){const t=zs(e),n=e.proxy,r=e.ctx;Xi=!1,t.beforeCreate&&$o(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:o,watch:l,provide:a,inject:u,created:f,beforeMount:d,mounted:m,beforeUpdate:b,updated:O,activated:C,deactivated:B,beforeDestroy:_,beforeUnmount:y,destroyed:S,unmounted:F,render:x,renderTracked:K,renderTriggered:N,errorCaptured:c,serverPrefetch:p,expose:v,inheritAttrs:T,components:w,directives:R,filters:A}=t;if(u&&Kf(u,r,null,e.appContext.config.unwrapInjectedRef),o)for(const j in o){const te=o[j];re(te)&&(r[j]=te.bind(n))}if(i){const j=i.call(n,n);be(j)&&(e.data=hr(j))}if(Xi=!0,s)for(const j in s){const te=s[j],X=re(te)?te.bind(n,n):re(te.get)?te.get.bind(n,n):Ue,Te=!re(te)&&re(te.set)?te.set.bind(n):Ue,_e=Ne({get:X,set:Te});Object.defineProperty(r,j,{enumerable:!0,configurable:!0,get:()=>_e.value,set:z=>_e.value=z})}if(l)for(const j in l)_a(l[j],r,n,j);if(a){const j=re(a)?a.call(n):a;Reflect.ownKeys(j).forEach(te=>{Vs(te,j[te])})}f&&$o(f,e,"c");function ee(j,te){q(te)?te.forEach(X=>j(X.bind(n))):te&&j(te.bind(n))}if(ee(fa,d),ee($n,m),ee(da,b),ee(yr,O),ee(aa,C),ee(ua,B),ee(ma,c),ee(ga,K),ee(ha,N),ee(Si,y),ee(Ti,F),ee(pa,p),q(v))if(v.length){const j=e.exposed||(e.exposed={});v.forEach(te=>{Object.defineProperty(j,te,{get:()=>n[te],set:X=>n[te]=X})})}else e.exposed||(e.exposed={});x&&e.render===Ue&&(e.render=x),T!=null&&(e.inheritAttrs=T),w&&(e.components=w),R&&(e.directives=R)}function Kf(e,t,n=Ue,r=!1){q(e)&&(e=Gi(e));for(const i in e){const s=e[i];let o;be(s)?"default"in s?o=rn(s.from||i,s.default,!0):o=rn(s.from||i):o=rn(s),Re(o)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[i]=o}}function $o(e,t,n){et(q(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function _a(e,t,n,r){const i=r.includes(".")?oa(n,r):()=>n[r];if(oe(e)){const s=t[e];re(s)&&ft(i,s)}else if(re(e))ft(i,e.bind(n));else if(be(e))if(q(e))e.forEach(s=>_a(s,t,n,r));else{const s=re(e.handler)?e.handler.bind(n):t[e.handler];re(s)&&ft(i,s,e)}}function zs(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,l=s.get(t);let a;return l?a=l:!i.length&&!n&&!r?a=t:(a={},i.length&&i.forEach(u=>Zr(a,u,o,!0)),Zr(a,t,o)),be(t)&&s.set(t,a),a}function Zr(e,t,n,r=!1){const{mixins:i,extends:s}=t;s&&Zr(e,s,n,!0),i&&i.forEach(o=>Zr(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const l=Wf[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Wf={data:Vo,props:zt,emits:zt,methods:zt,computed:zt,beforeCreate:He,created:He,beforeMount:He,mounted:He,beforeUpdate:He,updated:He,beforeDestroy:He,beforeUnmount:He,destroyed:He,unmounted:He,activated:He,deactivated:He,errorCaptured:He,serverPrefetch:He,components:zt,directives:zt,watch:qf,provide:Vo,inject:zf};function Vo(e,t){return t?e?function(){return he(re(e)?e.call(this,this):e,re(t)?t.call(this,this):t)}:t:e}function zf(e,t){return zt(Gi(e),Gi(t))}function Gi(e){if(q(e)){const t={};for(let n=0;n0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[m,b]=Ca(d,t,!0);he(o,m),b&&l.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!a)return be(e)&&r.set(e,Cn),Cn;if(q(s))for(let f=0;f-1,b[1]=C<0||O-1||fe(b,"default"))&&l.push(d)}}}const u=[o,l];return be(e)&&r.set(e,u),u}function Ho(e){return e[0]!=="$"}function jo(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Uo(e,t){return jo(e)===jo(t)}function Ko(e,t){return q(t)?t.findIndex(n=>Uo(n,e)):re(t)&&Uo(t,e)?0:-1}const Sa=e=>e[0]==="_"||e==="$stable",qs=e=>q(e)?e.map(Xe):[Xe(e)],Yf=(e,t,n)=>{if(t._n)return t;const r=ir((...i)=>qs(t(...i)),n);return r._c=!1,r},Ta=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Sa(i))continue;const s=e[i];if(re(s))t[i]=Yf(i,s,r);else if(s!=null){const o=qs(s);t[i]=()=>o}}},wa=(e,t)=>{const n=qs(t);e.slots.default=()=>n},Qf=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ce(t),Kr(t,"_",n)):Ta(t,e.slots={})}else e.slots={},t&&wa(e,t);Kr(e.slots,Ii,1)},Xf=(e,t,n)=>{const{vnode:r,slots:i}=e;let s=!0,o=ye;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(he(i,t),!n&&l===1&&delete i._):(s=!t.$stable,Ta(t,i)),o=t}else t&&(wa(e,t),o={default:1});if(s)for(const l in i)!Sa(l)&&!(l in o)&&delete i[l]};function Ia(){return{app:null,config:{isNativeTag:xr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Gf=0;function ed(e,t){return function(r,i=null){re(r)||(r=Object.assign({},r)),i!=null&&!be(i)&&(i=null);const s=Ia(),o=new Set;let l=!1;const a=s.app={_uid:Gf++,_component:r,_props:i,_container:null,_context:s,_instance:null,version:za,get config(){return s.config},set config(u){},use(u,...f){return o.has(u)||(u&&re(u.install)?(o.add(u),u.install(a,...f)):re(u)&&(o.add(u),u(a,...f))),a},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),a},component(u,f){return f?(s.components[u]=f,a):s.components[u]},directive(u,f){return f?(s.directives[u]=f,a):s.directives[u]},mount(u,f,d){if(!l){const m=ve(r,i);return m.appContext=s,f&&t?t(m,u):e(m,u,d),l=!0,a._container=u,u.__vue_app__=a,Oi(m.component)||m.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(u,f){return s.provides[u]=f,a}};return a}}function Yr(e,t,n,r,i=!1){if(q(e)){e.forEach((m,b)=>Yr(m,t&&(q(t)?t[b]:t),n,r,i));return}if(sn(r)&&!i)return;const s=r.shapeFlag&4?Oi(r.component)||r.component.proxy:r.el,o=i?null:s,{i:l,r:a}=e,u=t&&t.r,f=l.refs===ye?l.refs={}:l.refs,d=l.setupState;if(u!=null&&u!==a&&(oe(u)?(f[u]=null,fe(d,u)&&(d[u]=null)):Re(u)&&(u.value=null)),re(a))St(a,l,12,[o,f]);else{const m=oe(a),b=Re(a);if(m||b){const O=()=>{if(e.f){const C=m?fe(d,a)?d[a]:f[a]:a.value;i?q(C)&&Ts(C,s):q(C)?C.includes(s)||C.push(s):m?(f[a]=[s],fe(d,a)&&(d[a]=f[a])):(a.value=[s],e.k&&(f[e.k]=a.value))}else m?(f[a]=o,fe(d,a)&&(d[a]=o)):b&&(a.value=o,e.k&&(f[e.k]=o))};o?(O.id=-1,Fe(O,n)):O()}}}let At=!1;const Ar=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Mr=e=>e.nodeType===8;function td(e){const{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:s,parentNode:o,remove:l,insert:a,createComment:u}}=e,f=(_,y)=>{if(!y.hasChildNodes()){n(null,_,y),Jr(),y._vnode=_;return}At=!1,d(y.firstChild,_,null,null,null),Jr(),y._vnode=_,At&&console.error("Hydration completed but contains mismatches.")},d=(_,y,S,F,x,K=!1)=>{const N=Mr(_)&&_.data==="[",c=()=>C(_,y,S,F,x,N),{type:p,ref:v,shapeFlag:T,patchFlag:w}=y;let R=_.nodeType;y.el=_,w===-2&&(K=!1,y.dynamicChildren=null);let A=null;switch(p){case cn:R!==3?y.children===""?(a(y.el=i(""),o(_),_),A=_):A=c():(_.data!==y.children&&(At=!0,_.data=y.children),A=s(_));break;case $e:R!==8||N?A=c():A=s(_);break;case on:if(N&&(_=s(_),R=_.nodeType),R===1||R===3){A=_;const ne=!y.children.length;for(let ee=0;ee{K=K||!!y.dynamicChildren;const{type:N,props:c,patchFlag:p,shapeFlag:v,dirs:T}=y,w=N==="input"&&T||N==="option";if(w||p!==-1){if(T&&mt(y,null,S,"created"),c)if(w||!K||p&48)for(const A in c)(w&&A.endsWith("value")||pn(A)&&!en(A))&&r(_,A,null,c[A],!1,void 0,S);else c.onClick&&r(_,"onClick",null,c.onClick,!1,void 0,S);let R;if((R=c&&c.onVnodeBeforeMount)&&Ke(R,S,y),T&&mt(y,null,S,"beforeMount"),((R=c&&c.onVnodeMounted)||T)&&ia(()=>{R&&Ke(R,S,y),T&&mt(y,null,S,"mounted")},F),v&16&&!(c&&(c.innerHTML||c.textContent))){let A=b(_.firstChild,y,_,S,F,x,K);for(;A;){At=!0;const ne=A;A=A.nextSibling,l(ne)}}else v&8&&_.textContent!==y.children&&(At=!0,_.textContent=y.children)}return _.nextSibling},b=(_,y,S,F,x,K,N)=>{N=N||!!y.dynamicChildren;const c=y.children,p=c.length;for(let v=0;v{const{slotScopeIds:N}=y;N&&(x=x?x.concat(N):N);const c=o(_),p=b(s(_),y,c,S,F,x,K);return p&&Mr(p)&&p.data==="]"?s(y.anchor=p):(At=!0,a(y.anchor=u("]"),c,p),p)},C=(_,y,S,F,x,K)=>{if(At=!0,y.el=null,K){const p=B(_);for(;;){const v=s(_);if(v&&v!==p)l(v);else break}}const N=s(_),c=o(_);return l(_),n(null,y,c,N,S,F,Ar(c),x),N},B=_=>{let y=0;for(;_;)if(_=s(_),_&&Mr(_)&&(_.data==="["&&y++,_.data==="]")){if(y===0)return s(_);y--}return _};return[f,d]}const Fe=ia;function Oa(e){return Na(e)}function ka(e){return Na(e,td)}function Na(e,t){const n=bc();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:o,createText:l,createComment:a,setText:u,setElementText:f,parentNode:d,nextSibling:m,setScopeId:b=Ue,insertStaticContent:O}=e,C=(h,g,E,k=null,I=null,$=null,U=!1,D=null,V=!!g.dynamicChildren)=>{if(h===g)return;h&&!pt(h,g)&&(k=G(h),z(h,I,$,!0),h=null),g.patchFlag===-2&&(V=!1,g.dynamicChildren=null);const{type:P,ref:J,shapeFlag:W}=g;switch(P){case cn:B(h,g,E,k);break;case $e:_(h,g,E,k);break;case on:h==null&&y(g,E,k,U);break;case Se:w(h,g,E,k,I,$,U,D,V);break;default:W&1?x(h,g,E,k,I,$,U,D,V):W&6?R(h,g,E,k,I,$,U,D,V):(W&64||W&128)&&P.process(h,g,E,k,I,$,U,D,V,H)}J!=null&&I&&Yr(J,h&&h.ref,$,g||h,!g)},B=(h,g,E,k)=>{if(h==null)r(g.el=l(g.children),E,k);else{const I=g.el=h.el;g.children!==h.children&&u(I,g.children)}},_=(h,g,E,k)=>{h==null?r(g.el=a(g.children||""),E,k):g.el=h.el},y=(h,g,E,k)=>{[h.el,h.anchor]=O(h.children,g,E,k,h.el,h.anchor)},S=({el:h,anchor:g},E,k)=>{let I;for(;h&&h!==g;)I=m(h),r(h,E,k),h=I;r(g,E,k)},F=({el:h,anchor:g})=>{let E;for(;h&&h!==g;)E=m(h),i(h),h=E;i(g)},x=(h,g,E,k,I,$,U,D,V)=>{U=U||g.type==="svg",h==null?K(g,E,k,I,$,U,D,V):p(h,g,I,$,U,D,V)},K=(h,g,E,k,I,$,U,D)=>{let V,P;const{type:J,props:W,shapeFlag:Y,transition:Q,dirs:se}=h;if(V=h.el=o(h.type,$,W&&W.is,W),Y&8?f(V,h.children):Y&16&&c(h.children,V,null,k,I,$&&J!=="foreignObject",U,D),se&&mt(h,null,k,"created"),N(V,h,h.scopeId,U,k),W){for(const pe in W)pe!=="value"&&!en(pe)&&s(V,pe,null,W[pe],$,h.children,k,I,Z);"value"in W&&s(V,"value",null,W.value),(P=W.onVnodeBeforeMount)&&Ke(P,k,h)}se&&mt(h,null,k,"beforeMount");const ue=(!I||I&&!I.pendingBranch)&&Q&&!Q.persisted;ue&&Q.beforeEnter(V),r(V,g,E),((P=W&&W.onVnodeMounted)||ue||se)&&Fe(()=>{P&&Ke(P,k,h),ue&&Q.enter(V),se&&mt(h,null,k,"mounted")},I)},N=(h,g,E,k,I)=>{if(E&&b(h,E),k)for(let $=0;${for(let P=V;P{const D=g.el=h.el;let{patchFlag:V,dynamicChildren:P,dirs:J}=g;V|=h.patchFlag&16;const W=h.props||ye,Y=g.props||ye;let Q;E&&Ut(E,!1),(Q=Y.onVnodeBeforeUpdate)&&Ke(Q,E,g,h),J&&mt(g,h,E,"beforeUpdate"),E&&Ut(E,!0);const se=I&&g.type!=="foreignObject";if(P?v(h.dynamicChildren,P,D,E,k,se,$):U||te(h,g,D,null,E,k,se,$,!1),V>0){if(V&16)T(D,g,W,Y,E,k,I);else if(V&2&&W.class!==Y.class&&s(D,"class",null,Y.class,I),V&4&&s(D,"style",W.style,Y.style,I),V&8){const ue=g.dynamicProps;for(let pe=0;pe{Q&&Ke(Q,E,g,h),J&&mt(g,h,E,"updated")},k)},v=(h,g,E,k,I,$,U)=>{for(let D=0;D{if(E!==k){if(E!==ye)for(const D in E)!en(D)&&!(D in k)&&s(h,D,E[D],null,U,g.children,I,$,Z);for(const D in k){if(en(D))continue;const V=k[D],P=E[D];V!==P&&D!=="value"&&s(h,D,P,V,U,g.children,I,$,Z)}"value"in k&&s(h,"value",E.value,k.value)}},w=(h,g,E,k,I,$,U,D,V)=>{const P=g.el=h?h.el:l(""),J=g.anchor=h?h.anchor:l("");let{patchFlag:W,dynamicChildren:Y,slotScopeIds:Q}=g;Q&&(D=D?D.concat(Q):Q),h==null?(r(P,E,k),r(J,E,k),c(g.children,E,J,I,$,U,D,V)):W>0&&W&64&&Y&&h.dynamicChildren?(v(h.dynamicChildren,Y,E,I,$,U,D),(g.key!=null||I&&g===I.subTree)&&Js(h,g,!0)):te(h,g,E,J,I,$,U,D,V)},R=(h,g,E,k,I,$,U,D,V)=>{g.slotScopeIds=D,h==null?g.shapeFlag&512?I.ctx.activate(g,E,k,U,V):A(g,E,k,I,$,U,V):ne(h,g,V)},A=(h,g,E,k,I,$,U)=>{const D=h.component=Ba(h,k,I);if(mr(h)&&(D.ctx.renderer=H),Da(D),D.asyncDep){if(I&&I.registerDep(D,ee),!h.el){const V=D.subTree=ve($e);_(null,V,g,E)}return}ee(D,h,g,E,I,$,U)},ne=(h,g,E)=>{const k=g.component=h.component;if(Sf(h,g,E))if(k.asyncDep&&!k.asyncResolved){j(k,g,E);return}else k.next=g,hf(k.update),k.update();else g.el=h.el,k.vnode=g},ee=(h,g,E,k,I,$,U)=>{const D=()=>{if(h.isMounted){let{next:J,bu:W,u:Y,parent:Q,vnode:se}=h,ue=J,pe;Ut(h,!1),J?(J.el=se.el,j(h,J,U)):J=se,W&&wn(W),(pe=J.props&&J.props.onVnodeBeforeUpdate)&&Ke(pe,Q,J,se),Ut(h,!0);const Ee=$r(h),Le=h.subTree;h.subTree=Ee,C(Le,Ee,d(Le.el),G(Le),h,I,$),J.el=Ee.el,ue===null&&xs(h,Ee.el),Y&&Fe(Y,I),(pe=J.props&&J.props.onVnodeUpdated)&&Fe(()=>Ke(pe,Q,J,se),I)}else{let J;const{el:W,props:Y}=g,{bm:Q,m:se,parent:ue}=h,pe=sn(g);if(Ut(h,!1),Q&&wn(Q),!pe&&(J=Y&&Y.onVnodeBeforeMount)&&Ke(J,ue,g),Ut(h,!0),W&&ae){const Ee=()=>{h.subTree=$r(h),ae(W,h.subTree,h,I,null)};pe?g.type.__asyncLoader().then(()=>!h.isUnmounted&&Ee()):Ee()}else{const Ee=h.subTree=$r(h);C(null,Ee,E,k,h,I,$),g.el=Ee.el}if(se&&Fe(se,I),!pe&&(J=Y&&Y.onVnodeMounted)){const Ee=g;Fe(()=>Ke(J,ue,Ee),I)}(g.shapeFlag&256||ue&&sn(ue.vnode)&&ue.vnode.shapeFlag&256)&&h.a&&Fe(h.a,I),h.isMounted=!0,g=E=k=null}},V=h.effect=new pr(D,()=>yi(P),h.scope),P=h.update=()=>V.run();P.id=h.uid,Ut(h,!0),P()},j=(h,g,E)=>{g.component=h;const k=h.vnode.props;h.vnode=g,h.next=null,Zf(h,g.props,k,E),Xf(h,g.children,E),Dn(),Fo(),xn()},te=(h,g,E,k,I,$,U,D,V=!1)=>{const P=h&&h.children,J=h?h.shapeFlag:0,W=g.children,{patchFlag:Y,shapeFlag:Q}=g;if(Y>0){if(Y&128){Te(P,W,E,k,I,$,U,D,V);return}else if(Y&256){X(P,W,E,k,I,$,U,D,V);return}}Q&8?(J&16&&Z(P,I,$),W!==P&&f(E,W)):J&16?Q&16?Te(P,W,E,k,I,$,U,D,V):Z(P,I,$,!0):(J&8&&f(E,""),Q&16&&c(W,E,k,I,$,U,D,V))},X=(h,g,E,k,I,$,U,D,V)=>{h=h||Cn,g=g||Cn;const P=h.length,J=g.length,W=Math.min(P,J);let Y;for(Y=0;YJ?Z(h,I,$,!0,!1,W):c(g,E,k,I,$,U,D,V,W)},Te=(h,g,E,k,I,$,U,D,V)=>{let P=0;const J=g.length;let W=h.length-1,Y=J-1;for(;P<=W&&P<=Y;){const Q=h[P],se=g[P]=V?Pt(g[P]):Xe(g[P]);if(pt(Q,se))C(Q,se,E,null,I,$,U,D,V);else break;P++}for(;P<=W&&P<=Y;){const Q=h[W],se=g[Y]=V?Pt(g[Y]):Xe(g[Y]);if(pt(Q,se))C(Q,se,E,null,I,$,U,D,V);else break;W--,Y--}if(P>W){if(P<=Y){const Q=Y+1,se=QY)for(;P<=W;)z(h[P],I,$,!0),P++;else{const Q=P,se=P,ue=new Map;for(P=se;P<=Y;P++){const Ze=g[P]=V?Pt(g[P]):Xe(g[P]);Ze.key!=null&&ue.set(Ze.key,P)}let pe,Ee=0;const Le=Y-se+1;let rt=!1,Co=0;const Vn=new Array(Le);for(P=0;P=Le){z(Ze,I,$,!0);continue}let gt;if(Ze.key!=null)gt=ue.get(Ze.key);else for(pe=se;pe<=Y;pe++)if(Vn[pe-se]===0&&pt(Ze,g[pe])){gt=pe;break}gt===void 0?z(Ze,I,$,!0):(Vn[gt-se]=P+1,gt>=Co?Co=gt:rt=!0,C(Ze,g[gt],E,null,I,$,U,D,V),Ee++)}const So=rt?nd(Vn):Cn;for(pe=So.length-1,P=Le-1;P>=0;P--){const Ze=se+P,gt=g[Ze],To=Ze+1{const{el:$,type:U,transition:D,children:V,shapeFlag:P}=h;if(P&6){_e(h.component.subTree,g,E,k);return}if(P&128){h.suspense.move(g,E,k);return}if(P&64){U.move(h,g,E,H);return}if(U===Se){r($,g,E);for(let W=0;WD.enter($),I);else{const{leave:W,delayLeave:Y,afterLeave:Q}=D,se=()=>r($,g,E),ue=()=>{W($,()=>{se(),Q&&Q()})};Y?Y($,se,ue):ue()}else r($,g,E)},z=(h,g,E,k=!1,I=!1)=>{const{type:$,props:U,ref:D,children:V,dynamicChildren:P,shapeFlag:J,patchFlag:W,dirs:Y}=h;if(D!=null&&Yr(D,null,E,h,!0),J&256){g.ctx.deactivate(h);return}const Q=J&1&&Y,se=!sn(h);let ue;if(se&&(ue=U&&U.onVnodeBeforeUnmount)&&Ke(ue,g,h),J&6)L(h.component,E,k);else{if(J&128){h.suspense.unmount(E,k);return}Q&&mt(h,null,g,"beforeUnmount"),J&64?h.type.remove(h,g,E,I,H,k):P&&($!==Se||W>0&&W&64)?Z(P,g,E,!1,!0):($===Se&&W&384||!I&&J&16)&&Z(V,g,E),k&&ge(h)}(se&&(ue=U&&U.onVnodeUnmounted)||Q)&&Fe(()=>{ue&&Ke(ue,g,h),Q&&mt(h,null,g,"unmounted")},E)},ge=h=>{const{type:g,el:E,anchor:k,transition:I}=h;if(g===Se){M(E,k);return}if(g===on){F(h);return}const $=()=>{i(E),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(h.shapeFlag&1&&I&&!I.persisted){const{leave:U,delayLeave:D}=I,V=()=>U(E,$);D?D(h.el,$,V):V()}else $()},M=(h,g)=>{let E;for(;h!==g;)E=m(h),i(h),h=E;i(g)},L=(h,g,E)=>{const{bum:k,scope:I,update:$,subTree:U,um:D}=h;k&&wn(k),I.stop(),$&&($.active=!1,z(U,h,g,E)),D&&Fe(D,g),Fe(()=>{h.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve())},Z=(h,g,E,k=!1,I=!1,$=0)=>{for(let U=$;Uh.shapeFlag&6?G(h.component.subTree):h.shapeFlag&128?h.suspense.next():m(h.anchor||h.el),de=(h,g,E)=>{h==null?g._vnode&&z(g._vnode,null,null,!0):C(g._vnode||null,h,g,null,null,null,E),Fo(),Jr(),g._vnode=h},H={p:C,um:z,m:_e,r:ge,mt:A,mc:c,pc:te,pbc:v,n:G,o:e};let ie,ae;return t&&([ie,ae]=t(H)),{render:de,hydrate:ie,createApp:ed(de,ie)}}function Ut({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Js(e,t,n=!1){const r=e.children,i=t.children;if(q(r)&&q(i))for(let s=0;s>1,e[n[l]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=t[o];return n}const rd=e=>e.__isTeleport,qn=e=>e&&(e.disabled||e.disabled===""),Wo=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ts=(e,t)=>{const n=e&&e.to;return oe(n)?t?t(n):null:n},id={__isTeleport:!0,process(e,t,n,r,i,s,o,l,a,u){const{mc:f,pc:d,pbc:m,o:{insert:b,querySelector:O,createText:C,createComment:B}}=u,_=qn(t.props);let{shapeFlag:y,children:S,dynamicChildren:F}=t;if(e==null){const x=t.el=C(""),K=t.anchor=C("");b(x,n,r),b(K,n,r);const N=t.target=ts(t.props,O),c=t.targetAnchor=C("");N&&(b(c,N),o=o||Wo(N));const p=(v,T)=>{y&16&&f(S,v,T,i,s,o,l,a)};_?p(n,K):N&&p(N,c)}else{t.el=e.el;const x=t.anchor=e.anchor,K=t.target=e.target,N=t.targetAnchor=e.targetAnchor,c=qn(e.props),p=c?n:K,v=c?x:N;if(o=o||Wo(K),F?(m(e.dynamicChildren,F,p,i,s,o,l),Js(e,t,!0)):a||d(e,t,p,v,i,s,o,l,!1),_)c||Rr(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const T=t.target=ts(t.props,O);T&&Rr(t,T,null,u,0)}else c&&Rr(t,K,N,u,1)}Aa(t)},remove(e,t,n,r,{um:i,o:{remove:s}},o){const{shapeFlag:l,children:a,anchor:u,targetAnchor:f,target:d,props:m}=e;if(d&&s(f),(o||!qn(m))&&(s(u),l&16))for(let b=0;b0?We||Cn:null,Ma(),fn>0&&We&&We.push(e),e}function je(e,t,n,r,i,s){return Ra(Oe(e,t,n,r,i,s,!0))}function wi(e,t,n,r,i){return Ra(ve(e,t,n,r,i,!0))}function Vt(e){return e?e.__v_isVNode===!0:!1}function pt(e,t){return e.type===t.type&&e.key===t.key}function ld(e){}const Ii="__vInternal",Pa=({key:e})=>e??null,Hr=({ref:e,ref_key:t,ref_for:n})=>e!=null?oe(e)||Re(e)||re(e)?{i:Be,r:e,k:t,f:!!n}:e:null;function Oe(e,t=null,n=null,r=0,i=null,s=e===Se?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pa(t),ref:t&&Hr(t),scopeId:bi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Be};return l?(Ys(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=oe(n)?8:16),fn>0&&!o&&We&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&We.push(a),a}const ve=ad;function ad(e,t=null,n=null,r=0,i=null,s=!1){if((!e||e===va)&&(e=$e),Vt(e)){const l=vt(e,t,!0);return n&&Ys(l,n),fn>0&&!s&&We&&(l.shapeFlag&6?We[We.indexOf(e)]=l:We.push(l)),l.patchFlag|=-2,l}if(gd(e)&&(e=e.__vccOpts),t){t=Fa(t);let{class:l,style:a}=t;l&&!oe(l)&&(t.class=wt(l)),be(a)&&(Ms(a)&&!q(a)&&(a=he({},a)),t.style=dr(a))}const o=oe(e)?1:ra(e)?128:rd(e)?64:be(e)?4:re(e)?2:0;return Oe(e,t,n,r,i,o,s,!0)}function Fa(e){return e?Ms(e)||Ii in e?he({},e):e:null}function vt(e,t,n=!1){const{props:r,ref:i,patchFlag:s,children:o}=e,l=t?vr(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Pa(l),ref:t&&t.ref?n&&i?q(i)?i.concat(Hr(t)):[i,Hr(t)]:Hr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Se?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vt(e.ssContent),ssFallback:e.ssFallback&&vt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Zs(e=" ",t=0){return ve(cn,null,e,t)}function ud(e,t){const n=ve(on,null,e);return n.staticCount=t,n}function Xt(e="",t=!1){return t?(Ae(),wi($e,null,e)):ve($e,null,e)}function Xe(e){return e==null||typeof e=="boolean"?ve($e):q(e)?ve(Se,null,e.slice()):typeof e=="object"?Pt(e):ve(cn,null,String(e))}function Pt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vt(e)}function Ys(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(q(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Ys(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Ii in t)?t._ctx=Be:i===3&&Be&&(Be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else re(t)?(t={default:t,_ctx:Be},n=32):(t=String(t),r&64?(n=16,t=[Zs(t)]):n=8);e.children=t,e.shapeFlag|=n}function vr(...e){const t={};for(let n=0;nwe||Be,Ht=e=>{we=e,e.scope.on()},Lt=()=>{we&&we.scope.off(),we=null};function La(e){return e.vnode.shapeFlag&4}let An=!1;function Da(e,t=!1){An=t;const{props:n,children:r}=e.vnode,i=La(e);Jf(e,n,i,t),Qf(e,r);const s=i?dd(e,t):void 0;return An=!1,s}function dd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Rs(new Proxy(e.ctx,Qi));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?Va(e):null;Ht(e),Dn();const s=St(r,e,0,[e.props,i]);if(xn(),Lt(),ws(s)){if(s.then(Lt,Lt),t)return s.then(o=>{rs(e,o,t)}).catch(o=>{mn(o,e,0)});e.asyncDep=s}else rs(e,s,t)}else $a(e,t)}function rs(e,t,n){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=Bs(t)),$a(e,n)}let Qr,is;function xa(e){Qr=e,is=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,jf))}}const pd=()=>!Qr;function $a(e,t,n){const r=e.type;if(!e.render){if(!t&&Qr&&!r.render){const i=r.template||zs(e).template;if(i){const{isCustomElement:s,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:a}=r,u=he(he({isCustomElement:s,delimiters:l},o),a);r.render=Qr(i,u)}}e.render=r.render||Ue,is&&is(e)}Ht(e),Dn(),Uf(e),xn(),Lt()}function hd(e){return new Proxy(e.attrs,{get(t,n){return qe(e,"get","$attrs"),t[n]}})}function Va(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=hd(e))},slots:e.slots,emit:e.emit,expose:t}}function Oi(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Bs(Rs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in zn)return zn[n](e)},has(t,n){return n in t||n in zn}}))}function ss(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function gd(e){return re(e)&&"__vccOpts"in e}const Ne=(e,t)=>uf(e,t,An);function md(){return null}function yd(){return null}function vd(e){}function bd(e,t){return null}function _d(){return Ha().slots}function Ed(){return Ha().attrs}function Ha(){const e=kt();return e.setupContext||(e.setupContext=Va(e))}function Cd(e,t){const n=q(e)?e.reduce((r,i)=>(r[i]={},r),{}):e;for(const r in t){const i=n[r];i?q(i)||re(i)?n[r]={type:i,default:t[r]}:i.default=t[r]:i===null&&(n[r]={default:t[r]})}return n}function Sd(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Td(e){const t=kt();let n=e();return Lt(),ws(n)&&(n=n.catch(r=>{throw Ht(t),r})),[n,()=>Ht(t)]}function ja(e,t,n){const r=arguments.length;return r===2?be(t)&&!q(t)?Vt(t)?ve(e,null,[t]):ve(e,t):ve(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Vt(n)&&(n=[n]),ve(e,t,n))}const Ua=Symbol(""),Ka=()=>rn(Ua);function wd(){}function Id(e,t,n,r){const i=n[r];if(i&&Wa(i,e))return i;const s=t();return s.memo=e.slice(),n[r]=s}function Wa(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&&We&&We.push(e),!0}const za="3.2.47",Od={createComponentInstance:Ba,setupComponent:Da,renderComponentRoot:$r,setCurrentRenderingInstance:rr,isVNode:Vt,normalizeVNode:Xe},kd=Od,Nd=null,Ad=null,Md="http://www.w3.org/2000/svg",Jt=typeof document<"u"?document:null,zo=Jt&&Jt.createElement("template"),Rd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Jt.createElementNS(Md,e):Jt.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Jt.createTextNode(e),createComment:e=>Jt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Jt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,s){const o=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{zo.innerHTML=r?`${e}`:e;const l=zo.content;if(r){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Pd(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Fd(e,t,n){const r=e.style,i=oe(n);if(n&&!i){if(t&&!oe(t))for(const s in t)n[s]==null&&os(r,s,"");for(const s in n)os(r,s,n[s])}else{const s=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const qo=/\s*!important$/;function os(e,t,n){if(q(n))n.forEach(r=>os(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Bd(e,t);qo.test(n)?e.setProperty(Ge(r),n.replace(qo,""),"important"):e[r]=n}}const Jo=["Webkit","Moz","ms"],$i={};function Bd(e,t){const n=$i[t];if(n)return n;let r=Pe(t);if(r!=="filter"&&r in e)return $i[t]=r;r=gn(r);for(let i=0;iVi||(Hd.then(()=>Vi=0),Vi=Date.now());function Ud(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;et(Kd(r,n.value),t,5,[r])};return n.value=e,n.attached=jd(),n}function Kd(e,t){if(q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Qo=/^on[a-z]/,Wd=(e,t,n,r,i=!1,s,o,l,a)=>{t==="class"?Pd(e,r,i):t==="style"?Fd(e,n,r):pn(t)?Ss(t)||$d(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zd(e,t,r,i))?Dd(e,t,r,s,o,l,a):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ld(e,t,r,i))};function zd(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Qo.test(t)&&re(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Qo.test(t)&&oe(n)?!1:t in e}function qa(e,t){const n=Ei(e);class r extends ki{constructor(s){super(n,s,t)}}return r.def=n,r}const qd=e=>qa(e,au),Jd=typeof HTMLElement<"u"?HTMLElement:class{};class ki extends Jd{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,Ft(()=>{this._connected||(us(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r{for(const i of r)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const t=(r,i=!1)=>{const{props:s,styles:o}=r;let l;if(s&&!q(s))for(const a in s){const u=s[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=zr(this._props[a])),(l||(l=Object.create(null)))[Pe(a)]=!0)}this._numberProps=l,i&&this._resolveProps(r),this._applyStyles(o),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=q(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&r.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of r.map(Pe))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(s){this._setProp(i,s)}})}_setAttr(t){let n=this.getAttribute(t);const r=Pe(t);this._numberProps&&this._numberProps[r]&&(n=zr(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,i=!0){n!==this._props[t]&&(this._props[t]=n,i&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Ge(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ge(t),n+""):n||this.removeAttribute(Ge(t))))}_update(){us(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ve(this._def,he({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(s,o)=>{this.dispatchEvent(new CustomEvent(s,{detail:o}))};n.emit=(s,...o)=>{r(s,o),Ge(s)!==s&&r(Ge(s),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof ki){n.parent=i._instance,n.provides=i._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function Zd(e="$style"){{const t=kt();if(!t)return ye;const n=t.type.__cssModules;if(!n)return ye;const r=n[e];return r||ye}}function Yd(e){const t=kt();if(!t)return;const n=t.ut=(i=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>as(s,i))},r=()=>{const i=e(t.proxy);ls(t.subTree,i),n(i)};sa(r),$n(()=>{const i=new MutationObserver(r);i.observe(t.subTree.el.parentNode,{childList:!0}),Ti(()=>i.disconnect())})}function ls(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ls(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)as(e.el,t);else if(e.type===Se)e.children.forEach(n=>ls(n,t));else if(e.type===on){let{el:n,anchor:r}=e;for(;n&&(as(n,t),n!==r);)n=n.nextSibling}}function as(e,t){if(e.nodeType===1){const n=e.style;for(const r in t)n.setProperty(`--${r}`,t[r])}}const Mt="transition",Hn="animation",Qs=(e,{slots:t})=>ja(js,Za(e),t);Qs.displayName="Transition";const Ja={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Qd=Qs.props=he({},js.props,Ja),Kt=(e,t=[])=>{q(e)?e.forEach(n=>n(...t)):e&&e(...t)},Xo=e=>e?q(e)?e.some(t=>t.length>1):e.length>1:!1;function Za(e){const t={};for(const w in e)w in Ja||(t[w]=e[w]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=o,appearToClass:f=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:b=`${n}-leave-to`}=e,O=Xd(i),C=O&&O[0],B=O&&O[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:S,onLeave:F,onLeaveCancelled:x,onBeforeAppear:K=_,onAppear:N=y,onAppearCancelled:c=S}=t,p=(w,R,A)=>{Rt(w,R?f:l),Rt(w,R?u:o),A&&A()},v=(w,R)=>{w._isLeaving=!1,Rt(w,d),Rt(w,b),Rt(w,m),R&&R()},T=w=>(R,A)=>{const ne=w?N:y,ee=()=>p(R,w,A);Kt(ne,[R,ee]),Go(()=>{Rt(R,w?a:s),bt(R,w?f:l),Xo(ne)||el(R,r,C,ee)})};return he(t,{onBeforeEnter(w){Kt(_,[w]),bt(w,s),bt(w,o)},onBeforeAppear(w){Kt(K,[w]),bt(w,a),bt(w,u)},onEnter:T(!1),onAppear:T(!0),onLeave(w,R){w._isLeaving=!0;const A=()=>v(w,R);bt(w,d),Qa(),bt(w,m),Go(()=>{w._isLeaving&&(Rt(w,d),bt(w,b),Xo(F)||el(w,r,B,A))}),Kt(F,[w,A])},onEnterCancelled(w){p(w,!1),Kt(S,[w])},onAppearCancelled(w){p(w,!0),Kt(c,[w])},onLeaveCancelled(w){v(w),Kt(x,[w])}})}function Xd(e){if(e==null)return null;if(be(e))return[Hi(e.enter),Hi(e.leave)];{const t=Hi(e);return[t,t]}}function Hi(e){return zr(e)}function bt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Rt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Go(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Gd=0;function el(e,t,n,r){const i=e._endId=++Gd,s=()=>{i===e._endId&&r()};if(n)return setTimeout(s,n);const{type:o,timeout:l,propCount:a}=Ya(e,t);if(!o)return r();const u=o+"end";let f=0;const d=()=>{e.removeEventListener(u,m),s()},m=b=>{b.target===e&&++f>=a&&d()};setTimeout(()=>{f(n[O]||"").split(", "),i=r(`${Mt}Delay`),s=r(`${Mt}Duration`),o=tl(i,s),l=r(`${Hn}Delay`),a=r(`${Hn}Duration`),u=tl(l,a);let f=null,d=0,m=0;t===Mt?o>0&&(f=Mt,d=o,m=s.length):t===Hn?u>0&&(f=Hn,d=u,m=a.length):(d=Math.max(o,u),f=d>0?o>u?Mt:Hn:null,m=f?f===Mt?s.length:a.length:0);const b=f===Mt&&/\b(transform|all)(,|$)/.test(r(`${Mt}Property`).toString());return{type:f,timeout:d,propCount:m,hasTransform:b}}function tl(e,t){for(;e.lengthnl(n)+nl(e[r])))}function nl(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Qa(){return document.body.offsetHeight}const Xa=new WeakMap,Ga=new WeakMap,eu={name:"TransitionGroup",props:he({},Qd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=kt(),r=Hs();let i,s;return yr(()=>{if(!i.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!sp(i[0].el,n.vnode.el,o))return;i.forEach(np),i.forEach(rp);const l=i.filter(ip);Qa(),l.forEach(a=>{const u=a.el,f=u.style;bt(u,o),f.transform=f.webkitTransform=f.transitionDuration="";const d=u._moveCb=m=>{m&&m.target!==u||(!m||/transform$/.test(m.propertyName))&&(u.removeEventListener("transitionend",d),u._moveCb=null,Rt(u,o))};u.addEventListener("transitionend",d)})}),()=>{const o=ce(e),l=Za(o);let a=o.tag||Se;i=s,s=t.default?_i(t.default()):[];for(let u=0;udelete e.mode;eu.props;const tp=eu;function np(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function rp(e){Ga.set(e,e.el.getBoundingClientRect())}function ip(e){const t=Xa.get(e),n=Ga.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const s=e.el.style;return s.transform=s.webkitTransform=`translate(${r}px,${i}px)`,s.transitionDuration="0s",e}}function sp(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(o=>o&&r.classList.add(o)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:s}=Ya(r);return i.removeChild(r),s}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return q(t)?n=>wn(t,n):t};function op(e){e.target.composing=!0}function rl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Xr={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=jt(i);const s=r||i.props&&i.props.type==="number";Ct(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=Wr(l)),e._assign(l)}),n&&Ct(e,"change",()=>{e.value=e.value.trim()}),t||(Ct(e,"compositionstart",op),Ct(e,"compositionend",rl),Ct(e,"change",rl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},s){if(e._assign=jt(s),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&Wr(e.value)===t))return;const o=t??"";e.value!==o&&(e.value=o)}},Xs={deep:!0,created(e,t,n){e._assign=jt(n),Ct(e,"change",()=>{const r=e._modelValue,i=Mn(e),s=e.checked,o=e._assign;if(q(r)){const l=ci(r,i),a=l!==-1;if(s&&!a)o(r.concat(i));else if(!s&&a){const u=[...r];u.splice(l,1),o(u)}}else if(hn(r)){const l=new Set(r);s?l.add(i):l.delete(i),o(l)}else o(nu(e,s))})},mounted:il,beforeUpdate(e,t,n){e._assign=jt(n),il(e,t,n)}};function il(e,{value:t,oldValue:n},r){e._modelValue=t,q(t)?e.checked=ci(t,r.props.value)>-1:hn(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Dt(t,nu(e,!0)))}const Gs={created(e,{value:t},n){e.checked=Dt(t,n.props.value),e._assign=jt(n),Ct(e,"change",()=>{e._assign(Mn(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=jt(r),t!==n&&(e.checked=Dt(t,r.props.value))}},tu={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=hn(t);Ct(e,"change",()=>{const s=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Wr(Mn(o)):Mn(o));e._assign(e.multiple?i?new Set(s):s:s[0])}),e._assign=jt(r)},mounted(e,{value:t}){sl(e,t)},beforeUpdate(e,t,n){e._assign=jt(n)},updated(e,{value:t}){sl(e,t)}};function sl(e,t){const n=e.multiple;if(!(n&&!q(t)&&!hn(t))){for(let r=0,i=e.options.length;r-1:s.selected=t.has(o);else if(Dt(Mn(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Mn(e){return"_value"in e?e._value:e.value}function nu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ru={created(e,t,n){Pr(e,t,n,null,"created")},mounted(e,t,n){Pr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Pr(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Pr(e,t,n,r,"updated")}};function iu(e,t){switch(e){case"SELECT":return tu;case"TEXTAREA":return Xr;default:switch(t){case"checkbox":return Xs;case"radio":return Gs;default:return Xr}}}function Pr(e,t,n,r,i){const o=iu(e.tagName,n.props&&n.props.type)[i];o&&o(e,t,n,r)}function lp(){Xr.getSSRProps=({value:e})=>({value:e}),Gs.getSSRProps=({value:e},t)=>{if(t.props&&Dt(t.props.value,e))return{checked:!0}},Xs.getSSRProps=({value:e},t)=>{if(q(e)){if(t.props&&ci(e,t.props.value)>-1)return{checked:!0}}else if(hn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},ru.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=iu(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const ap=["ctrl","shift","alt","meta"],up={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ap.some(n=>e[`${n}Key`]&&!t.includes(n))},st=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Ge(n.key);if(t.some(i=>i===r||cp[i]===r))return e(n)},eo={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),jn(e,!0),r.enter(e)):r.leave(e,()=>{jn(e,!1)}):jn(e,t))},beforeUnmount(e,{value:t}){jn(e,t)}};function jn(e,t){e.style.display=t?e._vod:"none"}function fp(){eo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const su=he({patchProp:Wd},Rd);let Zn,ol=!1;function ou(){return Zn||(Zn=Oa(su))}function lu(){return Zn=ol?Zn:ka(su),ol=!0,Zn}const us=(...e)=>{ou().render(...e)},au=(...e)=>{lu().hydrate(...e)},dp=(...e)=>{const t=ou().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=uu(r);if(!i)return;const s=t._component;!re(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t},pp=(...e)=>{const t=lu().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=uu(r);if(i)return n(i,!0,i instanceof SVGElement)},t};function uu(e){return oe(e)?document.querySelector(e):e}let ll=!1;const hp=()=>{ll||(ll=!0,lp(),fp())},gp=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:js,Comment:$e,EffectScope:Os,Fragment:Se,KeepAlive:Bf,ReactiveEffect:pr,Static:on,Suspense:wf,Teleport:od,Text:cn,Transition:Qs,TransitionGroup:tp,VueElement:ki,assertNumber:ff,callWithAsyncErrorHandling:et,callWithErrorHandling:St,camelize:Pe,capitalize:gn,cloneVNode:vt,compatUtils:Ad,computed:Ne,createApp:dp,createBlock:wi,createCommentVNode:Xt,createElementBlock:je,createElementVNode:Oe,createHydrationRenderer:ka,createPropsRestProxy:Sd,createRenderer:Oa,createSSRApp:pp,createSlots:Vf,createStaticVNode:ud,createTextVNode:Zs,createVNode:ve,customRef:sf,defineAsyncComponent:Pf,defineComponent:Ei,defineCustomElement:qa,defineEmits:yd,defineExpose:vd,defineProps:md,defineSSRCustomElement:qd,get devtools(){return vn},effect:Tc,effectScope:_c,getCurrentInstance:kt,getCurrentScope:Bl,getTransitionRawChildren:_i,guardReactiveProps:Fa,h:ja,handleError:mn,hydrate:au,initCustomFormatter:wd,initDirectivesForSSR:hp,inject:rn,isMemoSame:Wa,isProxy:Ms,isReactive:nn,isReadonly:an,isRef:Re,isRuntimeOnly:pd,isShallow:Gn,isVNode:Vt,markRaw:Rs,mergeDefaults:Cd,mergeProps:vr,nextTick:Ft,normalizeClass:wt,normalizeProps:nc,normalizeStyle:dr,onActivated:aa,onBeforeMount:fa,onBeforeUnmount:Si,onBeforeUpdate:da,onDeactivated:ua,onErrorCaptured:ma,onMounted:$n,onRenderTracked:ga,onRenderTriggered:ha,onScopeDispose:Ec,onServerPrefetch:pa,onUnmounted:Ti,onUpdated:yr,openBlock:Ae,popScopeId:vf,provide:Vs,proxyRefs:Bs,pushScopeId:yf,queuePostFlushCb:Ds,reactive:hr,readonly:As,ref:Qe,registerRuntimeCompiler:xa,render:us,renderList:Ws,renderSlot:ot,resolveComponent:Vr,resolveDirective:$f,resolveDynamicComponent:xf,resolveFilter:Nd,resolveTransitionHooks:Nn,setBlockTracking:ns,setDevtoolsHook:ta,setTransitionHooks:un,shallowReactive:Jl,shallowReadonly:Xc,shallowRef:Gc,ssrContextKey:Ua,ssrUtils:kd,stop:wc,toDisplayString:Xn,toHandlerKey:Tn,toHandlers:Hf,toRaw:ce,toRef:bn,toRefs:of,transformVNodeArgs:ld,triggerRef:tf,unref:Yl,useAttrs:Ed,useCssModule:Zd,useCssVars:Yd,useSSRContext:Ka,useSlots:_d,useTransitionState:Hs,vModelCheckbox:Xs,vModelDynamic:ru,vModelRadio:Gs,vModelSelect:tu,vModelText:Xr,vShow:eo,version:za,warn:cf,watch:ft,watchEffect:Et,watchPostEffect:sa,watchSyncEffect:Af,withAsyncContext:Td,withCtx:ir,withDefaults:bd,withDirectives:ya,withKeys:Zt,withMemo:Id,withModifiers:st,withScopeId:bf},Symbol.toStringTag,{value:"Module"}));function to(e){throw e}function cu(e){}function Ce(e,t,n,r){const i=e,s=new SyntaxError(String(i));return s.code=e,s.loc=t,s}const or=Symbol(""),Yn=Symbol(""),no=Symbol(""),Gr=Symbol(""),fu=Symbol(""),dn=Symbol(""),du=Symbol(""),pu=Symbol(""),ro=Symbol(""),io=Symbol(""),br=Symbol(""),so=Symbol(""),hu=Symbol(""),oo=Symbol(""),ei=Symbol(""),lo=Symbol(""),ao=Symbol(""),uo=Symbol(""),co=Symbol(""),gu=Symbol(""),mu=Symbol(""),Ni=Symbol(""),ti=Symbol(""),fo=Symbol(""),po=Symbol(""),lr=Symbol(""),_r=Symbol(""),ho=Symbol(""),cs=Symbol(""),mp=Symbol(""),fs=Symbol(""),ni=Symbol(""),yp=Symbol(""),vp=Symbol(""),go=Symbol(""),bp=Symbol(""),_p=Symbol(""),mo=Symbol(""),yu=Symbol(""),Rn={[or]:"Fragment",[Yn]:"Teleport",[no]:"Suspense",[Gr]:"KeepAlive",[fu]:"BaseTransition",[dn]:"openBlock",[du]:"createBlock",[pu]:"createElementBlock",[ro]:"createVNode",[io]:"createElementVNode",[br]:"createCommentVNode",[so]:"createTextVNode",[hu]:"createStaticVNode",[oo]:"resolveComponent",[ei]:"resolveDynamicComponent",[lo]:"resolveDirective",[ao]:"resolveFilter",[uo]:"withDirectives",[co]:"renderList",[gu]:"renderSlot",[mu]:"createSlots",[Ni]:"toDisplayString",[ti]:"mergeProps",[fo]:"normalizeClass",[po]:"normalizeStyle",[lr]:"normalizeProps",[_r]:"guardReactiveProps",[ho]:"toHandlers",[cs]:"camelize",[mp]:"capitalize",[fs]:"toHandlerKey",[ni]:"setBlockTracking",[yp]:"pushScopeId",[vp]:"popScopeId",[go]:"withCtx",[bp]:"unref",[_p]:"isRef",[mo]:"withMemo",[yu]:"isMemoSame"};function Ep(e){Object.getOwnPropertySymbols(e).forEach(t=>{Rn[t]=e[t]})}const nt={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Cp(e,t=nt){return{type:0,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}function ar(e,t,n,r,i,s,o,l=!1,a=!1,u=!1,f=nt){return e&&(l?(e.helper(dn),e.helper(Bn(e.inSSR,u))):e.helper(Fn(e.inSSR,u)),o&&e.helper(uo)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:s,directives:o,isBlock:l,disableTracking:a,isComponent:u,loc:f}}function Er(e,t=nt){return{type:17,loc:t,elements:e}}function at(e,t=nt){return{type:15,loc:t,properties:e}}function Ie(e,t){return{type:16,loc:nt,key:oe(e)?le(e,!0):e,value:t}}function le(e,t=!1,n=nt,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ht(e,t=nt){return{type:8,loc:t,children:e}}function ke(e,t=[],n=nt){return{type:14,loc:n,callee:e,arguments:t}}function Pn(e,t=void 0,n=!1,r=!1,i=nt){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function ds(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:nt}}function Sp(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:nt}}function Tp(e){return{type:21,body:e,loc:nt}}const ze=e=>e.type===4&&e.isStatic,_n=(e,t)=>e===t||e===Ge(t);function vu(e){if(_n(e,"Teleport"))return Yn;if(_n(e,"Suspense"))return no;if(_n(e,"KeepAlive"))return Gr;if(_n(e,"BaseTransition"))return fu}const wp=/^\d|[^\$\w]/,yo=e=>!wp.test(e),Ip=/[A-Za-z_$\xA0-\uFFFF]/,Op=/[\.\?\w$\xA0-\uFFFF]/,kp=/\s+[.[]\s*|\s*[.[]\s+/g,Np=e=>{e=e.trim().replace(kp,o=>o.trim());let t=0,n=[],r=0,i=0,s=null;for(let o=0;ot.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function ji(e){return e.type===5||e.type===2}function Mp(e){return e.type===7&&e.name==="slot"}function si(e){return e.type===1&&e.tagType===3}function oi(e){return e.type===1&&e.tagType===2}function Fn(e,t){return e||t?ro:io}function Bn(e,t){return e||t?du:pu}const Rp=new Set([lr,_r]);function Eu(e,t=[]){if(e&&!oe(e)&&e.type===14){const n=e.callee;if(!oe(n)&&Rp.has(n))return Eu(e.arguments[0],t.concat(e))}return[e,t]}function li(e,t,n){let r,i=e.type===13?e.props:e.arguments[2],s=[],o;if(i&&!oe(i)&&i.type===14){const l=Eu(i);i=l[0],s=l[1],o=s[s.length-1]}if(i==null||oe(i))r=at([t]);else if(i.type===14){const l=i.arguments[0];!oe(l)&&l.type===15?al(t,l)||l.properties.unshift(t):i.callee===ho?r=ke(n.helper(ti),[at([t]),i]):i.arguments.unshift(at([t])),!r&&(r=i)}else i.type===15?(al(t,i)||i.properties.unshift(t),r=i):(r=ke(n.helper(ti),[at([t]),i]),o&&o.callee===_r&&(o=s[s.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function al(e,t){let n=!1;if(e.key.type===4){const r=e.key.content;n=t.properties.some(i=>i.key.type===4&&i.key.content===r)}return n}function ur(e,t){return`_${t}_${e.replace(/[^\w]/g,(n,r)=>n==="-"?"_":e.charCodeAt(r).toString())}`}function Pp(e){return e.type===14&&e.callee===mo?e.arguments[1].returns:e}function vo(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(Fn(r,e.isComponent)),t(dn),t(Bn(r,e.isComponent)))}function ul(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,r=n&&n[e];return e==="MODE"?r||3:r}function ln(e,t){const n=ul("MODE",t),r=ul(e,t);return n===3?r===!0:r!==!1}function cr(e,t,n,...r){return ln(e,t)}const Fp=/&(gt|lt|amp|apos|quot);/g,Bp={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},cl={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:xr,isPreTag:xr,isCustomElement:xr,decodeEntities:e=>e.replace(Fp,(t,n)=>Bp[n]),onError:to,onWarn:cu,comments:!1};function Lp(e,t={}){const n=Dp(e,t),r=tt(n);return Cp(bo(n,0,[]),ct(n,r))}function Dp(e,t){const n=he({},cl);let r;for(r in t)n[r]=t[r]===void 0?cl[r]:t[r];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}function bo(e,t,n){const r=Mi(n),i=r?r.ns:0,s=[];for(;!zp(e,t,n);){const l=e.source;let a;if(t===0||t===1){if(!e.inVPre&&xe(l,e.options.delimiters[0]))a=Kp(e,t);else if(t===0&&l[0]==="<")if(l.length===1)me(e,5,1);else if(l[1]==="!")xe(l,"=0;){const u=o[l];u&&u.type===9&&(a+=u.branches.length)}return()=>{if(s)r.codegenNode=ml(i,a,n);else{const u=mh(r.codegenNode);u.alternate=ml(i,a+r.branches.length-1,n)}}}));function gh(e,t,n,r){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;n.onError(Ce(28,t.loc)),t.exp=le("true",!1,i)}if(t.name==="if"){const i=gl(e,t),s={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(s),r)return r(s,i,!0)}else{const i=n.parent.children;let s=i.indexOf(e);for(;s-->=-1;){const o=i[s];if(o&&o.type===3){n.removeNode(o);continue}if(o&&o.type===2&&!o.content.trim().length){n.removeNode(o);continue}if(o&&o.type===9){t.name==="else-if"&&o.branches[o.branches.length-1].condition===void 0&&n.onError(Ce(30,e.loc)),n.removeNode();const l=gl(e,t);o.branches.push(l);const a=r&&r(o,l,!1);Ri(l,n),a&&a(),n.currentNode=null}else n.onError(Ce(30,e.loc));break}}}function gl(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!lt(e,"for")?e.children:[e],userKey:Ai(e,"key"),isTemplateIf:n}}function ml(e,t,n){return e.condition?ds(e.condition,yl(e,t,n),ke(n.helper(br),['""',"true"])):yl(e,t,n)}function yl(e,t,n){const{helper:r}=n,i=Ie("key",le(`${t}`,!1,nt,2)),{children:s}=e,o=s[0];if(s.length!==1||o.type!==1)if(s.length===1&&o.type===11){const a=o.codegenNode;return li(a,i,n),a}else{let a=64;return ar(n,r(or),at([i]),s,a+"",void 0,void 0,!0,!1,!1,e.loc)}else{const a=o.codegenNode,u=Pp(a);return u.type===13&&vo(u,n),li(u,i,n),a}}function mh(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const yh=ku("for",(e,t,n)=>{const{helper:r,removeHelper:i}=n;return vh(e,t,n,s=>{const o=ke(r(co),[s.source]),l=si(e),a=lt(e,"memo"),u=Ai(e,"key"),f=u&&(u.type===6?le(u.value.content,!0):u.exp),d=u?Ie("key",f):null,m=s.source.type===4&&s.source.constType>0,b=m?64:u?128:256;return s.codegenNode=ar(n,r(or),void 0,o,b+"",void 0,void 0,!0,!m,!1,e.loc),()=>{let O;const{children:C}=s,B=C.length!==1||C[0].type!==1,_=oi(e)?e:l&&e.children.length===1&&oi(e.children[0])?e.children[0]:null;if(_?(O=_.codegenNode,l&&d&&li(O,d,n)):B?O=ar(n,r(or),d?at([d]):void 0,e.children,64+"",void 0,void 0,!0,void 0,!1):(O=C[0].codegenNode,l&&d&&li(O,d,n),O.isBlock!==!m&&(O.isBlock?(i(dn),i(Bn(n.inSSR,O.isComponent))):i(Fn(n.inSSR,O.isComponent))),O.isBlock=!m,O.isBlock?(r(dn),r(Bn(n.inSSR,O.isComponent))):r(Fn(n.inSSR,O.isComponent))),a){const y=Pn(gs(s.parseResult,[le("_cached")]));y.body=Tp([ht(["const _memo = (",a.exp,")"]),ht(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${n.helperString(yu)}(_cached, _memo)) return _cached`]),ht(["const _item = ",O]),le("_item.memo = _memo"),le("return _item")]),o.arguments.push(y,le("_cache"),le(String(n.cached++)))}else o.arguments.push(Pn(gs(s.parseResult),O,!0))}})});function vh(e,t,n,r){if(!t.exp){n.onError(Ce(31,t.loc));return}const i=Ru(t.exp);if(!i){n.onError(Ce(32,t.loc));return}const{addIdentifiers:s,removeIdentifiers:o,scopes:l}=n,{source:a,value:u,key:f,index:d}=i,m={type:11,loc:t.loc,source:a,valueAlias:u,keyAlias:f,objectIndexAlias:d,parseResult:i,children:si(e)?e.children:[e]};n.replaceNode(m),l.vFor++;const b=r&&r(m);return()=>{l.vFor--,b&&b()}}const bh=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,vl=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,_h=/^\(|\)$/g;function Ru(e,t){const n=e.loc,r=e.content,i=r.match(bh);if(!i)return;const[,s,o]=i,l={source:Fr(n,o.trim(),r.indexOf(o,s.length)),value:void 0,key:void 0,index:void 0};let a=s.trim().replace(_h,"").trim();const u=s.indexOf(a),f=a.match(vl);if(f){a=a.replace(vl,"").trim();const d=f[1].trim();let m;if(d&&(m=r.indexOf(d,u+a.length),l.key=Fr(n,d,m)),f[2]){const b=f[2].trim();b&&(l.index=Fr(n,b,r.indexOf(b,l.key?m+d.length:u+a.length)))}}return a&&(l.value=Fr(n,a,u)),l}function Fr(e,t,n){return le(t,!1,_u(e,n,t.length))}function gs({value:e,key:t,index:n},r=[]){return Eh([e,t,n,...r])}function Eh(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,r)=>n||le("_".repeat(r+1),!1))}const bl=le("undefined",!1),Ch=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=lt(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},Sh=(e,t,n)=>Pn(e,t,!1,!0,t.length?t[0].loc:n);function Th(e,t,n=Sh){t.helper(go);const{children:r,loc:i}=e,s=[],o=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const a=lt(e,"slot",!0);if(a){const{arg:B,exp:_}=a;B&&!ze(B)&&(l=!0),s.push(Ie(B||le("default",!0),n(_,r,i)))}let u=!1,f=!1;const d=[],m=new Set;let b=0;for(let B=0;B{const S=n(_,y,i);return t.compatConfig&&(S.isNonScopedSlot=!0),Ie("default",S)};u?d.length&&d.some(_=>Pu(_))&&(f?t.onError(Ce(39,d[0].loc)):s.push(B(void 0,d))):s.push(B(void 0,r))}const O=l?2:Ur(e.children)?3:1;let C=at(s.concat(Ie("_",le(O+"",!1))),i);return o.length&&(C=ke(t.helper(mu),[C,Er(o)])),{slots:C,hasDynamicSlots:l}}function Br(e,t,n){const r=[Ie("name",e),Ie("fn",t)];return n!=null&&r.push(Ie("key",le(String(n),!0))),at(r)}function Ur(e){for(let t=0;tfunction(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:r,props:i}=e,s=e.tagType===1;let o=s?Ih(e,t):`"${r}"`;const l=be(o)&&o.callee===ei;let a,u,f,d=0,m,b,O,C=l||o===Yn||o===no||!s&&(r==="svg"||r==="foreignObject");if(i.length>0){const B=Bu(e,t,void 0,s,l);a=B.props,d=B.patchFlag,b=B.dynamicPropNames;const _=B.directives;O=_&&_.length?Er(_.map(y=>kh(y,t))):void 0,B.shouldUseBlock&&(C=!0)}if(e.children.length>0)if(o===Gr&&(C=!0,d|=1024),s&&o!==Yn&&o!==Gr){const{slots:_,hasDynamicSlots:y}=Th(e,t);u=_,y&&(d|=1024)}else if(e.children.length===1&&o!==Yn){const _=e.children[0],y=_.type,S=y===5||y===8;S&&ut(_,t)===0&&(d|=1),S||y===2?u=_:u=e.children}else u=e.children;d!==0&&(f=String(d),b&&b.length&&(m=Nh(b))),e.codegenNode=ar(t,o,a,u,f,m,O,!!C,!1,s,e.loc)};function Ih(e,t,n=!1){let{tag:r}=e;const i=ms(r),s=Ai(e,"is");if(s)if(i||ln("COMPILER_IS_ON_ELEMENT",t)){const a=s.type===6?s.value&&le(s.value.content,!0):s.exp;if(a)return ke(t.helper(ei),[a])}else s.type===6&&s.value.content.startsWith("vue:")&&(r=s.value.content.slice(4));const o=!i&<(e,"is");if(o&&o.exp)return ke(t.helper(ei),[o.exp]);const l=vu(r)||t.isBuiltInComponent(r);return l?(n||t.helper(l),l):(t.helper(oo),t.components.add(r),ur(r,"component"))}function Bu(e,t,n=e.props,r,i,s=!1){const{tag:o,loc:l,children:a}=e;let u=[];const f=[],d=[],m=a.length>0;let b=!1,O=0,C=!1,B=!1,_=!1,y=!1,S=!1,F=!1;const x=[],K=p=>{u.length&&(f.push(at(_l(u),l)),u=[]),p&&f.push(p)},N=({key:p,value:v})=>{if(ze(p)){const T=p.content,w=pn(T);if(w&&(!r||i)&&T.toLowerCase()!=="onclick"&&T!=="onUpdate:modelValue"&&!en(T)&&(y=!0),w&&en(T)&&(F=!0),v.type===20||(v.type===4||v.type===8)&&ut(v,t)>0)return;T==="ref"?C=!0:T==="class"?B=!0:T==="style"?_=!0:T!=="key"&&!x.includes(T)&&x.push(T),r&&(T==="class"||T==="style")&&!x.includes(T)&&x.push(T)}else S=!0};for(let p=0;p0&&u.push(Ie(le("ref_for",!0),le("true")))),w==="is"&&(ms(o)||R&&R.content.startsWith("vue:")||ln("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Ie(le(w,!0,_u(T,0,w.length)),le(R?R.content:"",A,R?R.loc:T)))}else{const{name:T,arg:w,exp:R,loc:A}=v,ne=T==="bind",ee=T==="on";if(T==="slot"){r||t.onError(Ce(40,A));continue}if(T==="once"||T==="memo"||T==="is"||ne&&Gt(w,"is")&&(ms(o)||ln("COMPILER_IS_ON_ELEMENT",t))||ee&&s)continue;if((ne&&Gt(w,"key")||ee&&m&&Gt(w,"vue:before-update"))&&(b=!0),ne&&Gt(w,"ref")&&t.scopes.vFor>0&&u.push(Ie(le("ref_for",!0),le("true"))),!w&&(ne||ee)){if(S=!0,R)if(ne){if(K(),ln("COMPILER_V_BIND_OBJECT_ORDER",t)){f.unshift(R);continue}f.push(R)}else K({type:14,loc:A,callee:t.helper(ho),arguments:r?[R]:[R,"true"]});else t.onError(Ce(ne?34:35,A));continue}const j=t.directiveTransforms[T];if(j){const{props:te,needRuntime:X}=j(v,e,t);!s&&te.forEach(N),ee&&w&&!ze(w)?K(at(te,l)):u.push(...te),X&&(d.push(v),xt(X)&&Fu.set(v,X))}else mc(T)||(d.push(v),m&&(b=!0))}}let c;if(f.length?(K(),f.length>1?c=ke(t.helper(ti),f,l):c=f[0]):u.length&&(c=at(_l(u),l)),S?O|=16:(B&&!r&&(O|=2),_&&!r&&(O|=4),x.length&&(O|=8),y&&(O|=32)),!b&&(O===0||O===32)&&(C||F||d.length>0)&&(O|=512),!t.inSSR&&c)switch(c.type){case 15:let p=-1,v=-1,T=!1;for(let A=0;AIe(o,s)),i))}return Er(n,e.loc)}function Nh(e){let t="[";for(let n=0,r=e.length;n{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Mh=/-(\w)/g,El=Ah(e=>e.replace(Mh,(t,n)=>n?n.toUpperCase():"")),Rh=(e,t)=>{if(oi(e)){const{children:n,loc:r}=e,{slotName:i,slotProps:s}=Ph(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let l=2;s&&(o[2]=s,l=3),n.length&&(o[3]=Pn([],n,!1,!1,r),l=4),t.scopeId&&!t.slotted&&(l=5),o.splice(l),e.codegenNode=ke(t.helper(gu),o,r)}};function Ph(e,t){let n='"default"',r;const i=[];for(let s=0;s0){const{props:s,directives:o}=Bu(e,t,i,!1,!1);r=s,o.length&&t.onError(Ce(36,o[0].loc))}return{slotName:n,slotProps:r}}const Fh=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Lu=(e,t,n,r)=>{const{loc:i,modifiers:s,arg:o}=e;!e.exp&&!s.length&&n.onError(Ce(35,i));let l;if(o.type===4)if(o.isStatic){let d=o.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const m=t.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?Tn(Pe(d)):`on:${d}`;l=le(m,!0,o.loc)}else l=ht([`${n.helperString(fs)}(`,o,")"]);else l=o,l.children.unshift(`${n.helperString(fs)}(`),l.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let u=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const d=bu(a.content),m=!(d||Fh.test(a.content)),b=a.content.includes(";");(m||u&&d)&&(a=ht([`${m?"$event":"(...args)"} => ${b?"{":"("}`,a,b?"}":")"]))}let f={props:[Ie(l,a||le("() => {}",!1,i))]};return r&&(f=r(f)),u&&(f.props[0].value=n.cache(f.props[0].value)),f.props.forEach(d=>d.key.isHandlerKey=!0),f},Bh=(e,t,n)=>{const{exp:r,modifiers:i,loc:s}=e,o=e.arg;return o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=`${o.content} || ""`),i.includes("camel")&&(o.type===4?o.isStatic?o.content=Pe(o.content):o.content=`${n.helperString(cs)}(${o.content})`:(o.children.unshift(`${n.helperString(cs)}(`),o.children.push(")"))),n.inSSR||(i.includes("prop")&&Cl(o,"."),i.includes("attr")&&Cl(o,"^")),!r||r.type===4&&!r.content.trim()?(n.onError(Ce(34,s)),{props:[Ie(o,le("",!0,s))]}):{props:[Ie(o,r)]}},Cl=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Lh=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let r,i=!1;for(let s=0;ss.type===7&&!t.directiveTransforms[s.name])&&e.tag!=="template")))for(let s=0;s{if(e.type===1&<(e,"once",!0))return Sl.has(e)||t.inVOnce?void 0:(Sl.add(e),t.inVOnce=!0,t.helper(ni),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},Du=(e,t,n)=>{const{exp:r,arg:i}=e;if(!r)return n.onError(Ce(41,e.loc)),Lr();const s=r.loc.source,o=r.type===4?r.content:s,l=n.bindingMetadata[s];if(l==="props"||l==="props-aliased")return n.onError(Ce(44,r.loc)),Lr();const a=!1;if(!o.trim()||!bu(o)&&!a)return n.onError(Ce(42,r.loc)),Lr();const u=i||le("modelValue",!0),f=i?ze(i)?`onUpdate:${Pe(i.content)}`:ht(['"onUpdate:" + ',i]):"onUpdate:modelValue";let d;const m=n.isTS?"($event: any)":"$event";d=ht([`${m} => ((`,r,") = $event)"]);const b=[Ie(u,e.exp),Ie(f,d)];if(e.modifiers.length&&t.tagType===1){const O=e.modifiers.map(B=>(yo(B)?B:JSON.stringify(B))+": true").join(", "),C=i?ze(i)?`${i.content}Modifiers`:ht([i,' + "Modifiers"']):"modelModifiers";b.push(Ie(C,le(`{ ${O} }`,!1,e.loc,2)))}return Lr(b)};function Lr(e=[]){return{props:e}}const xh=/[\w).+\-_$\]]/,$h=(e,t)=>{ln("COMPILER_FILTER",t)&&(e.type===5&&ai(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&ai(n.exp,t)}))};function ai(e,t){if(e.type===4)Tl(e,t);else for(let n=0;n=0&&(y=n.charAt(_),y===" ");_--);(!y||!xh.test(y))&&(o=!0)}}O===void 0?O=n.slice(0,b).trim():f!==0&&B();function B(){C.push(n.slice(f,b).trim()),f=b+1}if(C.length){for(b=0;b{if(e.type===1){const n=lt(e,"memo");return!n||wl.has(e)?void 0:(wl.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&r.type===13&&(e.tagType!==1&&vo(r,t),e.codegenNode=ke(t.helper(mo),[n.exp,Pn(void 0,r),"_cache",String(t.cached++)]))})}};function jh(e){return[[Dh,hh,Hh,yh,$h,Rh,wh,Ch,Lh],{on:Lu,bind:Bh,model:Du}]}function Uh(e,t={}){const n=t.onError||to,r=t.mode==="module";t.prefixIdentifiers===!0?n(Ce(47)):r&&n(Ce(48));const i=!1;t.cacheHandlers&&n(Ce(49)),t.scopeId&&!r&&n(Ce(50));const s=oe(e)?Lp(e,t):e,[o,l]=jh();return Yp(s,he({},t,{prefixIdentifiers:i,nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:he({},l,t.directiveTransforms||{})})),Gp(s,he({},t,{prefixIdentifiers:i}))}const Kh=()=>({props:[]}),xu=Symbol(""),$u=Symbol(""),Vu=Symbol(""),Hu=Symbol(""),ys=Symbol(""),ju=Symbol(""),Uu=Symbol(""),Ku=Symbol(""),Wu=Symbol(""),zu=Symbol("");Ep({[xu]:"vModelRadio",[$u]:"vModelCheckbox",[Vu]:"vModelText",[Hu]:"vModelSelect",[ys]:"vModelDynamic",[ju]:"withModifiers",[Uu]:"withKeys",[Ku]:"vShow",[Wu]:"Transition",[zu]:"TransitionGroup"});let yn;function Wh(e,t=!1){return yn||(yn=document.createElement("div")),t?(yn.innerHTML=`
`,yn.children[0].getAttribute("foo")):(yn.innerHTML=e,yn.textContent)}const zh=Je("style,iframe,script,noscript",!0),qh={isVoidTag:ac,isNativeTag:e=>oc(e)||lc(e),isPreTag:e=>e==="pre",decodeEntities:Wh,isBuiltInComponent:e=>{if(_n(e,"Transition"))return Wu;if(_n(e,"TransitionGroup"))return zu},getNamespace(e,t){let n=t?t.ns:0;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n},getTextMode({tag:e,ns:t}){if(t===0){if(e==="textarea"||e==="title")return 1;if(zh(e))return 2}return 0}},Jh=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:le("style",!0,t.loc),exp:Zh(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Zh=(e,t)=>{const n=Nl(e);return le(JSON.stringify(n),!1,t,3)};function Tt(e,t){return Ce(e,t)}const Yh=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Tt(51,i)),t.children.length&&(n.onError(Tt(52,i)),t.children.length=0),{props:[Ie(le("innerHTML",!0,i),r||le("",!0))]}},Qh=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Tt(53,i)),t.children.length&&(n.onError(Tt(54,i)),t.children.length=0),{props:[Ie(le("textContent",!0),r?ut(r,n)>0?r:ke(n.helperString(Ni),[r],i):le("",!0))]}},Xh=(e,t,n)=>{const r=Du(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(Tt(56,e.arg.loc));const{tag:i}=t,s=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||s){let o=Vu,l=!1;if(i==="input"||s){const a=Ai(t,"type");if(a){if(a.type===7)o=ys;else if(a.value)switch(a.value.content){case"radio":o=xu;break;case"checkbox":o=$u;break;case"file":l=!0,n.onError(Tt(57,e.loc));break}}else Ap(t)&&(o=ys)}else i==="select"&&(o=Hu);l||(r.needRuntime=n.helper(o))}else n.onError(Tt(55,e.loc));return r.props=r.props.filter(o=>!(o.key.type===4&&o.key.content==="modelValue")),r},Gh=Je("passive,once,capture"),eg=Je("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),tg=Je("left,right"),qu=Je("onkeyup,onkeydown,onkeypress",!0),ng=(e,t,n,r)=>{const i=[],s=[],o=[];for(let l=0;lze(e)&&e.content.toLowerCase()==="onclick"?le(t,!0):e.type!==4?ht(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,rg=(e,t,n)=>Lu(e,t,n,r=>{const{modifiers:i}=e;if(!i.length)return r;let{key:s,value:o}=r.props[0];const{keyModifiers:l,nonKeyModifiers:a,eventOptionModifiers:u}=ng(s,i,n,e.loc);if(a.includes("right")&&(s=Il(s,"onContextmenu")),a.includes("middle")&&(s=Il(s,"onMouseup")),a.length&&(o=ke(n.helper(ju),[o,JSON.stringify(a)])),l.length&&(!ze(s)||qu(s.content))&&(o=ke(n.helper(Uu),[o,JSON.stringify(l)])),u.length){const f=u.map(gn).join("");s=ze(s)?le(`${s.content}${f}`,!0):ht(["(",s,`) + "${f}"`])}return{props:[Ie(s,o)]}}),ig=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Tt(59,i)),{props:[],needRuntime:n.helper(Ku)}},sg=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(t.onError(Tt(61,e.loc)),t.removeNode())},og=[Jh],lg={cloak:Kh,html:Yh,text:Qh,model:Xh,on:rg,show:ig};function ag(e,t={}){return Uh(e,he({},qh,t,{nodeTransforms:[sg,...og,...t.nodeTransforms||[]],directiveTransforms:he({},lg,t.directiveTransforms||{}),transformHoist:null}))}const Ol=Object.create(null);function ug(e,t){if(!oe(e))if(e.nodeType)e=e.innerHTML;else return Ue;const n=e,r=Ol[n];if(r)return r;if(e[0]==="#"){const l=document.querySelector(e);e=l?l.innerHTML:""}const i=he({hoistStatic:!0,onError:void 0,onWarn:Ue},t);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=l=>!!customElements.get(l));const{code:s}=ag(e,i),o=new Function("Vue",s)(gp);return o._rc=!0,Ol[n]=o}xa(ug);function Eo(e){return(Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function kl(e){return function(t){if(Array.isArray(t))return vs(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Ju(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ju(e,t){if(e){if(typeof e=="string")return vs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vs(e,t):void 0}}function vs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{o||n.return==null||n.return()}finally{if(l)throw s}}}}var bs={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(e,t){var n=Qe(null);return $n(function(){e.autofocus&&n.value.focus()}),yr(function(){e.autofocus&&n.value.focus()}),{handleInput:function(r){t.emit("input",r),t.emit("update:modelValue",r.target.value)},handleChange:function(r){t.emit("change",r),t.emit("update:modelValue",r.target.value)},handleFocus:function(r){t.emit("focus",r)},handleBlur:function(r){t.emit("blur",r)},input:n,handleEscape:function(r){n.value.blur(),t.emit("escape",r)}}}},cg={class:"vue-input"},fg=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];bs.render=function(e,t,n,r,i,s){return Ae(),je("div",cg,[ot(e.$slots,"prepend"),Oe("input",{ref:"input",autocomplete:n.autocomplete,modelValue:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onInput:t[0]||(t[0]=function(){return r.handleInput&&r.handleInput.apply(r,arguments)}),onChange:t[1]||(t[1]=function(){return r.handleChange&&r.handleChange.apply(r,arguments)}),onFocus:t[2]||(t[2]=function(){return r.handleFocus&&r.handleFocus.apply(r,arguments)}),onBlur:t[3]||(t[3]=function(){return r.handleBlur&&r.handleBlur.apply(r,arguments)}),onKeyup:t[4]||(t[4]=Zt(st(function(){return r.handleEscape&&r.handleEscape.apply(r,arguments)},["exact"]),["esc"])),tabindex:n.tabindex,autofocus:n.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(n.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(n.comboboxUid,"-combobox")},null,40,fg),ot(e.$slots,"append")])},bs.__file="src/components/input.vue";var _s={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Eo(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(e,t){return{dataAttrs:rn("dataAttrs"),handleClick:function(n){t.emit("click",n)}}}};_s.render=function(e,t,n,r,i,s){return Ae(),je("ul",vr({class:["vue-tags",{collapsed:n.collapseTags}],onMousedown:t[0]||(t[0]=st(function(){},["prevent"])),tabindex:"-1",onClick:t[1]||(t[1]=function(){return r.handleClick&&r.handleClick.apply(r,arguments)})},r.dataAttrs),[(Ae(!0),je(Se,null,Ws(n.modelValue,function(o){return Ae(),je(Se,{key:o.key},[o.group?Xt("v-if",!0):(Ae(),je("li",{key:0,class:wt(["vue-tag",{selected:o.selected}])},[ot(e.$slots,"default",{option:o},function(){return[Oe("span",null,Xn(o.label),1)]})],2))],64)}),128))],16)},_s.__file="src/components/tags.vue";var Es={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Eo(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(e,t){return{dataAttrs:rn("dataAttrs"),handleClickItem:function(n,r){r.disabled||t.emit("click-item",n,r)},handleMouseenter:function(n,r){t.emit("mouseenter",n,r)}}}},dg=["id","aria-multiselectable","aria-busy","aria-disabled"],pg=["onClick","onMouseenter","id","aria-selected","aria-disabled"];Es.render=function(e,t,n,r,i,s){return Ae(),je("ul",vr({class:"vue-dropdown",style:{maxHeight:n.maxHeight+"px"},onMousedown:t[0]||(t[0]=st(function(){},["prevent"]))},r.dataAttrs,{role:"listbox",id:"vs".concat(n.comboboxUid,"-listbox"),"aria-multiselectable":r.dataAttrs["data-multiple"],"aria-busy":r.dataAttrs["data-loading"],"aria-disabled":r.dataAttrs["data-disabled"]}),[(Ae(!0),je(Se,null,Ws(n.modelValue,function(o,l){return Ae(),je(Se,{key:o.key},[o.visible&&o.hidden===!1?(Ae(),je("li",{key:0,onClick:function(a){return r.handleClickItem(a,o)},class:wt(["vue-dropdown-item",{selected:o.selected,disabled:o.disabled,highlighted:o.originalIndex===n.highlightedOriginalIndex,group:o.group}]),onMouseenter:function(a){return r.handleMouseenter(a,o)},role:"option",id:"vs".concat(n.comboboxUid,"-option-").concat(l),"aria-selected":!!o.selected||!!o.disabled&&void 0,"aria-disabled":o.disabled},[ot(e.$slots,"default",{option:o},function(){return[Oe("span",null,Xn(o.label),1)]})],42,pg)):Xt("v-if",!0)],64)}),128))],16,dg)},Es.__file="src/components/dropdown.vue";var Zu=function(e,t,n){var r=n.valueBy;return r(e)===r(t)},En=function(e,t,n){var r=n.valueBy;return e.some(function(i){return Zu(i,t,{valueBy:r})})},Wt=function(e,t,n){var r=n.valueBy;return e.find(function(i){return r(i)===t})},Ki=function(e,t,n){var r=n.max,i=n.valueBy;return En(e,t,{valueBy:i})||e.length>=r?e:e.concat(t)},Wi=function(e,t,n){var r=n.min,i=n.valueBy;return En(e,t,{valueBy:i})===!1||e.length<=r?e:e.filter(function(s){return Zu(s,t,{valueBy:i})===!1})},Dr=function(e){return Ne(function(){return typeof e.value=="function"?e.value:typeof e.value=="string"?function(t){return e.value.split(".").reduce(function(n,r){return n[r]},t)}:function(t){return t}})},hg=function(e,t){var n=Ne(function(){return e.value.reduce(function(o,l){return Object.assign(o,(a={},u=l.originalIndex,f=l,u in a?Object.defineProperty(a,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[u]=f,a));var a,u,f},{})}),r=function(o){var l=n.value[o];return l!==void 0&&i(l)!==!1&&(t.value=o,!0)},i=function(o){return!o.disabled&&!o.hidden&&o.visible},s=Ne(function(){return e.value.some(function(o){return i(o)})});return Et(function(){if(s.value===!1&&(t.value=null),t.value!==null&&e.value.length<=t.value){var o,l=Yt(e.value.reverse());try{for(l.s();!(o=l.n()).done;){var a=o.value;if(r(a.originalIndex))break}}catch(m){l.e(m)}finally{l.f()}}if(t.value===null||i(e.value[t.value])===!1){var u,f=Yt(e.value);try{for(f.s();!(u=f.n()).done;){var d=u.value;if(r(d.originalIndex))break}}catch(m){f.e(m)}finally{f.f()}}}),{pointerForward:function(){if(s.value!==!1&&t.value!==null)for(var o=t.value+1,l=0;o!==t.value&&l++o.value.$el.clientHeight+o.value.$el.scrollTop&&Z++n.min,"data-total-length":n.options.length,"data-multiple":e.multiple,"data-loading":e.loading,"data-disabled":e.disabled}});Vs("dataAttrs",X);var Te=Ne(function(){return v.value.filter(function(M){return M.selected}).filter(function(M){return!M.group})}),_e=Ne(function(){return e.multiple?Te.value.length===0?e.placeholder:Te.value.length===1?"1 option selected":Te.value.length+" options selected":Te.value.length===0?e.placeholder:Te.value[0].label+""}),z=Ne(function(){var M=Te.value.map(function(L){return L.originalOption});return e.multiple?M:M[0]||r.value}),ge=Qe();return ft(function(){return[e.openDirection,u.value]},function(){var M,L;ge.value=(L=(M=e.openDirection)!==null&&M!==void 0?M:function(){if(s.value!==void 0&&window!==void 0)return window.innerHeight-s.value.getBoundingClientRect().bottom>=e.maxHeight?"bottom":"top"}())!==null&&L!==void 0?L:"bottom"},{immediate:!0}),{instance:i,isFocusing:u,wrapper:s,dropdown:o,input:l,focus:f,blur:d,toggle:function(){u.value?d():f()},searchingInputValue:m,handleInputForInput:function(M){t.emit("search:input",M)},handleChangeForInput:function(M){t.emit("search:change",M)},handleFocusForInput:function(M){f()},handleBlurForInput:function(M){d()},optionsWithInfo:v,addOrRemoveOption:function(M,L){e.disabled||(L.group&&e.multiple?F(M,L):x(M,L),K(),e.closeOnSelect===!0&&(u.value=!1),e.clearOnSelect===!0&&m.value&&N())},dataAttrs:X,innerPlaceholder:_e,selected:z,highlightedOriginalIndex:p,pointerForward:function(){w(),Ft(te)},pointerBackward:function(){R(),Ft(te)},pointerFirst:function(){var M,L=Yt(n.options.keys());try{for(L.s();!(M=L.n()).done;){var Z=M.value;if(A(Z))break}}catch(G){L.e(G)}finally{L.f()}Ft(te)},pointerLast:function(){var M,L=Yt(kl(n.options.keys()).reverse());try{for(L.s();!(M=L.n()).done;){var Z=M.value;if(A(Z))break}}catch(G){L.e(G)}finally{L.f()}Ft(te)},typeAhead:function(M){var L,Z;if(!e.searchable){var G=!1;if(ee.test(M.key)?(ne+=M.key.toLowerCase(),G=!0):M.code==="Space"&&(ne+=" "),G){var de,H=Yt(j.value);try{for(H.s();!(de=H.n()).done;){var ie=de.value;if(((Z=(L=n.labelBy(n.options[ie]))===null||L===void 0?void 0:L.toLowerCase())===null||Z===void 0?void 0:Z.startsWith(ne))===!0&&A(ie))break}}catch(ae){H.e(ae)}finally{H.f()}clearTimeout(S),S=setTimeout(function(){ne=""},500)}}},pointerSet:A,direction:ge}},components:{VInput:bs,VTags:_s,VDropdown:Es}});Cs.__VERSION__="2.10.5";var gg=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],mg={class:"vue-select-header"},yg={key:0,class:"vue-input"},vg=["placeholder","autocomplete"],bg=["onClick"],_g=Oe("span",{class:"icon loading"},[Oe("div"),Oe("div"),Oe("div")],-1),Eg={key:0,class:"vue-select-input-wrapper"},Cg=Oe("span",{class:"icon loading"},[Oe("div"),Oe("div"),Oe("div")],-1);Cs.render=function(e,t,n,r,i,s){var o=Vr("v-tags"),l=Vr("v-input"),a=Vr("v-dropdown");return Ae(),je("div",vr({ref:"wrapper",class:["vue-select",["direction-".concat(e.direction)]],tabindex:e.isFocusing?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return e.focus&&e.focus.apply(e,arguments)}),onBlur:t[10]||(t[10]=function(u){return!e.searchable&&e.blur(u)})},Object.assign({},e.dataAttrs,e.$attrs),{onKeypress:t[11]||(t[11]=Zt(st(function(){return e.highlightedOriginalIndex!==null&&e.addOrRemoveOption(e.$event,e.optionsWithInfo[e.highlightedOriginalIndex])},["prevent","exact"]),["enter"])),onKeydown:[t[12]||(t[12]=Zt(st(function(){return e.pointerForward&&e.pointerForward.apply(e,arguments)},["prevent","exact"]),["down"])),t[13]||(t[13]=Zt(st(function(){return e.pointerBackward&&e.pointerBackward.apply(e,arguments)},["prevent","exact"]),["up"])),t[14]||(t[14]=Zt(st(function(){return e.pointerFirst&&e.pointerFirst.apply(e,arguments)},["prevent","exact"]),["home"])),t[15]||(t[15]=Zt(st(function(){return e.pointerLast&&e.pointerLast.apply(e,arguments)},["prevent","exact"]),["end"])),t[16]||(t[16]=function(){return e.typeAhead&&e.typeAhead.apply(e,arguments)})],id:"vs".concat(e.instance.uid,"-combobox"),role:e.searchable?"combobox":null,"aria-expanded":e.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(e.instance.uid,"-listbox"),"aria-activedescendant":e.highlightedOriginalIndex===null?null:"vs".concat(e.instance.uid,"-option-").concat(e.highlightedOriginalIndex),"aria-busy":e.loading,"aria-disabled":e.disabled}),[Oe("div",mg,[e.multiple&&e.taggable&&e.modelValue.length===0||e.searchable===!1&&e.taggable===!1?(Ae(),je("div",yg,[ot(e.$slots,"label",{selected:e.selected},function(){return[Oe("input",{placeholder:e.innerPlaceholder,autocomplete:e.autocomplete,readonly:"",onClick:t[0]||(t[0]=function(){return e.focus&&e.focus.apply(e,arguments)})},null,8,vg)]})])):Xt("v-if",!0),e.multiple&&e.taggable?(Ae(),je(Se,{key:1},[ve(o,{modelValue:e.optionsWithInfo,"collapse-tags":e.collapseTags,tabindex:"-1",onClick:e.focus},{default:ir(function(u){var f=u.option;return[ot(e.$slots,"tag",{option:f.originalOption,remove:function(){return e.addOrRemoveOption(e.$event,f)}},function(){return[Oe("span",null,Xn(f.label),1),Oe("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:st(function(){return e.addOrRemoveOption(e.$event,f)},["prevent","stop"])},null,8,bg)]})]}),_:3},8,["modelValue","collapse-tags","onClick"]),ot(e.$slots,"toggle",{isFocusing:e.isFocusing,toggle:e.toggle},function(){return[Oe("span",{class:wt(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[1]||(t[1]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[2]||(t[2]=st(function(){},["prevent","stop"]))},null,34)]})],64)):(Ae(),je(Se,{key:2},[e.searchable?(Ae(),wi(l,{key:0,ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[3]||(t[3]=function(u){return e.searchingInputValue=u}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):Xt("v-if",!0),e.loading?ot(e.$slots,"loading",{key:1},function(){return[_g]}):ot(e.$slots,"toggle",{key:2,isFocusing:e.isFocusing,toggle:e.toggle},function(){return[Oe("span",{class:wt(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[4]||(t[4]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[5]||(t[5]=st(function(){},["prevent","stop"]))},null,34)]})],64))]),e.multiple&&e.taggable&&e.searchable?(Ae(),je("div",Eg,[ya(ve(l,{ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[6]||(t[6]=function(u){return e.searchingInputValue=u}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[eo,e.isFocusing]]),e.loading?ot(e.$slots,"loading",{key:0},function(){return[Cg]}):Xt("v-if",!0)])):Xt("v-if",!0),ve(a,{ref:"dropdown",modelValue:e.optionsWithInfo,"onUpdate:modelValue":t[7]||(t[7]=function(u){return e.optionsWithInfo=u}),onClickItem:e.addOrRemoveOption,onMouseenter:t[8]||(t[8]=function(u,f){return e.pointerSet(f.originalIndex)}),comboboxUid:e.instance.uid,maxHeight:e.maxHeight,highlightedOriginalIndex:e.highlightedOriginalIndex},{default:ir(function(u){var f=u.option;return[ot(e.$slots,"dropdown-item",{option:f.originalOption},function(){return[Oe("span",null,Xn(f.label),1)]})]}),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,gg)},Cs.__file="src/index.vue";var Sg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ui={},Tg={get exports(){return ui},set exports(e){ui=e}};/* @license +Papa Parse +v5.3.2 +https://github.com/mholt/PapaParse +License: MIT +*/(function(e,t){(function(n,r){e.exports=r()})(Sg,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i=!r.document&&!!r.postMessage,s=i&&/blob:/i.test((r.location||{}).protocol),o={},l=0,a={parse:function(c,p){var v=(p=p||{}).dynamicTyping||!1;if(N(v)&&(p.dynamicTypingFunction=v,v={}),p.dynamicTyping=v,p.transform=!!N(p.transform)&&p.transform,p.worker&&a.WORKERS_SUPPORTED){var T=function(){if(!a.WORKERS_SUPPORTED)return!1;var R=(ne=r.URL||r.webkitURL||null,ee=n.toString(),a.BLOB_URL||(a.BLOB_URL=ne.createObjectURL(new Blob(["(",ee,")();"],{type:"text/javascript"})))),A=new r.Worker(R),ne,ee;return A.onmessage=y,A.id=l++,o[A.id]=A}();return T.userStep=p.step,T.userChunk=p.chunk,T.userComplete=p.complete,T.userError=p.error,p.step=N(p.step),p.chunk=N(p.chunk),p.complete=N(p.complete),p.error=N(p.error),delete p.worker,void T.postMessage({input:c,config:p,workerId:T.id})}var w=null;return a.NODE_STREAM_INPUT,typeof c=="string"?w=p.download?new d(p):new b(p):c.readable===!0&&N(c.read)&&N(c.on)?w=new O(p):(r.File&&c instanceof File||c instanceof Object)&&(w=new m(p)),w.stream(c)},unparse:function(c,p){var v=!1,T=!0,w=",",R=`\r +`,A='"',ne=A+A,ee=!1,j=null,te=!1;(function(){if(typeof p=="object"){if(typeof p.delimiter!="string"||a.BAD_DELIMITERS.filter(function(z){return p.delimiter.indexOf(z)!==-1}).length||(w=p.delimiter),(typeof p.quotes=="boolean"||typeof p.quotes=="function"||Array.isArray(p.quotes))&&(v=p.quotes),typeof p.skipEmptyLines!="boolean"&&typeof p.skipEmptyLines!="string"||(ee=p.skipEmptyLines),typeof p.newline=="string"&&(R=p.newline),typeof p.quoteChar=="string"&&(A=p.quoteChar),typeof p.header=="boolean"&&(T=p.header),Array.isArray(p.columns)){if(p.columns.length===0)throw new Error("Option columns is empty");j=p.columns}p.escapeChar!==void 0&&(ne=p.escapeChar+A),(typeof p.escapeFormulae=="boolean"||p.escapeFormulae instanceof RegExp)&&(te=p.escapeFormulae instanceof RegExp?p.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var X=new RegExp(B(A),"g");if(typeof c=="string"&&(c=JSON.parse(c)),Array.isArray(c)){if(!c.length||Array.isArray(c[0]))return Te(null,c,ee);if(typeof c[0]=="object")return Te(j||Object.keys(c[0]),c,ee)}else if(typeof c=="object")return typeof c.data=="string"&&(c.data=JSON.parse(c.data)),Array.isArray(c.data)&&(c.fields||(c.fields=c.meta&&c.meta.fields||j),c.fields||(c.fields=Array.isArray(c.data[0])?c.fields:typeof c.data[0]=="object"?Object.keys(c.data[0]):[]),Array.isArray(c.data[0])||typeof c.data[0]=="object"||(c.data=[c.data])),Te(c.fields||[],c.data||[],ee);throw new Error("Unable to serialize unrecognized input");function Te(z,ge,M){var L="";typeof z=="string"&&(z=JSON.parse(z)),typeof ge=="string"&&(ge=JSON.parse(ge));var Z=Array.isArray(z)&&0=this._config.preview;if(s)r.postMessage({results:R,workerId:a.WORKER_ID,finished:ne});else if(N(this._config.chunk)&&!v){if(this._config.chunk(R,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);R=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(R.data),this._completeResults.errors=this._completeResults.errors.concat(R.errors),this._completeResults.meta=R.meta),this._completed||!ne||!N(this._config.complete)||R&&R.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),ne||R&&R.meta.paused||this._nextChunk(),R}this._halted=!0},this._sendError=function(p){N(this._config.error)?this._config.error(p):s&&this._config.error&&r.postMessage({workerId:a.WORKER_ID,error:p,finished:!1})}}function d(c){var p;(c=c||{}).chunkSize||(c.chunkSize=a.RemoteChunkSize),f.call(this,c),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(v){this._input=v,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(p=new XMLHttpRequest,this._config.withCredentials&&(p.withCredentials=this._config.withCredentials),i||(p.onload=K(this._chunkLoaded,this),p.onerror=K(this._chunkError,this)),p.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var v=this._config.downloadRequestHeaders;for(var T in v)p.setRequestHeader(T,v[T])}if(this._config.chunkSize){var w=this._start+this._config.chunkSize-1;p.setRequestHeader("Range","bytes="+this._start+"-"+w)}try{p.send(this._config.downloadRequestBody)}catch(R){this._chunkError(R.message)}i&&p.status===0&&this._chunkError()}},this._chunkLoaded=function(){p.readyState===4&&(p.status<200||400<=p.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:p.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(v){var T=v.getResponseHeader("Content-Range");return T===null?-1:parseInt(T.substring(T.lastIndexOf("/")+1))}(p),this.parseChunk(p.responseText)))},this._chunkError=function(v){var T=p.statusText||v;this._sendError(new Error(T))}}function m(c){var p,v;(c=c||{}).chunkSize||(c.chunkSize=a.LocalChunkSize),f.call(this,c);var T=typeof FileReader<"u";this.stream=function(w){this._input=w,v=w.slice||w.webkitSlice||w.mozSlice,T?((p=new FileReader).onload=K(this._chunkLoaded,this),p.onerror=K(this._chunkError,this)):p=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(w.target.result)},this._chunkError=function(){this._sendError(p.error)}}function b(c){var p;f.call(this,c=c||{}),this.stream=function(v){return p=v,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var v,T=this._config.chunkSize;return T?(v=p.substring(0,T),p=p.substring(T)):(v=p,p=""),this._finished=!p,this.parseChunk(v)}}}function O(c){f.call(this,c=c||{});var p=[],v=!0,T=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(w){this._input=w,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){T&&p.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),p.length?this.parseChunk(p.shift()):v=!0},this._streamData=K(function(w){try{p.push(typeof w=="string"?w:w.toString(this._config.encoding)),v&&(v=!1,this._checkIsFinished(),this.parseChunk(p.shift()))}catch(R){this._streamError(R)}},this),this._streamError=K(function(w){this._streamCleanUp(),this._sendError(w)},this),this._streamEnd=K(function(){this._streamCleanUp(),T=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function C(c){var p,v,T,w=Math.pow(2,53),R=-w,A=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,ne=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,ee=this,j=0,te=0,X=!1,Te=!1,_e=[],z={data:[],errors:[],meta:{}};if(N(c.step)){var ge=c.step;c.step=function(H){if(z=H,Z())L();else{if(L(),z.data.length===0)return;j+=H.data.length,c.preview&&j>c.preview?v.abort():(z.data=z.data[0],ge(z,ee))}}}function M(H){return c.skipEmptyLines==="greedy"?H.join("").trim()==="":H.length===1&&H[0].length===0}function L(){return z&&T&&(de("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),T=!1),c.skipEmptyLines&&(z.data=z.data.filter(function(H){return!M(H)})),Z()&&function(){if(!z)return;function H(ae,h){N(c.transformHeader)&&(ae=c.transformHeader(ae,h)),_e.push(ae)}if(Array.isArray(z.data[0])){for(var ie=0;Z()&&ie=_e.length?"__parsed_extra":_e[g]),c.transform&&(I=c.transform(I,k)),I=G(k,I),k==="__parsed_extra"?(E[k]=E[k]||[],E[k].push(I)):E[k]=I}return c.header&&(g>_e.length?de("FieldMismatch","TooManyFields","Too many fields: expected "+_e.length+" fields but parsed "+g,te+h):g<_e.length&&de("FieldMismatch","TooFewFields","Too few fields: expected "+_e.length+" fields but parsed "+g,te+h)),E}var ie=1;return!z.data.length||Array.isArray(z.data[0])?(z.data=z.data.map(H),ie=z.data.length):z.data=H(z.data,0),c.header&&z.meta&&(z.meta.fields=_e),te+=ie,z}()}function Z(){return c.header&&_e.length===0}function G(H,ie){return ae=H,c.dynamicTypingFunction&&c.dynamicTyping[ae]===void 0&&(c.dynamicTyping[ae]=c.dynamicTypingFunction(ae)),(c.dynamicTyping[ae]||c.dynamicTyping)===!0?ie==="true"||ie==="TRUE"||ie!=="false"&&ie!=="FALSE"&&(function(h){if(A.test(h)){var g=parseFloat(h);if(R=U.length/2?`\r +`:"\r"}(H,h)),T=!1,c.delimiter)N(c.delimiter)&&(c.delimiter=c.delimiter(H),z.meta.delimiter=c.delimiter);else{var g=function(k,I,$,U,D){var V,P,J,W;D=D||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Y=0;Y=A)return W(!0)}else for(I=j,j++;;){if((I=X.indexOf(p,I+1))===-1)return _e||de.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:G.length,index:j}),P();if(I===z-1)return P(X.substring(j,I).replace(k,p));if(p!==ee||X[I+1]!==ee){if(p===ee||I===0||X[I-1]!==ee){g!==-1&&g=A)return W(!0);break}de.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:G.length,index:j}),I++}}else I++}return P();function D(Q){G.push(Q),ie=j}function V(Q){var se=0;if(Q!==-1){var ue=X.substring(I+1,Q);ue&&ue.trim()===""&&(se=ue.length)}return se}function P(Q){return _e||(Q===void 0&&(Q=X.substring(j)),H.push(Q),j=z,D(H),Z&&Y()),W()}function J(Q){j=Q,D(H),H=[],E=X.indexOf(T,j)}function W(Q){return{data:G,errors:de,meta:{delimiter:v,linebreak:T,aborted:te,truncated:!!Q,cursor:ie+(Te||0)}}}function Y(){R(W()),G=[],de=[]}},this.abort=function(){te=!0},this.getCharIndex=function(){return j}}function y(c){var p=c.data,v=o[p.workerId],T=!1;if(p.error)v.userError(p.error,p.file);else if(p.results&&p.results.data){var w={abort:function(){T=!0,S(p.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:F,resume:F};if(N(v.userStep)){for(var R=0;R{try{const n=new Blob([e],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.id=`csv-${parseInt(Math.random().toString().slice(2,16))}`,i.href=r,document.body.appendChild(i);const s=document.getElementById(i.id);return s.style.visibility="hidden",s.download=`${t}.csv`,s.click(),setTimeout(()=>{document.body.removeChild(i)},1),!0}catch{return!1}},kg=e=>e.map(t=>JSON.stringify(t)).reduce((t,n)=>(t.find(r=>r===n)||t.push(n),t),[]).map(t=>JSON.parse(t)),Ng={install(e,t){const n={download:Og,dedupe:kg},r=Object.entries(Ig).reduce((s,[o,l])=>(s[o]=l,s),{}),i=Object.assign(r,n);"config"in e&&"globalProperties"in e.config?e.config.globalProperties.$papa=i:e.prototype.$papa=i}};export{Se as F,Ng as V,Cs as Y,Ae as a,je as b,Ne as c,Oe as d,ya as e,Re as f,Ws as g,Xr as h,rn as i,st as j,eo as k,Xt as l,wt as m,Ft as n,$n as o,wi as p,ir as q,Qe as r,Zs as s,Xn as t,Yl as u,tu as v,ft as w,Xs as x,dp as y}; diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..d5873a2 --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,13 @@ +{ + "_vendor-f73869ed.js": { + "file": "assets/vendor-f73869ed.js" + }, + "gamutable.js": { + "file": "assets/gamutable-559fdd12.js", + "imports": [ + "_vendor-f73869ed.js" + ], + "isEntry": true, + "src": "gamutable.js" + } +} \ No newline at end of file diff --git a/formulaires/configurer_gamutable.html b/formulaires/configurer_gamutable.html index 6058d71..f897043 100644 --- a/formulaires/configurer_gamutable.html +++ b/formulaires/configurer_gamutable.html @@ -9,24 +9,20 @@
#ACTION_FORMULAIRE
- #SET{name,version_js} + #SET{name,charger_modalbox} #SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}} - #SET{obli,"obligatoire"}
+
- - -

js/vue.min.js - 92ko (sans le debug)

-
-
- - -

js/vue.js - 276ko

+ + +

Si un lien à la classe .modalbox, ouvre l'url dans une modale

+

 

diff --git a/gamutable_fonctions.php b/gamutable_fonctions.php index cd4952f..8565364 100644 --- a/gamutable_fonctions.php +++ b/gamutable_fonctions.php @@ -9,47 +9,124 @@ * @package SPIP\Gamutable\Fonctions */ -if (!defined('_ECRIRE_INC_VERSION')) { +if (!defined("_ECRIRE_INC_VERSION")) { return; } +include_spip("inc/vite"); +/** + * fonction pour forcer un hit pour un objet + * un hit => maj de champ maj + * + * @param string $objet + * @param int $id_objet + * @param string $table (optional) pour forcer sur une table spécifique ou le test se fait sur la cle primaire de $objet + * si $table est renseigné : ex : + * $objet = rubrique + * $id_objet = 4 + * $table = 'spip_articles' + * => le hit sur l'id_rubrique 4 de spip_articles + * + * @return void [TODO:description] + */ +function forcer_hit(string $objet, int $id_objet, string $table = null):void { + include_spip('inc/invalideur'); + $id = id_table_objet($objet); + if (!$table) { + $table = table_objet_sql($objet); + } else { + $id_c = id_table_objet($table); + suivre_invalideur("id='$id_c/1'"); + } + sql_updateq($table, ['maj' => date("Y-m-d H:i:s")], "$id=".$id_objet); + suivre_invalideur("id='$id/1'"); +} + +if (!function_exists('tsEnDate')) { + /** + * retour la date d'un timestamp + * + * @param $ts + * + * @return string + */ + function tsEnDate($ts) { + $ts = intval($ts); + return date('Y-m-d H:i:s', $ts); + } +} + +function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) { + if ($num) { + $num = "_deux"; + } -function gamutable_fermer_modalbox($id_objet = 9999999999){ $html = << id = "$id_objet"; - id = parseInt(id); - if (id > 0 && id < 9999999999) { + if (id === 'maj' || !id) { if (typeof app !== 'undefined') { app.rechargerJson(id); } - $.modalboxclose(); - } - if (id === 9999999999) { - if (typeof app !== 'undefined') { - app.rechargerJson(); + if (typeof app_deux !== 'undefined') { + app_deux.rechargerJson(id); + } + } else { + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); + } + } + if (id === 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); + } } - $.modalboxclose(); } + $.modalboxclose(); delete id; EOJS; return $html; } -function gamutable_recharger_tableau($id_objet = 9999999999){ +/** + * fonction que l'on peut appeler comme filtre dans une vues des crayons + * ex: + * [(#ID_APP_HORAIRE|gamutable_recharger_tableau)] + * + * @param $id_objet (optional) + * @param $num (optional) (si on veut recharger qu'un tableau préciséemnt) + * + * @return string $html + */ +function gamutable_recharger_tableau($id_objet = 9999999999, $num = null):string { + if ($num) { + $num = "_deux"; + } + $html = << id = "$id_objet"; - id = parseInt(id); - if (id > 0 && id < 9999999999) { + if (id === 'maj' || !id) { if (typeof app !== 'undefined') { app.rechargerJson(id); } - } - if (id === 9999999999) { - if (typeof app !== 'undefined') { - app.rechargerJson(); + if (typeof app_deux !== 'undefined') { + app_deux.rechargerJson(id); + } + } else { + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); + } + } + if (id === 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); + } } } delete id; diff --git a/gamutable_pipelines.php b/gamutable_pipelines.php index ce403bf..ebec4a9 100644 --- a/gamutable_pipelines.php +++ b/gamutable_pipelines.php @@ -52,11 +52,11 @@ function gamutable_crayons_vue_affichage_final($flux){ $objet = $flux['args']['type']; if ( $id = intval($id) - and (!empty($GLOBALS['gamutable_rechargerJson_all']) and !in_array($objet, $GLOBALS['gamutable_rechargerJson_all'])) + and !in_array($objet, $GLOBALS['gamutable_rechargerJson_all'] ?? []) ) { - $flux['data'] .= ' '; + $flux['data'] .= ' '; } else { - $flux['data'] .= ' '; + $flux['data'] .= ' '; } return $flux; diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 69062f3..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,142 +0,0 @@ -const { src, dest, series, parallel, watch } = require('gulp'); -const gulpSass = require('gulp-sass')(require('sass')); -const sourcemaps = require('gulp-sourcemaps'); -const postcss = require('gulp-postcss'); -const autoprefixer = require('autoprefixer'); -const CombineMQ = require('postcss-combine-media-query'); -const notify = require('gulp-notify'); -const concat = require('gulp-concat'); -const uglify = require('gulp-uglify'); -const babel = require('gulp-babel'); -const rename = require('gulp-regex-rename'); - -const CSSnano = require('cssnano'); - -// const unuse = require('postcss-uncss'); //https://github.com/uncss/postcss-uncss - -/* - * SASS$ - */ -function sass() { - return src(['css/**/*.scss']) - .pipe(sourcemaps.init()) - .pipe( - gulpSass({ - outputStyle: 'expanded', - }) - ) - .on('error', (err) => notify().write(err)) - .pipe( - postcss([ - CombineMQ, // rassemble les Media Queries (parfait pour les classes utilitaires) - autoprefixer, // ajoute les préfixes vendeurs - // CSSnano, // minification - ]) - ) - .pipe(sourcemaps.write('.')) // initialize sourcemaps first - .pipe(dest('css')); -} - -/* - * JS -> concat + babel - */ -function jsConcatMinif() { - console.log('ok'); - return ( - src(['./js/a_compresser/*.js']) - .pipe(sourcemaps.init()) - .pipe( - babel({ - presets: ['@babel/preset-env'], - }) - ) - .pipe(concat('mon_site.min.js', { newLine: ';' })) - // SPECIFIQUE DEV: ne pas compacter le JS - // .pipe(uglify()) - .pipe(sourcemaps.write('.')) - .pipe(dest('./js')) - ); -} - -/* - * JS -> babel - */ -function jsBabel() { - return src(['js/**/*.es6.js']) - .pipe( - babel({ - presets: ['@babel/preset-env'], - }) - ) - .pipe(rename(/\.es6/, '')) - .pipe(dest('./js')); -} - -/* - * Les Watchers - */ -function watcherSass() { - watch('css/**/*.scss', { ignoreInitial: false }, sass).on('change', function () { - notify('CSS -> SCSS ==> OK').write(''); - }); -} - -function watcherJsConcatMinif() { - watch('./js/a_compresser/*.js', { ignoreInitial: false }, jsConcatMinif).on('change', function () { - notify('JS (concat) ==> OK').write(''); - }); -} - -function watcherJsBabel() { - watch('./js/**/*.es6.js', { ignoreInitial: false }, jsBabel).on('change', function () { - notify('JS (babel) ==> OK').write(''); - }); -} - -/* - * SVG sprite - */ -// const gulpSvgSprite = require('gulp-svg-sprite'); -// const config = { -// shape: { -// spacing: { -// box: 'icon', -// }, -// }, -// mode: { -// symbol: { -// dest: '.', -// sprite: 'sprite_symbol_picto.svg', -// }, -// }, -// }; -// -// function svgSprite() { -// return ( -// src('svg/**/*.svg') -// .pipe(gulpSvgSprite(config)) -// .on('error', function (error) { -// console.log(error); -// }) -// .pipe(dest('img')) -// ); -// } - -/* - * SVG minifier - */ -// var svgmin = require('gulp-svgmin'); -// function svgMin() { -// return src('svg/*.svg').pipe(svgmin()).pipe(dest('./svgmin')); -// } - -/* - * Exports des fonctions - */ -module.exports = { - default: parallel(sass, jsConcatMinif, jsBabel), - sass: sass, - watch: parallel(watcherSass, watcherJsConcatMinif, watcherJsBabel), - // sprite: svgSprite, - // svgmin: svgMin, -}; diff --git a/inc/vite.php b/inc/vite.php new file mode 100644 index 0000000..afea007 --- /dev/null +++ b/inc/vite.php @@ -0,0 +1,147 @@ +'; +} + +function jsPreloadImports(string $entry): string +{ + if (isDev($entry)) { + return ""; + } + + $res = ""; + foreach (importsUrls($entry) as $url) { + $res .= ''; + } + return $res; +} + +function cssTag(string $entry): string +{ + // not needed on dev, it's inject by Vite + if (isDev($entry)) { + return ""; + } + + $tags = ""; + foreach (cssUrls($entry) as $url) { + $tags .= ''; + } + return $tags; +} + +// Helpers to locate files + +function getManifest(): array +{ + $urlManifest = find_in_path("dist/manifest.json"); + + $content = file_get_contents($urlManifest); + return json_decode($content, true); +} + +function assetUrl(string $entry): string +{ + $manifest = getManifest(); + + return isset($manifest[$entry]) + ? find_in_path("dist/" . $manifest[$entry]["file"]) + : ""; +} + +function importsUrls(string $entry): array +{ + $urls = []; + $manifest = getManifest(); + + if (!empty($manifest[$entry]["imports"])) { + foreach ($manifest[$entry]["imports"] as $imports) { + $urls[] = find_in_path("dist/" . $manifest[$imports]["file"]); + } + } + return $urls; +} + +function cssUrls(string $entry): array +{ + $urls = []; + $manifest = getManifest(); + + if (!empty($manifest[$entry]["css"])) { + foreach ($manifest[$entry]["css"] as $file) { + $urls[] = find_in_path("dist/" . $file); + } + } + return $urls; +} diff --git a/inclure/gamutable.html b/inclure/gamutable.html index 3d92ce9..eaeb56a 100644 --- a/inclure/gamutable.html +++ b/inclure/gamutable.html @@ -1,50 +1,72 @@ - - +[(#VAL{gamutable.js}|vite)] + + + + [(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})] [(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})] [(#SET{pdfuri,#VAL{pdf_gamutable}|generer_url_action{"", 1}})] -
-
-
+ +
+ +
[(#ENV{titregamutable})] - [(#REM) OLD pour compat] - [(#ENV{titreGamutableUn})] - +
+ +
-
+ +
-
- [(#ENV{titregamutable_deux})] - [(#REM) OLD pour compat] - [(#ENV{titreGamutableDeux})] - (#ENV{titregamutable_deux})] +
+ + filtreselect="[(#ENV{filtrer_deux,#ENV{filtrerselect_deux}})]" + trier="[(#ENV{trier_deux})]" + langpdf="[(#ENV{langpdf})]" + >
-[(#REM) - si dans l'env il y a un parametre _id=xxx, il sera récupéré pour selectionner cette ligne dans le gamutable - ajout de la classe: select sur le tr -] -[(#CONFIG{gamutable/version_js}|=={dev}|?{ - - - - - -, - - - - -})] + +[(#CONFIG{gamutable/charger_modalbox}|=={oui}|oui) + +] diff --git a/js/gamubox.js b/js/gamubox.js new file mode 100644 index 0000000..e271d66 --- /dev/null +++ b/js/gamubox.js @@ -0,0 +1,48 @@ +/* + * Pour parametrer la largeur : + * Indiquer le data-width sur le lien (exmeple data-width= "90") + * Imposer le style sur le premier bloc englobant dans la madiabox (style="width: [(#ENV{largeur})]) + */ +jQuery(function () { + modalbox(); + + function modalbox() { + $('body').on('click', '.modalbox, .modalgamutable', function (e) { + e.stopPropagation(); + e.preventDefault(); + let ts = + new Date() + let url = $(this).attr('href'); + url += '&var_zajax=content'; + url += '&ts=' + ts; + let data = {}; + let minHeight = $(this).data('minheight'); + let minWidth = $(this).data('minwidth'); + if (minHeight !== undefined) { + data.minHeight = minHeight; + } + if (minWidth !== undefined) { + data.minWidth = minWidth; + } + let width = $(this).data('width'); + if (width !== undefined) { + data.width = width; + let valeur_reduite = ($(window).width() * width) / 100; + url += '&largeur=' + valeur_reduite + 'px'; + } + + let that = this; + data.onShow = () => { + if (typeof charger_require !== undefined) { + charger_require(); + } + + if ($(that).hasClass('modalgamutable')) { + if (typeof window.gamutable !== 'undefined') { + window.gamutable(); + } + } + }; + $.modalbox(url, data); + }); + } +}); diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 5fcafaa..631bbbd 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -892,7 +892,7 @@ let monTableau = { v-show="this.namecsv" title="Exporter le tableau complet en csv" > - + \n\t\t\t\n\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tMise \xE0 jour de la base de donn\xE9e\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{tableau.length}} / {{table.length}} \xE9l\xE9ments\n\t\t\t \n\t\t
\n\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tX\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\n\t\t\t\t\t
\n\t\t
\n\t\t\t
{{tableau.length}} / {{table.length}} \xE9l\xE9ments
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
" -}; -var gamuTable = { - components: { - monTableau: monTableau - }, - methods: { - rechargerJson: function rechargerJson(id) { - var ajaxCrayons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - this.$refs.montableau.ajaxCrayons = ajaxCrayons; - this.$refs.montableau.chargerJson(id); - }, - rechargerJson_deux: function rechargerJson_deux(id) { - var ajaxCrayons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (this.$refs.montableau_deux) { - this.$refs.montableau_deux.ajaxCrayons = ajaxCrayons; - this.$refs.montableau_deux.chargerJson(id); - } - } - } -}; -var app = Vue.createApp(gamuTable).component('vue-select', window.VueNextSelect).mount('#app'); \ No newline at end of file diff --git a/js/papaparse.js b/js/papaparse.js deleted file mode 100644 index 70dedf0..0000000 --- a/js/papaparse.js +++ /dev/null @@ -1,1924 +0,0 @@ -/* @license -Papa Parse -v5.2.0 -https://github.com/mholt/PapaParse -License: MIT -*/ - -(function(root, factory) -{ - /* globals define */ - if (typeof define === 'function' && define.amd) - { - // AMD. Register as an anonymous module. - define([], factory); - } - else if (typeof module === 'object' && typeof exports !== 'undefined') - { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } - else - { - // Browser globals (root is window) - root.Papa = factory(); - } - // in strict mode we cannot access arguments.callee, so we need a named reference to - // stringify the factory method for the blob worker - // eslint-disable-next-line func-name -}(this, function moduleFactory() -{ - 'use strict'; - - var global = (function() { - // alternative method, similar to `Function('return this')()` - // but without using `eval` (which is disabled when - // using Content Security Policy). - - if (typeof self !== 'undefined') { return self; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - - // When running tests none of the above have been defined - return {}; - })(); - - - function getWorkerBlob() { - var URL = global.URL || global.webkitURL || null; - var code = moduleFactory.toString(); - return Papa.BLOB_URL || (Papa.BLOB_URL = URL.createObjectURL(new Blob(['(', code, ')();'], {type: 'text/javascript'}))); - } - - var IS_WORKER = !global.document && !!global.postMessage, - IS_PAPA_WORKER = IS_WORKER && /blob:/i.test((global.location || {}).protocol); - var workers = {}, workerIdCounter = 0; - - var Papa = {}; - - Papa.parse = CsvToJson; - Papa.unparse = JsonToCsv; - - Papa.RECORD_SEP = String.fromCharCode(30); - Papa.UNIT_SEP = String.fromCharCode(31); - Papa.BYTE_ORDER_MARK = '\ufeff'; - Papa.BAD_DELIMITERS = ['\r', '\n', '"', Papa.BYTE_ORDER_MARK]; - Papa.WORKERS_SUPPORTED = !IS_WORKER && !!global.Worker; - Papa.NODE_STREAM_INPUT = 1; - - // Configurable chunk sizes for local and remote files, respectively - Papa.LocalChunkSize = 1024 * 1024 * 10; // 10 MB - Papa.RemoteChunkSize = 1024 * 1024 * 5; // 5 MB - Papa.DefaultDelimiter = ','; // Used if not specified and detection fails - - // Exposed for testing and development only - Papa.Parser = Parser; - Papa.ParserHandle = ParserHandle; - Papa.NetworkStreamer = NetworkStreamer; - Papa.FileStreamer = FileStreamer; - Papa.StringStreamer = StringStreamer; - Papa.ReadableStreamStreamer = ReadableStreamStreamer; - if (typeof PAPA_BROWSER_CONTEXT === 'undefined') { - Papa.DuplexStreamStreamer = DuplexStreamStreamer; - } - - if (global.jQuery) - { - var $ = global.jQuery; - $.fn.parse = function(options) - { - var config = options.config || {}; - var queue = []; - - this.each(function(idx) - { - var supported = $(this).prop('tagName').toUpperCase() === 'INPUT' - && $(this).attr('type').toLowerCase() === 'file' - && global.FileReader; - - if (!supported || !this.files || this.files.length === 0) - return true; // continue to next input element - - for (var i = 0; i < this.files.length; i++) - { - queue.push({ - file: this.files[i], - inputElem: this, - instanceConfig: $.extend({}, config) - }); - } - }); - - parseNextFile(); // begin parsing - return this; // maintains chainability - - - function parseNextFile() - { - if (queue.length === 0) - { - if (isFunction(options.complete)) - options.complete(); - return; - } - - var f = queue[0]; - - if (isFunction(options.before)) - { - var returned = options.before(f.file, f.inputElem); - - if (typeof returned === 'object') - { - if (returned.action === 'abort') - { - error('AbortError', f.file, f.inputElem, returned.reason); - return; // Aborts all queued files immediately - } - else if (returned.action === 'skip') - { - fileComplete(); // parse the next file in the queue, if any - return; - } - else if (typeof returned.config === 'object') - f.instanceConfig = $.extend(f.instanceConfig, returned.config); - } - else if (returned === 'skip') - { - fileComplete(); // parse the next file in the queue, if any - return; - } - } - - // Wrap up the user's complete callback, if any, so that ours also gets executed - var userCompleteFunc = f.instanceConfig.complete; - f.instanceConfig.complete = function(results) - { - if (isFunction(userCompleteFunc)) - userCompleteFunc(results, f.file, f.inputElem); - fileComplete(); - }; - - Papa.parse(f.file, f.instanceConfig); - } - - function error(name, file, elem, reason) - { - if (isFunction(options.error)) - options.error({name: name}, file, elem, reason); - } - - function fileComplete() - { - queue.splice(0, 1); - parseNextFile(); - } - }; - } - - - if (IS_PAPA_WORKER) - { - global.onmessage = workerThreadReceivedMessage; - } - - - - - function CsvToJson(_input, _config) - { - _config = _config || {}; - var dynamicTyping = _config.dynamicTyping || false; - if (isFunction(dynamicTyping)) { - _config.dynamicTypingFunction = dynamicTyping; - // Will be filled on first row call - dynamicTyping = {}; - } - _config.dynamicTyping = dynamicTyping; - - _config.transform = isFunction(_config.transform) ? _config.transform : false; - - if (_config.worker && Papa.WORKERS_SUPPORTED) - { - var w = newWorker(); - - w.userStep = _config.step; - w.userChunk = _config.chunk; - w.userComplete = _config.complete; - w.userError = _config.error; - - _config.step = isFunction(_config.step); - _config.chunk = isFunction(_config.chunk); - _config.complete = isFunction(_config.complete); - _config.error = isFunction(_config.error); - delete _config.worker; // prevent infinite loop - - w.postMessage({ - input: _input, - config: _config, - workerId: w.id - }); - - return; - } - - var streamer = null; - if (_input === Papa.NODE_STREAM_INPUT && typeof PAPA_BROWSER_CONTEXT === 'undefined') - { - // create a node Duplex stream for use - // with .pipe - streamer = new DuplexStreamStreamer(_config); - return streamer.getStream(); - } - else if (typeof _input === 'string') - { - if (_config.download) - streamer = new NetworkStreamer(_config); - else - streamer = new StringStreamer(_config); - } - else if (_input.readable === true && isFunction(_input.read) && isFunction(_input.on)) - { - streamer = new ReadableStreamStreamer(_config); - } - else if ((global.File && _input instanceof File) || _input instanceof Object) // ...Safari. (see issue #106) - streamer = new FileStreamer(_config); - - return streamer.stream(_input); - } - - - - - - - function JsonToCsv(_input, _config) - { - // Default configuration - - /** whether to surround every datum with quotes */ - var _quotes = false; - - /** whether to write headers */ - var _writeHeader = true; - - /** delimiting character(s) */ - var _delimiter = ','; - - /** newline character(s) */ - var _newline = '\r\n'; - - /** quote character */ - var _quoteChar = '"'; - - /** escaped quote character, either "" or " */ - var _escapedQuote = _quoteChar + _quoteChar; - - /** whether to skip empty lines */ - var _skipEmptyLines = false; - - /** the columns (keys) we expect when we unparse objects */ - var _columns = null; - - unpackConfig(); - - var quoteCharRegex = new RegExp(escapeRegExp(_quoteChar), 'g'); - - if (typeof _input === 'string') - _input = JSON.parse(_input); - - if (Array.isArray(_input)) - { - if (!_input.length || Array.isArray(_input[0])) - return serialize(null, _input, _skipEmptyLines); - else if (typeof _input[0] === 'object') - return serialize(_columns || objectKeys(_input[0]), _input, _skipEmptyLines); - } - else if (typeof _input === 'object') - { - if (typeof _input.data === 'string') - _input.data = JSON.parse(_input.data); - - if (Array.isArray(_input.data)) - { - if (!_input.fields) - _input.fields = _input.meta && _input.meta.fields; - - if (!_input.fields) - _input.fields = Array.isArray(_input.data[0]) - ? _input.fields - : objectKeys(_input.data[0]); - - if (!(Array.isArray(_input.data[0])) && typeof _input.data[0] !== 'object') - _input.data = [_input.data]; // handles input like [1,2,3] or ['asdf'] - } - - return serialize(_input.fields || [], _input.data || [], _skipEmptyLines); - } - - // Default (any valid paths should return before this) - throw new Error('Unable to serialize unrecognized input'); - - - function unpackConfig() - { - if (typeof _config !== 'object') - return; - - if (typeof _config.delimiter === 'string' - && !Papa.BAD_DELIMITERS.filter(function(value) { return _config.delimiter.indexOf(value) !== -1; }).length) - { - _delimiter = _config.delimiter; - } - - if (typeof _config.quotes === 'boolean' - || typeof _config.quotes === 'function' - || Array.isArray(_config.quotes)) - _quotes = _config.quotes; - - if (typeof _config.skipEmptyLines === 'boolean' - || typeof _config.skipEmptyLines === 'string') - _skipEmptyLines = _config.skipEmptyLines; - - if (typeof _config.newline === 'string') - _newline = _config.newline; - - if (typeof _config.quoteChar === 'string') - _quoteChar = _config.quoteChar; - - if (typeof _config.header === 'boolean') - _writeHeader = _config.header; - - if (Array.isArray(_config.columns)) { - - if (_config.columns.length === 0) throw new Error('Option columns is empty'); - - _columns = _config.columns; - } - - if (_config.escapeChar !== undefined) { - _escapedQuote = _config.escapeChar + _quoteChar; - } - } - - - /** Turns an object's keys into an array */ - function objectKeys(obj) - { - if (typeof obj !== 'object') - return []; - var keys = []; - for (var key in obj) - keys.push(key); - return keys; - } - - /** The double for loop that iterates the data and writes out a CSV string including header row */ - function serialize(fields, data, skipEmptyLines) - { - var csv = ''; - - if (typeof fields === 'string') - fields = JSON.parse(fields); - if (typeof data === 'string') - data = JSON.parse(data); - - var hasHeader = Array.isArray(fields) && fields.length > 0; - var dataKeyedByField = !(Array.isArray(data[0])); - - // If there a header row, write it first - if (hasHeader && _writeHeader) - { - for (var i = 0; i < fields.length; i++) - { - if (i > 0) - csv += _delimiter; - csv += safe(fields[i], i); - } - if (data.length > 0) - csv += _newline; - } - - // Then write out the data - for (var row = 0; row < data.length; row++) - { - var maxCol = hasHeader ? fields.length : data[row].length; - - var emptyLine = false; - var nullLine = hasHeader ? Object.keys(data[row]).length === 0 : data[row].length === 0; - if (skipEmptyLines && !hasHeader) - { - emptyLine = skipEmptyLines === 'greedy' ? data[row].join('').trim() === '' : data[row].length === 1 && data[row][0].length === 0; - } - if (skipEmptyLines === 'greedy' && hasHeader) { - var line = []; - for (var c = 0; c < maxCol; c++) { - var cx = dataKeyedByField ? fields[c] : c; - line.push(data[row][cx]); - } - emptyLine = line.join('').trim() === ''; - } - if (!emptyLine) - { - for (var col = 0; col < maxCol; col++) - { - if (col > 0 && !nullLine) - csv += _delimiter; - var colIdx = hasHeader && dataKeyedByField ? fields[col] : col; - csv += safe(data[row][colIdx], col); - } - if (row < data.length - 1 && (!skipEmptyLines || (maxCol > 0 && !nullLine))) - { - csv += _newline; - } - } - } - return csv; - } - - /** Encloses a value around quotes if needed (makes a value safe for CSV insertion) */ - function safe(str, col) - { - if (typeof str === 'undefined' || str === null) - return ''; - - if (str.constructor === Date) - return JSON.stringify(str).slice(1, 25); - - var escapedQuoteStr = str.toString().replace(quoteCharRegex, _escapedQuote); - - var needsQuotes = (typeof _quotes === 'boolean' && _quotes) - || (typeof _quotes === 'function' && _quotes(str, col)) - || (Array.isArray(_quotes) && _quotes[col]) - || hasAny(escapedQuoteStr, Papa.BAD_DELIMITERS) - || escapedQuoteStr.indexOf(_delimiter) > -1 - || escapedQuoteStr.charAt(0) === ' ' - || escapedQuoteStr.charAt(escapedQuoteStr.length - 1) === ' '; - - return needsQuotes ? _quoteChar + escapedQuoteStr + _quoteChar : escapedQuoteStr; - } - - function hasAny(str, substrings) - { - for (var i = 0; i < substrings.length; i++) - if (str.indexOf(substrings[i]) > -1) - return true; - return false; - } - } - - /** ChunkStreamer is the base prototype for various streamer implementations. */ - function ChunkStreamer(config) - { - this._handle = null; - this._finished = false; - this._completed = false; - this._halted = false; - this._input = null; - this._baseIndex = 0; - this._partialLine = ''; - this._rowCount = 0; - this._start = 0; - this._nextChunk = null; - this.isFirstChunk = true; - this._completeResults = { - data: [], - errors: [], - meta: {} - }; - replaceConfig.call(this, config); - - this.parseChunk = function(chunk, isFakeChunk) - { - // First chunk pre-processing - if (this.isFirstChunk && isFunction(this._config.beforeFirstChunk)) - { - var modifiedChunk = this._config.beforeFirstChunk(chunk); - if (modifiedChunk !== undefined) - chunk = modifiedChunk; - } - this.isFirstChunk = false; - this._halted = false; - - // Rejoin the line we likely just split in two by chunking the file - var aggregate = this._partialLine + chunk; - this._partialLine = ''; - - var results = this._handle.parse(aggregate, this._baseIndex, !this._finished); - - if (this._handle.paused() || this._handle.aborted()) { - this._halted = true; - return; - } - - var lastIndex = results.meta.cursor; - - if (!this._finished) - { - this._partialLine = aggregate.substring(lastIndex - this._baseIndex); - this._baseIndex = lastIndex; - } - - if (results && results.data) - this._rowCount += results.data.length; - - var finishedIncludingPreview = this._finished || (this._config.preview && this._rowCount >= this._config.preview); - - if (IS_PAPA_WORKER) - { - global.postMessage({ - results: results, - workerId: Papa.WORKER_ID, - finished: finishedIncludingPreview - }); - } - else if (isFunction(this._config.chunk) && !isFakeChunk) - { - this._config.chunk(results, this._handle); - if (this._handle.paused() || this._handle.aborted()) { - this._halted = true; - return; - } - results = undefined; - this._completeResults = undefined; - } - - if (!this._config.step && !this._config.chunk) { - this._completeResults.data = this._completeResults.data.concat(results.data); - this._completeResults.errors = this._completeResults.errors.concat(results.errors); - this._completeResults.meta = results.meta; - } - - if (!this._completed && finishedIncludingPreview && isFunction(this._config.complete) && (!results || !results.meta.aborted)) { - this._config.complete(this._completeResults, this._input); - this._completed = true; - } - - if (!finishedIncludingPreview && (!results || !results.meta.paused)) - this._nextChunk(); - - return results; - }; - - this._sendError = function(error) - { - if (isFunction(this._config.error)) - this._config.error(error); - else if (IS_PAPA_WORKER && this._config.error) - { - global.postMessage({ - workerId: Papa.WORKER_ID, - error: error, - finished: false - }); - } - }; - - function replaceConfig(config) - { - // Deep-copy the config so we can edit it - var configCopy = copy(config); - configCopy.chunkSize = parseInt(configCopy.chunkSize); // parseInt VERY important so we don't concatenate strings! - if (!config.step && !config.chunk) - configCopy.chunkSize = null; // disable Range header if not streaming; bad values break IIS - see issue #196 - this._handle = new ParserHandle(configCopy); - this._handle.streamer = this; - this._config = configCopy; // persist the copy to the caller - } - } - - - function NetworkStreamer(config) - { - config = config || {}; - if (!config.chunkSize) - config.chunkSize = Papa.RemoteChunkSize; - ChunkStreamer.call(this, config); - - var xhr; - - if (IS_WORKER) - { - this._nextChunk = function() - { - this._readChunk(); - this._chunkLoaded(); - }; - } - else - { - this._nextChunk = function() - { - this._readChunk(); - }; - } - - this.stream = function(url) - { - this._input = url; - this._nextChunk(); // Starts streaming - }; - - this._readChunk = function() - { - if (this._finished) - { - this._chunkLoaded(); - return; - } - - xhr = new XMLHttpRequest(); - - if (this._config.withCredentials) - { - xhr.withCredentials = this._config.withCredentials; - } - - if (!IS_WORKER) - { - xhr.onload = bindFunction(this._chunkLoaded, this); - xhr.onerror = bindFunction(this._chunkError, this); - } - - xhr.open(this._config.downloadRequestBody ? 'POST' : 'GET', this._input, !IS_WORKER); - // Headers can only be set when once the request state is OPENED - if (this._config.downloadRequestHeaders) - { - var headers = this._config.downloadRequestHeaders; - - for (var headerName in headers) - { - xhr.setRequestHeader(headerName, headers[headerName]); - } - } - - if (this._config.chunkSize) - { - var end = this._start + this._config.chunkSize - 1; // minus one because byte range is inclusive - xhr.setRequestHeader('Range', 'bytes=' + this._start + '-' + end); - } - - try { - xhr.send(this._config.downloadRequestBody); - } - catch (err) { - this._chunkError(err.message); - } - - if (IS_WORKER && xhr.status === 0) - this._chunkError(); - }; - - this._chunkLoaded = function() - { - if (xhr.readyState !== 4) - return; - - if (xhr.status < 200 || xhr.status >= 400) - { - this._chunkError(); - return; - } - - // Use chunckSize as it may be a diference on reponse lentgh due to characters with more than 1 byte - this._start += this._config.chunkSize ? this._config.chunkSize : xhr.responseText.length; - this._finished = !this._config.chunkSize || this._start >= getFileSize(xhr); - this.parseChunk(xhr.responseText); - }; - - this._chunkError = function(errorMessage) - { - var errorText = xhr.statusText || errorMessage; - this._sendError(new Error(errorText)); - }; - - function getFileSize(xhr) - { - var contentRange = xhr.getResponseHeader('Content-Range'); - if (contentRange === null) { // no content range, then finish! - return -1; - } - return parseInt(contentRange.substring(contentRange.lastIndexOf('/') + 1)); - } - } - NetworkStreamer.prototype = Object.create(ChunkStreamer.prototype); - NetworkStreamer.prototype.constructor = NetworkStreamer; - - - function FileStreamer(config) - { - config = config || {}; - if (!config.chunkSize) - config.chunkSize = Papa.LocalChunkSize; - ChunkStreamer.call(this, config); - - var reader, slice; - - // FileReader is better than FileReaderSync (even in worker) - see http://stackoverflow.com/q/24708649/1048862 - // But Firefox is a pill, too - see issue #76: https://github.com/mholt/PapaParse/issues/76 - var usingAsyncReader = typeof FileReader !== 'undefined'; // Safari doesn't consider it a function - see issue #105 - - this.stream = function(file) - { - this._input = file; - slice = file.slice || file.webkitSlice || file.mozSlice; - - if (usingAsyncReader) - { - reader = new FileReader(); // Preferred method of reading files, even in workers - reader.onload = bindFunction(this._chunkLoaded, this); - reader.onerror = bindFunction(this._chunkError, this); - } - else - reader = new FileReaderSync(); // Hack for running in a web worker in Firefox - - this._nextChunk(); // Starts streaming - }; - - this._nextChunk = function() - { - if (!this._finished && (!this._config.preview || this._rowCount < this._config.preview)) - this._readChunk(); - }; - - this._readChunk = function() - { - var input = this._input; - if (this._config.chunkSize) - { - var end = Math.min(this._start + this._config.chunkSize, this._input.size); - input = slice.call(input, this._start, end); - } - var txt = reader.readAsText(input, this._config.encoding); - if (!usingAsyncReader) - this._chunkLoaded({ target: { result: txt } }); // mimic the async signature - }; - - this._chunkLoaded = function(event) - { - // Very important to increment start each time before handling results - this._start += this._config.chunkSize; - this._finished = !this._config.chunkSize || this._start >= this._input.size; - this.parseChunk(event.target.result); - }; - - this._chunkError = function() - { - this._sendError(reader.error); - }; - - } - FileStreamer.prototype = Object.create(ChunkStreamer.prototype); - FileStreamer.prototype.constructor = FileStreamer; - - - function StringStreamer(config) - { - config = config || {}; - ChunkStreamer.call(this, config); - - var remaining; - this.stream = function(s) - { - remaining = s; - return this._nextChunk(); - }; - this._nextChunk = function() - { - if (this._finished) return; - var size = this._config.chunkSize; - var chunk; - if(size) { - chunk = remaining.substring(0, size); - remaining = remaining.substring(size); - } else { - chunk = remaining; - remaining = ''; - } - this._finished = !remaining; - return this.parseChunk(chunk); - }; - } - StringStreamer.prototype = Object.create(StringStreamer.prototype); - StringStreamer.prototype.constructor = StringStreamer; - - - function ReadableStreamStreamer(config) - { - config = config || {}; - - ChunkStreamer.call(this, config); - - var queue = []; - var parseOnData = true; - var streamHasEnded = false; - - this.pause = function() - { - ChunkStreamer.prototype.pause.apply(this, arguments); - this._input.pause(); - }; - - this.resume = function() - { - ChunkStreamer.prototype.resume.apply(this, arguments); - this._input.resume(); - }; - - this.stream = function(stream) - { - this._input = stream; - - this._input.on('data', this._streamData); - this._input.on('end', this._streamEnd); - this._input.on('error', this._streamError); - }; - - this._checkIsFinished = function() - { - if (streamHasEnded && queue.length === 1) { - this._finished = true; - } - }; - - this._nextChunk = function() - { - this._checkIsFinished(); - if (queue.length) - { - this.parseChunk(queue.shift()); - } - else - { - parseOnData = true; - } - }; - - this._streamData = bindFunction(function(chunk) - { - try - { - queue.push(typeof chunk === 'string' ? chunk : chunk.toString(this._config.encoding)); - - if (parseOnData) - { - parseOnData = false; - this._checkIsFinished(); - this.parseChunk(queue.shift()); - } - } - catch (error) - { - this._streamError(error); - } - }, this); - - this._streamError = bindFunction(function(error) - { - this._streamCleanUp(); - this._sendError(error); - }, this); - - this._streamEnd = bindFunction(function() - { - this._streamCleanUp(); - streamHasEnded = true; - this._streamData(''); - }, this); - - this._streamCleanUp = bindFunction(function() - { - this._input.removeListener('data', this._streamData); - this._input.removeListener('end', this._streamEnd); - this._input.removeListener('error', this._streamError); - }, this); - } - ReadableStreamStreamer.prototype = Object.create(ChunkStreamer.prototype); - ReadableStreamStreamer.prototype.constructor = ReadableStreamStreamer; - - - function DuplexStreamStreamer(_config) { - var Duplex = require('stream').Duplex; - var config = copy(_config); - var parseOnWrite = true; - var writeStreamHasFinished = false; - var parseCallbackQueue = []; - var stream = null; - - this._onCsvData = function(results) - { - var data = results.data; - if (!stream.push(data) && !this._handle.paused()) { - // the writeable consumer buffer has filled up - // so we need to pause until more items - // can be processed - this._handle.pause(); - } - }; - - this._onCsvComplete = function() - { - // node will finish the read stream when - // null is pushed - stream.push(null); - }; - - config.step = bindFunction(this._onCsvData, this); - config.complete = bindFunction(this._onCsvComplete, this); - ChunkStreamer.call(this, config); - - this._nextChunk = function() - { - if (writeStreamHasFinished && parseCallbackQueue.length === 1) { - this._finished = true; - } - if (parseCallbackQueue.length) { - parseCallbackQueue.shift()(); - } else { - parseOnWrite = true; - } - }; - - this._addToParseQueue = function(chunk, callback) - { - // add to queue so that we can indicate - // completion via callback - // node will automatically pause the incoming stream - // when too many items have been added without their - // callback being invoked - parseCallbackQueue.push(bindFunction(function() { - this.parseChunk(typeof chunk === 'string' ? chunk : chunk.toString(config.encoding)); - if (isFunction(callback)) { - return callback(); - } - }, this)); - if (parseOnWrite) { - parseOnWrite = false; - this._nextChunk(); - } - }; - - this._onRead = function() - { - if (this._handle.paused()) { - // the writeable consumer can handle more data - // so resume the chunk parsing - this._handle.resume(); - } - }; - - this._onWrite = function(chunk, encoding, callback) - { - this._addToParseQueue(chunk, callback); - }; - - this._onWriteComplete = function() - { - writeStreamHasFinished = true; - // have to write empty string - // so parser knows its done - this._addToParseQueue(''); - }; - - this.getStream = function() - { - return stream; - }; - stream = new Duplex({ - readableObjectMode: true, - decodeStrings: false, - read: bindFunction(this._onRead, this), - write: bindFunction(this._onWrite, this) - }); - stream.once('finish', bindFunction(this._onWriteComplete, this)); - } - if (typeof PAPA_BROWSER_CONTEXT === 'undefined') { - DuplexStreamStreamer.prototype = Object.create(ChunkStreamer.prototype); - DuplexStreamStreamer.prototype.constructor = DuplexStreamStreamer; - } - - - // Use one ParserHandle per entire CSV file or string - function ParserHandle(_config) - { - // One goal is to minimize the use of regular expressions... - var MAX_FLOAT = Math.pow(2, 53); - var MIN_FLOAT = -MAX_FLOAT; - var FLOAT = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/; - var ISO_DATE = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/; - var self = this; - var _stepCounter = 0; // Number of times step was called (number of rows parsed) - var _rowCounter = 0; // Number of rows that have been parsed so far - var _input; // The input being parsed - var _parser; // The core parser being used - var _paused = false; // Whether we are paused or not - var _aborted = false; // Whether the parser has aborted or not - var _delimiterError; // Temporary state between delimiter detection and processing results - var _fields = []; // Fields are from the header row of the input, if there is one - var _results = { // The last results returned from the parser - data: [], - errors: [], - meta: {} - }; - - if (isFunction(_config.step)) - { - var userStep = _config.step; - _config.step = function(results) - { - _results = results; - - if (needsHeaderRow()) - processResults(); - else // only call user's step function after header row - { - processResults(); - - // It's possbile that this line was empty and there's no row here after all - if (_results.data.length === 0) - return; - - _stepCounter += results.data.length; - if (_config.preview && _stepCounter > _config.preview) - _parser.abort(); - else { - _results.data = _results.data[0]; - userStep(_results, self); - } - } - }; - } - - /** - * Parses input. Most users won't need, and shouldn't mess with, the baseIndex - * and ignoreLastRow parameters. They are used by streamers (wrapper functions) - * when an input comes in multiple chunks, like from a file. - */ - this.parse = function(input, baseIndex, ignoreLastRow) - { - var quoteChar = _config.quoteChar || '"'; - if (!_config.newline) - _config.newline = guessLineEndings(input, quoteChar); - - _delimiterError = false; - if (!_config.delimiter) - { - var delimGuess = guessDelimiter(input, _config.newline, _config.skipEmptyLines, _config.comments, _config.delimitersToGuess); - if (delimGuess.successful) - _config.delimiter = delimGuess.bestDelimiter; - else - { - _delimiterError = true; // add error after parsing (otherwise it would be overwritten) - _config.delimiter = Papa.DefaultDelimiter; - } - _results.meta.delimiter = _config.delimiter; - } - else if(isFunction(_config.delimiter)) - { - _config.delimiter = _config.delimiter(input); - _results.meta.delimiter = _config.delimiter; - } - - var parserConfig = copy(_config); - if (_config.preview && _config.header) - parserConfig.preview++; // to compensate for header row - - _input = input; - _parser = new Parser(parserConfig); - _results = _parser.parse(_input, baseIndex, ignoreLastRow); - processResults(); - return _paused ? { meta: { paused: true } } : (_results || { meta: { paused: false } }); - }; - - this.paused = function() - { - return _paused; - }; - - this.pause = function() - { - _paused = true; - _parser.abort(); - - // If it is streaming via "chunking", the reader will start appending correctly already so no need to substring, - // otherwise we can get duplicate content within a row - _input = isFunction(_config.chunk) ? "" : _input.substring(_parser.getCharIndex()); - }; - - this.resume = function() - { - if(self.streamer._halted) { - _paused = false; - self.streamer.parseChunk(_input, true); - } else { - // Bugfix: #636 In case the processing hasn't halted yet - // wait for it to halt in order to resume - setTimeout(self.resume, 3); - } - }; - - this.aborted = function() - { - return _aborted; - }; - - this.abort = function() - { - _aborted = true; - _parser.abort(); - _results.meta.aborted = true; - if (isFunction(_config.complete)) - _config.complete(_results); - _input = ''; - }; - - function testEmptyLine(s) { - return _config.skipEmptyLines === 'greedy' ? s.join('').trim() === '' : s.length === 1 && s[0].length === 0; - } - - function testFloat(s) { - if (FLOAT.test(s)) { - var floatValue = parseFloat(s); - if (floatValue > MIN_FLOAT && floatValue < MAX_FLOAT) { - return true; - } - } - return false; - } - - function processResults() - { - if (_results && _delimiterError) - { - addError('Delimiter', 'UndetectableDelimiter', 'Unable to auto-detect delimiting character; defaulted to \'' + Papa.DefaultDelimiter + '\''); - _delimiterError = false; - } - - if (_config.skipEmptyLines) - { - for (var i = 0; i < _results.data.length; i++) - if (testEmptyLine(_results.data[i])) - _results.data.splice(i--, 1); - } - - if (needsHeaderRow()) - fillHeaderFields(); - - return applyHeaderAndDynamicTypingAndTransformation(); - } - - function needsHeaderRow() - { - return _config.header && _fields.length === 0; - } - - function fillHeaderFields() - { - if (!_results) - return; - - function addHeder(header) - { - if (isFunction(_config.transformHeader)) - header = _config.transformHeader(header); - - _fields.push(header); - } - - if (Array.isArray(_results.data[0])) - { - for (var i = 0; needsHeaderRow() && i < _results.data.length; i++) - _results.data[i].forEach(addHeder); - - _results.data.splice(0, 1); - } - // if _results.data[0] is not an array, we are in a step where _results.data is the row. - else - _results.data.forEach(addHeder); - } - - function shouldApplyDynamicTyping(field) { - // Cache function values to avoid calling it for each row - if (_config.dynamicTypingFunction && _config.dynamicTyping[field] === undefined) { - _config.dynamicTyping[field] = _config.dynamicTypingFunction(field); - } - return (_config.dynamicTyping[field] || _config.dynamicTyping) === true; - } - - function parseDynamic(field, value) - { - if (shouldApplyDynamicTyping(field)) - { - if (value === 'true' || value === 'TRUE') - return true; - else if (value === 'false' || value === 'FALSE') - return false; - else if (testFloat(value)) - return parseFloat(value); - else if (ISO_DATE.test(value)) - return new Date(value); - else - return (value === '' ? null : value); - } - return value; - } - - function applyHeaderAndDynamicTypingAndTransformation() - { - if (!_results || (!_config.header && !_config.dynamicTyping && !_config.transform)) - return _results; - - function processRow(rowSource, i) - { - var row = _config.header ? {} : []; - - var j; - for (j = 0; j < rowSource.length; j++) - { - var field = j; - var value = rowSource[j]; - - if (_config.header) - field = j >= _fields.length ? '__parsed_extra' : _fields[j]; - - if (_config.transform) - value = _config.transform(value,field); - - value = parseDynamic(field, value); - - if (field === '__parsed_extra') - { - row[field] = row[field] || []; - row[field].push(value); - } - else - row[field] = value; - } - - - if (_config.header) - { - if (j > _fields.length) - addError('FieldMismatch', 'TooManyFields', 'Too many fields: expected ' + _fields.length + ' fields but parsed ' + j, _rowCounter + i); - else if (j < _fields.length) - addError('FieldMismatch', 'TooFewFields', 'Too few fields: expected ' + _fields.length + ' fields but parsed ' + j, _rowCounter + i); - } - - return row; - } - - var incrementBy = 1; - if (!_results.data.length || Array.isArray(_results.data[0])) - { - _results.data = _results.data.map(processRow); - incrementBy = _results.data.length; - } - else - _results.data = processRow(_results.data, 0); - - - if (_config.header && _results.meta) - _results.meta.fields = _fields; - - _rowCounter += incrementBy; - return _results; - } - - function guessDelimiter(input, newline, skipEmptyLines, comments, delimitersToGuess) { - var bestDelim, bestDelta, fieldCountPrevRow, maxFieldCount; - - delimitersToGuess = delimitersToGuess || [',', '\t', '|', ';', Papa.RECORD_SEP, Papa.UNIT_SEP]; - - for (var i = 0; i < delimitersToGuess.length; i++) { - var delim = delimitersToGuess[i]; - var delta = 0, avgFieldCount = 0, emptyLinesCount = 0; - fieldCountPrevRow = undefined; - - var preview = new Parser({ - comments: comments, - delimiter: delim, - newline: newline, - preview: 10 - }).parse(input); - - for (var j = 0; j < preview.data.length; j++) { - if (skipEmptyLines && testEmptyLine(preview.data[j])) { - emptyLinesCount++; - continue; - } - var fieldCount = preview.data[j].length; - avgFieldCount += fieldCount; - - if (typeof fieldCountPrevRow === 'undefined') { - fieldCountPrevRow = fieldCount; - continue; - } - else if (fieldCount > 0) { - delta += Math.abs(fieldCount - fieldCountPrevRow); - fieldCountPrevRow = fieldCount; - } - } - - if (preview.data.length > 0) - avgFieldCount /= (preview.data.length - emptyLinesCount); - - if ((typeof bestDelta === 'undefined' || delta <= bestDelta) - && (typeof maxFieldCount === 'undefined' || avgFieldCount > maxFieldCount) && avgFieldCount > 1.99) { - bestDelta = delta; - bestDelim = delim; - maxFieldCount = avgFieldCount; - } - } - - _config.delimiter = bestDelim; - - return { - successful: !!bestDelim, - bestDelimiter: bestDelim - }; - } - - function guessLineEndings(input, quoteChar) - { - input = input.substring(0, 1024 * 1024); // max length 1 MB - // Replace all the text inside quotes - var re = new RegExp(escapeRegExp(quoteChar) + '([^]*?)' + escapeRegExp(quoteChar), 'gm'); - input = input.replace(re, ''); - - var r = input.split('\r'); - - var n = input.split('\n'); - - var nAppearsFirst = (n.length > 1 && n[0].length < r[0].length); - - if (r.length === 1 || nAppearsFirst) - return '\n'; - - var numWithN = 0; - for (var i = 0; i < r.length; i++) - { - if (r[i][0] === '\n') - numWithN++; - } - - return numWithN >= r.length / 2 ? '\r\n' : '\r'; - } - - function addError(type, code, msg, row) - { - var error = { - type: type, - code: code, - message: msg - }; - if(row !== undefined) { - error.row = row; - } - _results.errors.push(error); - } - } - - /** https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions */ - function escapeRegExp(string) - { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string - } - - /** The core parser implements speedy and correct CSV parsing */ - function Parser(config) - { - // Unpack the config object - config = config || {}; - var delim = config.delimiter; - var newline = config.newline; - var comments = config.comments; - var step = config.step; - var preview = config.preview; - var fastMode = config.fastMode; - var quoteChar; - /** Allows for no quoteChar by setting quoteChar to undefined in config */ - if (config.quoteChar === undefined) { - quoteChar = '"'; - } else { - quoteChar = config.quoteChar; - } - var escapeChar = quoteChar; - if (config.escapeChar !== undefined) { - escapeChar = config.escapeChar; - } - - // Delimiter must be valid - if (typeof delim !== 'string' - || Papa.BAD_DELIMITERS.indexOf(delim) > -1) - delim = ','; - - // Comment character must be valid - if (comments === delim) - throw new Error('Comment character same as delimiter'); - else if (comments === true) - comments = '#'; - else if (typeof comments !== 'string' - || Papa.BAD_DELIMITERS.indexOf(comments) > -1) - comments = false; - - // Newline must be valid: \r, \n, or \r\n - if (newline !== '\n' && newline !== '\r' && newline !== '\r\n') - newline = '\n'; - - // We're gonna need these at the Parser scope - var cursor = 0; - var aborted = false; - - this.parse = function(input, baseIndex, ignoreLastRow) - { - // For some reason, in Chrome, this speeds things up (!?) - if (typeof input !== 'string') - throw new Error('Input must be a string'); - - // We don't need to compute some of these every time parse() is called, - // but having them in a more local scope seems to perform better - var inputLen = input.length, - delimLen = delim.length, - newlineLen = newline.length, - commentsLen = comments.length; - var stepIsFunction = isFunction(step); - - // Establish starting state - cursor = 0; - var data = [], errors = [], row = [], lastCursor = 0; - - if (!input) - return returnable(); - - if (fastMode || (fastMode !== false && input.indexOf(quoteChar) === -1)) - { - var rows = input.split(newline); - for (var i = 0; i < rows.length; i++) - { - row = rows[i]; - cursor += row.length; - if (i !== rows.length - 1) - cursor += newline.length; - else if (ignoreLastRow) - return returnable(); - if (comments && row.substring(0, commentsLen) === comments) - continue; - if (stepIsFunction) - { - data = []; - pushRow(row.split(delim)); - doStep(); - if (aborted) - return returnable(); - } - else - pushRow(row.split(delim)); - if (preview && i >= preview) - { - data = data.slice(0, preview); - return returnable(true); - } - } - return returnable(); - } - - var nextDelim = input.indexOf(delim, cursor); - var nextNewline = input.indexOf(newline, cursor); - var quoteCharRegex = new RegExp(escapeRegExp(escapeChar) + escapeRegExp(quoteChar), 'g'); - var quoteSearch = input.indexOf(quoteChar, cursor); - - // Parser loop - for (;;) - { - // Field has opening quote - if (input[cursor] === quoteChar) - { - // Start our search for the closing quote where the cursor is - quoteSearch = cursor; - - // Skip the opening quote - cursor++; - - for (;;) - { - // Find closing quote - quoteSearch = input.indexOf(quoteChar, quoteSearch + 1); - - //No other quotes are found - no other delimiters - if (quoteSearch === -1) - { - if (!ignoreLastRow) { - // No closing quote... what a pity - errors.push({ - type: 'Quotes', - code: 'MissingQuotes', - message: 'Quoted field unterminated', - row: data.length, // row has yet to be inserted - index: cursor - }); - } - return finish(); - } - - // Closing quote at EOF - if (quoteSearch === inputLen - 1) - { - var value = input.substring(cursor, quoteSearch).replace(quoteCharRegex, quoteChar); - return finish(value); - } - - // If this quote is escaped, it's part of the data; skip it - // If the quote character is the escape character, then check if the next character is the escape character - if (quoteChar === escapeChar && input[quoteSearch + 1] === escapeChar) - { - quoteSearch++; - continue; - } - - // If the quote character is not the escape character, then check if the previous character was the escape character - if (quoteChar !== escapeChar && quoteSearch !== 0 && input[quoteSearch - 1] === escapeChar) - { - continue; - } - - if(nextDelim !== -1 && nextDelim < (quoteSearch + 1)) { - nextDelim = input.indexOf(delim, (quoteSearch + 1)); - } - if(nextNewline !== -1 && nextNewline < (quoteSearch + 1)) { - nextNewline = input.indexOf(newline, (quoteSearch + 1)); - } - // Check up to nextDelim or nextNewline, whichever is closest - var checkUpTo = nextNewline === -1 ? nextDelim : Math.min(nextDelim, nextNewline); - var spacesBetweenQuoteAndDelimiter = extraSpaces(checkUpTo); - - // Closing quote followed by delimiter or 'unnecessary spaces + delimiter' - if (input[quoteSearch + 1 + spacesBetweenQuoteAndDelimiter] === delim) - { - row.push(input.substring(cursor, quoteSearch).replace(quoteCharRegex, quoteChar)); - cursor = quoteSearch + 1 + spacesBetweenQuoteAndDelimiter + delimLen; - - // If char after following delimiter is not quoteChar, we find next quote char position - if (input[quoteSearch + 1 + spacesBetweenQuoteAndDelimiter + delimLen] !== quoteChar) - { - quoteSearch = input.indexOf(quoteChar, cursor); - } - nextDelim = input.indexOf(delim, cursor); - nextNewline = input.indexOf(newline, cursor); - break; - } - - var spacesBetweenQuoteAndNewLine = extraSpaces(nextNewline); - - // Closing quote followed by newline or 'unnecessary spaces + newLine' - if (input.substring(quoteSearch + 1 + spacesBetweenQuoteAndNewLine, quoteSearch + 1 + spacesBetweenQuoteAndNewLine + newlineLen) === newline) - { - row.push(input.substring(cursor, quoteSearch).replace(quoteCharRegex, quoteChar)); - saveRow(quoteSearch + 1 + spacesBetweenQuoteAndNewLine + newlineLen); - nextDelim = input.indexOf(delim, cursor); // because we may have skipped the nextDelim in the quoted field - quoteSearch = input.indexOf(quoteChar, cursor); // we search for first quote in next line - - if (stepIsFunction) - { - doStep(); - if (aborted) - return returnable(); - } - - if (preview && data.length >= preview) - return returnable(true); - - break; - } - - - // Checks for valid closing quotes are complete (escaped quotes or quote followed by EOF/delimiter/newline) -- assume these quotes are part of an invalid text string - errors.push({ - type: 'Quotes', - code: 'InvalidQuotes', - message: 'Trailing quote on quoted field is malformed', - row: data.length, // row has yet to be inserted - index: cursor - }); - - quoteSearch++; - continue; - - } - - continue; - } - - // Comment found at start of new line - if (comments && row.length === 0 && input.substring(cursor, cursor + commentsLen) === comments) - { - if (nextNewline === -1) // Comment ends at EOF - return returnable(); - cursor = nextNewline + newlineLen; - nextNewline = input.indexOf(newline, cursor); - nextDelim = input.indexOf(delim, cursor); - continue; - } - - // Next delimiter comes before next newline, so we've reached end of field - if (nextDelim !== -1 && (nextDelim < nextNewline || nextNewline === -1)) - { - // we check, if we have quotes, because delimiter char may be part of field enclosed in quotes - if (quoteSearch > nextDelim) { - // we have quotes, so we try to find the next delimiter not enclosed in quotes and also next starting quote char - var nextDelimObj = getNextUnquotedDelimiter(nextDelim, quoteSearch, nextNewline); - - // if we have next delimiter char which is not enclosed in quotes - if (nextDelimObj && typeof nextDelimObj.nextDelim !== 'undefined') { - nextDelim = nextDelimObj.nextDelim; - quoteSearch = nextDelimObj.quoteSearch; - row.push(input.substring(cursor, nextDelim)); - cursor = nextDelim + delimLen; - // we look for next delimiter char - nextDelim = input.indexOf(delim, cursor); - continue; - } - } else { - row.push(input.substring(cursor, nextDelim)); - cursor = nextDelim + delimLen; - nextDelim = input.indexOf(delim, cursor); - continue; - } - } - - // End of row - if (nextNewline !== -1) - { - row.push(input.substring(cursor, nextNewline)); - saveRow(nextNewline + newlineLen); - - if (stepIsFunction) - { - doStep(); - if (aborted) - return returnable(); - } - - if (preview && data.length >= preview) - return returnable(true); - - continue; - } - - break; - } - - - return finish(); - - - function pushRow(row) - { - data.push(row); - lastCursor = cursor; - } - - /** - * checks if there are extra spaces after closing quote and given index without any text - * if Yes, returns the number of spaces - */ - function extraSpaces(index) { - var spaceLength = 0; - if (index !== -1) { - var textBetweenClosingQuoteAndIndex = input.substring(quoteSearch + 1, index); - if (textBetweenClosingQuoteAndIndex && textBetweenClosingQuoteAndIndex.trim() === '') { - spaceLength = textBetweenClosingQuoteAndIndex.length; - } - } - return spaceLength; - } - - /** - * Appends the remaining input from cursor to the end into - * row, saves the row, calls step, and returns the results. - */ - function finish(value) - { - if (ignoreLastRow) - return returnable(); - if (typeof value === 'undefined') - value = input.substring(cursor); - row.push(value); - cursor = inputLen; // important in case parsing is paused - pushRow(row); - if (stepIsFunction) - doStep(); - return returnable(); - } - - /** - * Appends the current row to the results. It sets the cursor - * to newCursor and finds the nextNewline. The caller should - * take care to execute user's step function and check for - * preview and end parsing if necessary. - */ - function saveRow(newCursor) - { - cursor = newCursor; - pushRow(row); - row = []; - nextNewline = input.indexOf(newline, cursor); - } - - /** Returns an object with the results, errors, and meta. */ - function returnable(stopped) - { - return { - data: data, - errors: errors, - meta: { - delimiter: delim, - linebreak: newline, - aborted: aborted, - truncated: !!stopped, - cursor: lastCursor + (baseIndex || 0) - } - }; - } - - /** Executes the user's step function and resets data & errors. */ - function doStep() - { - step(returnable()); - data = []; - errors = []; - } - - /** Gets the delimiter character, which is not inside the quoted field */ - function getNextUnquotedDelimiter(nextDelim, quoteSearch, newLine) { - var result = { - nextDelim: undefined, - quoteSearch: undefined - }; - // get the next closing quote character - var nextQuoteSearch = input.indexOf(quoteChar, quoteSearch + 1); - - // if next delimiter is part of a field enclosed in quotes - if (nextDelim > quoteSearch && nextDelim < nextQuoteSearch && (nextQuoteSearch < newLine || newLine === -1)) { - // get the next delimiter character after this one - var nextNextDelim = input.indexOf(delim, nextQuoteSearch); - - // if there is no next delimiter, return default result - if (nextNextDelim === -1) { - return result; - } - // find the next opening quote char position - if (nextNextDelim > nextQuoteSearch) { - nextQuoteSearch = input.indexOf(quoteChar, nextQuoteSearch + 1); - } - // try to get the next delimiter position - result = getNextUnquotedDelimiter(nextNextDelim, nextQuoteSearch, newLine); - } else { - result = { - nextDelim: nextDelim, - quoteSearch: quoteSearch - }; - } - - return result; - } - }; - - /** Sets the abort flag */ - this.abort = function() - { - aborted = true; - }; - - /** Gets the cursor position */ - this.getCharIndex = function() - { - return cursor; - }; - } - - - function newWorker() - { - if (!Papa.WORKERS_SUPPORTED) - return false; - - var workerUrl = getWorkerBlob(); - var w = new global.Worker(workerUrl); - w.onmessage = mainThreadReceivedMessage; - w.id = workerIdCounter++; - workers[w.id] = w; - return w; - } - - /** Callback when main thread receives a message */ - function mainThreadReceivedMessage(e) - { - var msg = e.data; - var worker = workers[msg.workerId]; - var aborted = false; - - if (msg.error) - worker.userError(msg.error, msg.file); - else if (msg.results && msg.results.data) - { - var abort = function() { - aborted = true; - completeWorker(msg.workerId, { data: [], errors: [], meta: { aborted: true } }); - }; - - var handle = { - abort: abort, - pause: notImplemented, - resume: notImplemented - }; - - if (isFunction(worker.userStep)) - { - for (var i = 0; i < msg.results.data.length; i++) - { - worker.userStep({ - data: msg.results.data[i], - errors: msg.results.errors, - meta: msg.results.meta - }, handle); - if (aborted) - break; - } - delete msg.results; // free memory ASAP - } - else if (isFunction(worker.userChunk)) - { - worker.userChunk(msg.results, handle, msg.file); - delete msg.results; - } - } - - if (msg.finished && !aborted) - completeWorker(msg.workerId, msg.results); - } - - function completeWorker(workerId, results) { - var worker = workers[workerId]; - if (isFunction(worker.userComplete)) - worker.userComplete(results); - worker.terminate(); - delete workers[workerId]; - } - - function notImplemented() { - throw new Error('Not implemented.'); - } - - /** Callback when worker thread receives a message */ - function workerThreadReceivedMessage(e) - { - var msg = e.data; - - if (typeof Papa.WORKER_ID === 'undefined' && msg) - Papa.WORKER_ID = msg.workerId; - - if (typeof msg.input === 'string') - { - global.postMessage({ - workerId: Papa.WORKER_ID, - results: Papa.parse(msg.input, msg.config), - finished: true - }); - } - else if ((global.File && msg.input instanceof File) || msg.input instanceof Object) // thank you, Safari (see issue #106) - { - var results = Papa.parse(msg.input, msg.config); - if (results) - global.postMessage({ - workerId: Papa.WORKER_ID, - results: results, - finished: true - }); - } - } - - /** Makes a deep copy of an array or object (mostly) */ - function copy(obj) - { - if (typeof obj !== 'object' || obj === null) - return obj; - var cpy = Array.isArray(obj) ? [] : {}; - for (var key in obj) - cpy[key] = copy(obj[key]); - return cpy; - } - - function bindFunction(f, self) - { - return function() { f.apply(self, arguments); }; - } - - function isFunction(func) - { - return typeof func === 'function'; - } - - return Papa; -})); diff --git a/js/papaparse.min.js b/js/papaparse.min.js deleted file mode 100644 index 2876359..0000000 --- a/js/papaparse.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* @license -Papa Parse -v5.2.0 -https://github.com/mholt/PapaParse -License: MIT -*/ -!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&"undefined"!=typeof exports?module.exports=t():e.Papa=t()}(this,function s(){"use strict";var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;U(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!U(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return!1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=U(t.step),t.chunk=U(t.chunk),t.complete=U(t.complete),t.error=U(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&U(e.read)&&U(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",v="\r\n",s='"',a=s+s,i=!1,r=null;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(v=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+s)}();var o=new RegExp(q(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||h(e[0]),e,i)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:h(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function h(e){if("object"!=typeof e)return[];var t=[];for(var i in e)t.push(i);return t}function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(U(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!U(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0},this._sendError=function(e){U(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1})}}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=y(this._chunkLoaded,this),r.onerror=y(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{r.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===r.status&&this._chunkError()}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return-1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)))},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t))}}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=y(this._chunkLoaded,this),r.onerror=y(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(r.error)}}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}}}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=y(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=y(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=y(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,u=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(U(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else{if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t))}}}function v(e){return"greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines)for(var e=0;e=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=y(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)U(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else{var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u=L)return R(!0)}else for(m=M,M++;;){if(-1===(m=a.indexOf(O,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:M}),E();if(m===r-1)return E(a.substring(M,m).replace(_,O));if(O!==z||a[m+1]!==z){if(O===z||0===m||a[m-1]!==z){-1!==p&&p=L)return R(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:M}),m++}}else m++}return E();function b(e){h.push(e),d=M}function w(e){var t=0;if(-1!==e){var i=a.substring(m+1,e);i&&""===i.trim()&&(t=i.length)}return t}function E(e){return i||(void 0===e&&(e=a.substring(M)),f.push(e),M=r,b(f),o&&S()),R()}function C(e){M=e,b(f),f=[],g=a.indexOf(I,M)}function R(e){return{data:h,errors:u,meta:{delimiter:D,linebreak:I,aborted:j,truncated:!!e,cursor:d+(t||0)}}}function S(){A(R()),h=[],u=[]}function x(e,t,i){var r={nextDelim:void 0,quoteSearch:void 0},n=a.indexOf(O,t+1);if(t arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - function _createForOfIteratorHelper(o, allowArrayLike) { - var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; - - if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = it.call(o); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - - var script$2 = { - inheritAttrs: false, - name: 'vue-input', - props: { - autocomplete: { - required: false, - type: String - }, - modelValue: { - required: true, - type: String - }, - placeholder: { - required: true, - type: String - }, - disabled: { - required: true, - type: Boolean - }, - tabindex: { - required: true, - type: Number - }, - autofocus: { - required: true, - type: Boolean - }, - comboboxUid: { - required: true, - type: Number - } - }, - emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'escape'], - setup: function setup(props, context) { - var handleInput = function handleInput(event) { - context.emit('input', event); - context.emit('update:modelValue', event.target.value); - }; - - var handleChange = function handleChange(event) { - context.emit('change', event); - context.emit('update:modelValue', event.target.value); - }; - - var handleFocus = function handleFocus(event) { - context.emit('focus', event); - }; - - var handleBlur = function handleBlur(event) { - context.emit('blur', event); - }; - - var input = vue.ref(null); - - var handleEscape = function handleEscape(event) { - input.value.blur(); - context.emit('escape', event); - }; - - vue.onMounted(function () { - if (props.autofocus) input.value.focus(); - }); - vue.onUpdated(function () { - if (props.autofocus) input.value.focus(); - }); - return { - handleInput: handleInput, - handleChange: handleChange, - handleFocus: handleFocus, - handleBlur: handleBlur, - input: input, - handleEscape: handleEscape - }; - } - }; - - var _hoisted_1$2 = { - "class": "vue-input" - }; - var _hoisted_2$2 = ["autocomplete", "modelValue", "placeholder", "disabled", "tabindex", "autofocus", "aria-controls", "aria-labelledby"]; - function render$3(_ctx, _cache, $props, $setup, $data, $options) { - return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [vue.renderSlot(_ctx.$slots, "prepend"), vue.createElementVNode("input", { - ref: "input", - autocomplete: $props.autocomplete, - modelValue: $props.modelValue, - placeholder: $props.placeholder, - disabled: $props.disabled, - onInput: _cache[0] || (_cache[0] = function () { - return $setup.handleInput && $setup.handleInput.apply($setup, arguments); - }), - onChange: _cache[1] || (_cache[1] = function () { - return $setup.handleChange && $setup.handleChange.apply($setup, arguments); - }), - onFocus: _cache[2] || (_cache[2] = function () { - return $setup.handleFocus && $setup.handleFocus.apply($setup, arguments); - }), - onBlur: _cache[3] || (_cache[3] = function () { - return $setup.handleBlur && $setup.handleBlur.apply($setup, arguments); - }), - onKeyup: _cache[4] || (_cache[4] = vue.withKeys(vue.withModifiers(function () { - return $setup.handleEscape && $setup.handleEscape.apply($setup, arguments); - }, ["exact"]), ["esc"])), - tabindex: $props.tabindex, - autofocus: $props.autofocus, - "aria-autocomplete": "list", - "aria-controls": "vs".concat($props.comboboxUid, "-listbox"), - "aria-labelledby": "vs".concat($props.comboboxUid, "-combobox") - }, null, 40 - /* PROPS, HYDRATE_EVENTS */ - , _hoisted_2$2), vue.renderSlot(_ctx.$slots, "append")]); - } - - script$2.render = render$3; - script$2.__file = "src/components/input.vue"; - - var script$1 = { - inheritAttrs: false, - name: 'vue-tags', - props: { - modelValue: { - required: true, - type: Array, - validator: function validator(modelValue) { - return modelValue.every(function (option) { - return _typeof(option.key) !== undefined && option.label !== undefined && typeof option.selected === 'boolean'; - }); - } - }, - collapseTags: { - type: Boolean - } - }, - emits: ['click'], - setup: function setup(props, context) { - var dataAttrs = vue.inject('dataAttrs'); - - var handleClick = function handleClick(event) { - context.emit('click', event); - }; - - return { - dataAttrs: dataAttrs, - handleClick: handleClick - }; - } - }; - - function render$2(_ctx, _cache, $props, $setup, $data, $options) { - return vue.openBlock(), vue.createElementBlock("ul", vue.mergeProps({ - "class": ["vue-tags", { - collapsed: $props.collapseTags - }], - onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(function () {}, ["prevent"])), - tabindex: "-1", - onClick: _cache[1] || (_cache[1] = function () { - return $setup.handleClick && $setup.handleClick.apply($setup, arguments); - }) - }, $setup.dataAttrs), [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.modelValue, function (option) { - return vue.openBlock(), vue.createElementBlock(vue.Fragment, { - key: option.key - }, [!option.group ? (vue.openBlock(), vue.createElementBlock("li", { - key: 0, - "class": vue.normalizeClass(["vue-tag", { - selected: option.selected - }]) - }, [vue.renderSlot(_ctx.$slots, "default", { - option: option - }, function () { - return [vue.createElementVNode("span", null, vue.toDisplayString(option.label), 1 - /* TEXT */ - )]; - })], 2 - /* CLASS */ - )) : vue.createCommentVNode("v-if", true)], 64 - /* STABLE_FRAGMENT */ - ); - }), 128 - /* KEYED_FRAGMENT */ - ))], 16 - /* FULL_PROPS */ - ); - } - - script$1.render = render$2; - script$1.__file = "src/components/tags.vue"; - - var script = { - inheritAttrs: false, - name: 'vue-dropdown', - props: { - modelValue: { - required: true, - type: Array, - validator: function validator(modelValue) { - return modelValue.every(function (option) { - return _typeof(option.key) !== undefined && option.label !== undefined && typeof option.selected === 'boolean'; - }); - } - }, - comboboxUid: { - required: true, - type: Number - }, - maxHeight: { - required: true - }, - highlightedOriginalIndex: { - required: true - } - }, - emits: ['click-item', 'mouseenter'], - setup: function setup(props, context) { - var dataAttrs = vue.inject('dataAttrs'); - - var handleClickItem = function handleClickItem(event, option) { - if (option.disabled) return; - context.emit('click-item', event, option); - }; - - var handleMouseenter = function handleMouseenter(event, option) { - context.emit('mouseenter', event, option); - }; - - return { - dataAttrs: dataAttrs, - handleClickItem: handleClickItem, - handleMouseenter: handleMouseenter - }; - } - }; - - var _hoisted_1$1 = ["id", "aria-multiselectable", "aria-busy", "aria-disabled"]; - var _hoisted_2$1 = ["onClick", "onMouseenter", "id", "aria-selected", "aria-disabled"]; - function render$1(_ctx, _cache, $props, $setup, $data, $options) { - return vue.openBlock(), vue.createElementBlock("ul", vue.mergeProps({ - "class": "vue-dropdown", - style: { - maxHeight: $props.maxHeight + 'px' - }, - onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(function () {}, ["prevent"])) - }, $setup.dataAttrs, { - role: "listbox", - id: "vs".concat($props.comboboxUid, "-listbox"), - "aria-multiselectable": $setup.dataAttrs['data-multiple'], - "aria-busy": $setup.dataAttrs['data-loading'], - "aria-disabled": $setup.dataAttrs['data-disabled'] - }), [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.modelValue, function (option, index) { - return vue.openBlock(), vue.createElementBlock(vue.Fragment, { - key: option.key - }, [option.visible && option.hidden === false ? (vue.openBlock(), vue.createElementBlock("li", { - key: 0, - onClick: function onClick($event) { - return $setup.handleClickItem($event, option); - }, - "class": vue.normalizeClass(["vue-dropdown-item", { - selected: option.selected, - disabled: option.disabled, - highlighted: option.originalIndex === $props.highlightedOriginalIndex, - group: option.group - }]), - onMouseenter: function onMouseenter($event) { - return $setup.handleMouseenter($event, option); - }, - role: "option", - id: "vs".concat($props.comboboxUid, "-option-").concat(index), - "aria-selected": option.selected ? true : option.disabled ? undefined : false, - "aria-disabled": option.disabled - }, [vue.renderSlot(_ctx.$slots, "default", { - option: option - }, function () { - return [vue.createElementVNode("span", null, vue.toDisplayString(option.label), 1 - /* TEXT */ - )]; - })], 42 - /* CLASS, PROPS, HYDRATE_EVENTS */ - , _hoisted_2$1)) : vue.createCommentVNode("v-if", true)], 64 - /* STABLE_FRAGMENT */ - ); - }), 128 - /* KEYED_FRAGMENT */ - ))], 16 - /* FULL_PROPS */ - , _hoisted_1$1); - } - - script.render = render$1; - script.__file = "src/components/dropdown.vue"; - - var isSameOption = function isSameOption(option1, option2, _ref) { - var valueBy = _ref.valueBy; - return valueBy(option1) === valueBy(option2); - }; - var hasOption = function hasOption(options, option, _ref2) { - var valueBy = _ref2.valueBy; - return options.some(function (_option) { - return isSameOption(_option, option, { - valueBy: valueBy - }); - }); - }; - var getOptionByValue = function getOptionByValue(options, value, _ref3) { - var valueBy = _ref3.valueBy; - return options.find(function (option) { - return valueBy(option) === value; - }); - }; - var addOption = function addOption(selectedOptions, option, _ref4) { - var max = _ref4.max, - valueBy = _ref4.valueBy; - if (hasOption(selectedOptions, option, { - valueBy: valueBy - })) return selectedOptions; - if (selectedOptions.length >= max) return selectedOptions; - return selectedOptions.concat(option); - }; - var removeOption = function removeOption(selectedOptions, option, _ref5) { - var min = _ref5.min, - valueBy = _ref5.valueBy; - if (hasOption(selectedOptions, option, { - valueBy: valueBy - }) === false) return selectedOptions; - if (selectedOptions.length <= min) return selectedOptions; - return selectedOptions.filter(function (_option) { - return isSameOption(_option, option, { - valueBy: valueBy - }) === false; - }); - }; - - var createComputedForGetterFunction = function createComputedForGetterFunction(maybePathFunc) { - return vue.computed(function () { - return typeof maybePathFunc.value === 'function' ? maybePathFunc.value : typeof maybePathFunc.value === 'string' ? function (option) { - return maybePathFunc.value.split('.').reduce(function (value, key) { - return value[key]; - }, option); - } : function (option) { - return option; - }; - }); - }; - - var normalize = (function (props) { - var normalized = vue.reactive({}); - var labelBy = createComputedForGetterFunction(vue.toRef(props, 'labelBy')); - vue.watchEffect(function () { - return normalized.labelBy = labelBy.value; - }); - var valueBy = createComputedForGetterFunction(vue.toRef(props, 'valueBy')); - vue.watchEffect(function () { - return normalized.valueBy = valueBy.value; - }); - var disabledBy = createComputedForGetterFunction(vue.toRef(props, 'disabledBy')); - vue.watchEffect(function () { - return normalized.disabledBy = disabledBy.value; - }); - var groupBy = createComputedForGetterFunction(vue.toRef(props, 'groupBy')); - vue.watchEffect(function () { - return normalized.groupBy = groupBy.value; - }); - var min = vue.computed(function () { - return props.multiple ? props.min : Math.min(1, props.min); - }); - vue.watchEffect(function () { - return normalized.min = min.value; - }); - var max = vue.computed(function () { - return props.multiple ? props.max : 1; - }); - vue.watchEffect(function () { - return normalized.max = max.value; - }); - vue.watchEffect(function () { - return normalized.options = props.options; - }); - return normalized; - }); - - var usePointer = function usePointer(options, highlightedOriginalIndex) { - var pointerForward = function pointerForward() { - if (isSomeSelectable.value === false) return; - if (highlightedOriginalIndex.value === null) return; - var tempOriginalIndex = highlightedOriginalIndex.value + 1; - var safeCount = 0; - - while (tempOriginalIndex !== highlightedOriginalIndex.value && safeCount++ < options.value.length) { - if (options.value.length <= tempOriginalIndex) tempOriginalIndex = 0; - if (pointerSet(tempOriginalIndex)) break; - ++tempOriginalIndex; - } - }; - - var pointerBackward = function pointerBackward() { - if (isSomeSelectable.value === false) return; - if (highlightedOriginalIndex.value === null) return; - var tempOriginalIndex = highlightedOriginalIndex.value - 1; - var safeCount = 0; - - while (tempOriginalIndex !== highlightedOriginalIndex.value && safeCount++ < options.value.length) { - if (tempOriginalIndex < 0) tempOriginalIndex = options.value.length - 1; - if (pointerSet(tempOriginalIndex)) break; - --tempOriginalIndex; - } - }; - - var originalIndexToOption = vue.computed(function () { - return options.value.reduce(function (acc, option) { - return Object.assign(acc, _defineProperty({}, option.originalIndex, option)); - }, {}); - }); - - var pointerSet = function pointerSet(originalIndex) { - var option = originalIndexToOption.value[originalIndex]; - if (option === undefined) return false; - if (isSelectable(option) === false) return false; - highlightedOriginalIndex.value = originalIndex; - return true; - }; - - var isSelectable = function isSelectable(option) { - return !option.disabled && !option.hidden && option.visible; - }; - - var isSomeSelectable = vue.computed(function () { - return options.value.some(function (option) { - return isSelectable(option); - }); - }); - vue.watchEffect(function () { - if (isSomeSelectable.value === false) highlightedOriginalIndex.value = null; - - if (highlightedOriginalIndex.value !== null && options.value.length <= highlightedOriginalIndex.value) { - var _iterator = _createForOfIteratorHelper(options.value.reverse()), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var option = _step.value; - if (pointerSet(option.originalIndex)) break; - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - - if (highlightedOriginalIndex.value === null || isSelectable(options.value[highlightedOriginalIndex.value]) === false) { - var _iterator2 = _createForOfIteratorHelper(options.value), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var _option = _step2.value; - if (pointerSet(_option.originalIndex)) break; - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - } - }); - return { - pointerForward: pointerForward, - pointerBackward: pointerBackward, - pointerSet: pointerSet - }; - }; - - var version = "2.10.4"; - - function escapeRegExp(pattern) { - // $& means the whole matched string - return pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - } - - var VueSelect = vue.defineComponent({ - name: 'vue-select', - inheritAttrs: false, - props: { - // modelValue - modelValue: { - required: true - }, - // TODO: default to `undefined` in next major version - // https://github.com/vuejs/vue-next/issues/3744 - emptyModelValue: {}, - // options - options: { - required: true, - type: Array - }, - // TODO: default to `'label'` in next major version - labelBy: { - type: [String, Function] - }, - // TODO: default to `'value'` in next major version - valueBy: { - type: [String, Function] - }, - disabledBy: { - "default": 'disabled', - type: [String, Function] - }, - groupBy: { - "default": 'group', - type: [String, Function] - }, - // TODO: default to `undefined` in next major version - visibleOptions: { - type: Array, - "default": null - }, - // multiple - multiple: { - "default": false, - type: Boolean - }, - min: { - "default": 0, - type: Number - }, - max: { - "default": Infinity, - type: Number - }, - // search - searchable: { - "default": false, - type: Boolean - }, - searchPlaceholder: { - "default": 'Type to search', - type: String - }, - clearOnSelect: { - "default": false, - type: Boolean - }, - clearOnClose: { - "default": false, - type: Boolean - }, - // tag - taggable: { - "default": false, - type: Boolean - }, - collapseTags: { - "default": false, - type: Boolean - }, - // misc - autocomplete: { - "default": 'off', - type: String - }, - disabled: { - "default": false, - type: Boolean - }, - loading: { - "default": false, - type: Boolean - }, - closeOnSelect: { - "default": false, - type: Boolean - }, - hideSelected: { - "default": false, - type: Boolean - }, - placeholder: { - "default": 'Select option', - type: String - }, - tabindex: { - "default": 0, - type: Number - }, - autofocus: { - "default": false, - type: Boolean - }, - maxHeight: { - "default": 300, - type: Number - }, - openDirection: { - type: String, - validator: function validator(value) { - return ['top', 'bottom'].includes(value); - } - } - }, - emits: ['selected', 'removed', 'update:modelValue', 'focus', 'blur', 'toggle', // TODO: remove use `opened` in next major version - 'opened', // TODO: remove use `opened` in next major version - 'closed', 'search:input', 'search:change', 'search:focus', 'search:blur'], - setup: function setup(props, context) { - var normalized = normalize(props); - var normalizedEmptyModelValue = vue.computed(function () { - var _a; - - return (_a = props.emptyModelValue) !== null && _a !== void 0 ? _a : null; - }); - var instance = vue.getCurrentInstance(); - var wrapper = vue.ref(); - var dropdown = vue.ref(); - var input = vue.ref(); - var inputEl = vue.computed(function () { - var _a; - - return (_a = input.value) === null || _a === void 0 ? void 0 : _a._.refs.input; - }); - var isFocusing = vue.ref(false); - vue.watch(function () { - return isFocusing.value; - }, function () { - var _a, _b; - - if (isFocusing.value) { - context.emit('opened'); - context.emit('focus'); - - if (props.searchable) { - if (inputEl.value !== document.activeElement) { - inputEl.value.focus(); - } - - context.emit('search:focus'); - } else { - (_a = wrapper.value) === null || _a === void 0 ? void 0 : _a.focus(); - } - } else { - if (props.searchable) { - if (inputEl.value === document.activeElement) { - inputEl.value.blur(); - } - - if (props.clearOnClose) clearInput(); - context.emit('search:blur'); - } else { - (_b = wrapper.value) === null || _b === void 0 ? void 0 : _b.blur(); - } - - context.emit('closed'); - context.emit('blur'); - } - - context.emit('toggle'); - }); - - var focus = function focus() { - if (props.disabled) return; - isFocusing.value = true; - }; - - var blur = function blur(e) { - var _a; - - if ((_a = wrapper.value) === null || _a === void 0 ? void 0 : _a.contains(e === null || e === void 0 ? void 0 : e.relatedTarget)) { - setTimeout(function () { - var _a; - - (_a = wrapper.value) === null || _a === void 0 ? void 0 : _a.focus(); - }); - return; - } - - isFocusing.value = false; - }; - - var toggle = function toggle() { - if (isFocusing.value) blur();else focus(); - }; - - vue.watch(function () { - return props.disabled; - }, function () { - return blur(); - }); // input - - var searchingInputValue = vue.ref(''); - - var handleInputForInput = function handleInputForInput(event) { - context.emit('search:input', event); - }; - - var handleChangeForInput = function handleChangeForInput(event) { - context.emit('search:change', event); - }; - - var handleFocusForInput = function handleFocusForInput(event) { - focus(); - }; - - var handleBlurForInput = function handleBlurForInput(event) { - blur(); - }; - - var searchRe = vue.computed(function () { - return new RegExp(escapeRegExp(searchingInputValue.value), 'i'); - }); - var searchedOptions = vue.computed(function () { - return searchingInputValue.value ? normalized.options.filter(function (option) { - return searchRe.value.test(normalized.labelBy(option)); - }) : undefined; - }); // sync model value - - var normalizedModelValue = vue.ref([]); - var selectedValueSet = vue.computed(function () { - return new Set(normalizedModelValue.value.map(function (option) { - return normalized.valueBy(option); - })); - }); - - var isSynchronoused = function isSynchronoused() { - if (props.multiple) { - if (Array.isArray(props.modelValue) === false) return false; - if (normalizedModelValue.value.length !== props.modelValue.length) return false; - if (Object.keys(normalizedModelValue.value).some(function (index) { - return normalizedModelValue.value[index] !== getOptionByValue(normalized.options, props.modelValue[index], { - valueBy: normalized.valueBy - }); - })) return false; - } else { - if (normalizedModelValue.value.length === 0 && props.modelValue !== normalizedEmptyModelValue.value) return false; - if (normalizedModelValue.value.length === 1 && props.modelValue === normalizedEmptyModelValue.value) return false; - if (normalizedModelValue.value[0] !== getOptionByValue(normalized.options, props.modelValue, { - valueBy: normalized.valueBy - })) return false; - } - - return true; - }; - - var syncFromModelValue = function syncFromModelValue() { - if (isSynchronoused()) return; - normalizedModelValue.value = []; - var modelValue = props.multiple ? props.modelValue : props.modelValue === normalizedEmptyModelValue.value ? [] : [props.modelValue]; - - var _iterator = _createForOfIteratorHelper(modelValue), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var value = _step.value; - var option = getOptionByValue(normalized.options, value, { - valueBy: normalized.valueBy - }); // guarantee options has modelValue - - if (hasOption(normalized.options, option, { - valueBy: normalized.valueBy - }) === false) continue; - normalizedModelValue.value = addOption(normalizedModelValue.value, option, { - max: Infinity, - valueBy: normalized.valueBy - }); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - }; - - syncFromModelValue(); - vue.watch(function () { - return props.modelValue; - }, function () { - return syncFromModelValue(); - }, { - deep: true - }); // guarantee options has modelValue - - vue.watch(function () { - return normalized.options; - }, function () { - normalizedModelValue.value = normalized.options.filter(function (option) { - return selectedValueSet.value.has(normalized.valueBy(option)); - }); - }, { - deep: true - }); - - var addOrRemoveOption = function addOrRemoveOption(event, option) { - if (props.disabled) return; // TODO: hot spot, improve performance - - if (option.group && props.multiple) addOrRemoveOptionForGroupOption(event, option);else addOrRemoveOptionForNonGroupOption(event, option); - syncToModelValue(); - if (props.closeOnSelect === true) isFocusing.value = false; - if (props.clearOnSelect === true && searchingInputValue.value) clearInput(); - }; - - var addOrRemoveOptionForGroupOption = function addOrRemoveOptionForGroupOption(event, option) { - option = option.originalOption; - var has = option.value.every(function (value) { - var option = getOptionByValue(normalized.options, value, { - valueBy: normalized.valueBy - }); - return hasOption(normalizedModelValue.value, option, { - valueBy: normalized.valueBy - }); - }); - - if (has) { - option.value.forEach(function (value) { - var option = getOptionByValue(normalized.options, value, { - valueBy: normalized.valueBy - }); - normalizedModelValue.value = removeOption(normalizedModelValue.value, option, { - min: normalized.min, - valueBy: normalized.valueBy - }); - context.emit('removed', option); - }); - } else { - option.value.forEach(function (value) { - var option = getOptionByValue(normalized.options, value, { - valueBy: normalized.valueBy - }); - if (hasOption(normalizedModelValue.value, option, { - valueBy: normalized.valueBy - })) return; - normalizedModelValue.value = addOption(normalizedModelValue.value, option, { - max: normalized.max, - valueBy: normalized.valueBy - }); - context.emit('selected', option); - }); - } - }; - - var addOrRemoveOptionForNonGroupOption = function addOrRemoveOptionForNonGroupOption(event, option) { - option = option.originalOption; - - if (hasOption(normalizedModelValue.value, option, { - valueBy: normalized.valueBy - })) { - normalizedModelValue.value = removeOption(normalizedModelValue.value, option, { - min: normalized.min, - valueBy: normalized.valueBy - }); - context.emit('removed', option); - } else { - if (!props.multiple && normalizedModelValue.value.length === 1) { - var removingOption = normalizedModelValue.value[0]; - normalizedModelValue.value = removeOption(normalizedModelValue.value, normalizedModelValue.value[0], { - min: 0, - valueBy: normalized.valueBy - }); - context.emit('removed', removingOption); - } - - normalizedModelValue.value = addOption(normalizedModelValue.value, option, { - max: normalized.max, - valueBy: normalized.valueBy - }); - context.emit('selected', option); - } - }; - - var syncToModelValue = function syncToModelValue() { - if (isSynchronoused()) return; - var selectedValues = normalizedModelValue.value.map(function (option) { - return normalized.valueBy(option); - }); - - if (props.multiple) { - context.emit('update:modelValue', selectedValues); - } else { - if (selectedValues.length) context.emit('update:modelValue', selectedValues[0]);else context.emit('update:modelValue', normalizedEmptyModelValue.value); - } - }; - - var clearInput = function clearInput() { - // simulate clear input value - inputEl.value.value = ''; - inputEl.value.dispatchEvent(new Event('input')); - inputEl.value.dispatchEvent(new Event('change')); - }; - - var renderedOptions = vue.computed(function () { - var _a, _b; - - return (_b = (_a = props.visibleOptions) !== null && _a !== void 0 ? _a : searchedOptions.value) !== null && _b !== void 0 ? _b : normalized.options; - }); - var highlightedOriginalIndex = vue.ref(0); - var optionsWithInfo = vue.computed(function () { - var visibleValueSet = new Set(renderedOptions.value.map(function (option) { - return normalized.valueBy(option); - })); - var optionsWithInfo = normalized.options.map(function (option, index) { - var _a; - - var optionWithInfo = { - key: normalized.valueBy(option), - label: normalized.labelBy(option), - // selected: selectedValueSet.value.has(normalized.valueBy(option)), - // disabled: normalized.disabledBy(option), - group: (_a = normalized.groupBy(option)) !== null && _a !== void 0 ? _a : false, - // visible: visibleValueSet.has(normalized.valueBy(option)), - // hidden: props.hideSelected ? selectedValueSet.value.has(normalized.valueBy(option)) : false, - originalIndex: index, - originalOption: option - }; - optionWithInfo.selected = optionWithInfo.group ? option.value.every(function (value) { - return selectedValueSet.value.has(value); - }) : selectedValueSet.value.has(normalized.valueBy(option)); - optionWithInfo.disabled = optionWithInfo.group ? normalized.disabledBy(option) || option.value.every(function (value) { - var option = getOptionByValue(normalized.options, value, { - valueBy: normalized.valueBy - }); - return normalized.disabledBy(option); - }) : normalized.disabledBy(option); - optionWithInfo.visible = optionWithInfo.group ? option.value.some(function (value) { - return visibleValueSet.has(value); - }) : visibleValueSet.has(normalized.valueBy(option)); - optionWithInfo.hidden = props.hideSelected ? optionWithInfo.group ? option.value.every(function (value) { - return selectedValueSet.value.has(value); - }) : selectedValueSet.value.has(normalized.valueBy(option)) : false; - return optionWithInfo; - }); - - var _iterator2 = _createForOfIteratorHelper(optionsWithInfo), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var option = _step2.value; - if (option.group === false) continue; - - if (option.disabled) { - (function () { - var values = new Set(option.originalOption.value); - optionsWithInfo.filter(function (optionWithInfo) { - return values.has(normalized.valueBy(optionWithInfo.originalOption)); - }).forEach(function (optionWithInfo) { - return optionWithInfo.disabled = true; - }); - })(); - } - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - - return optionsWithInfo; - }); - - var _usePointer = usePointer(optionsWithInfo, highlightedOriginalIndex), - _pointerForward = _usePointer.pointerForward, - _pointerBackward = _usePointer.pointerBackward, - pointerSet = _usePointer.pointerSet; - - var pointerForward = function pointerForward() { - _pointerForward(); - - vue.nextTick(updateScrollTop); - }; - - var pointerBackward = function pointerBackward() { - _pointerBackward(); - - vue.nextTick(updateScrollTop); - }; - - var pointerFirst = function pointerFirst() { - var _iterator3 = _createForOfIteratorHelper(normalized.options.keys()), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var index = _step3.value; - if (pointerSet(index)) break; - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - - vue.nextTick(updateScrollTop); - }; - - var pointerLast = function pointerLast() { - var _iterator4 = _createForOfIteratorHelper(_toConsumableArray(normalized.options.keys()).reverse()), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var index = _step4.value; - if (pointerSet(index)) break; - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - - vue.nextTick(updateScrollTop); - }; - - var recentTypedChars = ''; - var timerForClearingRecentTypedChars; - var alphanumRe = /^[\w]$/; - var sortedOriginalIndexBaseOnHighlighted = vue.computed(function () { - var indexes = _toConsumableArray(normalized.options.keys()); - - return indexes.slice(highlightedOriginalIndex.value).concat(indexes.slice(0, highlightedOriginalIndex.value)); - }); - - var typeAhead = function typeAhead(event) { - var _a, _b; - - if (props.searchable) return; - var changed = false; - - if (alphanumRe.test(event.key)) { - recentTypedChars += event.key.toLowerCase(); - changed = true; - } else if (event.code === 'Space') { - recentTypedChars += ' '; - } - - if (changed) { - var _iterator5 = _createForOfIteratorHelper(sortedOriginalIndexBaseOnHighlighted.value), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var index = _step5.value; - if (((_b = (_a = normalized.labelBy(normalized.options[index])) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.startsWith(recentTypedChars)) !== true) continue; - if (pointerSet(index)) break; - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - - clearTimeout(timerForClearingRecentTypedChars); - timerForClearingRecentTypedChars = setTimeout(function () { - recentTypedChars = ''; - }, 500); - } - }; - - var updateScrollTop = function updateScrollTop() { - var _a; - - var highlightedEl = (_a = wrapper.value) === null || _a === void 0 ? void 0 : _a.querySelector('.highlighted'); - if (!highlightedEl) return; - if (!dropdown.value) return; - var computedStyle = getComputedStyle(highlightedEl); - var safeCount; - safeCount = 0; - - while (highlightedEl.offsetTop + parseFloat(computedStyle.height) + parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom) > dropdown.value.$el.clientHeight + dropdown.value.$el.scrollTop && safeCount++ < optionsWithInfo.value.length) { - dropdown.value.$el.scrollTop = dropdown.value.$el.scrollTop + parseFloat(computedStyle.height) + parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom); - } - - safeCount = 0; - - while (highlightedEl.offsetTop < dropdown.value.$el.scrollTop && safeCount++ < optionsWithInfo.value.length) { - dropdown.value.$el.scrollTop = dropdown.value.$el.scrollTop - parseFloat(computedStyle.height) - parseFloat(computedStyle.paddingTop) - parseFloat(computedStyle.paddingBottom); - } - }; - - vue.watch(function () { - return [isFocusing.value, normalized.options, selectedValueSet.value]; - }, function (_, oldValue) { - if ((oldValue === null || oldValue === void 0 ? void 0 : oldValue[0]) === true) return; - if (isFocusing.value === false) return; - if (normalizedModelValue.value.length === 0) return; - pointerSet(normalized.options.findIndex(function (option) { - return selectedValueSet.value.has(normalized.valueBy(option)); - })); - vue.nextTick(updateScrollTop); - }, { - deep: true, - immediate: true - }); - var dataAttrs = vue.computed(function () { - return { - 'data-is-focusing': isFocusing.value, - 'data-visible-length': optionsWithInfo.value.filter(function (option) { - return option.visible && option.hidden === false; - }).length, - 'data-not-selected-length': normalized.options.length - optionsWithInfo.value.filter(function (option) { - return option.selected; - }).length, - 'data-selected-length': optionsWithInfo.value.filter(function (option) { - return option.selected; - }).length, - 'data-addable': optionsWithInfo.value.filter(function (option) { - return option.selected; - }).length < normalized.max, - 'data-removable': optionsWithInfo.value.filter(function (option) { - return option.selected; - }).length > normalized.min, - 'data-total-length': normalized.options.length, - 'data-multiple': props.multiple, - 'data-loading': props.loading, - 'data-disabled': props.disabled - }; - }); - vue.provide('dataAttrs', dataAttrs); - var selectedOptions = vue.computed(function () { - return optionsWithInfo.value.filter(function (option) { - return option.selected; - }).filter(function (option) { - return !option.group; - }); - }); - var innerPlaceholder = vue.computed(function () { - if (props.multiple) { - if (selectedOptions.value.length === 0) { - return props.placeholder; - } else if (selectedOptions.value.length === 1) { - return '1 option selected'; - } else { - return selectedOptions.value.length + ' options selected'; - } - } else { - if (selectedOptions.value.length === 0) { - return props.placeholder; - } else { - return selectedOptions.value[0].label + ''; - } - } - }); - var selected = vue.computed(function () { - var selected = selectedOptions.value.map(function (option) { - return option.originalOption; - }); - if (props.multiple) return selected; - return selected[0] || normalizedEmptyModelValue.value; - }); - var direction = vue.ref(); - vue.watch(function () { - return [props.openDirection, isFocusing.value]; - }, function () { - var _a, _b; - - direction.value = (_b = (_a = props.openDirection) !== null && _a !== void 0 ? _a : calcPreferredDirection()) !== null && _b !== void 0 ? _b : 'bottom'; - }, { - immediate: true - }); - - function calcPreferredDirection() { - if (wrapper.value === undefined) return; - if (window === undefined) return; - var spaceBelow = window.innerHeight - wrapper.value.getBoundingClientRect().bottom; - var hasEnoughSpaceBelow = spaceBelow >= props.maxHeight; - return hasEnoughSpaceBelow ? 'bottom' : 'top'; - } - - return { - instance: instance, - isFocusing: isFocusing, - wrapper: wrapper, - dropdown: dropdown, - input: input, - focus: focus, - blur: blur, - toggle: toggle, - searchingInputValue: searchingInputValue, - handleInputForInput: handleInputForInput, - handleChangeForInput: handleChangeForInput, - handleFocusForInput: handleFocusForInput, - handleBlurForInput: handleBlurForInput, - optionsWithInfo: optionsWithInfo, - addOrRemoveOption: addOrRemoveOption, - dataAttrs: dataAttrs, - innerPlaceholder: innerPlaceholder, - selected: selected, - highlightedOriginalIndex: highlightedOriginalIndex, - pointerForward: pointerForward, - pointerBackward: pointerBackward, - pointerFirst: pointerFirst, - pointerLast: pointerLast, - typeAhead: typeAhead, - pointerSet: pointerSet, - direction: direction - }; - }, - components: { - VInput: script$2, - VTags: script$1, - VDropdown: script - } - }); - VueSelect.__VERSION__ = version; - - var _imports_0 = 'data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg=='; - - var _hoisted_1 = ["tabindex", "id", "role", "aria-expanded", "aria-owns", "aria-activedescendant", "aria-busy", "aria-disabled"]; - var _hoisted_2 = { - "class": "vue-select-header" - }; - var _hoisted_3 = { - key: 0, - "class": "vue-input" - }; - var _hoisted_4 = ["placeholder", "autocomplete"]; - var _hoisted_5 = ["onClick"]; - - var _hoisted_6 = /*#__PURE__*/vue.createElementVNode("span", { - "class": "icon loading" - }, [/*#__PURE__*/vue.createElementVNode("div"), /*#__PURE__*/vue.createElementVNode("div"), /*#__PURE__*/vue.createElementVNode("div")], -1 - /* HOISTED */ - ); - - var _hoisted_7 = { - key: 0, - "class": "vue-select-input-wrapper" - }; - - var _hoisted_8 = /*#__PURE__*/vue.createElementVNode("span", { - "class": "icon loading" - }, [/*#__PURE__*/vue.createElementVNode("div"), /*#__PURE__*/vue.createElementVNode("div"), /*#__PURE__*/vue.createElementVNode("div")], -1 - /* HOISTED */ - ); - - function render(_ctx, _cache, $props, $setup, $data, $options) { - var _component_v_tags = vue.resolveComponent("v-tags"); - - var _component_v_input = vue.resolveComponent("v-input"); - - var _component_v_dropdown = vue.resolveComponent("v-dropdown"); - - return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ - ref: "wrapper", - "class": ["vue-select", ["direction-".concat(_ctx.direction)]], - tabindex: _ctx.isFocusing ? -1 : _ctx.tabindex, - onFocus: _cache[9] || (_cache[9] = function () { - return _ctx.focus && _ctx.focus.apply(_ctx, arguments); - }), - onBlur: _cache[10] || (_cache[10] = function (e) { - return _ctx.searchable ? false : _ctx.blur(e); - }) - }, Object.assign({}, _ctx.dataAttrs, _ctx.$attrs), { - onKeypress: _cache[11] || (_cache[11] = vue.withKeys(vue.withModifiers(function () { - return _ctx.highlightedOriginalIndex !== null && _ctx.addOrRemoveOption(_ctx.$event, _ctx.optionsWithInfo[_ctx.highlightedOriginalIndex]); - }, ["prevent", "exact"]), ["enter"])), - onKeydown: [_cache[12] || (_cache[12] = vue.withKeys(vue.withModifiers(function () { - return _ctx.pointerForward && _ctx.pointerForward.apply(_ctx, arguments); - }, ["prevent", "exact"]), ["down"])), _cache[13] || (_cache[13] = vue.withKeys(vue.withModifiers(function () { - return _ctx.pointerBackward && _ctx.pointerBackward.apply(_ctx, arguments); - }, ["prevent", "exact"]), ["up"])), _cache[14] || (_cache[14] = vue.withKeys(vue.withModifiers(function () { - return _ctx.pointerFirst && _ctx.pointerFirst.apply(_ctx, arguments); - }, ["prevent", "exact"]), ["home"])), _cache[15] || (_cache[15] = vue.withKeys(vue.withModifiers(function () { - return _ctx.pointerLast && _ctx.pointerLast.apply(_ctx, arguments); - }, ["prevent", "exact"]), ["end"])), _cache[16] || (_cache[16] = function () { - return _ctx.typeAhead && _ctx.typeAhead.apply(_ctx, arguments); - })], - id: "vs".concat(_ctx.instance.uid, "-combobox"), - role: _ctx.searchable ? 'combobox' : null, - "aria-expanded": _ctx.isFocusing, - "aria-haspopup": "listbox", - "aria-owns": "vs".concat(_ctx.instance.uid, "-listbox"), - "aria-activedescendant": _ctx.highlightedOriginalIndex === null ? null : "vs".concat(_ctx.instance.uid, "-option-").concat(_ctx.highlightedOriginalIndex), - "aria-busy": _ctx.loading, - "aria-disabled": _ctx.disabled - }), [vue.createElementVNode("div", _hoisted_2, [_ctx.multiple && _ctx.taggable && _ctx.modelValue.length === 0 || _ctx.searchable === false && _ctx.taggable === false ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [vue.renderSlot(_ctx.$slots, "label", { - selected: _ctx.selected - }, function () { - return [vue.createElementVNode("input", { - placeholder: _ctx.innerPlaceholder, - autocomplete: _ctx.autocomplete, - readonly: "", - onClick: _cache[0] || (_cache[0] = function () { - return _ctx.focus && _ctx.focus.apply(_ctx, arguments); - }) - }, null, 8 - /* PROPS */ - , _hoisted_4)]; - })])) : vue.createCommentVNode("v-if", true), _ctx.multiple && _ctx.taggable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { - key: 1 - }, [vue.createVNode(_component_v_tags, { - modelValue: _ctx.optionsWithInfo, - "collapse-tags": _ctx.collapseTags, - tabindex: "-1", - onClick: _ctx.focus - }, { - "default": vue.withCtx(function (_ref) { - var option = _ref.option; - return [vue.renderSlot(_ctx.$slots, "tag", { - option: option.originalOption, - remove: function remove() { - return _ctx.addOrRemoveOption(_ctx.$event, option); - } - }, function () { - return [vue.createElementVNode("span", null, vue.toDisplayString(option.label), 1 - /* TEXT */ - ), vue.createElementVNode("img", { - src: _imports_0, - alt: "delete tag", - "class": "icon delete", - onClick: vue.withModifiers(function () { - return _ctx.addOrRemoveOption(_ctx.$event, option); - }, ["prevent", "stop"]) - }, null, 8 - /* PROPS */ - , _hoisted_5)]; - })]; - }), - _: 3 - /* FORWARDED */ - - }, 8 - /* PROPS */ - , ["modelValue", "collapse-tags", "onClick"]), vue.renderSlot(_ctx.$slots, "toggle", { - isFocusing: _ctx.isFocusing, - toggle: _ctx.toggle - }, function () { - return [vue.createElementVNode("span", { - "class": vue.normalizeClass(["icon arrow-downward", { - active: _ctx.isFocusing - }]), - onClick: _cache[1] || (_cache[1] = function () { - return _ctx.toggle && _ctx.toggle.apply(_ctx, arguments); - }), - onMousedown: _cache[2] || (_cache[2] = vue.withModifiers(function () {}, ["prevent", "stop"])) - }, null, 34 - /* CLASS, HYDRATE_EVENTS */ - )]; - })], 64 - /* STABLE_FRAGMENT */ - )) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { - key: 2 - }, [_ctx.searchable ? (vue.openBlock(), vue.createBlock(_component_v_input, { - key: 0, - ref: "input", - modelValue: _ctx.searchingInputValue, - "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) { - return _ctx.searchingInputValue = $event; - }), - disabled: _ctx.disabled, - autocomplete: _ctx.autocomplete, - placeholder: _ctx.isFocusing ? _ctx.searchPlaceholder : _ctx.innerPlaceholder, - onInput: _ctx.handleInputForInput, - onChange: _ctx.handleChangeForInput, - onFocus: _ctx.handleFocusForInput, - onBlur: _ctx.handleBlurForInput, - onEscape: _ctx.blur, - autofocus: _ctx.autofocus || _ctx.taggable && _ctx.searchable, - tabindex: _ctx.tabindex, - comboboxUid: _ctx.instance.uid - }, null, 8 - /* PROPS */ - , ["modelValue", "disabled", "autocomplete", "placeholder", "onInput", "onChange", "onFocus", "onBlur", "onEscape", "autofocus", "tabindex", "comboboxUid"])) : vue.createCommentVNode("v-if", true), _ctx.loading ? vue.renderSlot(_ctx.$slots, "loading", { - key: 1 - }, function () { - return [_hoisted_6]; - }) : vue.renderSlot(_ctx.$slots, "toggle", { - key: 2, - isFocusing: _ctx.isFocusing, - toggle: _ctx.toggle - }, function () { - return [vue.createElementVNode("span", { - "class": vue.normalizeClass(["icon arrow-downward", { - active: _ctx.isFocusing - }]), - onClick: _cache[4] || (_cache[4] = function () { - return _ctx.toggle && _ctx.toggle.apply(_ctx, arguments); - }), - onMousedown: _cache[5] || (_cache[5] = vue.withModifiers(function () {}, ["prevent", "stop"])) - }, null, 34 - /* CLASS, HYDRATE_EVENTS */ - )]; - })], 64 - /* STABLE_FRAGMENT */ - ))]), _ctx.multiple && _ctx.taggable && _ctx.searchable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [vue.withDirectives(vue.createVNode(_component_v_input, { - ref: "input", - modelValue: _ctx.searchingInputValue, - "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) { - return _ctx.searchingInputValue = $event; - }), - disabled: _ctx.disabled, - autocomplete: _ctx.autocomplete, - placeholder: _ctx.isFocusing ? _ctx.searchPlaceholder : _ctx.innerPlaceholder, - onInput: _ctx.handleInputForInput, - onChange: _ctx.handleChangeForInput, - onFocus: _ctx.handleFocusForInput, - onBlur: _ctx.handleBlurForInput, - onEscape: _ctx.blur, - autofocus: _ctx.autofocus || _ctx.taggable && _ctx.searchable, - tabindex: _ctx.tabindex, - comboboxUid: _ctx.instance.uid - }, null, 8 - /* PROPS */ - , ["modelValue", "disabled", "autocomplete", "placeholder", "onInput", "onChange", "onFocus", "onBlur", "onEscape", "autofocus", "tabindex", "comboboxUid"]), [[vue.vShow, _ctx.isFocusing]]), _ctx.loading ? vue.renderSlot(_ctx.$slots, "loading", { - key: 0 - }, function () { - return [_hoisted_8]; - }) : vue.createCommentVNode("v-if", true)])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_v_dropdown, { - ref: "dropdown", - modelValue: _ctx.optionsWithInfo, - "onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) { - return _ctx.optionsWithInfo = $event; - }), - onClickItem: _ctx.addOrRemoveOption, - onMouseenter: _cache[8] || (_cache[8] = function (ev, option) { - return _ctx.pointerSet(option.originalIndex); - }), - comboboxUid: _ctx.instance.uid, - maxHeight: _ctx.maxHeight, - highlightedOriginalIndex: _ctx.highlightedOriginalIndex - }, { - "default": vue.withCtx(function (_ref2) { - var option = _ref2.option; - return [vue.renderSlot(_ctx.$slots, "dropdown-item", { - option: option.originalOption - }, function () { - return [vue.createElementVNode("span", null, vue.toDisplayString(option.label), 1 - /* TEXT */ - )]; - })]; - }), - _: 3 - /* FORWARDED */ - - }, 8 - /* PROPS */ - , ["modelValue", "onClickItem", "comboboxUid", "maxHeight", "highlightedOriginalIndex"])], 16 - /* FULL_PROPS */ - , _hoisted_1); - } - - VueSelect.render = render; - VueSelect.__file = "src/index.vue"; - - return VueSelect; - -})(Vue); diff --git a/js/vue-next-select.min.js b/js/vue-next-select.min.js deleted file mode 100644 index f225b13..0000000 --- a/js/vue-next-select.min.js +++ /dev/null @@ -1 +0,0 @@ -this.VueNextSelect=function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,u=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){i=!0,r=e},f:function(){try{u||null==n.return||n.return()}finally{if(i)throw r}}}}var r={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(t,n){var o=e.ref(null);return e.onMounted((function(){t.autofocus&&o.value.focus()})),e.onUpdated((function(){t.autofocus&&o.value.focus()})),{handleInput:function(e){n.emit("input",e),n.emit("update:modelValue",e.target.value)},handleChange:function(e){n.emit("change",e),n.emit("update:modelValue",e.target.value)},handleFocus:function(e){n.emit("focus",e)},handleBlur:function(e){n.emit("blur",e)},input:o,handleEscape:function(e){o.value.blur(),n.emit("escape",e)}}}},u={class:"vue-input"},i=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];r.render=function(t,n,o,a,l,r){return e.openBlock(),e.createElementBlock("div",u,[e.renderSlot(t.$slots,"prepend"),e.createElementVNode("input",{ref:"input",autocomplete:o.autocomplete,modelValue:o.modelValue,placeholder:o.placeholder,disabled:o.disabled,onInput:n[0]||(n[0]=function(){return a.handleInput&&a.handleInput.apply(a,arguments)}),onChange:n[1]||(n[1]=function(){return a.handleChange&&a.handleChange.apply(a,arguments)}),onFocus:n[2]||(n[2]=function(){return a.handleFocus&&a.handleFocus.apply(a,arguments)}),onBlur:n[3]||(n[3]=function(){return a.handleBlur&&a.handleBlur.apply(a,arguments)}),onKeyup:n[4]||(n[4]=e.withKeys(e.withModifiers((function(){return a.handleEscape&&a.handleEscape.apply(a,arguments)}),["exact"]),["esc"])),tabindex:o.tabindex,autofocus:o.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(o.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(o.comboboxUid,"-combobox")},null,40,i),e.renderSlot(t.$slots,"append")])},r.__file="src/components/input.vue";var c={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every((function(e){return void 0!==t(e.key)&&void 0!==e.label&&"boolean"==typeof e.selected}))}},collapseTags:{type:Boolean}},emits:["click"],setup:function(t,n){return{dataAttrs:e.inject("dataAttrs"),handleClick:function(e){n.emit("click",e)}}}};c.render=function(t,n,o,a,l,r){return e.openBlock(),e.createElementBlock("ul",e.mergeProps({class:["vue-tags",{collapsed:o.collapseTags}],onMousedown:n[0]||(n[0]=e.withModifiers((function(){}),["prevent"])),tabindex:"-1",onClick:n[1]||(n[1]=function(){return a.handleClick&&a.handleClick.apply(a,arguments)})},a.dataAttrs),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.modelValue,(function(n){return e.openBlock(),e.createElementBlock(e.Fragment,{key:n.key},[n.group?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["vue-tag",{selected:n.selected}])},[e.renderSlot(t.$slots,"default",{option:n},(function(){return[e.createElementVNode("span",null,e.toDisplayString(n.label),1)]}))],2))],64)})),128))],16)},c.__file="src/components/tags.vue";var d={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every((function(e){return void 0!==t(e.key)&&void 0!==e.label&&"boolean"==typeof e.selected}))}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(t,n){return{dataAttrs:e.inject("dataAttrs"),handleClickItem:function(e,t){t.disabled||n.emit("click-item",e,t)},handleMouseenter:function(e,t){n.emit("mouseenter",e,t)}}}},s=["id","aria-multiselectable","aria-busy","aria-disabled"],p=["onClick","onMouseenter","id","aria-selected","aria-disabled"];d.render=function(t,n,o,a,l,r){return e.openBlock(),e.createElementBlock("ul",e.mergeProps({class:"vue-dropdown",style:{maxHeight:o.maxHeight+"px"},onMousedown:n[0]||(n[0]=e.withModifiers((function(){}),["prevent"]))},a.dataAttrs,{role:"listbox",id:"vs".concat(o.comboboxUid,"-listbox"),"aria-multiselectable":a.dataAttrs["data-multiple"],"aria-busy":a.dataAttrs["data-loading"],"aria-disabled":a.dataAttrs["data-disabled"]}),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.modelValue,(function(n,l){return e.openBlock(),e.createElementBlock(e.Fragment,{key:n.key},[n.visible&&!1===n.hidden?(e.openBlock(),e.createElementBlock("li",{key:0,onClick:function(e){return a.handleClickItem(e,n)},class:e.normalizeClass(["vue-dropdown-item",{selected:n.selected,disabled:n.disabled,highlighted:n.originalIndex===o.highlightedOriginalIndex,group:n.group}]),onMouseenter:function(e){return a.handleMouseenter(e,n)},role:"option",id:"vs".concat(o.comboboxUid,"-option-").concat(l),"aria-selected":!!n.selected||!!n.disabled&&void 0,"aria-disabled":n.disabled},[e.renderSlot(t.$slots,"default",{option:n},(function(){return[e.createElementVNode("span",null,e.toDisplayString(n.label),1)]}))],42,p)):e.createCommentVNode("v-if",!0)],64)})),128))],16,s)},d.__file="src/components/dropdown.vue";var v=function(e,t,n){var o=n.valueBy;return o(e)===o(t)},f=function(e,t,n){var o=n.valueBy;return e.some((function(e){return v(e,t,{valueBy:o})}))},m=function(e,t,n){var o=n.valueBy;return e.find((function(e){return o(e)===t}))},g=function(e,t,n){var o=n.max,a=n.valueBy;return f(e,t,{valueBy:a})||e.length>=o?e:e.concat(t)},h=function(e,t,n){var o=n.min,a=n.valueBy;return!1===f(e,t,{valueBy:a})||e.length<=o?e:e.filter((function(e){return!1===v(e,t,{valueBy:a})}))},y=function(t){return e.computed((function(){return"function"==typeof t.value?t.value:"string"==typeof t.value?function(e){return t.value.split(".").reduce((function(e,t){return e[t]}),e)}:function(e){return e}}))},b=function(t,n){var o=e.computed((function(){return t.value.reduce((function(e,t){return Object.assign(e,(n={},o=t.originalIndex,a=t,o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n));var n,o,a}),{})})),a=function(e){var t=o.value[e];return void 0!==t&&(!1!==r(t)&&(n.value=e,!0))},r=function(e){return!e.disabled&&!e.hidden&&e.visible},u=e.computed((function(){return t.value.some((function(e){return r(e)}))}));return e.watchEffect((function(){if(!1===u.value&&(n.value=null),null!==n.value&&t.value.length<=n.value){var e,o=l(t.value.reverse());try{for(o.s();!(e=o.n()).done;){var i=e.value;if(a(i.originalIndex))break}}catch(e){o.e(e)}finally{o.f()}}if(null===n.value||!1===r(t.value[n.value])){var c,d=l(t.value);try{for(d.s();!(c=d.n()).done;){var s=c.value;if(a(s.originalIndex))break}}catch(e){d.e(e)}finally{d.f()}}})),{pointerForward:function(){if(!1!==u.value&&null!==n.value)for(var e=n.value+1,o=0;e!==n.value&&o++c.value.$el.clientHeight+c.value.$el.scrollTop&&n++a.min,"data-total-length":a.options.length,"data-multiple":t.multiple,"data-loading":t.loading,"data-disabled":t.disabled}}));e.provide("dataAttrs",H);var _=e.computed((function(){return D.value.filter((function(e){return e.selected})).filter((function(e){return!e.group}))})),W=e.computed((function(){return t.multiple?0===_.value.length?t.placeholder:1===_.value.length?"1 option selected":_.value.length+" options selected":0===_.value.length?t.placeholder:_.value[0].label+""})),Z=e.computed((function(){var e=_.value.map((function(e){return e.originalOption}));return t.multiple?e:e[0]||r.value})),K=e.ref();return e.watch((function(){return[t.openDirection,p.value]}),(function(){var e,n;K.value=null!==(n=null!==(e=t.openDirection)&&void 0!==e?e:function(){if(void 0===i.value)return;if(void 0===window)return;return window.innerHeight-i.value.getBoundingClientRect().bottom>=t.maxHeight?"bottom":"top"}())&&void 0!==n?n:"bottom"}),{immediate:!0}),{instance:u,isFocusing:p,wrapper:i,dropdown:c,input:d,focus:v,blur:B,toggle:function(){p.value?B():v()},searchingInputValue:w,handleInputForInput:function(e){o.emit("search:input",e)},handleChangeForInput:function(e){o.emit("search:change",e)},handleFocusForInput:function(e){v()},handleBlurForInput:function(e){B()},optionsWithInfo:D,addOrRemoveOption:function(e,n){t.disabled||(n.group&&t.multiple?N(e,n):F(e,n),O(),!0===t.closeOnSelect&&(p.value=!1),!0===t.clearOnSelect&&w.value&&C())},dataAttrs:H,innerPlaceholder:W,selected:Z,highlightedOriginalIndex:T,pointerForward:function(){j(),e.nextTick(q)},pointerBackward:function(){z(),e.nextTick(q)},pointerFirst:function(){var t,n=l(a.options.keys());try{for(n.s();!(t=n.n()).done;){var o=t.value;if($(o))break}}catch(e){n.e(e)}finally{n.f()}e.nextTick(q)},pointerLast:function(){var t,o=l(n(a.options.keys()).reverse());try{for(o.s();!(t=o.n()).done;){var r=t.value;if($(r))break}}catch(e){o.e(e)}finally{o.f()}e.nextTick(q)},typeAhead:function(e){var n,o;if(!t.searchable){var r=!1;if(P.test(e.key)?(U+=e.key.toLowerCase(),r=!0):"Space"===e.code&&(U+=" "),r){var u,i=l(R.value);try{for(i.s();!(u=i.n()).done;){var c=u.value;if(!0===(null===(o=null===(n=a.labelBy(a.options[c]))||void 0===n?void 0:n.toLowerCase())||void 0===o?void 0:o.startsWith(U))&&$(c))break}}catch(e){i.e(e)}finally{i.f()}clearTimeout(S),S=setTimeout((function(){U=""}),500)}}},pointerSet:$,direction:K}},components:{VInput:r,VTags:c,VDropdown:d}});B.__VERSION__="2.10.4";var w=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],I={class:"vue-select-header"},x={key:0,class:"vue-input"},k=["placeholder","autocomplete"],V=["onClick"],M=e.createElementVNode("span",{class:"icon loading"},[e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div")],-1),E={key:0,class:"vue-select-input-wrapper"},S=e.createElementVNode("span",{class:"icon loading"},[e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div")],-1);return B.render=function(t,n,o,a,l,r){var u=e.resolveComponent("v-tags"),i=e.resolveComponent("v-input"),c=e.resolveComponent("v-dropdown");return e.openBlock(),e.createElementBlock("div",e.mergeProps({ref:"wrapper",class:["vue-select",["direction-".concat(t.direction)]],tabindex:t.isFocusing?-1:t.tabindex,onFocus:n[9]||(n[9]=function(){return t.focus&&t.focus.apply(t,arguments)}),onBlur:n[10]||(n[10]=function(e){return!t.searchable&&t.blur(e)})},Object.assign({},t.dataAttrs,t.$attrs),{onKeypress:n[11]||(n[11]=e.withKeys(e.withModifiers((function(){return null!==t.highlightedOriginalIndex&&t.addOrRemoveOption(t.$event,t.optionsWithInfo[t.highlightedOriginalIndex])}),["prevent","exact"]),["enter"])),onKeydown:[n[12]||(n[12]=e.withKeys(e.withModifiers((function(){return t.pointerForward&&t.pointerForward.apply(t,arguments)}),["prevent","exact"]),["down"])),n[13]||(n[13]=e.withKeys(e.withModifiers((function(){return t.pointerBackward&&t.pointerBackward.apply(t,arguments)}),["prevent","exact"]),["up"])),n[14]||(n[14]=e.withKeys(e.withModifiers((function(){return t.pointerFirst&&t.pointerFirst.apply(t,arguments)}),["prevent","exact"]),["home"])),n[15]||(n[15]=e.withKeys(e.withModifiers((function(){return t.pointerLast&&t.pointerLast.apply(t,arguments)}),["prevent","exact"]),["end"])),n[16]||(n[16]=function(){return t.typeAhead&&t.typeAhead.apply(t,arguments)})],id:"vs".concat(t.instance.uid,"-combobox"),role:t.searchable?"combobox":null,"aria-expanded":t.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(t.instance.uid,"-listbox"),"aria-activedescendant":null===t.highlightedOriginalIndex?null:"vs".concat(t.instance.uid,"-option-").concat(t.highlightedOriginalIndex),"aria-busy":t.loading,"aria-disabled":t.disabled}),[e.createElementVNode("div",I,[t.multiple&&t.taggable&&0===t.modelValue.length||!1===t.searchable&&!1===t.taggable?(e.openBlock(),e.createElementBlock("div",x,[e.renderSlot(t.$slots,"label",{selected:t.selected},(function(){return[e.createElementVNode("input",{placeholder:t.innerPlaceholder,autocomplete:t.autocomplete,readonly:"",onClick:n[0]||(n[0]=function(){return t.focus&&t.focus.apply(t,arguments)})},null,8,k)]}))])):e.createCommentVNode("v-if",!0),t.multiple&&t.taggable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{modelValue:t.optionsWithInfo,"collapse-tags":t.collapseTags,tabindex:"-1",onClick:t.focus},{default:e.withCtx((function(n){var o=n.option;return[e.renderSlot(t.$slots,"tag",{option:o.originalOption,remove:function(){return t.addOrRemoveOption(t.$event,o)}},(function(){return[e.createElementVNode("span",null,e.toDisplayString(o.label),1),e.createElementVNode("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:e.withModifiers((function(){return t.addOrRemoveOption(t.$event,o)}),["prevent","stop"])},null,8,V)]}))]})),_:3},8,["modelValue","collapse-tags","onClick"]),e.renderSlot(t.$slots,"toggle",{isFocusing:t.isFocusing,toggle:t.toggle},(function(){return[e.createElementVNode("span",{class:e.normalizeClass(["icon arrow-downward",{active:t.isFocusing}]),onClick:n[1]||(n[1]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onMousedown:n[2]||(n[2]=e.withModifiers((function(){}),["prevent","stop"]))},null,34)]}))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.searchable?(e.openBlock(),e.createBlock(i,{key:0,ref:"input",modelValue:t.searchingInputValue,"onUpdate:modelValue":n[3]||(n[3]=function(e){return t.searchingInputValue=e}),disabled:t.disabled,autocomplete:t.autocomplete,placeholder:t.isFocusing?t.searchPlaceholder:t.innerPlaceholder,onInput:t.handleInputForInput,onChange:t.handleChangeForInput,onFocus:t.handleFocusForInput,onBlur:t.handleBlurForInput,onEscape:t.blur,autofocus:t.autofocus||t.taggable&&t.searchable,tabindex:t.tabindex,comboboxUid:t.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):e.createCommentVNode("v-if",!0),t.loading?e.renderSlot(t.$slots,"loading",{key:1},(function(){return[M]})):e.renderSlot(t.$slots,"toggle",{key:2,isFocusing:t.isFocusing,toggle:t.toggle},(function(){return[e.createElementVNode("span",{class:e.normalizeClass(["icon arrow-downward",{active:t.isFocusing}]),onClick:n[4]||(n[4]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onMousedown:n[5]||(n[5]=e.withModifiers((function(){}),["prevent","stop"]))},null,34)]}))],64))]),t.multiple&&t.taggable&&t.searchable?(e.openBlock(),e.createElementBlock("div",E,[e.withDirectives(e.createVNode(i,{ref:"input",modelValue:t.searchingInputValue,"onUpdate:modelValue":n[6]||(n[6]=function(e){return t.searchingInputValue=e}),disabled:t.disabled,autocomplete:t.autocomplete,placeholder:t.isFocusing?t.searchPlaceholder:t.innerPlaceholder,onInput:t.handleInputForInput,onChange:t.handleChangeForInput,onFocus:t.handleFocusForInput,onBlur:t.handleBlurForInput,onEscape:t.blur,autofocus:t.autofocus||t.taggable&&t.searchable,tabindex:t.tabindex,comboboxUid:t.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[e.vShow,t.isFocusing]]),t.loading?e.renderSlot(t.$slots,"loading",{key:0},(function(){return[S]})):e.createCommentVNode("v-if",!0)])):e.createCommentVNode("v-if",!0),e.createVNode(c,{ref:"dropdown",modelValue:t.optionsWithInfo,"onUpdate:modelValue":n[7]||(n[7]=function(e){return t.optionsWithInfo=e}),onClickItem:t.addOrRemoveOption,onMouseenter:n[8]||(n[8]=function(e,n){return t.pointerSet(n.originalIndex)}),comboboxUid:t.instance.uid,maxHeight:t.maxHeight,highlightedOriginalIndex:t.highlightedOriginalIndex},{default:e.withCtx((function(n){var o=n.option;return[e.renderSlot(t.$slots,"dropdown-item",{option:o.originalOption},(function(){return[e.createElementVNode("span",null,e.toDisplayString(o.label),1)]}))]})),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,w)},B.__file="src/index.vue",B}(Vue); diff --git a/js/vue.js b/js/vue.js deleted file mode 100644 index e45eed3..0000000 --- a/js/vue.js +++ /dev/null @@ -1,15754 +0,0 @@ -var Vue = (function (exports) { - 'use strict'; - - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ - function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; - } - - /** - * dev only flag -> name mapping - */ - const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` - }; - - /** - * Dev only - */ - const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' - }; - - 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(GLOBALS_WHITE_LISTED); - - const range = 2; - function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); - } - - /** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); - /** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. ` - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. - hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } - } - return node; - }; - return [hydrate, hydrateNode]; - } - - /* eslint-disable no-restricted-globals */ - let supported; - let perf; - function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now()); - } - } - function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now()); - } - } - function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } - return supported; - } - - const queuePostRenderEffect = queueEffectWithSuspense - ; - /** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ - function createRenderer(options) { - return baseCreateRenderer(options); - } - // Separate API for creating hydration-enabled renderer. - // Hydration logic is only used when calling this function, making it - // tree-shakable. - function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); - } - // implementation - function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); - } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); - } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); - } - else { - // there's no support for dynamic comments - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); - } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const 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); - } - else { - 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, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `