diff --git a/babybuddy/static_src/js/tags_editor.js b/babybuddy/static_src/js/tags_editor.js index f0b73e17..8038e579 100644 --- a/babybuddy/static_src/js/tags_editor.js +++ b/babybuddy/static_src/js/tags_editor.js @@ -191,7 +191,7 @@ } /** - * Callback called when the the "Add" button of the add-tag input is + * Callback called when the "Add" button of the add-tag input is * clicked or enter is pressed in the editor. */ onCreateTagClicked() { diff --git a/package-lock.json b/package-lock.json index ec2986bf..73767bd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "license": "BSD-2-Clause", "devDependencies": { "@popperjs/core": "^2.11.8", - "@ronilaukkarinen/gulp-stylelint": "^14.1.1", + "@ronilaukkarinen/gulp-stylelint": "^14.1.2", "bootstrap": "^5.3.2", "del": "^6.1.1", "gulp": "^4.0.2", @@ -26,10 +26,10 @@ "jquery": "^3.7.1", "masonry-layout": "^4.2.2", "npm-force-resolutions": "^0.0.10", - "plotly.js": "^2.27.0", + "plotly.js": "^2.28.0", "pulltorefreshjs": "^0.1.22", "pump": "^3.0.0", - "sass": "^1.69.4", + "sass": "^1.70.0", "stylelint": "^15.11.0", "stylelint-config-recommended-scss": "^13.0.0", "stylelint-order": "^6.0.3", @@ -378,6 +378,39 @@ "elementary-circuits-directed-graph": "^1.0.4" } }, + "node_modules/@plotly/mapbox-gl": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@plotly/mapbox-gl/-/mapbox-gl-1.13.4.tgz", + "integrity": "sha512-sR3/Pe5LqT/fhYgp4rT4aSFf1rTsxMbGiH6Hojc7PH36ny5Bn17iVFUjpzycafETURuFbLZUfjODO8LvSI+5zQ==", + "dev": true, + "dependencies": { + "@mapbox/geojson-rewind": "^0.5.2", + "@mapbox/geojson-types": "^1.0.2", + "@mapbox/jsonlint-lines-primitives": "^2.0.2", + "@mapbox/mapbox-gl-supported": "^1.5.0", + "@mapbox/point-geometry": "^0.1.0", + "@mapbox/tiny-sdf": "^1.1.1", + "@mapbox/unitbezier": "^0.0.0", + "@mapbox/vector-tile": "^1.3.1", + "@mapbox/whoots-js": "^3.1.0", + "csscolorparser": "~1.0.3", + "earcut": "^2.2.2", + "geojson-vt": "^3.2.1", + "gl-matrix": "^3.2.1", + "grid-index": "^1.1.0", + "murmurhash-js": "^1.0.0", + "pbf": "^3.2.1", + "potpack": "^1.0.1", + "quickselect": "^2.0.0", + "rw": "^1.3.3", + "supercluster": "^7.1.0", + "tinyqueue": "^2.0.3", + "vt-pbf": "^3.1.1" + }, + "engines": { + "node": ">=6.4.0" + } + }, "node_modules/@plotly/point-cluster": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/@plotly/point-cluster/-/point-cluster-3.1.9.tgz", @@ -407,9 +440,9 @@ } }, "node_modules/@ronilaukkarinen/gulp-stylelint": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@ronilaukkarinen/gulp-stylelint/-/gulp-stylelint-14.1.1.tgz", - "integrity": "sha512-3gXiYu0PkPTXs7l70V6zrHCy9O1KziMTKy9fcDho2KXiAxUcFeBaZ8Gw6Sz46Rj5vJTXMgrVd4fAoRHfxO3tBQ==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@ronilaukkarinen/gulp-stylelint/-/gulp-stylelint-14.1.2.tgz", + "integrity": "sha512-Ckg2cD1MVWBJTq8Yp6uxCLB5DtDrhybl1RfOAGv9QodxIF5Bk5OgRhfEkue2do23oYq5147VdATPgd5n4ShV8Q==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", @@ -1176,6 +1209,15 @@ "node": ">=0.10.0" } }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/beeper": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", @@ -5599,12 +5641,13 @@ } }, "node_modules/mapbox-gl": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.10.1.tgz", - "integrity": "sha512-0aHt+lFUpYfvh0kMIqXqNXqoYMuhuAsMlw87TbhWrw78Tx2zfuPI0Lx31/YPUgJ+Ire0tzQ4JnuBL7acDNXmMg==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.13.3.tgz", + "integrity": "sha512-p8lJFEiqmEQlyv+DQxFAOG/XPWN0Wp7j/Psq93Zywz7qt9CcUKFYDBOoOEKzqe6gudHVJY8/Bhqw6VDpX2lSBg==", "dev": true, + "peer": true, "dependencies": { - "@mapbox/geojson-rewind": "^0.5.0", + "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/geojson-types": "^1.0.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/mapbox-gl-supported": "^1.5.0", @@ -5618,13 +5661,12 @@ "geojson-vt": "^3.2.1", "gl-matrix": "^3.2.1", "grid-index": "^1.1.0", - "minimist": "^1.2.5", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", "potpack": "^1.0.1", "quickselect": "^2.0.0", "rw": "^1.3.3", - "supercluster": "^7.0.0", + "supercluster": "^7.1.0", "tinyqueue": "^2.0.3", "vt-pbf": "^3.1.1" }, @@ -6851,17 +6893,19 @@ } }, "node_modules/plotly.js": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.27.0.tgz", - "integrity": "sha512-48LjCf+A7MmgNTPBBomYdIcFaY/oWjIdRT7k+qmXz9opcMCAJiBrpbslWyfmR8HwmTxJRGdeyoWWlO8AHkvq5A==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.28.0.tgz", + "integrity": "sha512-fEvAapXhFTFO/PM5LnUvoG+tgOxRjjW7C7nHwVaDLKfq0F+SF/p3zRgo7vKwk9588WfgEHvuk6yRnp1mxZ+YSw==", "dev": true, "dependencies": { "@plotly/d3": "3.8.1", "@plotly/d3-sankey": "0.7.2", "@plotly/d3-sankey-circular": "0.33.1", + "@plotly/mapbox-gl": "v1.13.4", "@turf/area": "^6.4.0", "@turf/bbox": "^6.4.0", "@turf/centroid": "^6.0.2", + "base64-arraybuffer": "^1.0.2", "canvas-fit": "^1.5.0", "color-alpha": "1.0.4", "color-normalize": "1.5.0", @@ -6883,7 +6927,6 @@ "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", "is-mobile": "^4.0.0", - "mapbox-gl": "1.10.1", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", "mouse-wheel": "^1.2.0", @@ -6895,7 +6938,7 @@ "regl": "npm:@plotly/regl@^2.1.2", "regl-error2d": "^2.0.12", "regl-line2d": "^3.1.2", - "regl-scatter2d": "^3.2.9", + "regl-scatter2d": "^3.3.1", "regl-splom": "^1.0.14", "strongly-connected-components": "^1.0.1", "superscript-text": "^1.0.0", @@ -7649,9 +7692,9 @@ } }, "node_modules/regl-scatter2d": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.2.9.tgz", - "integrity": "sha512-PNrXs+xaCClKpiB2b3HZ2j3qXQXhC5kcTh/Nfgx9rLO0EpEhab0BSQDqAsbdbpdf+pSHSJvbgitB7ulbGeQ+Fg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.3.1.tgz", + "integrity": "sha512-seOmMIVwaCwemSYz/y4WE0dbSO9svNFSqtTh5RE57I7PjGo3tcUYKtH0MTSoshcAsreoqN8HoCtnn8wfHXXfKQ==", "dev": true, "dependencies": { "@plotly/point-cluster": "^3.1.9", @@ -7972,9 +8015,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.69.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.4.tgz", - "integrity": "sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==", + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.70.0.tgz", + "integrity": "sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index 0254ec5f..79b072a2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@popperjs/core": "^2.11.8", - "@ronilaukkarinen/gulp-stylelint": "^14.1.1", + "@ronilaukkarinen/gulp-stylelint": "^14.1.2", "bootstrap": "^5.3.2", "del": "^6.1.1", "gulp": "^4.0.2", @@ -26,10 +26,10 @@ "jquery": "^3.7.1", "masonry-layout": "^4.2.2", "npm-force-resolutions": "^0.0.10", - "plotly.js": "^2.27.0", + "plotly.js": "^2.28.0", "pulltorefreshjs": "^0.1.22", "pump": "^3.0.0", - "sass": "^1.69.4", + "sass": "^1.70.0", "stylelint": "^15.11.0", "stylelint-config-recommended-scss": "^13.0.0", "stylelint-order": "^6.0.3", diff --git a/static/admin/css/base.64976e0f7339.css.gz b/static/admin/css/base.64976e0f7339.css.gz deleted file mode 100644 index e8dc2686..00000000 Binary files a/static/admin/css/base.64976e0f7339.css.gz and /dev/null differ diff --git a/static/admin/css/base.64976e0f7339.css b/static/admin/css/base.6be58084bde8.css similarity index 96% rename from static/admin/css/base.64976e0f7339.css rename to static/admin/css/base.6be58084bde8.css index 456af38a..0683419c 100644 --- a/static/admin/css/base.64976e0f7339.css +++ b/static/admin/css/base.6be58084bde8.css @@ -22,11 +22,11 @@ html[data-theme="light"], --breadcrumbs-fg: #c4dce8; --breadcrumbs-link-fg: var(--body-bg); - --breadcrumbs-bg: var(--primary); + --breadcrumbs-bg: #264b5d; --link-fg: #417893; --link-hover-color: #036; - --link-selected-fg: #5b80b2; + --link-selected-fg: var(--secondary); --hairline-color: #e8e8e8; --border-color: #ccc; @@ -42,10 +42,10 @@ html[data-theme="light"], --selected-row: #ffc; --button-fg: #fff; - --button-bg: var(--primary); - --button-hover-bg: #609ab6; - --default-button-bg: var(--secondary); - --default-button-hover-bg: #205067; + --button-bg: var(--secondary); + --button-hover-bg: #205067; + --default-button-bg: #205067; + --default-button-hover-bg: var(--secondary); --close-button-bg: #747474; --close-button-hover-bg: #333; --delete-button-bg: #ba2121; @@ -56,8 +56,6 @@ html[data-theme="light"], --object-tools-hover-bg: var(--close-button-hover-bg); --font-family-primary: - -apple-system, - BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, @@ -104,7 +102,7 @@ body { /* LINKS */ a:link, a:visited { - color: var(--link-fg); + color: var(--body-fg); text-decoration: none; transition: color 0.15s, background 0.15s; } @@ -586,7 +584,7 @@ input[type=button][disabled].default { font-weight: 400; font-size: 0.8125rem; text-align: left; - background: var(--primary); + background: var(--header-bg); color: var(--header-link-color); } @@ -722,6 +720,11 @@ div.breadcrumbs a:focus, div.breadcrumbs a:hover { background: url("../img/icon-viewlink.41eb31f7826e.svg") 0 1px no-repeat; } +.hidelink { + padding-left: 16px; + background: url("../img/icon-hidelink.8d245a995e18.svg") 0 1px no-repeat; +} + .addlink { padding-left: 16px; background: url("../img/icon-addlink.d519b3bab011.svg") 0 1px no-repeat; @@ -831,10 +834,6 @@ a.deletelink:focus, a.deletelink:hover { height: 100%; } -#container > div { - flex-shrink: 0; -} - #container > .main { display: flex; flex: 1 0 auto; @@ -919,7 +918,6 @@ a.deletelink:focus, a.deletelink:hover { padding: 10px 40px; background: var(--header-bg); color: var(--header-color); - overflow: hidden; } #header a:link, #header a:visited, #logout-form button { @@ -934,7 +932,7 @@ a.deletelink:focus, a.deletelink:hover { display: flex; } -#branding h1 { +#site-name { padding: 0; margin: 0; margin-inline-end: 20px; @@ -943,7 +941,7 @@ a.deletelink:focus, a.deletelink:hover { color: var(--header-branding-color); } -#branding h1 a:link, #branding h1 a:visited { +#site-name a:link, #site-name a:visited { color: var(--accent); } @@ -1090,6 +1088,9 @@ a.deletelink:focus, a.deletelink:hover { /* PAGINATOR */ .paginator { + display: flex; + align-items: center; + gap: 4px; font-size: 0.8125rem; padding-top: 10px; padding-bottom: 10px; @@ -1133,6 +1134,23 @@ a.deletelink:focus, a.deletelink:hover { background: var(--link-hover-color); } +.paginator input { + margin-left: auto; +} + .base-svgs { display: none; } + +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0,0,0,0); + white-space: nowrap; + border: 0; + color: var(--body-fg); + background-color: var(--body-bg); +} diff --git a/static/admin/css/base.6be58084bde8.css.gz b/static/admin/css/base.6be58084bde8.css.gz new file mode 100644 index 00000000..a377ed58 Binary files /dev/null and b/static/admin/css/base.6be58084bde8.css.gz differ diff --git a/static/admin/css/base.css b/static/admin/css/base.css index 72f4ae16..8a2837a5 100644 --- a/static/admin/css/base.css +++ b/static/admin/css/base.css @@ -22,11 +22,11 @@ html[data-theme="light"], --breadcrumbs-fg: #c4dce8; --breadcrumbs-link-fg: var(--body-bg); - --breadcrumbs-bg: var(--primary); + --breadcrumbs-bg: #264b5d; --link-fg: #417893; --link-hover-color: #036; - --link-selected-fg: #5b80b2; + --link-selected-fg: var(--secondary); --hairline-color: #e8e8e8; --border-color: #ccc; @@ -42,10 +42,10 @@ html[data-theme="light"], --selected-row: #ffc; --button-fg: #fff; - --button-bg: var(--primary); - --button-hover-bg: #609ab6; - --default-button-bg: var(--secondary); - --default-button-hover-bg: #205067; + --button-bg: var(--secondary); + --button-hover-bg: #205067; + --default-button-bg: #205067; + --default-button-hover-bg: var(--secondary); --close-button-bg: #747474; --close-button-hover-bg: #333; --delete-button-bg: #ba2121; @@ -56,8 +56,6 @@ html[data-theme="light"], --object-tools-hover-bg: var(--close-button-hover-bg); --font-family-primary: - -apple-system, - BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, @@ -104,7 +102,7 @@ body { /* LINKS */ a:link, a:visited { - color: var(--link-fg); + color: var(--body-fg); text-decoration: none; transition: color 0.15s, background 0.15s; } @@ -586,7 +584,7 @@ input[type=button][disabled].default { font-weight: 400; font-size: 0.8125rem; text-align: left; - background: var(--primary); + background: var(--header-bg); color: var(--header-link-color); } @@ -722,6 +720,11 @@ div.breadcrumbs a:focus, div.breadcrumbs a:hover { background: url(../img/icon-viewlink.svg) 0 1px no-repeat; } +.hidelink { + padding-left: 16px; + background: url(../img/icon-hidelink.svg) 0 1px no-repeat; +} + .addlink { padding-left: 16px; background: url(../img/icon-addlink.svg) 0 1px no-repeat; @@ -831,10 +834,6 @@ a.deletelink:focus, a.deletelink:hover { height: 100%; } -#container > div { - flex-shrink: 0; -} - #container > .main { display: flex; flex: 1 0 auto; @@ -919,7 +918,6 @@ a.deletelink:focus, a.deletelink:hover { padding: 10px 40px; background: var(--header-bg); color: var(--header-color); - overflow: hidden; } #header a:link, #header a:visited, #logout-form button { @@ -934,7 +932,7 @@ a.deletelink:focus, a.deletelink:hover { display: flex; } -#branding h1 { +#site-name { padding: 0; margin: 0; margin-inline-end: 20px; @@ -943,7 +941,7 @@ a.deletelink:focus, a.deletelink:hover { color: var(--header-branding-color); } -#branding h1 a:link, #branding h1 a:visited { +#site-name a:link, #site-name a:visited { color: var(--accent); } @@ -1090,6 +1088,9 @@ a.deletelink:focus, a.deletelink:hover { /* PAGINATOR */ .paginator { + display: flex; + align-items: center; + gap: 4px; font-size: 0.8125rem; padding-top: 10px; padding-bottom: 10px; @@ -1133,6 +1134,23 @@ a.deletelink:focus, a.deletelink:hover { background: var(--link-hover-color); } +.paginator input { + margin-left: auto; +} + .base-svgs { display: none; } + +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0,0,0,0); + white-space: nowrap; + border: 0; + color: var(--body-fg); + background-color: var(--body-bg); +} diff --git a/static/admin/css/base.css.gz b/static/admin/css/base.css.gz index fa107378..ac71d24b 100644 Binary files a/static/admin/css/base.css.gz and b/static/admin/css/base.css.gz differ diff --git a/static/admin/css/changelists.9237a1ac391b.css b/static/admin/css/changelists.47cb433b29d4.css similarity index 95% rename from static/admin/css/changelists.9237a1ac391b.css rename to static/admin/css/changelists.47cb433b29d4.css index a7545131..573c3896 100644 --- a/static/admin/css/changelists.9237a1ac391b.css +++ b/static/admin/css/changelists.47cb433b29d4.css @@ -153,6 +153,7 @@ font-weight: 400; padding: 0 15px; margin-bottom: 10px; + cursor: pointer; } #changelist-filter details summary > * { @@ -215,9 +216,9 @@ color: var(--link-hover-color); } -#changelist-filter #changelist-filter-clear a { +#changelist-filter #changelist-filter-extra-actions { font-size: 0.8125rem; - padding-bottom: 10px; + margin-bottom: 10px; border-bottom: 1px solid var(--hairline-color); } @@ -265,6 +266,15 @@ background-color: var(--selected-row); } +@media (forced-colors: active) { + #changelist tbody tr.selected { + background-color: SelectedItem; + } + #changelist tbody tr:has(.action-select:checked) { + background-color: SelectedItem; + } +} + #changelist .actions { padding: 10px; background: var(--body-bg); diff --git a/static/admin/css/changelists.47cb433b29d4.css.gz b/static/admin/css/changelists.47cb433b29d4.css.gz new file mode 100644 index 00000000..1658ab0b Binary files /dev/null and b/static/admin/css/changelists.47cb433b29d4.css.gz differ diff --git a/static/admin/css/changelists.9237a1ac391b.css.gz b/static/admin/css/changelists.9237a1ac391b.css.gz deleted file mode 100644 index 108028ff..00000000 Binary files a/static/admin/css/changelists.9237a1ac391b.css.gz and /dev/null differ diff --git a/static/admin/css/changelists.css b/static/admin/css/changelists.css index a7545131..573c3896 100644 --- a/static/admin/css/changelists.css +++ b/static/admin/css/changelists.css @@ -153,6 +153,7 @@ font-weight: 400; padding: 0 15px; margin-bottom: 10px; + cursor: pointer; } #changelist-filter details summary > * { @@ -215,9 +216,9 @@ color: var(--link-hover-color); } -#changelist-filter #changelist-filter-clear a { +#changelist-filter #changelist-filter-extra-actions { font-size: 0.8125rem; - padding-bottom: 10px; + margin-bottom: 10px; border-bottom: 1px solid var(--hairline-color); } @@ -265,6 +266,15 @@ background-color: var(--selected-row); } +@media (forced-colors: active) { + #changelist tbody tr.selected { + background-color: SelectedItem; + } + #changelist tbody tr:has(.action-select:checked) { + background-color: SelectedItem; + } +} + #changelist .actions { padding: 10px; background: var(--body-bg); diff --git a/static/admin/css/changelists.css.gz b/static/admin/css/changelists.css.gz index 108028ff..1658ab0b 100644 Binary files a/static/admin/css/changelists.css.gz and b/static/admin/css/changelists.css.gz differ diff --git a/static/admin/css/dark_mode.css b/static/admin/css/dark_mode.css index 6d08233a..c49b6bc2 100644 --- a/static/admin/css/dark_mode.css +++ b/static/admin/css/dark_mode.css @@ -122,16 +122,3 @@ html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark { html[data-theme="light"] .theme-toggle svg.theme-icon-when-light { display: block; } - -.visually-hidden { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - overflow: hidden; - clip: rect(0,0,0,0); - white-space: nowrap; - border: 0; - color: var(--body-fg); - background-color: var(--body-bg); -} diff --git a/static/admin/css/dark_mode.css.gz b/static/admin/css/dark_mode.css.gz index faebccea..10e4839b 100644 Binary files a/static/admin/css/dark_mode.css.gz and b/static/admin/css/dark_mode.css.gz differ diff --git a/static/admin/css/dark_mode.ef27a31af300.css b/static/admin/css/dark_mode.e18e9a052429.css similarity index 91% rename from static/admin/css/dark_mode.ef27a31af300.css rename to static/admin/css/dark_mode.e18e9a052429.css index 6d08233a..c49b6bc2 100644 --- a/static/admin/css/dark_mode.ef27a31af300.css +++ b/static/admin/css/dark_mode.e18e9a052429.css @@ -122,16 +122,3 @@ html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark { html[data-theme="light"] .theme-toggle svg.theme-icon-when-light { display: block; } - -.visually-hidden { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - overflow: hidden; - clip: rect(0,0,0,0); - white-space: nowrap; - border: 0; - color: var(--body-fg); - background-color: var(--body-bg); -} diff --git a/static/admin/css/dark_mode.e18e9a052429.css.gz b/static/admin/css/dark_mode.e18e9a052429.css.gz new file mode 100644 index 00000000..10e4839b Binary files /dev/null and b/static/admin/css/dark_mode.e18e9a052429.css.gz differ diff --git a/static/admin/css/dark_mode.ef27a31af300.css.gz b/static/admin/css/dark_mode.ef27a31af300.css.gz deleted file mode 100644 index faebccea..00000000 Binary files a/static/admin/css/dark_mode.ef27a31af300.css.gz and /dev/null differ diff --git a/static/admin/css/forms.3b181cba6653.css.gz b/static/admin/css/forms.3b181cba6653.css.gz deleted file mode 100644 index 107139e0..00000000 Binary files a/static/admin/css/forms.3b181cba6653.css.gz and /dev/null differ diff --git a/static/admin/css/forms.3b181cba6653.css b/static/admin/css/forms.b29a0c8c9155.css similarity index 99% rename from static/admin/css/forms.3b181cba6653.css rename to static/admin/css/forms.b29a0c8c9155.css index 1f269972..eb2c2945 100644 --- a/static/admin/css/forms.3b181cba6653.css +++ b/static/admin/css/forms.b29a0c8c9155.css @@ -1,4 +1,4 @@ -@import url("widgets.0a3765e806b3.css"); +@import url("widgets.8a70ea6d8850.css"); /* FORM ROWS */ @@ -24,6 +24,9 @@ form .form-row p { .flex-container { display: flex; +} + +.form-multiline { flex-wrap: wrap; } @@ -78,6 +81,7 @@ form ul.inline li { .aligned label { display: block; padding: 4px 10px 0 0; + min-width: 160px; width: 160px; word-wrap: break-word; line-height: 1; diff --git a/static/admin/css/forms.b29a0c8c9155.css.gz b/static/admin/css/forms.b29a0c8c9155.css.gz new file mode 100644 index 00000000..e3c930f0 Binary files /dev/null and b/static/admin/css/forms.b29a0c8c9155.css.gz differ diff --git a/static/admin/css/forms.css b/static/admin/css/forms.css index e45abe1c..9a8dad08 100644 --- a/static/admin/css/forms.css +++ b/static/admin/css/forms.css @@ -24,6 +24,9 @@ form .form-row p { .flex-container { display: flex; +} + +.form-multiline { flex-wrap: wrap; } @@ -78,6 +81,7 @@ form ul.inline li { .aligned label { display: block; padding: 4px 10px 0 0; + min-width: 160px; width: 160px; word-wrap: break-word; line-height: 1; diff --git a/static/admin/css/forms.css.gz b/static/admin/css/forms.css.gz index ed254361..da29e869 100644 Binary files a/static/admin/css/forms.css.gz and b/static/admin/css/forms.css.gz differ diff --git a/static/admin/css/nav_sidebar.269a1bd44627.css.gz b/static/admin/css/nav_sidebar.269a1bd44627.css.gz deleted file mode 100644 index 7398c4df..00000000 Binary files a/static/admin/css/nav_sidebar.269a1bd44627.css.gz and /dev/null differ diff --git a/static/admin/css/nav_sidebar.css b/static/admin/css/nav_sidebar.css index f76e6ce4..7eb0de97 100644 --- a/static/admin/css/nav_sidebar.css +++ b/static/admin/css/nav_sidebar.css @@ -102,6 +102,12 @@ background: var(--selected-row); } +@media (forced-colors: active) { + #nav-sidebar .current-model { + background-color: SelectedItem; + } +} + .main > #nav-sidebar + .content { max-width: calc(100% - 23px); } diff --git a/static/admin/css/nav_sidebar.css.gz b/static/admin/css/nav_sidebar.css.gz index 7398c4df..bb01234e 100644 Binary files a/static/admin/css/nav_sidebar.css.gz and b/static/admin/css/nav_sidebar.css.gz differ diff --git a/static/admin/css/nav_sidebar.269a1bd44627.css b/static/admin/css/nav_sidebar.dd925738f4cc.css similarity index 95% rename from static/admin/css/nav_sidebar.269a1bd44627.css rename to static/admin/css/nav_sidebar.dd925738f4cc.css index f76e6ce4..7eb0de97 100644 --- a/static/admin/css/nav_sidebar.269a1bd44627.css +++ b/static/admin/css/nav_sidebar.dd925738f4cc.css @@ -102,6 +102,12 @@ background: var(--selected-row); } +@media (forced-colors: active) { + #nav-sidebar .current-model { + background-color: SelectedItem; + } +} + .main > #nav-sidebar + .content { max-width: calc(100% - 23px); } diff --git a/static/admin/css/nav_sidebar.dd925738f4cc.css.gz b/static/admin/css/nav_sidebar.dd925738f4cc.css.gz new file mode 100644 index 00000000..bb01234e Binary files /dev/null and b/static/admin/css/nav_sidebar.dd925738f4cc.css.gz differ diff --git a/static/admin/css/responsive.107cd2690311.css.gz b/static/admin/css/responsive.107cd2690311.css.gz deleted file mode 100644 index 7e8070e4..00000000 Binary files a/static/admin/css/responsive.107cd2690311.css.gz and /dev/null differ diff --git a/static/admin/css/responsive.css b/static/admin/css/responsive.css index 9ce4f67b..bb539456 100644 --- a/static/admin/css/responsive.css +++ b/static/admin/css/responsive.css @@ -43,7 +43,7 @@ input[type="submit"], button { justify-content: flex-start; } - #branding h1 { + #site-name { margin: 0 0 8px; line-height: 1.2; } @@ -237,22 +237,6 @@ input[type="submit"], button { padding: 7px; } - /* Related widget */ - - .related-widget-wrapper { - float: none; - } - - .related-widget-wrapper-link + .selector { - max-width: calc(100% - 30px); - margin-right: 15px; - } - - select + .related-widget-wrapper-link, - .related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 10px; - } - /* Selector */ .selector { @@ -270,7 +254,7 @@ input[type="submit"], button { } .selector .selector-filter input { - width: auto; + width: 100%; min-height: 0; flex: 1 1; } @@ -292,7 +276,6 @@ input[type="submit"], button { width: 26px; height: 52px; padding: 2px 0; - margin: auto 15px; border-radius: 20px; transform: translateY(-10px); } @@ -336,7 +319,6 @@ input[type="submit"], button { width: 52px; height: 26px; padding: 0 2px; - margin: 15px auto; transform: none; } @@ -432,7 +414,7 @@ input[type="submit"], button { padding: 15px 20px; } - .login #branding h1 { + .login #site-name { margin: 0; } @@ -565,6 +547,10 @@ input[type="submit"], button { flex-flow: column; } + .flex-container.checkbox-row { + flex-flow: row; + } + textarea { max-width: none; } @@ -584,6 +570,7 @@ input[type="submit"], button { .aligned label { width: 100%; + min-width: auto; padding: 0 0 10px; } @@ -598,10 +585,6 @@ input[type="submit"], button { max-width: 100%; } - .aligned .checkbox-row { - align-items: center; - } - .aligned .checkbox-row input { flex: 0 1 auto; margin: 0; @@ -683,23 +666,14 @@ input[type="submit"], button { align-self: center; } - select + .related-widget-wrapper-link, - .related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 15px; - } - /* Selector */ .selector { flex-direction: column; - } - - .selector > * { - float: none; + gap: 10px 0; } .selector-available, .selector-chosen { - margin-bottom: 0; flex: 1 1 auto; } @@ -709,11 +683,9 @@ input[type="submit"], button { .selector ul.selector-chooser { display: block; - float: none; width: 52px; height: 26px; padding: 0 2px; - margin: 15px auto 20px; transform: none; } diff --git a/static/admin/css/responsive.css.gz b/static/admin/css/responsive.css.gz index 7e8070e4..eeba5c4a 100644 Binary files a/static/admin/css/responsive.css.gz and b/static/admin/css/responsive.css.gz differ diff --git a/static/admin/css/responsive.107cd2690311.css b/static/admin/css/responsive.eafb93ff084c.css similarity index 95% rename from static/admin/css/responsive.107cd2690311.css rename to static/admin/css/responsive.eafb93ff084c.css index 9ce4f67b..bb539456 100644 --- a/static/admin/css/responsive.107cd2690311.css +++ b/static/admin/css/responsive.eafb93ff084c.css @@ -43,7 +43,7 @@ input[type="submit"], button { justify-content: flex-start; } - #branding h1 { + #site-name { margin: 0 0 8px; line-height: 1.2; } @@ -237,22 +237,6 @@ input[type="submit"], button { padding: 7px; } - /* Related widget */ - - .related-widget-wrapper { - float: none; - } - - .related-widget-wrapper-link + .selector { - max-width: calc(100% - 30px); - margin-right: 15px; - } - - select + .related-widget-wrapper-link, - .related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 10px; - } - /* Selector */ .selector { @@ -270,7 +254,7 @@ input[type="submit"], button { } .selector .selector-filter input { - width: auto; + width: 100%; min-height: 0; flex: 1 1; } @@ -292,7 +276,6 @@ input[type="submit"], button { width: 26px; height: 52px; padding: 2px 0; - margin: auto 15px; border-radius: 20px; transform: translateY(-10px); } @@ -336,7 +319,6 @@ input[type="submit"], button { width: 52px; height: 26px; padding: 0 2px; - margin: 15px auto; transform: none; } @@ -432,7 +414,7 @@ input[type="submit"], button { padding: 15px 20px; } - .login #branding h1 { + .login #site-name { margin: 0; } @@ -565,6 +547,10 @@ input[type="submit"], button { flex-flow: column; } + .flex-container.checkbox-row { + flex-flow: row; + } + textarea { max-width: none; } @@ -584,6 +570,7 @@ input[type="submit"], button { .aligned label { width: 100%; + min-width: auto; padding: 0 0 10px; } @@ -598,10 +585,6 @@ input[type="submit"], button { max-width: 100%; } - .aligned .checkbox-row { - align-items: center; - } - .aligned .checkbox-row input { flex: 0 1 auto; margin: 0; @@ -683,23 +666,14 @@ input[type="submit"], button { align-self: center; } - select + .related-widget-wrapper-link, - .related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 15px; - } - /* Selector */ .selector { flex-direction: column; - } - - .selector > * { - float: none; + gap: 10px 0; } .selector-available, .selector-chosen { - margin-bottom: 0; flex: 1 1 auto; } @@ -709,11 +683,9 @@ input[type="submit"], button { .selector ul.selector-chooser { display: block; - float: none; width: 52px; height: 26px; padding: 0 2px; - margin: 15px auto 20px; transform: none; } diff --git a/static/admin/css/responsive.eafb93ff084c.css.gz b/static/admin/css/responsive.eafb93ff084c.css.gz new file mode 100644 index 00000000..eeba5c4a Binary files /dev/null and b/static/admin/css/responsive.eafb93ff084c.css.gz differ diff --git a/static/admin/css/responsive_rtl.97b066429fd8.css b/static/admin/css/responsive_rtl.7d1130848605.css similarity index 95% rename from static/admin/css/responsive_rtl.97b066429fd8.css rename to static/admin/css/responsive_rtl.7d1130848605.css index 639e20b2..31dc8ff7 100644 --- a/static/admin/css/responsive_rtl.97b066429fd8.css +++ b/static/admin/css/responsive_rtl.7d1130848605.css @@ -78,4 +78,7 @@ margin-left: 0; margin-right: 0; } + [dir="rtl"] .aligned .vCheckboxLabel { + padding: 1px 5px 0 0; + } } diff --git a/static/admin/css/responsive_rtl.7d1130848605.css.gz b/static/admin/css/responsive_rtl.7d1130848605.css.gz new file mode 100644 index 00000000..3e2886b5 Binary files /dev/null and b/static/admin/css/responsive_rtl.7d1130848605.css.gz differ diff --git a/static/admin/css/responsive_rtl.97b066429fd8.css.gz b/static/admin/css/responsive_rtl.97b066429fd8.css.gz deleted file mode 100644 index 92a5f17f..00000000 Binary files a/static/admin/css/responsive_rtl.97b066429fd8.css.gz and /dev/null differ diff --git a/static/admin/css/responsive_rtl.css b/static/admin/css/responsive_rtl.css index 639e20b2..31dc8ff7 100644 --- a/static/admin/css/responsive_rtl.css +++ b/static/admin/css/responsive_rtl.css @@ -78,4 +78,7 @@ margin-left: 0; margin-right: 0; } + [dir="rtl"] .aligned .vCheckboxLabel { + padding: 1px 5px 0 0; + } } diff --git a/static/admin/css/responsive_rtl.css.gz b/static/admin/css/responsive_rtl.css.gz index 92a5f17f..3e2886b5 100644 Binary files a/static/admin/css/responsive_rtl.css.gz and b/static/admin/css/responsive_rtl.css.gz differ diff --git a/static/admin/css/rtl.4685390ad96d.css.gz b/static/admin/css/rtl.4685390ad96d.css.gz deleted file mode 100644 index 67cea157..00000000 Binary files a/static/admin/css/rtl.4685390ad96d.css.gz and /dev/null differ diff --git a/static/admin/css/rtl.4685390ad96d.css b/static/admin/css/rtl.aa92d763340b.css similarity index 95% rename from static/admin/css/rtl.4685390ad96d.css rename to static/admin/css/rtl.aa92d763340b.css index 298fba87..3a60b90f 100644 --- a/static/admin/css/rtl.4685390ad96d.css +++ b/static/admin/css/rtl.aa92d763340b.css @@ -13,7 +13,7 @@ th { margin-right: 1.5em; } -.viewlink, .addlink, .changelink { +.viewlink, .addlink, .changelink, .hidelink { padding-left: 0; padding-right: 16px; background-position: 100% 1px; @@ -107,6 +107,16 @@ thead th.sorted .text { border-left: none; } +.paginator .end { + margin-left: 6px; + margin-right: 0; +} + +.paginator input { + margin-left: 0; + margin-right: auto; +} + /* FORMS */ .aligned label { @@ -286,3 +296,7 @@ form .form-row p.datetime { margin-left: inherit; margin-right: 2px; } + +.selector .selector-chooser { + margin: 0; +} diff --git a/static/admin/css/rtl.aa92d763340b.css.gz b/static/admin/css/rtl.aa92d763340b.css.gz new file mode 100644 index 00000000..3ede13e0 Binary files /dev/null and b/static/admin/css/rtl.aa92d763340b.css.gz differ diff --git a/static/admin/css/rtl.css b/static/admin/css/rtl.css index 53a6dd6c..9027c7ed 100644 --- a/static/admin/css/rtl.css +++ b/static/admin/css/rtl.css @@ -13,7 +13,7 @@ th { margin-right: 1.5em; } -.viewlink, .addlink, .changelink { +.viewlink, .addlink, .changelink, .hidelink { padding-left: 0; padding-right: 16px; background-position: 100% 1px; @@ -107,6 +107,16 @@ thead th.sorted .text { border-left: none; } +.paginator .end { + margin-left: 6px; + margin-right: 0; +} + +.paginator input { + margin-left: 0; + margin-right: auto; +} + /* FORMS */ .aligned label { @@ -286,3 +296,7 @@ form .form-row p.datetime { margin-left: inherit; margin-right: 2px; } + +.selector .selector-chooser { + margin: 0; +} diff --git a/static/admin/css/rtl.css.gz b/static/admin/css/rtl.css.gz index 3f4ce964..a067efdc 100644 Binary files a/static/admin/css/rtl.css.gz and b/static/admin/css/rtl.css.gz differ diff --git a/static/admin/css/widgets.0a3765e806b3.css.gz b/static/admin/css/widgets.0a3765e806b3.css.gz deleted file mode 100644 index 385dbc29..00000000 Binary files a/static/admin/css/widgets.0a3765e806b3.css.gz and /dev/null differ diff --git a/static/admin/css/widgets.0a3765e806b3.css b/static/admin/css/widgets.8a70ea6d8850.css similarity index 94% rename from static/admin/css/widgets.0a3765e806b3.css rename to static/admin/css/widgets.8a70ea6d8850.css index d060ab92..c4f23580 100644 --- a/static/admin/css/widgets.0a3765e806b3.css +++ b/static/admin/css/widgets.8a70ea6d8850.css @@ -1,23 +1,23 @@ /* SELECTOR (FILTER INTERFACE) */ .selector { - width: 800px; - float: left; display: flex; + flex-grow: 1; + gap: 0 10px; } .selector select { - width: 380px; height: 17.2em; flex: 1 0 auto; + overflow: scroll; + width: 100%; } .selector-available, .selector-chosen { - width: 380px; text-align: center; - margin-bottom: 5px; display: flex; flex-direction: column; + flex: 1 1; } .selector-available h2, .selector-chosen h2 { @@ -41,7 +41,7 @@ } .selector-chosen h2 { - background: var(--primary); + background: var(--secondary); color: var(--header-link-color); } @@ -58,6 +58,7 @@ font-size: 0.625rem; margin: 0; text-align: left; + display: flex; } .selector .selector-filter label, @@ -69,11 +70,15 @@ padding: 0; overflow: hidden; line-height: 1; + min-width: auto; +} + +.selector-filter input { + flex-grow: 1; } .selector .selector-available input, .selector .selector-chosen input { - width: 320px; margin-left: 8px; } @@ -82,7 +87,7 @@ width: 22px; background-color: var(--selected-bg); border-radius: 10px; - margin: 0 5px; + margin: 0; padding: 0; transform: translateY(-17px); } @@ -146,7 +151,7 @@ a.selector-chooseall, a.selector-clearall { display: inline-block; height: 16px; text-align: left; - margin: 1px auto 3px; + margin: 0 auto; overflow: hidden; font-weight: bold; line-height: 16px; @@ -446,7 +451,7 @@ span.clearable-file-input label { } .calendar td.selected a { - background: var(--primary); + background: var(--secondary); color: var(--button-fg); } @@ -533,17 +538,17 @@ span.clearable-file-input label { margin: 0; padding: 4px 0; font-size: 0.75rem; - background: #eee; + background: var(--close-button-bg); border-top: 1px solid var(--border-color); - color: var(--body-fg); + color: var(--button-fg); } .calendar-cancel:focus, .calendar-cancel:hover { - background: #ddd; + background: var(--close-button-hover-bg); } .calendar-cancel a { - color: black; + color: var(--button-fg); display: block; } @@ -574,26 +579,21 @@ ul.timelist, .timelist li { /* RELATED WIDGET WRAPPER */ .related-widget-wrapper { - float: left; /* display properly in form rows with multiple fields */ - overflow: hidden; /* clear floated contents */ + display: flex; + gap: 0 10px; + flex-grow: 1; + flex-wrap: wrap; + margin-bottom: 5px; } .related-widget-wrapper-link { - opacity: 0.3; + opacity: .6; + filter: grayscale(1); } .related-widget-wrapper-link:link { - opacity: .8; -} - -.related-widget-wrapper-link:link:focus, -.related-widget-wrapper-link:link:hover { opacity: 1; -} - -select + .related-widget-wrapper-link, -.related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 7px; + filter: grayscale(0); } /* GIS MAPS */ diff --git a/static/admin/css/widgets.8a70ea6d8850.css.gz b/static/admin/css/widgets.8a70ea6d8850.css.gz new file mode 100644 index 00000000..61c72855 Binary files /dev/null and b/static/admin/css/widgets.8a70ea6d8850.css.gz differ diff --git a/static/admin/css/widgets.css b/static/admin/css/widgets.css index 5f7adcb2..d3d4732c 100644 --- a/static/admin/css/widgets.css +++ b/static/admin/css/widgets.css @@ -1,23 +1,23 @@ /* SELECTOR (FILTER INTERFACE) */ .selector { - width: 800px; - float: left; display: flex; + flex-grow: 1; + gap: 0 10px; } .selector select { - width: 380px; height: 17.2em; flex: 1 0 auto; + overflow: scroll; + width: 100%; } .selector-available, .selector-chosen { - width: 380px; text-align: center; - margin-bottom: 5px; display: flex; flex-direction: column; + flex: 1 1; } .selector-available h2, .selector-chosen h2 { @@ -41,7 +41,7 @@ } .selector-chosen h2 { - background: var(--primary); + background: var(--secondary); color: var(--header-link-color); } @@ -58,6 +58,7 @@ font-size: 0.625rem; margin: 0; text-align: left; + display: flex; } .selector .selector-filter label, @@ -69,11 +70,15 @@ padding: 0; overflow: hidden; line-height: 1; + min-width: auto; +} + +.selector-filter input { + flex-grow: 1; } .selector .selector-available input, .selector .selector-chosen input { - width: 320px; margin-left: 8px; } @@ -82,7 +87,7 @@ width: 22px; background-color: var(--selected-bg); border-radius: 10px; - margin: 0 5px; + margin: 0; padding: 0; transform: translateY(-17px); } @@ -146,7 +151,7 @@ a.selector-chooseall, a.selector-clearall { display: inline-block; height: 16px; text-align: left; - margin: 1px auto 3px; + margin: 0 auto; overflow: hidden; font-weight: bold; line-height: 16px; @@ -446,7 +451,7 @@ span.clearable-file-input label { } .calendar td.selected a { - background: var(--primary); + background: var(--secondary); color: var(--button-fg); } @@ -533,17 +538,17 @@ span.clearable-file-input label { margin: 0; padding: 4px 0; font-size: 0.75rem; - background: #eee; + background: var(--close-button-bg); border-top: 1px solid var(--border-color); - color: var(--body-fg); + color: var(--button-fg); } .calendar-cancel:focus, .calendar-cancel:hover { - background: #ddd; + background: var(--close-button-hover-bg); } .calendar-cancel a { - color: black; + color: var(--button-fg); display: block; } @@ -574,26 +579,21 @@ ul.timelist, .timelist li { /* RELATED WIDGET WRAPPER */ .related-widget-wrapper { - float: left; /* display properly in form rows with multiple fields */ - overflow: hidden; /* clear floated contents */ + display: flex; + gap: 0 10px; + flex-grow: 1; + flex-wrap: wrap; + margin-bottom: 5px; } .related-widget-wrapper-link { - opacity: 0.3; + opacity: .6; + filter: grayscale(1); } .related-widget-wrapper-link:link { - opacity: .8; -} - -.related-widget-wrapper-link:link:focus, -.related-widget-wrapper-link:link:hover { opacity: 1; -} - -select + .related-widget-wrapper-link, -.related-widget-wrapper-link + .related-widget-wrapper-link { - margin-left: 7px; + filter: grayscale(0); } /* GIS MAPS */ diff --git a/static/admin/css/widgets.css.gz b/static/admin/css/widgets.css.gz index 6ac29fc4..cb0e67e2 100644 Binary files a/static/admin/css/widgets.css.gz and b/static/admin/css/widgets.css.gz differ diff --git a/static/admin/img/icon-hidelink.8d245a995e18.svg b/static/admin/img/icon-hidelink.8d245a995e18.svg new file mode 100644 index 00000000..2a8b404b --- /dev/null +++ b/static/admin/img/icon-hidelink.8d245a995e18.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/admin/img/icon-hidelink.8d245a995e18.svg.gz b/static/admin/img/icon-hidelink.8d245a995e18.svg.gz new file mode 100644 index 00000000..a6ed981d Binary files /dev/null and b/static/admin/img/icon-hidelink.8d245a995e18.svg.gz differ diff --git a/static/admin/img/icon-hidelink.svg b/static/admin/img/icon-hidelink.svg new file mode 100644 index 00000000..2a8b404b --- /dev/null +++ b/static/admin/img/icon-hidelink.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/admin/img/icon-hidelink.svg.gz b/static/admin/img/icon-hidelink.svg.gz new file mode 100644 index 00000000..a6ed981d Binary files /dev/null and b/static/admin/img/icon-hidelink.svg.gz differ diff --git a/static/admin/js/SelectFilter2.bdb8d0cc579e.js b/static/admin/js/SelectFilter2.b8cf7343ff9e.js similarity index 98% rename from static/admin/js/SelectFilter2.bdb8d0cc579e.js rename to static/admin/js/SelectFilter2.b8cf7343ff9e.js index 9a4e0a3a..fc59eba7 100644 --- a/static/admin/js/SelectFilter2.bdb8d0cc579e.js +++ b/static/admin/js/SelectFilter2.b8cf7343ff9e.js @@ -30,6 +30,9 @@ Requires core.js and SelectBox.js. //
or
const selector_div = quickElement('div', from_box.parentNode); + // Make sure the selector div is at the beginning so that the + // add link would be displayed to the right of the widget. + from_box.parentNode.prepend(selector_div); selector_div.className = is_stacked ? 'selector stacked' : 'selector'; //
diff --git a/static/admin/js/SelectFilter2.b8cf7343ff9e.js.gz b/static/admin/js/SelectFilter2.b8cf7343ff9e.js.gz new file mode 100644 index 00000000..6eea510a Binary files /dev/null and b/static/admin/js/SelectFilter2.b8cf7343ff9e.js.gz differ diff --git a/static/admin/js/SelectFilter2.bdb8d0cc579e.js.gz b/static/admin/js/SelectFilter2.bdb8d0cc579e.js.gz deleted file mode 100644 index 67e33860..00000000 Binary files a/static/admin/js/SelectFilter2.bdb8d0cc579e.js.gz and /dev/null differ diff --git a/static/admin/js/SelectFilter2.js b/static/admin/js/SelectFilter2.js index 9a4e0a3a..fc59eba7 100644 --- a/static/admin/js/SelectFilter2.js +++ b/static/admin/js/SelectFilter2.js @@ -30,6 +30,9 @@ Requires core.js and SelectBox.js. //
or
const selector_div = quickElement('div', from_box.parentNode); + // Make sure the selector div is at the beginning so that the + // add link would be displayed to the right of the widget. + from_box.parentNode.prepend(selector_div); selector_div.className = is_stacked ? 'selector stacked' : 'selector'; //
diff --git a/static/admin/js/SelectFilter2.js.gz b/static/admin/js/SelectFilter2.js.gz index 67e33860..6eea510a 100644 Binary files a/static/admin/js/SelectFilter2.js.gz and b/static/admin/js/SelectFilter2.js.gz differ diff --git a/static/admin/js/actions.eac7e3441574.js b/static/admin/js/actions.867b023a736d.js similarity index 97% rename from static/admin/js/actions.eac7e3441574.js rename to static/admin/js/actions.867b023a736d.js index 20a5c143..6a2ae91a 100644 --- a/static/admin/js/actions.eac7e3441574.js +++ b/static/admin/js/actions.867b023a736d.js @@ -179,6 +179,9 @@ } }); } + // Sync counter when navigating to the page, such as through the back + // button. + window.addEventListener('pageshow', (event) => updateCounter(actionCheckboxes, options)); }; // Call function fn when the DOM is loaded and ready. If it is already diff --git a/static/admin/js/actions.867b023a736d.js.gz b/static/admin/js/actions.867b023a736d.js.gz new file mode 100644 index 00000000..9c77c3a1 Binary files /dev/null and b/static/admin/js/actions.867b023a736d.js.gz differ diff --git a/static/admin/js/actions.eac7e3441574.js.gz b/static/admin/js/actions.eac7e3441574.js.gz deleted file mode 100644 index a86a6c9c..00000000 Binary files a/static/admin/js/actions.eac7e3441574.js.gz and /dev/null differ diff --git a/static/admin/js/actions.js b/static/admin/js/actions.js index 20a5c143..6a2ae91a 100644 --- a/static/admin/js/actions.js +++ b/static/admin/js/actions.js @@ -179,6 +179,9 @@ } }); } + // Sync counter when navigating to the page, such as through the back + // button. + window.addEventListener('pageshow', (event) => updateCounter(actionCheckboxes, options)); }; // Call function fn when the DOM is loaded and ready. If it is already diff --git a/static/admin/js/actions.js.gz b/static/admin/js/actions.js.gz index a86a6c9c..9c77c3a1 100644 Binary files a/static/admin/js/actions.js.gz and b/static/admin/js/actions.js.gz differ diff --git a/static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js.gz b/static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js.gz deleted file mode 100644 index 2c550cc7..00000000 Binary files a/static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js.gz and /dev/null differ diff --git a/static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js b/static/admin/js/admin/RelatedObjectLookups.ef211845e458.js similarity index 98% rename from static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js rename to static/admin/js/admin/RelatedObjectLookups.ef211845e458.js index afb6b66c..32e3f5b8 100644 --- a/static/admin/js/admin/RelatedObjectLookups.8609f99b9ab2.js +++ b/static/admin/js/admin/RelatedObjectLookups.ef211845e458.js @@ -79,9 +79,11 @@ siblings.each(function() { const elm = $(this); elm.attr('href', elm.attr('data-href-template').replace('__fk__', value)); + elm.removeAttr('aria-disabled'); }); } else { siblings.removeAttr('href'); + siblings.attr('aria-disabled', true); } } diff --git a/static/admin/js/admin/RelatedObjectLookups.ef211845e458.js.gz b/static/admin/js/admin/RelatedObjectLookups.ef211845e458.js.gz new file mode 100644 index 00000000..9604b5ff Binary files /dev/null and b/static/admin/js/admin/RelatedObjectLookups.ef211845e458.js.gz differ diff --git a/static/admin/js/admin/RelatedObjectLookups.js b/static/admin/js/admin/RelatedObjectLookups.js index afb6b66c..32e3f5b8 100644 --- a/static/admin/js/admin/RelatedObjectLookups.js +++ b/static/admin/js/admin/RelatedObjectLookups.js @@ -79,9 +79,11 @@ siblings.each(function() { const elm = $(this); elm.attr('href', elm.attr('data-href-template').replace('__fk__', value)); + elm.removeAttr('aria-disabled'); }); } else { siblings.removeAttr('href'); + siblings.attr('aria-disabled', true); } } diff --git a/static/admin/js/admin/RelatedObjectLookups.js.gz b/static/admin/js/admin/RelatedObjectLookups.js.gz index 2c550cc7..9604b5ff 100644 Binary files a/static/admin/js/admin/RelatedObjectLookups.js.gz and b/static/admin/js/admin/RelatedObjectLookups.js.gz differ diff --git a/static/admin/js/calendar.f8a5d055eb33.js b/static/admin/js/calendar.d64496bbf46d.js similarity index 92% rename from static/admin/js/calendar.f8a5d055eb33.js rename to static/admin/js/calendar.d64496bbf46d.js index a62d10a7..776310f7 100644 --- a/static/admin/js/calendar.f8a5d055eb33.js +++ b/static/admin/js/calendar.d64496bbf46d.js @@ -36,6 +36,24 @@ depends on core.js for utility functions like removeChildren or quickElement pgettext('abbrev. month December', 'Dec') ], daysOfWeek: [ + gettext('Sunday'), + gettext('Monday'), + gettext('Tuesday'), + gettext('Wednesday'), + gettext('Thursday'), + gettext('Friday'), + gettext('Saturday') + ], + daysOfWeekAbbrev: [ + pgettext('abbrev. day Sunday', 'Sun'), + pgettext('abbrev. day Monday', 'Mon'), + pgettext('abbrev. day Tuesday', 'Tue'), + pgettext('abbrev. day Wednesday', 'Wed'), + pgettext('abbrev. day Thursday', 'Thur'), + pgettext('abbrev. day Friday', 'Fri'), + pgettext('abbrev. day Saturday', 'Sat') + ], + daysOfWeekInitial: [ pgettext('one letter Sunday', 'S'), pgettext('one letter Monday', 'M'), pgettext('one letter Tuesday', 'T'), @@ -98,7 +116,7 @@ depends on core.js for utility functions like removeChildren or quickElement // Draw days-of-week header let tableRow = quickElement('tr', tableBody); for (let i = 0; i < 7; i++) { - quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]); + quickElement('th', tableRow, CalendarNamespace.daysOfWeekInitial[(i + CalendarNamespace.firstDayOfWeek) % 7]); } const startingPos = new Date(year, month - 1, 1 - CalendarNamespace.firstDayOfWeek).getDay(); diff --git a/static/admin/js/calendar.d64496bbf46d.js.gz b/static/admin/js/calendar.d64496bbf46d.js.gz new file mode 100644 index 00000000..a7644980 Binary files /dev/null and b/static/admin/js/calendar.d64496bbf46d.js.gz differ diff --git a/static/admin/js/calendar.f8a5d055eb33.js.gz b/static/admin/js/calendar.f8a5d055eb33.js.gz deleted file mode 100644 index 8f7f5c50..00000000 Binary files a/static/admin/js/calendar.f8a5d055eb33.js.gz and /dev/null differ diff --git a/static/admin/js/calendar.js b/static/admin/js/calendar.js index a62d10a7..776310f7 100644 --- a/static/admin/js/calendar.js +++ b/static/admin/js/calendar.js @@ -36,6 +36,24 @@ depends on core.js for utility functions like removeChildren or quickElement pgettext('abbrev. month December', 'Dec') ], daysOfWeek: [ + gettext('Sunday'), + gettext('Monday'), + gettext('Tuesday'), + gettext('Wednesday'), + gettext('Thursday'), + gettext('Friday'), + gettext('Saturday') + ], + daysOfWeekAbbrev: [ + pgettext('abbrev. day Sunday', 'Sun'), + pgettext('abbrev. day Monday', 'Mon'), + pgettext('abbrev. day Tuesday', 'Tue'), + pgettext('abbrev. day Wednesday', 'Wed'), + pgettext('abbrev. day Thursday', 'Thur'), + pgettext('abbrev. day Friday', 'Fri'), + pgettext('abbrev. day Saturday', 'Sat') + ], + daysOfWeekInitial: [ pgettext('one letter Sunday', 'S'), pgettext('one letter Monday', 'M'), pgettext('one letter Tuesday', 'T'), @@ -98,7 +116,7 @@ depends on core.js for utility functions like removeChildren or quickElement // Draw days-of-week header let tableRow = quickElement('tr', tableBody); for (let i = 0; i < 7; i++) { - quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]); + quickElement('th', tableRow, CalendarNamespace.daysOfWeekInitial[(i + CalendarNamespace.firstDayOfWeek) % 7]); } const startingPos = new Date(year, month - 1, 1 - CalendarNamespace.firstDayOfWeek).getDay(); diff --git a/static/admin/js/calendar.js.gz b/static/admin/js/calendar.js.gz index 8f7f5c50..a7644980 100644 Binary files a/static/admin/js/calendar.js.gz and b/static/admin/js/calendar.js.gz differ diff --git a/static/admin/js/core.cf103cd04ebf.js b/static/admin/js/core.7e257fdf56dc.js similarity index 91% rename from static/admin/js/core.cf103cd04ebf.js rename to static/admin/js/core.7e257fdf56dc.js index 0344a13f..10504d4a 100644 --- a/static/admin/js/core.cf103cd04ebf.js +++ b/static/admin/js/core.7e257fdf56dc.js @@ -85,6 +85,18 @@ function findPosY(obj) { return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds(); }; + Date.prototype.getAbbrevDayName = function() { + return typeof window.CalendarNamespace === "undefined" + ? '0' + this.getDay() + : window.CalendarNamespace.daysOfWeekAbbrev[this.getDay()]; + }; + + Date.prototype.getFullDayName = function() { + return typeof window.CalendarNamespace === "undefined" + ? '0' + this.getDay() + : window.CalendarNamespace.daysOfWeek[this.getDay()]; + }; + Date.prototype.getAbbrevMonthName = function() { return typeof window.CalendarNamespace === "undefined" ? this.getTwoDigitMonth() @@ -99,6 +111,8 @@ function findPosY(obj) { Date.prototype.strftime = function(format) { const fields = { + a: this.getAbbrevDayName(), + A: this.getFullDayName(), b: this.getAbbrevMonthName(), B: this.getFullMonthName(), c: this.toString(), diff --git a/static/admin/js/core.7e257fdf56dc.js.gz b/static/admin/js/core.7e257fdf56dc.js.gz new file mode 100644 index 00000000..023f8fa3 Binary files /dev/null and b/static/admin/js/core.7e257fdf56dc.js.gz differ diff --git a/static/admin/js/core.cf103cd04ebf.js.gz b/static/admin/js/core.cf103cd04ebf.js.gz deleted file mode 100644 index 39bab4a5..00000000 Binary files a/static/admin/js/core.cf103cd04ebf.js.gz and /dev/null differ diff --git a/static/admin/js/core.js b/static/admin/js/core.js index 0344a13f..10504d4a 100644 --- a/static/admin/js/core.js +++ b/static/admin/js/core.js @@ -85,6 +85,18 @@ function findPosY(obj) { return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds(); }; + Date.prototype.getAbbrevDayName = function() { + return typeof window.CalendarNamespace === "undefined" + ? '0' + this.getDay() + : window.CalendarNamespace.daysOfWeekAbbrev[this.getDay()]; + }; + + Date.prototype.getFullDayName = function() { + return typeof window.CalendarNamespace === "undefined" + ? '0' + this.getDay() + : window.CalendarNamespace.daysOfWeek[this.getDay()]; + }; + Date.prototype.getAbbrevMonthName = function() { return typeof window.CalendarNamespace === "undefined" ? this.getTwoDigitMonth() @@ -99,6 +111,8 @@ function findPosY(obj) { Date.prototype.strftime = function(format) { const fields = { + a: this.getAbbrevDayName(), + A: this.getFullDayName(), b: this.getAbbrevMonthName(), B: this.getFullMonthName(), c: this.toString(), diff --git a/static/admin/js/core.js.gz b/static/admin/js/core.js.gz index 39bab4a5..023f8fa3 100644 Binary files a/static/admin/js/core.js.gz and b/static/admin/js/core.js.gz differ diff --git a/static/admin/js/vendor/jquery/jquery.0208b96062ba.js.gz b/static/admin/js/vendor/jquery/jquery.0208b96062ba.js.gz deleted file mode 100644 index eae6d31b..00000000 Binary files a/static/admin/js/vendor/jquery/jquery.0208b96062ba.js.gz and /dev/null differ diff --git a/static/admin/js/vendor/jquery/jquery.0208b96062ba.js b/static/admin/js/vendor/jquery/jquery.12e87d2f3a4c.js similarity index 88% rename from static/admin/js/vendor/jquery/jquery.0208b96062ba.js rename to static/admin/js/vendor/jquery/jquery.12e87d2f3a4c.js index 7f35c11b..1a86433c 100644 --- a/static/admin/js/vendor/jquery/jquery.0208b96062ba.js +++ b/static/admin/js/vendor/jquery/jquery.12e87d2f3a4c.js @@ -1,15 +1,12 @@ /*! - * jQuery JavaScript Library v3.6.4 + * jQuery JavaScript Library v3.7.1 * https://jquery.com/ * - * Includes Sizzle.js - * https://sizzlejs.com/ - * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * - * Date: 2023-03-08T15:28Z + * Date: 2023-08-28T13:37Z */ ( function( global, factory ) { @@ -150,8 +147,9 @@ function toType( obj ) { -var - version = "3.6.4", +var version = "3.7.1", + + rhtmlSuffix = /HTML$/i, // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -397,6 +395,38 @@ jQuery.extend( { return obj; }, + + // Retrieve the text value of an array of DOM nodes + text: function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += jQuery.text( node ); + } + } + if ( nodeType === 1 || nodeType === 11 ) { + return elem.textContent; + } + if ( nodeType === 9 ) { + return elem.documentElement.textContent; + } + if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; + }, + // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; @@ -419,6 +449,15 @@ jQuery.extend( { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, + isXMLDoc: function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Assume HTML when documentElement doesn't yet exist, such as inside + // document fragments. + return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" ); + }, + // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { @@ -520,43 +559,98 @@ function isArrayLike( obj ) { return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.10 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2023-02-14 - */ -( function( window ) { + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var pop = arr.pop; + + +var sort = arr.sort; + + +var splice = arr.splice; + + +var whitespace = "[\\x20\\t\\r\\n\\f]"; + + +var rtrimCSS = new RegExp( + "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", + "g" +); + + + + +// Note: an element does not contain itself +jQuery.contains = function( a, b ) { + var bup = b && b.parentNode; + + return a === bup || !!( bup && bup.nodeType === 1 && ( + + // Support: IE 9 - 11+ + // IE doesn't have `contains` on SVG. + a.contains ? + a.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); +}; + + + + +// CSS string/identifier serialization +// https://drafts.csswg.org/cssom/#common-serializing-idioms +var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; + +function fcssescape( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; +} + +jQuery.escapeSelector = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + + + + +var preferredDoc = document, + pushNative = push; + +( function() { + var i, - support, Expr, - getText, - isXML, - tokenize, - compile, - select, outermostContext, sortInput, hasDuplicate, + push = pushNative, // Local document vars - setDocument, document, - docElem, + documentElement, documentIsHTML, rbuggyQSA, - rbuggyMatches, matches, - contains, // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, + expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), @@ -570,47 +664,22 @@ var i, return 0; }, - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" + + "loop|multiple|open|readonly|required|scoped", // Regular expressions - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", @@ -629,101 +698,88 @@ var i, // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), + rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + + whitespace + "*" ), rdescend = new RegExp( whitespace + "|>" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + ID: new RegExp( "^#(" + identifier + ")" ), + CLASS: new RegExp( "^\\.(" + identifier + ")" ), + TAG: new RegExp( "^(" + identifier + "|[*])" ), + ATTR: new RegExp( "^" + attributes ), + PSEUDO: new RegExp( "^" + pseudos ), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + bool: new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + + needsContext: new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, - rhtml = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, - rnative = /^[^{]+\{\s*\[native \w/, - // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\([^\\r\\n\\f])", "g" ), funescape = function( escape, nonHex ) { var high = "0x" + escape.slice( 1 ) - 0x10000; - return nonHex ? + if ( nonHex ) { // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + return nonHex; } - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + return high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, - // Used for iframes - // See setDocument() + // Used for iframes; see `setDocument`. + // Support: IE 9 - 11+, Edge 12 - 18+ // Removing the function wrapper causes a "Permission Denied" - // error in IE + // error in IE/Edge. unloadHandler = function() { setDocument(); }, inDisabledFieldset = addCombinator( function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + return elem.disabled === true && nodeName( elem, "fieldset" ); }, { dir: "parentNode", next: "legend" } ); +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + // Optimize for push.apply( _, NodeList ) try { push.apply( @@ -731,32 +787,22 @@ try { preferredDoc.childNodes ); - // Support: Android<4.0 + // Support: Android <=4.0 // Detect silently failing push.apply // eslint-disable-next-line no-unused-expressions arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { + push = { + apply: function( target, els ) { pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; + }, + call: function( target ) { + pushNative.apply( target, slice.call( arguments, 1 ) ); } }; } -function Sizzle( selector, context, results, seed ) { +function find( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, @@ -790,11 +836,10 @@ function Sizzle( selector, context, results, seed ) { if ( nodeType === 9 ) { if ( ( elem = context.getElementById( m ) ) ) { - // Support: IE, Opera, Webkit - // TODO: identify versions + // Support: IE 9 only // getElementById can match elements by name instead of ID if ( elem.id === m ) { - results.push( elem ); + push.call( results, elem ); return results; } } else { @@ -804,14 +849,13 @@ function Sizzle( selector, context, results, seed ) { // Element context } else { - // Support: IE, Opera, Webkit - // TODO: identify versions + // Support: IE 9 only // getElementById can match elements by name instead of ID if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && + find.contains( context, elem ) && elem.id === m ) { - results.push( elem ); + push.call( results, elem ); return results; } } @@ -822,22 +866,15 @@ function Sizzle( selector, context, results, seed ) { return results; // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - + } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + if ( !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) { newSelector = selector; newContext = context; @@ -858,11 +895,15 @@ function Sizzle( selector, context, results, seed ) { // We can use :scope instead of the ID hack if the browser // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when + // strict-comparing two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( newContext != context || !support.scope ) { // Capture the context ID, setting it first if necessary if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); + nid = jQuery.escapeSelector( nid ); } else { context.setAttribute( "id", ( nid = expando ) ); } @@ -895,7 +936,7 @@ function Sizzle( selector, context, results, seed ) { } // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); + return select( selector.replace( rtrimCSS, "$1" ), context, results, seed ); } /** @@ -909,7 +950,8 @@ function createCache() { function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + // Use (key + " ") to avoid collision with native prototype properties + // (see https://github.com/jquery/sizzle/issues/157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries @@ -921,7 +963,7 @@ function createCache() { } /** - * Mark a function for special use by Sizzle + * Mark a function for special use by jQuery selector module * @param {Function} fn The function to mark */ function markFunction( fn ) { @@ -952,56 +994,13 @@ function assert( fn ) { } } -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; + return nodeName( elem, "input" ) && elem.type === type; }; } @@ -1011,8 +1010,8 @@ function createInputPseudo( type ) { */ function createButtonPseudo( type ) { return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; + return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) && + elem.type === type; }; } @@ -1048,14 +1047,13 @@ function createDisabledPseudo( disabled ) { } } - // Support: IE 6 - 11 + // Support: IE 6 - 11+ // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually - /* jshint -W018 */ elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; + inDisabledFieldset( elem ) === disabled; } return elem.disabled === disabled; @@ -1095,7 +1093,7 @@ function createPositionalPseudo( fn ) { } /** - * Checks a node for validity as a Sizzle context + * Checks a node for validity as a jQuery selector context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ @@ -1103,31 +1101,13 @@ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem && elem.namespaceURI, - docElem = elem && ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - /** * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document + * @param {Element|Object} [node] An element or document object to use to set the document * @returns {Object} Returns the current document */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, +function setDocument( node ) { + var subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected @@ -1141,41 +1121,58 @@ setDocument = Sizzle.setDocument = function( node ) { // Update global variables document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); + documentElement = document.documentElement; + documentIsHTML = !jQuery.isXMLDoc( document ); + + // Support: iOS 7 only, IE 9 - 11+ + // Older browsers didn't support unprefixed `matches`. + matches = documentElement.matches || + documentElement.webkitMatchesSelector || + documentElement.msMatchesSelector; // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && + // Accessing iframe documents after unload throws "permission denied" errors + // (see trac-13936). + // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`, + // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well. + if ( documentElement.msMatchesSelector && + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + preferredDoc != document && ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } + // Support: IE 9 - 11+, Edge 12 - 18+ + subWindow.addEventListener( "unload", unloadHandler ); } - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; + // Support: IE <10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + documentElement.appendChild( el ).id = jQuery.expando; + return !document.getElementsByName || + !document.getElementsByName( jQuery.expando ).length; } ); - // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+ - // Make sure the the `:has()` argument is parsed unforgivingly. + // Support: IE 9 only + // Check to see if it's possible to do matchesSelector + // on a disconnected node. + support.disconnectedMatch = assert( function( el ) { + return matches.call( el, "*" ); + } ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // IE/Edge don't support the :scope pseudo-class. + support.scope = assert( function() { + return document.querySelectorAll( ":scope" ); + } ); + + // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only + // Make sure the `:has()` argument is parsed unforgivingly. // We include `*` in the test to detect buggy implementations that are // _selectively_ forgiving (specifically when the list includes at least // one valid selector). @@ -1192,54 +1189,22 @@ setDocument = Sizzle.setDocument = function( node ) { } } ); - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - // ID filter and find if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { + Expr.filter.ID = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute( "id" ) === attrId; }; }; - Expr.find[ "ID" ] = function( id, context ) { + Expr.find.ID = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { - Expr.filter[ "ID" ] = function( id ) { + Expr.filter.ID = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && @@ -1250,7 +1215,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { + Expr.find.ID = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); @@ -1280,40 +1245,18 @@ setDocument = Sizzle.setDocument = function( node ) { } // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); + Expr.find.TAG = function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; + // DocumentFragment nodes don't have gEBTN + } else { + return context.querySelectorAll( tag ); + } + }; // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + Expr.find.CLASS = function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } @@ -1324,139 +1267,75 @@ setDocument = Sizzle.setDocument = function( node ) { // QSA and matchesSelector support - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { + var input; - var input; + documentElement.appendChild( el ).innerHTML = + "" + + ""; - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; + // Support: iOS <=7 - 8 only + // Boolean attributes and "value" are not treated correctly in some XML documents + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } + // Support: iOS <=7 - 8 only + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } + // Support: iOS 8 only + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } + // Support: IE 9 - 11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + documentElement.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + } ); if ( !support.cssHas ) { @@ -1470,49 +1349,12 @@ setDocument = Sizzle.setDocument = function( node ) { } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - - // Support: IE <9 only - // IE doesn't have `contains` on `document` so we need to check for - // `documentElement` presence. - // We need to fall back to `a` when `documentElement` is missing - // as `ownerDocument` of elements within `