From 22979235fa501f2ec53fca6dc9d135aa844ca2c6 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Fri, 19 Sep 2025 14:29:20 +1000 Subject: [PATCH 01/20] chore: wip tide content collection UI --- .gitignore | 1 + .../tide_content_collection_ui/README.md | 13 + .../tide_content_collection_ui/app/.gitignore | 2 + .../app/dist/main.js | 33 + .../app/dist/main.js.map | 1 + .../app/package-lock.json | 1074 +++++++++++++++++ .../app/package.json | 12 + .../app/src/index.html | 47 + .../app/src/index.js | 25 + .../app/vite.config.js | 25 + ...aragraph.content_collection_ui.default.yml | 43 + ...aragraph.content_collection_ui.default.yml | 45 + ...ent_collection_ui.field_paragraph_body.yml | 25 + ...ent_collection_ui.field_paragraph_link.yml | 36 + ...nt_collection_ui.field_paragraph_title.yml | 18 + ....paragraphs_type.content_collection_ui.yml | 13 + .../ContentCollectionUIAutocomplete.php | 105 ++ .../ContentCollectionUIFormatter.php | 36 + .../FieldType/ContentCollectionUIItem.php | 57 + .../ContentCollectionUIDefaultWidget.php | 133 ++ .../tide_content_collection_ui.info.yml | 10 + .../tide_content_collection_ui.libraries.yml | 8 + .../tide_content_collection_ui.module | 6 + .../tide_content_collection_ui.routing.yml | 7 + .../tide_content_collection_ui.services.yml | 4 + ..._term.searchable_content_types.default.yml | 57 + ...axonomy_term.searchable_fields.default.yml | 24 +- ..._term.searchable_content_types.default.yml | 30 + ...axonomy_term.searchable_fields.default.yml | 18 + ...hable_content_types.field_machine_name.yml | 18 + ...hable_fields.field_elasticsearch_field.yml | 4 +- ...archable_fields.field_elasticsearch_id.yml | 18 + ..._fields.field_searchable_content_types.yml | 28 + ...e.taxonomy_term.field_elasticsearch_id.yml | 20 + ...my_term.field_searchable_content_types.yml | 18 + ...my.vocabulary.searchable_content_types.yml | 8 + 36 files changed, 2018 insertions(+), 4 deletions(-) create mode 100644 modules/tide_api/modules/tide_content_collection_ui/README.md create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/.gitignore create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js.map create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/package-lock.json create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/package.json create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/src/index.html create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/src/index.js create mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/vite.config.js create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.paragraph.content_collection_ui.default.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.paragraph.content_collection_ui.default.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_body.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_link.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_title.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php create mode 100644 modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php create mode 100644 modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php create mode 100644 modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php create mode 100644 modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.info.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.libraries.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.module create mode 100644 modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.routing.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.services.yml create mode 100644 modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml create mode 100644 modules/tide_search/config/optional/core.entity_view_display.taxonomy_term.searchable_content_types.default.yml create mode 100644 modules/tide_search/config/optional/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml create mode 100644 modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml create mode 100644 modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml create mode 100644 modules/tide_search/config/optional/field.storage.taxonomy_term.field_elasticsearch_id.yml create mode 100644 modules/tide_search/config/optional/field.storage.taxonomy_term.field_searchable_content_types.yml create mode 100644 modules/tide_search/config/optional/taxonomy.vocabulary.searchable_content_types.yml diff --git a/.gitignore b/.gitignore index b1bbca113..d176ddf50 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /composer.build.lock /docroot /dpc-sdp +.idea .env.local docker-compose.override.yml screenshots diff --git a/modules/tide_api/modules/tide_content_collection_ui/README.md b/modules/tide_api/modules/tide_content_collection_ui/README.md new file mode 100644 index 000000000..2e6f38c82 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/README.md @@ -0,0 +1,13 @@ +# Tide content collection UI + +Module that provides a custom field type for integrating the content collection UI app. + +## App + +### Updating/building the app + +To update and build the Vue app, update the version of `@dpc-sdp/tide-search-ui` in `app/package.json` and run `npm install && npm run build` from the app directory. + +### Testing the app + +The app can be tested within Drupal by adding the landing page component to a page. It can also be tested outside Drupal for preliminary testing by running `npm run dev` from the app directory. Make sure you have a `.env` file within the app directory with the following: `VITE_API_URL=http://content-sdp.docker.internal/` diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/.gitignore b/modules/tide_api/modules/tide_content_collection_ui/app/.gitignore new file mode 100644 index 000000000..6ed48a986 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/app/.gitignore @@ -0,0 +1,2 @@ +.env +node_modules diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js b/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js new file mode 100644 index 000000000..3b036a4ac --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js @@ -0,0 +1,33 @@ +(function(){"use strict";var Yr=document.createElement("style");Yr.textContent=`.tide-form :where(input[type=text],input[type=number],textarea,select,button):focus{box-shadow:var(--tide-shadow-focus)}.tide-form__element{width:100%;padding:var(--tide-space-4) var(--tide-space-5);color:var(--tide-colour-text);border:var(--tide-border-width-1) solid var(--tide-border-colour);border-radius:var(--tide-border-radius-1);appearance:none}.tide-form__element:hover{border-color:var(--tide-border-colour-hover);box-shadow:var(--tide-border-shadow-hover)}.tide-form__element:is(select,input[type=text],input[type=number]){min-height:48px;font-size:inherit;background-color:var(--tide-colour-white)}.tide-form__label{display:block;font-size:var(--tide-font-size-3);margin-bottom:var(--tide-space-2);font-weight:var(--tide-font-weight-3);line-height:var(--tide-line-height-3)}.tide-form__description{color:var(--tide-colour-grey-dark);font-size:var(--tide-font-size-3);line-height:var(--tide-line-height-3);margin-top:var(--tide-space-2)}.tide-form__error{color:var(--tide-colour-error);font-size:var(--tide-font-size-3)}.tide-fieldset[data-v-da18ce75]{margin:0;position:relative;padding-inline:var(--tide-space-6);padding-block:var(--tide-space-9) var(--tide-space-6);background-color:var(--tide-colour-white);border-radius:var(--tide-border-radius-1);border:var(--tide-border-width-1) solid var(--tide-colour-grey);box-shadow:var(--tide-shadow-2)}.tide-fieldset__legend[data-v-da18ce75]{position:absolute;display:block;width:calc(100% - var(--tide-space-6) * 2);left:var(--tide-space-6);top:var(--tide-space-5);padding-inline:0;padding-block:0 var(--tide-space-3);font-size:var(--tide-font-size-4);font-weight:var(--tide-font-weight-3);border-bottom:var(--tide-border-width-2) solid var(--tide-colour-grey-light)}.tide-fieldset__required[data-v-da18ce75]{color:var(--tide-colour-error);font-weight:var(--tide-font-weight-1)}.tide-fieldset__description[data-v-da18ce75]{color:var(--tide-colour-grey-dark);font-size:var(--tide-font-size-3);margin-block:calc(var(--tide-space-4) * -1) var(--tide-space-6)}.tide-fieldset+.tide-fieldset[data-v-da18ce75]{margin-top:var(--tide-space-5)}.tide-fieldset[data-v-da18ce75]>*:last-child{margin-bottom:0}.tide-fieldset[data-v-da18ce75]>*:where(.tide-field-group,.tide-field)+*:where(.tide-field-group,.tide-field){margin-top:var(--tide-space-5);padding-top:var(--tide-space-5);border-top:var(--tide-border-width-2) solid var(--tide-colour-grey-light)}.tide-field:has(input:disabled,select:disabled,textarea:disabled){opacity:.5;pointer-events:none}.tide-field__label{font:inherit}.tide-field__required{color:var(--tide-colour-error)}.tide-option-button[data-v-378f24ab]{display:flex;align-items:center;padding-block:var(--tide-space-1);padding-inline:var(--tide-space-1) var(--tide-space-5);min-height:90px;cursor:pointer}.tide-option-button .tide-form__label[data-v-378f24ab]{font-size:var(--tide-font-size-4);font-weight:var(--tide-font-weight-2)}.tide-option-button[aria-disabled=true][data-v-378f24ab]{opacity:.5;pointer-events:none}.tide-option-button__image[data-v-378f24ab]{display:flex;align-items:center;justify-content:center;align-self:stretch;pointer-events:none;background-image:none;padding:var(--tide-space-6);background-color:var(--tide-colour-grey-light)}.tide-option-button__icon[data-v-378f24ab]{width:50px;height:auto}.tide-option-button__main[data-v-378f24ab]{flex:1;display:flex;flex-direction:column;justify-content:center;padding:var(--tide-space-4) var(--tide-space-3)}.tide-option-button__input[data-v-378f24ab]{outline:none;box-shadow:none;scale:1.5}.tide-option-button[data-v-378f24ab]:focus-within{box-shadow:var(--tide-shadow-focus)}.tide-option-group[data-v-0c7fefd7]{display:grid;gap:var(--tide-space-2) var(--tide-space-5);grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.tide-button{font:inherit;margin:0;padding:calc(var(--tide-space-5) - 1px) var(--tide-space-6);display:flex;align-items:center;justify-content:center;text-align:center;border:none;color:var(--tide-colour-text);border-radius:var(--tide-border-radius-1);background-color:var(--tide-colour-grey);font-weight:var(--tide-font-weight-3);line-height:var(--tide-line-height-2);box-shadow:var(--tide-shadow-1);cursor:pointer}.tide-button:focus-visible{outline:none}.tide-button:not([disabled]):hover{filter:brightness(.9)}.tide-button[disabled]{opacity:.5;filter:grayscale(1);cursor:not-allowed}.tide-button--small{font-size:var(--tide-font-size-2);line-height:var(--tide-line-height-1);padding:var(--tide-space-3) var(--tide-space-4)}.tide-button--large{font-size:var(--tide-font-size-4);line-height:var(--tide-line-height-3);padding:var(--tide-space-6) var(--tide-space-7)}.tide-button--primary{color:var(--tide-colour-white);background-color:var(--tide-colour-primary)}.tide-button--danger{color:var(--tide-colour-white);background-color:var(--tide-colour-error)}.tide-button--plain{all:unset;text-decoration:underline;cursor:pointer}.tide-field-group__content[data-v-787c34d8]{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--tide-space-5) var(--tide-space-6)}.tide-field-group--repeatable .tide-field-group__content[data-v-787c34d8]{display:block}.tide-field-group__action[data-v-787c34d8]{margin-top:var(--tide-space-6)}.tide-dropdown-list[data-v-af4a810a]{position:relative}.tide-dropdown-list:focus-within .tide-dropdown-list__autocomplete[data-v-af4a810a]{box-shadow:var(--tide-shadow-focus)}.tide-dropdown-list__autocomplete[data-v-af4a810a]{display:flex;flex-wrap:wrap;flex-direction:row;gap:var(--tide-space-4) var(--tide-space-2);padding-block:var(--tide-space-3);padding-right:var(--tide-space-7);background-color:var(--tide-colour-white);min-height:48px}.tide-dropdown-list__input[data-v-af4a810a]{flex:1;padding:0;border:none;width:125px;min-height:auto;font:inherit}.tide-dropdown-list__input[data-v-af4a810a]:focus{border:none;box-shadow:none;outline:none}.tide-dropdown-list__input[data-v-af4a810a]:disabled{background-color:transparent}.tide-dropdown-list__tags[data-v-af4a810a]{display:contents}.tide-dropdown-list__tag[data-v-af4a810a]{display:flex;align-items:center;justify-content:space-between;gap:var(--tide-space-3);font-weight:500;font-size:var(--tide-font-size-2);border-radius:1rem;background-color:var(--tide-colour-grey);padding:var(--tide-space-1) var(--tide-space-4);margin-block:var(--tide-space-1)}.tide-dropdown-list__tag[data-v-af4a810a]:hover{outline:1px solid var(--tide-colour-focus);outline-offset:1px}.tide-dropdown-list__tag-remove[data-v-af4a810a]{display:flex;align-items:center;justify-content:center;border:none;color:var(--tide-colour-grey);background-color:var(--tide-colour-grey-dark);border-radius:50%;margin-right:-4px;cursor:pointer;width:16px;height:16px;padding:var(--tide-space-1);font-size:var(--tide-font-size-1)}.tide-dropdown-list__tag-remove svg[data-v-af4a810a]{stroke:var(--tide-colour-white)}.tide-dropdown-list__tag-remove[data-v-af4a810a]:hover{color:var(--tide-colour-grey-light)}.tide-dropdown-list__loading-icon[data-v-af4a810a]{position:absolute;top:calc(50% - 9px);right:var(--tide-space-4);fill:var(--tide-colour-grey-dark);pointer-events:none;animation:tideSpin-af4a810a 1s linear infinite}.tide-dropdown-list__menu[data-v-af4a810a]{position:absolute;top:calc(100% + 1px);left:0;right:0;max-height:300px;overflow:auto;margin:0;padding:0;z-index:99;background-color:var(--tide-colour-white);overscroll-behavior:contain;box-shadow:var(--tide-shadow-2)}.tide-dropdown-list__menu-item[data-v-af4a810a]{padding:var(--tide-space-4) var(--tide-space-5);cursor:pointer}.tide-dropdown-list__menu-item[data-v-af4a810a]:hover,.tide-dropdown-list__menu-item[aria-current=true][data-v-af4a810a]{color:var(--tide-colour-white);background-color:var(--tide-colour-primary)}.tide-dropdown-list__menu-item[data-v-af4a810a]:where([aria-selected=true]){background-color:var(--tide-colour-grey)}.tide-dropdown-list__menu-empty[data-v-af4a810a]{cursor:inherit}.tide-dropdown-list__menu-empty[data-v-af4a810a]:hover{color:var(--tide-colour-text);background-color:var(--tide-colour-white)}.tide-dropdown-list--single .tide-dropdown-list__autocomplete[data-v-af4a810a]{padding-right:var(--tide-space-5)}.tide-dropdown-list--single .tide-dropdown-list__tag[data-v-af4a810a]{padding:0;width:100%;font-size:inherit;font-weight:inherit;background-color:transparent}.tide-dropdown-list--single .tide-dropdown-list__tag[data-v-af4a810a]:hover{outline:none}.tide-dropdown-list--single .tide-dropdown-list__tag-text[data-v-af4a810a]{max-width:calc(100% - var(--tide-space-8))}.tide-dropdown-list--single .tide-dropdown-list__tag-remove[data-v-af4a810a]{background-color:transparent;width:22px;height:22px}.tide-dropdown-list--single .tide-dropdown-list__tag-remove[data-v-af4a810a]:hover{background-color:var(--tide-colour-grey-light)}.tide-dropdown-list--single .tide-dropdown-list__tag-remove svg[data-v-af4a810a]{stroke:var(--tide-colour-grey-dark)}@keyframes tideSpin-af4a810a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tide-field-group-row[data-v-77f91b0d]{display:grid;align-items:center;grid-template-columns:1fr;gap:var(--tide-space-5)}.tide-field-group-row--sortable[data-v-77f91b0d]{grid-template-columns:auto 1fr}.tide-field-group-row--removeable[data-v-77f91b0d]{grid-template-columns:1fr auto}.tide-field-group-row--sortable.tide-field-group-row--removeable[data-v-77f91b0d]{grid-template-columns:auto 1fr auto}.tide-field-group-row+.tide-field-group-row[data-v-77f91b0d]{margin-top:var(--tide-space-3);padding-top:var(--tide-space-3);border-top:var(--tide-border-width-1) solid var(--tide-colour-grey-light)}.tide-field-group-row__content[data-v-77f91b0d]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:var(--tide-space-5) var(--tide-space-6)}.tide-field-group__sort[data-v-77f91b0d]{cursor:grab;display:flex;margin-right:calc(var(--tide-space-3) * -1)}.tide-field-group__sort svg[data-v-77f91b0d]{stroke:var(--tide-colour-grey-dark)}.tide-field-group-row__action-button[data-v-77f91b0d]{translate:0 -1px}.tide-radio[data-v-df50077b]{display:flex;flex-direction:column;gap:var(--tide-space-3)}.tide-radio--inline[data-v-df50077b]{display:flex;flex-direction:row;gap:var(--tide-space-3) var(--tide-space-6)}.tide-radio__label[data-v-df50077b]{display:flex;align-items:center;gap:var(--tide-space-3)}.tide-radio__input[data-v-df50077b]{margin:0;scale:1.25}.tide-radio__input[data-v-df50077b]:focus-visible{outline-color:var(--tide-colour-focus)}.tide-checkbox[data-v-3a00e669]{display:flex;flex-direction:column;gap:var(--tide-space-3)}.tide-checkbox--inline[data-v-3a00e669]{display:flex;flex-direction:row;gap:var(--tide-space-3) var(--tide-space-6)}.tide-checkbox__label[data-v-3a00e669]{display:flex;align-items:center;gap:var(--tide-space-3)}.tide-checkbox__input[data-v-3a00e669]{scale:1.25}.tide-checkbox__input[data-v-3a00e669]:focus-visible{outline-color:var(--tide-colour-focus)}.tide-collection{--tide-space-1: .125rem;--tide-space-2: .25rem;--tide-space-3: .5rem;--tide-space-4: .75rem;--tide-space-5: 1rem;--tide-space-6: 1.5rem;--tide-space-7: 2.5rem;--tide-space-8: 3.25rem;--tide-space-9: 4.5rem;--tide-font-size-1: .702rem;--tide-font-size-2: .79rem;--tide-font-size-3: .889rem;--tide-font-size-4: 1.125rem;--tide-font-size-5: 1.266rem;--tide-font-size-6: 1.424rem;--tide-font-size-7: 1.602rem;--tide-font-weight-1: 400;--tide-font-weight-2: 600;--tide-font-weight-3: 700;--tide-line-height-1: .9;--tide-line-height-2: 1.1;--tide-line-height-3: 1.3;--tide-line-height-4: 1.6;--tide-line-height-5: 1.9;--tide-colour-primary: #003ecc;--tide-colour-focus: #26a769;--tide-colour-error: #dc2323;--tide-colour-text: #232429;--tide-colour-white: #ffffff;--tide-colour-grey: #dedfe4;--tide-colour-grey-light: #f5f8ff;--tide-colour-grey-dark: #828388;--tide-border-width-1: 1px;--tide-border-width-2: 2px;--tide-border-width-3: 4px;--tide-border-colour: #919297;--tide-border-colour-hover: var(--tide-colour-text);--tide-border-radius-1: 2px;--tide-border-radius-2: 4px;--tide-border-radius-3: 6px;--tide-border-radius-4: 8px;--tide-border-radius-5: 50%;--tide-border-shadow-hover: inset 0 0 0 1px var(--tide-colour-text);--tide-shadow-1: 0 1px 2px rgba(0, 0, 0, .25);--tide-shadow-2: 0 2px 4px rgba(0, 0, 0, .1);--tide-shadow-focus: 0 0 0 2px var(--tide-colour-white), 0 0 0 5px var(--tide-colour-focus);--tide-outline-focus: 2px var(--tide-colour-focus) solid;accent-color:var(--tide-colour-primary);border-radius:var(--tide-border-radius-1)}.tide-collection *,.tide-collection *:before,.tide-collection *:after{box-sizing:border-box}.tide-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0;pointer-events:none} +/*$vite$:1*/`,document.head.appendChild(Yr);var Qr={};/** +* @vue/shared v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Ka(e){const a=Object.create(null);for(const t of e.split(","))a[t]=1;return t=>t in a}const de=Qr.NODE_ENV!=="production"?Object.freeze({}):{},Ft=Qr.NODE_ENV!=="production"?Object.freeze([]):[],qe=()=>{},wu=()=>!1,pn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Hn=e=>e.startsWith("onUpdate:"),$e=Object.assign,Xo=(e,a)=>{const t=e.indexOf(a);t>-1&&e.splice(t,1)},_u=Object.prototype.hasOwnProperty,le=(e,a)=>_u.call(e,a),G=Array.isArray,wt=e=>Kn(e)==="[object Map]",Xr=e=>Kn(e)==="[object Set]",Y=e=>typeof e=="function",Se=e=>typeof e=="string",Ga=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Jo=e=>(be(e)||Y(e))&&Y(e.then)&&Y(e.catch),Jr=Object.prototype.toString,Kn=e=>Jr.call(e),Zo=e=>Kn(e).slice(8,-1),Zr=e=>Kn(e)==="[object Object]",ei=e=>Se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,un=Ka(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ku=Ka("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Gn=e=>{const a=Object.create(null);return t=>a[t]||(a[t]=e(t))},Eu=/-(\w)/g,Ze=Gn(e=>e.replace(Eu,(a,t)=>t?t.toUpperCase():"")),ju=/\B([A-Z])/g,Ya=Gn(e=>e.replace(ju,"-$1").toLowerCase()),_t=Gn(e=>e.charAt(0).toUpperCase()+e.slice(1)),kt=Gn(e=>e?`on${_t(e)}`:""),st=(e,a)=>!Object.is(e,a),zt=(e,...a)=>{for(let t=0;t{Object.defineProperty(e,a,{configurable:!0,enumerable:!1,writable:n,value:t})},ai=e=>{const a=parseFloat(e);return isNaN(a)?e:a};let es;const mn=()=>es||(es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ti(e){if(G(e)){const a={};for(let t=0;t{if(t){const n=t.split(Nu);n.length>1&&(a[n[0].trim()]=n[1].trim())}}),a}function wa(e){let a="";if(Se(e))a=e;else if(G(e))for(let t=0;t!!(e&&e.__v_isRef===!0),ra=e=>Se(e)?e:e==null?"":G(e)||be(e)&&(e.toString===Jr||!Y(e.toString))?ts(e)?ra(e.value):JSON.stringify(e,ns,2):String(e),ns=(e,a)=>ts(a)?ns(e,a.value):wt(a)?{[`Map(${a.size})`]:[...a.entries()].reduce((t,[n,o],i)=>(t[ni(n,i)+" =>"]=o,t),{})}:Xr(a)?{[`Set(${a.size})`]:[...a.values()].map(t=>ni(t))}:Ga(a)?ni(a):be(a)&&!G(a)&&!Zr(a)?String(a):a,ni=(e,a="")=>{var t;return Ga(e)?`Symbol(${(t=e.description)!=null?t:a})`:e};var ye={};function Na(e,...a){console.warn(`[Vue warn] ${e}`,...a)}let Xe;class Mu{constructor(a=!1){this.detached=a,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xe,!a&&Xe&&(this.index=(Xe.scopes||(Xe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let a,t;if(this.scopes)for(a=0,t=this.scopes.length;a0&&--this._on===0&&(Xe=this.prevScope,this.prevScope=void 0)}stop(a){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(vn){let a=vn;for(vn=void 0;a;){const t=a.next;a.next=void 0,a.flags&=-9,a=t}}let e;for(;fn;){let a=fn;for(fn=void 0;a;){const t=a.next;if(a.next=void 0,a.flags&=-9,a.flags&1)try{a.trigger()}catch(n){e||(e=n)}a=t}}if(e)throw e}function cs(e){for(let a=e.deps;a;a=a.nextDep)a.version=-1,a.prevActiveLink=a.dep.activeLink,a.dep.activeLink=a}function ls(e){let a,t=e.depsTail,n=t;for(;n;){const o=n.prevDep;n.version===-1?(n===t&&(t=o),ci(n),zu(n)):a=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=a,e.depsTail=t}function si(e){for(let a=e.deps;a;a=a.nextDep)if(a.dep.version!==a.version||a.dep.computed&&(ps(a.dep.computed)||a.dep.version!==a.version))return!0;return!!e._dirty}function ps(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===hn)||(e.globalVersion=hn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!si(e))))return;e.flags|=2;const a=e.dep,t=ge,n=Sa;ge=e,Sa=!0;try{cs(e);const o=e.fn(e._value);(a.version===0||st(o,e._value))&&(e.flags|=128,e._value=o,a.version++)}catch(o){throw a.version++,o}finally{ge=t,Sa=n,ls(e),e.flags&=-3}}function ci(e,a=!1){const{dep:t,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),ye.NODE_ENV!=="production"&&t.subsHead===e&&(t.subsHead=o),t.subs===e&&(t.subs=n,!n&&t.computed)){t.computed.flags&=-5;for(let i=t.computed.deps;i;i=i.nextDep)ci(i,!0)}!a&&!--t.sc&&t.map&&t.map.delete(t.key)}function zu(e){const{prevDep:a,nextDep:t}=e;a&&(a.nextDep=t,e.prevDep=void 0),t&&(t.prevDep=a,e.nextDep=void 0)}let Sa=!0;const us=[];function Da(){us.push(Sa),Sa=!1}function Ca(){const e=us.pop();Sa=e===void 0?!0:e}function ds(e){const{cleanup:a}=e;if(e.cleanup=void 0,a){const t=ge;ge=void 0;try{a()}finally{ge=t}}}let hn=0;class Uu{constructor(a,t){this.sub=a,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class li{constructor(a){this.computed=a,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,ye.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(a){if(!ge||!Sa||ge===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ge)t=this.activeLink=new Uu(ge,this),ge.deps?(t.prevDep=ge.depsTail,ge.depsTail.nextDep=t,ge.depsTail=t):ge.deps=ge.depsTail=t,ms(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const n=t.nextDep;n.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=n),t.prevDep=ge.depsTail,t.nextDep=void 0,ge.depsTail.nextDep=t,ge.depsTail=t,ge.deps===t&&(ge.deps=n)}return ye.NODE_ENV!=="production"&&ge.onTrack&&ge.onTrack($e({effect:ge},a)),t}trigger(a){this.version++,hn++,this.notify(a)}notify(a){ii();try{if(ye.NODE_ENV!=="production")for(let t=this.subsHead;t;t=t.nextSub)t.sub.onTrigger&&!(t.sub.flags&8)&&t.sub.onTrigger($e({effect:t.sub},a));for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{ri()}}}function ms(e){if(e.dep.sc++,e.sub.flags&4){const a=e.dep.computed;if(a&&!e.dep.subs){a.flags|=20;for(let n=a.deps;n;n=n.nextDep)ms(n)}const t=e.dep.subs;t!==e&&(e.prevSub=t,t&&(t.nextSub=e)),ye.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const pi=new WeakMap,Et=Symbol(ye.NODE_ENV!=="production"?"Object iterate":""),ui=Symbol(ye.NODE_ENV!=="production"?"Map keys iterate":""),gn=Symbol(ye.NODE_ENV!=="production"?"Array iterate":"");function Be(e,a,t){if(Sa&&ge){let n=pi.get(e);n||pi.set(e,n=new Map);let o=n.get(t);o||(n.set(t,o=new li),o.map=n,o.key=t),ye.NODE_ENV!=="production"?o.track({target:e,type:a,key:t}):o.track()}}function Ra(e,a,t,n,o,i){const r=pi.get(e);if(!r){hn++;return}const s=c=>{c&&(ye.NODE_ENV!=="production"?c.trigger({target:e,type:a,key:t,newValue:n,oldValue:o,oldTarget:i}):c.trigger())};if(ii(),a==="clear")r.forEach(s);else{const c=G(e),l=c&&ei(t);if(c&&t==="length"){const p=Number(n);r.forEach((u,d)=>{(d==="length"||d===gn||!Ga(d)&&d>=p)&&s(u)})}else switch((t!==void 0||r.has(void 0))&&s(r.get(t)),l&&s(r.get(gn)),a){case"add":c?l&&s(r.get("length")):(s(r.get(Et)),wt(e)&&s(r.get(ui)));break;case"delete":c||(s(r.get(Et)),wt(e)&&s(r.get(ui)));break;case"set":wt(e)&&s(r.get(Et));break}}ri()}function Ut(e){const a=ne(e);return a===e?a:(Be(a,"iterate",gn),ea(e)?a:a.map(Ge))}function Yn(e){return Be(e=ne(e),"iterate",gn),e}const Lu={__proto__:null,[Symbol.iterator](){return di(this,Symbol.iterator,Ge)},concat(...e){return Ut(this).concat(...e.map(a=>G(a)?Ut(a):a))},entries(){return di(this,"entries",e=>(e[1]=Ge(e[1]),e))},every(e,a){return Qa(this,"every",e,a,void 0,arguments)},filter(e,a){return Qa(this,"filter",e,a,t=>t.map(Ge),arguments)},find(e,a){return Qa(this,"find",e,a,Ge,arguments)},findIndex(e,a){return Qa(this,"findIndex",e,a,void 0,arguments)},findLast(e,a){return Qa(this,"findLast",e,a,Ge,arguments)},findLastIndex(e,a){return Qa(this,"findLastIndex",e,a,void 0,arguments)},forEach(e,a){return Qa(this,"forEach",e,a,void 0,arguments)},includes(...e){return mi(this,"includes",e)},indexOf(...e){return mi(this,"indexOf",e)},join(e){return Ut(this).join(e)},lastIndexOf(...e){return mi(this,"lastIndexOf",e)},map(e,a){return Qa(this,"map",e,a,void 0,arguments)},pop(){return xn(this,"pop")},push(...e){return xn(this,"push",e)},reduce(e,...a){return fs(this,"reduce",e,a)},reduceRight(e,...a){return fs(this,"reduceRight",e,a)},shift(){return xn(this,"shift")},some(e,a){return Qa(this,"some",e,a,void 0,arguments)},splice(...e){return xn(this,"splice",e)},toReversed(){return Ut(this).toReversed()},toSorted(e){return Ut(this).toSorted(e)},toSpliced(...e){return Ut(this).toSpliced(...e)},unshift(...e){return xn(this,"unshift",e)},values(){return di(this,"values",Ge)}};function di(e,a,t){const n=Yn(e),o=n[a]();return n!==e&&!ea(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.value&&(i.value=t(i.value)),i}),o}const qu=Array.prototype;function Qa(e,a,t,n,o,i){const r=Yn(e),s=r!==e&&!ea(e),c=r[a];if(c!==qu[a]){const u=c.apply(e,i);return s?Ge(u):u}let l=t;r!==e&&(s?l=function(u,d){return t.call(this,Ge(u),d,e)}:t.length>2&&(l=function(u,d){return t.call(this,u,d,e)}));const p=c.call(r,l,n);return s&&o?o(p):p}function fs(e,a,t,n){const o=Yn(e);let i=t;return o!==e&&(ea(e)?t.length>3&&(i=function(r,s,c){return t.call(this,r,s,c,e)}):i=function(r,s,c){return t.call(this,r,Ge(s),c,e)}),o[a](i,...n)}function mi(e,a,t){const n=ne(e);Be(n,"iterate",gn);const o=n[a](...t);return(o===-1||o===!1)&&ao(t[0])?(t[0]=ne(t[0]),n[a](...t)):o}function xn(e,a,t=[]){Da(),ii();const n=ne(e)[a].apply(e,t);return ri(),Ca(),n}const Bu=Ka("__proto__,__v_isRef,__isVue"),vs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ga));function Wu(e){Ga(e)||(e=String(e));const a=ne(this);return Be(a,"has",e),a.hasOwnProperty(e)}class hs{constructor(a=!1,t=!1){this._isReadonly=a,this._isShallow=t}get(a,t,n){if(t==="__v_skip")return a.__v_skip;const o=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!o;if(t==="__v_isReadonly")return o;if(t==="__v_isShallow")return i;if(t==="__v_raw")return n===(o?i?ks:_s:i?ws:ys).get(a)||Object.getPrototypeOf(a)===Object.getPrototypeOf(n)?a:void 0;const r=G(a);if(!o){let c;if(r&&(c=Lu[t]))return c;if(t==="hasOwnProperty")return Wu}const s=Reflect.get(a,t,Ie(a)?a:n);return(Ga(t)?vs.has(t):Bu(t))||(o||Be(a,"get",t),i)?s:Ie(s)?r&&ei(t)?s:s.value:be(s)?o?vi(s):Zn(s):s}}class gs extends hs{constructor(a=!1){super(!1,a)}set(a,t,n,o){let i=a[t];if(!this._isShallow){const c=Fa(i);if(!ea(n)&&!Fa(n)&&(i=ne(i),n=ne(n)),!G(a)&&Ie(i)&&!Ie(n))return c?!1:(i.value=n,!0)}const r=G(a)&&ei(t)?Number(t)e,Qn=e=>Reflect.getPrototypeOf(e);function Qu(e,a,t){return function(...n){const o=this.__v_raw,i=ne(o),r=wt(i),s=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,l=o[e](...n),p=t?fi:a?to:Ge;return!a&&Be(i,"iterate",c?ui:Et),{next(){const{value:u,done:d}=l.next();return d?{value:u,done:d}:{value:s?[p(u[0]),p(u[1])]:p(u),done:d}},[Symbol.iterator](){return this}}}}function Xn(e){return function(...a){if(ye.NODE_ENV!=="production"){const t=a[0]?`on key "${a[0]}" `:"";Na(`${_t(e)} operation ${t}failed: target is readonly.`,ne(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Xu(e,a){const t={get(n){const o=this.__v_raw,i=ne(o),r=ne(n);e||(st(n,r)&&Be(i,"get",n),Be(i,"get",r));const{has:s}=Qn(i),c=a?fi:e?to:Ge;if(s.call(i,n))return c(o.get(n));if(s.call(i,r))return c(o.get(r));o!==i&&o.get(n)},get size(){const n=this.__v_raw;return!e&&Be(ne(n),"iterate",Et),Reflect.get(n,"size",n)},has(n){const o=this.__v_raw,i=ne(o),r=ne(n);return e||(st(n,r)&&Be(i,"has",n),Be(i,"has",r)),n===r?o.has(n):o.has(n)||o.has(r)},forEach(n,o){const i=this,r=i.__v_raw,s=ne(r),c=a?fi:e?to:Ge;return!e&&Be(s,"iterate",Et),r.forEach((l,p)=>n.call(o,c(l),c(p),i))}};return $e(t,e?{add:Xn("add"),set:Xn("set"),delete:Xn("delete"),clear:Xn("clear")}:{add(n){!a&&!ea(n)&&!Fa(n)&&(n=ne(n));const o=ne(this);return Qn(o).has.call(o,n)||(o.add(n),Ra(o,"add",n,n)),this},set(n,o){!a&&!ea(o)&&!Fa(o)&&(o=ne(o));const i=ne(this),{has:r,get:s}=Qn(i);let c=r.call(i,n);c?ye.NODE_ENV!=="production"&&bs(i,r,n):(n=ne(n),c=r.call(i,n));const l=s.call(i,n);return i.set(n,o),c?st(o,l)&&Ra(i,"set",n,o,l):Ra(i,"add",n,o),this},delete(n){const o=ne(this),{has:i,get:r}=Qn(o);let s=i.call(o,n);s?ye.NODE_ENV!=="production"&&bs(o,i,n):(n=ne(n),s=i.call(o,n));const c=r?r.call(o,n):void 0,l=o.delete(n);return s&&Ra(o,"delete",n,void 0,c),l},clear(){const n=ne(this),o=n.size!==0,i=ye.NODE_ENV!=="production"?wt(n)?new Map(n):new Set(n):void 0,r=n.clear();return o&&Ra(n,"clear",void 0,void 0,i),r}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=Qu(n,e,a)}),t}function Jn(e,a){const t=Xu(e,a);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(le(t,o)&&o in n?t:n,o,i)}const Ju={get:Jn(!1,!1)},Zu={get:Jn(!1,!0)},ed={get:Jn(!0,!1)},ad={get:Jn(!0,!0)};function bs(e,a,t){const n=ne(t);if(n!==t&&a.call(e,n)){const o=Zo(e);Na(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ys=new WeakMap,ws=new WeakMap,_s=new WeakMap,ks=new WeakMap;function td(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nd(e){return e.__v_skip||!Object.isExtensible(e)?0:td(Zo(e))}function Zn(e){return Fa(e)?e:eo(e,!1,Hu,Ju,ys)}function od(e){return eo(e,!1,Gu,Zu,ws)}function vi(e){return eo(e,!0,Ku,ed,_s)}function Ma(e){return eo(e,!0,Yu,ad,ks)}function eo(e,a,t,n,o){if(!be(e))return ye.NODE_ENV!=="production"&&Na(`value cannot be made ${a?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(a&&e.__v_isReactive))return e;const i=nd(e);if(i===0)return e;const r=o.get(e);if(r)return r;const s=new Proxy(e,i===2?n:t);return o.set(e,s),s}function jt(e){return Fa(e)?jt(e.__v_raw):!!(e&&e.__v_isReactive)}function Fa(e){return!!(e&&e.__v_isReadonly)}function ea(e){return!!(e&&e.__v_isShallow)}function ao(e){return e?!!e.__v_raw:!1}function ne(e){const a=e&&e.__v_raw;return a?ne(a):e}function id(e){return!le(e,"__v_skip")&&Object.isExtensible(e)&&dn(e,"__v_skip",!0),e}const Ge=e=>be(e)?Zn(e):e,to=e=>be(e)?vi(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function Ta(e){return js(e,!1)}function Es(e){return js(e,!0)}function js(e,a){return Ie(e)?e:new rd(e,a)}class rd{constructor(a,t){this.dep=new li,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?a:ne(a),this._value=t?a:Ge(a),this.__v_isShallow=t}get value(){return ye.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(a){const t=this._rawValue,n=this.__v_isShallow||ea(a)||Fa(a);a=n?a:ne(a),st(a,t)&&(this._rawValue=a,this._value=n?a:Ge(a),ye.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:a,oldValue:t}):this.dep.trigger())}}function Ot(e){return Ie(e)?e.value:e}function hi(e){return Y(e)?e():Ot(e)}const sd={get:(e,a,t)=>a==="__v_raw"?e:Ot(Reflect.get(e,a,t)),set:(e,a,t,n)=>{const o=e[a];return Ie(o)&&!Ie(t)?(o.value=t,!0):Reflect.set(e,a,t,n)}};function Os(e){return jt(e)?e:new Proxy(e,sd)}class cd{constructor(a,t,n){this.fn=a,this.setter=t,this._value=void 0,this.dep=new li(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=hn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ge!==this)return ss(this,!0),!0}get value(){const a=ye.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return ps(this),a&&(a.version=this.dep.version),this._value}set value(a){this.setter?this.setter(a):ye.NODE_ENV!=="production"&&Na("Write operation failed: computed value is readonly")}}function ld(e,a,t=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new cd(n,o,t)}const no={},oo=new WeakMap;let Nt;function pd(e,a=!1,t=Nt){if(t){let n=oo.get(t);n||oo.set(t,n=[]),n.push(e)}else ye.NODE_ENV!=="production"&&!a&&Na("onWatcherCleanup() was called when there was no active watcher to associate with.")}function ud(e,a,t=de){const{immediate:n,deep:o,once:i,scheduler:r,augmentJob:s,call:c}=t,l=O=>{(t.onWarn||Na)("Invalid watch source: ",O,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},p=O=>o?O:ea(O)||o===!1||o===0?Xa(O,1):Xa(O);let u,d,f,g,h=!1,j=!1;if(Ie(e)?(d=()=>e.value,h=ea(e)):jt(e)?(d=()=>p(e),h=!0):G(e)?(j=!0,h=e.some(O=>jt(O)||ea(O)),d=()=>e.map(O=>{if(Ie(O))return O.value;if(jt(O))return p(O);if(Y(O))return c?c(O,2):O();ye.NODE_ENV!=="production"&&l(O)})):Y(e)?a?d=c?()=>c(e,2):e:d=()=>{if(f){Da();try{f()}finally{Ca()}}const O=Nt;Nt=u;try{return c?c(e,3,[g]):e(g)}finally{Nt=O}}:(d=qe,ye.NODE_ENV!=="production"&&l(e)),a&&o){const O=d,L=o===!0?1/0:o;d=()=>Xa(O(),L)}const y=os(),w=()=>{u.stop(),y&&y.active&&Xo(y.effects,u)};if(i&&a){const O=a;a=(...L)=>{O(...L),w()}}let _=j?new Array(e.length).fill(no):no;const M=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(a){const L=u.run();if(o||h||(j?L.some((F,q)=>st(F,_[q])):st(L,_))){f&&f();const F=Nt;Nt=u;try{const q=[L,_===no?void 0:j&&_[0]===no?[]:_,g];_=L,c?c(a,3,q):a(...q)}finally{Nt=F}}}else u.run()};return s&&s(M),u=new is(d),u.scheduler=r?()=>r(M,!1):M,g=O=>pd(O,!1,u),f=u.onStop=()=>{const O=oo.get(u);if(O){if(c)c(O,4);else for(const L of O)L();oo.delete(u)}},ye.NODE_ENV!=="production"&&(u.onTrack=t.onTrack,u.onTrigger=t.onTrigger),a?n?M(!0):_=u.run():r?r(M.bind(null,!0),!0):u.run(),w.pause=u.pause.bind(u),w.resume=u.resume.bind(u),w.stop=w,w}function Xa(e,a=1/0,t){if(a<=0||!be(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),a--,Ie(e))Xa(e.value,a,t);else if(G(e))for(let n=0;n{Xa(n,a,t)});else if(Zr(e)){for(const n in e)Xa(e[n],a,t);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Xa(e[n],a,t)}return e}var x={};const St=[];function io(e){St.push(e)}function ro(){St.pop()}let gi=!1;function V(e,...a){if(gi)return;gi=!0,Da();const t=St.length?St[St.length-1].component:null,n=t&&t.appContext.config.warnHandler,o=dd();if(n)Lt(n,t,11,[e+a.map(i=>{var r,s;return(s=(r=i.toString)==null?void 0:r.call(i))!=null?s:JSON.stringify(i)}).join(""),t&&t.proxy,o.map(({vnode:i})=>`at <${jo(t,i.type)}>`).join(` +`),o]);else{const i=[`[Vue warn]: ${e}`,...a];o.length&&i.push(` +`,...md(o)),console.warn(...i)}Ca(),gi=!1}function dd(){let e=St[St.length-1];if(!e)return[];const a=[];for(;e;){const t=a[0];t&&t.vnode===e?t.recurseCount++:a.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return a}function md(e){const a=[];return e.forEach((t,n)=>{a.push(...n===0?[]:[` +`],...fd(t))}),a}function fd({vnode:e,recurseCount:a}){const t=a>0?`... (${a} recursive calls)`:"",n=e.component?e.component.parent==null:!1,o=` at <${jo(e.component,e.type,n)}`,i=">"+t;return e.props?[o,...vd(e.props),i]:[o+i]}function vd(e){const a=[],t=Object.keys(e);return t.slice(0,3).forEach(n=>{a.push(...Ns(n,e[n]))}),t.length>3&&a.push(" ..."),a}function Ns(e,a,t){return Se(a)?(a=JSON.stringify(a),t?a:[`${e}=${a}`]):typeof a=="number"||typeof a=="boolean"||a==null?t?a:[`${e}=${a}`]:Ie(a)?(a=Ns(e,ne(a.value),!0),t?a:[`${e}=Ref<`,a,">"]):Y(a)?[`${e}=fn${a.name?`<${a.name}>`:""}`]:(a=ne(a),t?a:[`${e}=`,a])}const xi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Lt(e,a,t,n){try{return n?e(...n):e()}catch(o){bn(o,a,t)}}function za(e,a,t,n){if(Y(e)){const o=Lt(e,a,t,n);return o&&Jo(o)&&o.catch(i=>{bn(i,a,t)}),o}if(G(e)){const o=[];for(let i=0;i>>1,o=aa[n],i=yn(o);i=yn(t)?aa.push(e):aa.splice(xd(a),0,e),e.flags|=1,Ds()}}function Ds(){so||(so=Ss.then(Is))}function Cs(e){G(e)?qt.push(...e):ct&&e.id===-1?ct.splice(Bt+1,0,e):e.flags&1||(qt.push(e),e.flags|=1),Ds()}function Ts(e,a,t=Ua+1){for(x.NODE_ENV!=="production"&&(a=a||new Map);tyn(t)-yn(n));if(qt.length=0,ct){ct.push(...a);return}for(ct=a,x.NODE_ENV!=="production"&&(e=e||new Map),Bt=0;Bte.id==null?e.flags&2?-1:1/0:e.id;function Is(e){x.NODE_ENV!=="production"&&(e=e||new Map);const a=x.NODE_ENV!=="production"?t=>yi(e,t):qe;try{for(Ua=0;Uagd){const n=a.i,o=n&&Li(n.type);return bn(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(a,t+1),!1}let La=!1;const lo=new Map;x.NODE_ENV!=="production"&&(mn().__VUE_HMR_RUNTIME__={createRecord:wi(Ps),rerender:wi(wd),reload:wi(_d)});const Dt=new Map;function bd(e){const a=e.type.__hmrId;let t=Dt.get(a);t||(Ps(a,e.type),t=Dt.get(a)),t.instances.add(e)}function yd(e){Dt.get(e.type.__hmrId).instances.delete(e)}function Ps(e,a){return Dt.has(e)?!1:(Dt.set(e,{initialDef:po(a),instances:new Set}),!0)}function po(e){return Pc(e)?e.__vccOpts:e}function wd(e,a){const t=Dt.get(e);t&&(t.initialDef.render=a,[...t.instances].forEach(n=>{a&&(n.render=a,po(n.type).render=a),n.renderCache=[],La=!0,n.update(),La=!1}))}function _d(e,a){const t=Dt.get(e);if(!t)return;a=po(a),Vs(t.initialDef,a);const n=[...t.instances];for(let o=0;o{La=!0,i.parent.update(),La=!1,s.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(r)}Cs(()=>{lo.clear()})}function Vs(e,a){$e(e,a);for(const t in e)t!=="__file"&&!(t in a)&&delete e[t]}function wi(e){return(a,t)=>{try{return e(a,t)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let qa,wn=[],_i=!1;function _n(e,...a){qa?qa.emit(e,...a):_i||wn.push({event:e,args:a})}function $s(e,a){var t,n;qa=e,qa?(qa.enabled=!0,wn.forEach(({event:o,args:i})=>qa.emit(o,...i)),wn=[]):typeof window<"u"&&window.HTMLElement&&!((n=(t=window.navigator)==null?void 0:t.userAgent)!=null&&n.includes("jsdom"))?((a.__VUE_DEVTOOLS_HOOK_REPLAY__=a.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{$s(o,a)}),setTimeout(()=>{qa||(a.__VUE_DEVTOOLS_HOOK_REPLAY__=null,_i=!0,wn=[])},3e3)):(_i=!0,wn=[])}function kd(e,a){_n("app:init",e,a,{Fragment:Te,Text:On,Comment:sa,Static:yo})}function Ed(e){_n("app:unmount",e)}const jd=ki("component:added"),Rs=ki("component:updated"),Od=ki("component:removed"),Nd=e=>{qa&&typeof qa.cleanupBuffer=="function"&&!qa.cleanupBuffer(e)&&Od(e)};/*! #__NO_SIDE_EFFECTS__ */function ki(e){return a=>{_n(e,a.appContext.app,a.uid,a.parent?a.parent.uid:void 0,a)}}const Sd=Ms("perf:start"),Dd=Ms("perf:end");function Ms(e){return(a,t,n)=>{_n(e,a.appContext.app,a.uid,a,t,n)}}function Cd(e,a,t){_n("component:emit",e.appContext.app,e,a,t)}let Re=null,Fs=null;function uo(e){const a=Re;return Re=e,Fs=e&&e.type.__scopeId||null,a}function Pe(e,a=Re,t){if(!a||e._n)return e;const n=(...o)=>{n._d&&kc(-1);const i=uo(a);let r;try{r=e(...o)}finally{uo(i),n._d&&kc(1)}return x.NODE_ENV!=="production"&&Rs(a),r};return n._n=!0,n._c=!0,n._d=!0,n}function zs(e){ku(e)&&V("Do not use built-in directive ids as custom directive id: "+e)}function Td(e,a){if(Re===null)return x.NODE_ENV!=="production"&&V("withDirectives can only be used inside render functions."),e;const t=Eo(Re),n=e.dirs||(e.dirs=[]);for(let o=0;oe.__isTeleport;function Ei(e,a){e.shapeFlag&6&&e.component?(e.transition=a,Ei(e.component.subTree,a)):e.shapeFlag&128?(e.ssContent.transition=a.clone(e.ssContent),e.ssFallback.transition=a.clone(e.ssFallback)):e.transition=a}/*! #__NO_SIDE_EFFECTS__ */function Me(e,a){return Y(e)?$e({name:e.name},a,{setup:e}):e}function Us(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Ls=new WeakSet;function Pd(e){const a=_o(),t=Es(null);if(a){const o=a.refs===de?a.refs={}:a.refs;let i;x.NODE_ENV!=="production"&&(i=Object.getOwnPropertyDescriptor(o,e))&&!i.configurable?V(`useTemplateRef('${e}') already exists.`):Object.defineProperty(o,e,{enumerable:!0,get:()=>t.value,set:r=>t.value=r})}else x.NODE_ENV!=="production"&&V("useTemplateRef() is called when there is no active component instance to be associated with.");const n=x.NODE_ENV!=="production"?vi(t):t;return x.NODE_ENV!=="production"&&Ls.add(n),n}function kn(e,a,t,n,o=!1){if(G(e)){e.forEach((g,h)=>kn(g,a&&(G(a)?a[h]:a),t,n,o));return}if(Wt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&kn(e,a,t,n.component.subTree);return}const i=n.shapeFlag&4?Eo(n.component):n.el,r=o?null:i,{i:s,r:c}=e;if(x.NODE_ENV!=="production"&&!s){V("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const l=a&&a.r,p=s.refs===de?s.refs={}:s.refs,u=s.setupState,d=ne(u),f=u===de?()=>!1:g=>x.NODE_ENV!=="production"&&(le(d,g)&&!Ie(d[g])&&V(`Template ref "${g}" used on a non-ref value. It will not work in the production build.`),Ls.has(d[g]))?!1:le(d,g);if(l!=null&&l!==c&&(Se(l)?(p[l]=null,f(l)&&(u[l]=null)):Ie(l)&&(l.value=null)),Y(c))Lt(c,s,12,[r,p]);else{const g=Se(c),h=Ie(c);if(g||h){const j=()=>{if(e.f){const y=g?f(c)?u[c]:p[c]:c.value;o?G(y)&&Xo(y,i):G(y)?y.includes(i)||y.push(i):g?(p[c]=[i],f(c)&&(u[c]=p[c])):(c.value=[i],e.k&&(p[e.k]=c.value))}else g?(p[c]=r,f(c)&&(u[c]=r)):h?(c.value=r,e.k&&(p[e.k]=r)):x.NODE_ENV!=="production"&&V("Invalid template ref type:",c,`(${typeof c})`)};r?(j.id=-1,ma(j,t)):j()}else x.NODE_ENV!=="production"&&V("Invalid template ref type:",c,`(${typeof c})`)}}mn().requestIdleCallback,mn().cancelIdleCallback;const Wt=e=>!!e.type.__asyncLoader,ji=e=>e.type.__isKeepAlive;function Vd(e,a){qs(e,"a",a)}function $d(e,a){qs(e,"da",a)}function qs(e,a,t=He){const n=e.__wdc||(e.__wdc=()=>{let o=t;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(mo(a,n,t),t){let o=t.parent;for(;o&&o.parent;)ji(o.parent.vnode)&&Rd(n,a,t,o),o=o.parent}}function Rd(e,a,t,n){const o=mo(a,e,n,!0);Oi(()=>{Xo(n[a],o)},t)}function mo(e,a,t=He,n=!1){if(t){const o=t[e]||(t[e]=[]),i=a.__weh||(a.__weh=(...r)=>{Da();const s=An(t),c=za(a,t,e,r);return s(),Ca(),c});return n?o.unshift(i):o.push(i),i}else if(x.NODE_ENV!=="production"){const o=kt(xi[e].replace(/ hook$/,""));V(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Ja=e=>(a,t=He)=>{(!In||e==="sp")&&mo(e,(...n)=>a(...n),t)},Md=Ja("bm"),Ht=Ja("m"),Fd=Ja("bu"),zd=Ja("u"),Ud=Ja("bum"),Oi=Ja("um"),Ld=Ja("sp"),qd=Ja("rtg"),Bd=Ja("rtc");function Wd(e,a=He){mo("ec",e,a)}const Hd="components",Bs=Symbol.for("v-ndc");function Kd(e){return Se(e)?Gd(Hd,e,!1)||e:e||Bs}function Gd(e,a,t=!0,n=!1){const o=Re||He;if(o){const i=o.type;{const s=Li(i,!1);if(s&&(s===a||s===Ze(a)||s===_t(Ze(a))))return i}const r=Ws(o[e]||i[e],a)||Ws(o.appContext[e],a);return!r&&n?i:(x.NODE_ENV!=="production"&&t&&!r&&V(`Failed to resolve ${e.slice(0,-1)}: ${a} +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),r)}else x.NODE_ENV!=="production"&&V(`resolve${_t(e.slice(0,-1))} can only be used in render() or setup().`)}function Ws(e,a){return e&&(e[a]||e[Ze(a)]||e[_t(Ze(a))])}function lt(e,a,t,n){let o;const i=t,r=G(e);if(r||Se(e)){const s=r&&jt(e);let c=!1,l=!1;s&&(c=!ea(e),l=Fa(e),e=Yn(e)),o=new Array(e.length);for(let p=0,u=e.length;pa(s,c,void 0,i));else{const s=Object.keys(e);o=new Array(s.length);for(let c=0,l=s.length;c1&&(V("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),i=()=>[]),i&&i._c&&(i._d=!1),W();const r=i&&Hs(i(t)),s=t.key||r&&r.key,c=We(Te,{key:(s&&!Ga(s)?s:`_${a}`)+""},r||[],r&&e._===1?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function Hs(e){return e.some(a=>Dn(a)?!(a.type===sa||a.type===Te&&!Hs(a.children)):!0)?e:null}const Ni=e=>e?Cc(e)?Eo(e):Ni(e.parent):null,Tt=$e(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>x.NODE_ENV!=="production"?Ma(e.props):e.props,$attrs:e=>x.NODE_ENV!=="production"?Ma(e.attrs):e.attrs,$slots:e=>x.NODE_ENV!=="production"?Ma(e.slots):e.slots,$refs:e=>x.NODE_ENV!=="production"?Ma(e.refs):e.refs,$parent:e=>Ni(e.parent),$root:e=>Ni(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xs(e),$forceUpdate:e=>e.f||(e.f=()=>{co(e.update)}),$nextTick:e=>e.n||(e.n=bi.bind(e.proxy)),$watch:e=>Om.bind(e)}),Si=e=>e==="_"||e==="$",Di=(e,a)=>e!==de&&!e.__isScriptSetup&&le(e,a),Ks={get({_:e},a){if(a==="__v_skip")return!0;const{ctx:t,setupState:n,data:o,props:i,accessCache:r,type:s,appContext:c}=e;if(x.NODE_ENV!=="production"&&a==="__isVue")return!0;let l;if(a[0]!=="$"){const f=r[a];if(f!==void 0)switch(f){case 1:return n[a];case 2:return o[a];case 4:return t[a];case 3:return i[a]}else{if(Di(n,a))return r[a]=1,n[a];if(o!==de&&le(o,a))return r[a]=2,o[a];if((l=e.propsOptions[0])&&le(l,a))return r[a]=3,i[a];if(t!==de&&le(t,a))return r[a]=4,t[a];Ci&&(r[a]=0)}}const p=Tt[a];let u,d;if(p)return a==="$attrs"?(Be(e.attrs,"get",""),x.NODE_ENV!=="production"&&bo()):x.NODE_ENV!=="production"&&a==="$slots"&&Be(e,"get",a),p(e);if((u=s.__cssModules)&&(u=u[a]))return u;if(t!==de&&le(t,a))return r[a]=4,t[a];if(d=c.config.globalProperties,le(d,a))return d[a];x.NODE_ENV!=="production"&&Re&&(!Se(a)||a.indexOf("__v")!==0)&&(o!==de&&Si(a[0])&&le(o,a)?V(`Property ${JSON.stringify(a)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Re&&V(`Property ${JSON.stringify(a)} was accessed during render but is not defined on instance.`))},set({_:e},a,t){const{data:n,setupState:o,ctx:i}=e;return Di(o,a)?(o[a]=t,!0):x.NODE_ENV!=="production"&&o.__isScriptSetup&&le(o,a)?(V(`Cannot mutate + + + +
+ +

Drupal style mock test page

+ +
+
+ +
+
+ + + + + + diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/src/index.js b/modules/tide_api/modules/tide_content_collection_ui/app/src/index.js new file mode 100644 index 000000000..1be89d4c3 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/app/src/index.js @@ -0,0 +1,25 @@ +import { getJson, initApp, setJson } from '@dpc-sdp/tide-content-collection-ui' +import '@dpc-sdp/tide-content-collection-ui/styles' + + ;(($) => { + Drupal.behaviors.contentCollection = { + attach: function (context) { + once('content-collection-init', '.content-collection-app', context).forEach(function (container) { + const wrap = container.closest('.field--type-content-collection') + const index = container.getAttribute('data-index') || '0' + const config = container.getAttribute('data-config') || '{}' + const field = wrap?.querySelector(`#content-collection-value-${index}`) + + if (field) { + initApp(container, { + index, + form: getJson(field.value), + config: getJson(config), + update: (form) => (field.value = setJson(form)), + baseUrl: import.meta.env.VITE_API_URL || window.location.origin + }) + } + }) + } + } +})(jQuery) diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/vite.config.js b/modules/tide_api/modules/tide_content_collection_ui/app/vite.config.js new file mode 100644 index 000000000..afda75987 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/app/vite.config.js @@ -0,0 +1,25 @@ +import { defineConfig } from 'vite'; +import { resolve } from 'path'; + +export default defineConfig({ + root: './src', + build: { + outDir: '../dist', + rollupOptions: { + input: { + 'main': resolve(__dirname, 'src/index.js'), + }, + output: { + format: 'iife', + entryFileNames: '[name].js', + globals: { + jquery: 'jQuery', + drupal: 'Drupal', + once: 'once', + }, + }, + external: ['jquery', 'drupal', 'once'], + }, + sourcemap: true, + }, +}); diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.paragraph.content_collection_ui.default.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.paragraph.content_collection_ui.default.yml new file mode 100644 index 000000000..f8ab97a15 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.paragraph.content_collection_ui.default.yml @@ -0,0 +1,43 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.content_collection_ui.field_paragraph_body + - field.field.paragraph.content_collection_ui.field_paragraph_link + - field.field.paragraph.content_collection_ui.field_paragraph_title + - paragraphs.paragraphs_type.content_collection_ui + module: + - link + - text +id: paragraph.content_collection_ui.default +targetEntityType: paragraph +bundle: content_collection_ui +mode: default +content: + field_paragraph_body: + type: text_textarea + weight: 1 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_paragraph_link: + type: link_default + weight: 5 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_paragraph_title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + status: true diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.paragraph.content_collection_ui.default.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.paragraph.content_collection_ui.default.yml new file mode 100644 index 000000000..eb6e4e3de --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.paragraph.content_collection_ui.default.yml @@ -0,0 +1,45 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.content_collection_ui.field_paragraph_body + - field.field.paragraph.content_collection_ui.field_paragraph_link + - field.field.paragraph.content_collection_ui.field_paragraph_title + - paragraphs.paragraphs_type.content_collection_ui + module: + - link + - text +id: paragraph.content_collection_ui.default +targetEntityType: paragraph +bundle: content_collection_ui +mode: default +content: + field_paragraph_body: + type: text_default + label: above + settings: { } + third_party_settings: { } + weight: 2 + region: content + field_paragraph_link: + type: link + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + weight: 5 + region: content + field_paragraph_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 0 + region: content +hidden: + search_api_excerpt: true diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_body.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_body.yml new file mode 100644 index 000000000..1fdbb1829 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_body.yml @@ -0,0 +1,25 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_paragraph_body + - paragraphs.paragraphs_type.content_collection_ui + module: + - allowed_formats + - text +third_party_settings: + allowed_formats: + allowed_formats: { } +id: paragraph.content_collection_ui.field_paragraph_body +field_name: field_paragraph_body +entity_type: paragraph +bundle: content_collection_ui +label: Description +description: 'Description to display below title.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + allowed_formats: { } +field_type: text_long diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_link.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_link.yml new file mode 100644 index 000000000..8b190786f --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_link.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_paragraph_link + - paragraphs.paragraphs_type.content_collection_ui + module: + - link + - link_field_autocomplete_filter +third_party_settings: + link_field_autocomplete_filter: + negate: null + allowed_content_types: + alert: '0' + event: '0' + grant: '0' + landing_page: '0' + news: '0' + publication: '0' + publication_page: '0' + test: '0' + tide_search_listing: '0' +id: paragraph.content_collection_ui.field_paragraph_link +field_name: field_paragraph_link +entity_type: paragraph +bundle: content_collection_ui +label: Link +description: 'A link to displayed below the content to help navigate uses to more related content.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + title: 1 + link_type: 17 +field_type: link diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_title.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_title.yml new file mode 100644 index 000000000..c07118d57 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_paragraph_title.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_paragraph_title + - paragraphs.paragraphs_type.content_collection_ui +id: paragraph.content_collection_ui.field_paragraph_title +field_name: field_paragraph_title +entity_type: paragraph +bundle: content_collection_ui +label: Title +description: 'Add a title to display above the content.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml new file mode 100644 index 000000000..7eb620eae --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml @@ -0,0 +1,13 @@ +langcode: en +status: true +dependencies: + content: + - 'file:file:bd168646-7145-4b4b-b6c8-8552d2d7b0b8' +_core: + default_config_hash: epwlG1_yWnseA1q5W7Ajymn3b3NQEyTjdnCPjXzNFyA +id: content_collection_ui +label: 'Tide Content Collection UI' +icon_uuid: bd168646-7145-4b4b-b6c8-8552d2d7b0b8 +icon_default: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzciIHZpZXdCb3g9IjAgMCA2OCA3NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjY4IiBoZWlnaHQ9Ijc3IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjIzMiAxMUgxNi43NjhDMTUuMDI1NCAxMSAxMy41NzYgMTEgMTIuMzg3MSAxMS4wOTgyQzcuNzkxMzEgMTEuNDc0NSA0LjQ2NTc3IDE0LjkwNzYgNC4wOTc3MSAxOS40MjczQzQgMjAuNjIxOCA0IDIyLjA4NDcgNCAyMy44MjkxVjUyLjE3MDlDNCA1My45MjE4IDQgNTUuMzc4MiA0LjA5NzcxIDU2LjU3MjdDNC4xOTU0MyA1Ny44MTY0IDQuNDE2OTEgNTguOTgxNSA0Ljk3NzE0IDYwLjA4NDRDNS44MzU5NiA2MS43NzgyIDcuMjA2NDggNjMuMTU1MyA4Ljg5MjIzIDY0LjAxODJDOS45ODk4OSA2NC41ODExIDExLjE0OTQgNjQuODAzNiAxMi4zODcxIDY0LjkwMThDMTMuNTc2IDY1IDE1LjAyNTQgNjUgMTYuNzY0NyA2NUg0OC4yMzUzQzQ5Ljk3NDYgNjUgNTEuNDI3MyA2NSA1Mi42MTI5IDY0LjkwMThDNTMuODUwNiA2NC44MDM2IDU1LjAxMDEgNjQuNTgxMSA1Ni4xMDc4IDY0LjAxODJDNTYuNjYxOCA2My43MTAxIDU3LjA3NTEgNjMuMTk3OSA1Ny4yNjA2IDYyLjU4OTVDNTcuNDQ2MSA2MS45ODEyIDU3LjM4OTIgNjEuMzI0MiA1Ny4xMDE5IDYwLjc1NzJDNTYuODE0NyA2MC4xOTAyIDU2LjMxOTYgNTkuNzU3NCA1NS43MjA5IDU5LjU1QzU1LjEyMjMgNTkuMzQyNyA1NC40NjY5IDU5LjM3NyA1My44OTI5IDU5LjY0NThDNTMuNTk2NSA1OS43OTY0IDUzLjE1MDMgNTkuOTMzOCA1Mi4yMTIyIDYwLjAwOTFDNTEuMjUxNCA2MC4wODc2IDQ5Ljk5NzQgNjAuMDkwOSA0OC4xMzQzIDYwLjA5MDlIMTYuODY1N0MxNS4wMDI2IDYwLjA5MDkgMTMuNzQ4NiA2MC4wOTA5IDEyLjc4NDUgNjAuMDA5MUMxMS44NDk3IDU5LjkzMzggMTEuNDAzNSA1OS43OTY0IDExLjExMDMgNTkuNjQ1OEMxMC4zNDMgNTkuMjUzNCA5LjcxOTI0IDU4LjYyNjYgOS4zMjg2OSA1Ny44NTU2QzkuMTc4ODYgNTcuNTYxMSA5LjA0MjA2IDU3LjExMjcgOC45NjcxNCA1Ni4xNzAyQzguODg4OTcgNTUuMjA0NyA4Ljg4NTcxIDUzLjk0NDcgOC44ODU3MSA1Mi4wNzI3VjI1LjcyNzNINTYuMDY4N0M1Ni4wOTQ3IDI3LjA5MDkgNTYuMTA5OSAyOC40NTQ1IDU2LjExNDMgMjkuODE4MkM1Ni4xMTQzIDMwLjQ2OTIgNTYuMzcxNyAzMS4wOTM1IDU2LjgyOTggMzEuNTUzOEM1Ny4yODc5IDMyLjAxNDEgNTcuOTA5MyAzMi4yNzI3IDU4LjU1NzEgMzIuMjcyN0M1OS4yMDUgMzIuMjcyNyA1OS44MjY0IDMyLjAxNDEgNjAuMjg0NSAzMS41NTM4QzYwLjc0MjYgMzEuMDkzNSA2MSAzMC40NjkyIDYxIDI5LjgxODJDNjEgMjkuMjA3MyA2MC45OTY3IDI4LjU5ODUgNjAuOTkwMiAyNy45OTJDNjAuOTY3NCAyNS43OTkzIDYwLjkwMjMgMjIuMDc4MiA2MC42OTM4IDE5LjQyNEM2MC4zMjU4IDE0Ljc2MzYgNTcuMjAyMiAxMS40NzEzIDUyLjYxMjkgMTEuMDk4MkM1MS40MjQgMTEgNDkuOTc0NiAxMSA0OC4yMzIgMTFaTTU1Ljg5MjggMjAuODE4MkM1NS43MzY1IDE4LjIwOTggNTQuOTg3MyAxNi4yMTY3IDUyLjIxMjIgMTUuOTkwOUM1MS4yNTE0IDE1LjkxMjQgNDkuOTk3NCAxNS45MDkxIDQ4LjEzNDMgMTUuOTA5MUgxNi44NjU3QzE1LjAwMjYgMTUuOTA5MSAxMy43NDg2IDE1LjkwOTEgMTIuNzg0NSAxNS45OTA5QzEwLjEyMDIgMTYuMjEwMiA4Ljk5NjQ2IDE4LjIxNjQgOC45MTE3NyAyMC44MTgySDU1Ljg5MjhaIiBmaWxsPSIjQzRDNEM0Ii8+CjxwYXRoIGQ9Ik0xNi40IDI5QzE1Ljc2MzUgMjkgMTUuMTUzIDI5LjI2MzQgMTQuNzAyOSAyOS43MzIyQzE0LjI1MjkgMzAuMjAxMSAxNCAzMC44MzcgMTQgMzEuNUMxNCAzMi4xNjMgMTQuMjUyOSAzMi43OTg5IDE0LjcwMjkgMzMuMjY3OEMxNS4xNTMgMzMuNzM2NiAxNS43NjM1IDM0IDE2LjQgMzRIMzUuNkMzNi4yMzY1IDM0IDM2Ljg0NyAzMy43MzY2IDM3LjI5NzEgMzMuMjY3OEMzNy43NDcxIDMyLjc5ODkgMzggMzIuMTYzIDM4IDMxLjVDMzggMzAuODM3IDM3Ljc0NzEgMzAuMjAxMSAzNy4yOTcxIDI5LjczMjJDMzYuODQ3IDI5LjI2MzQgMzYuMjM2NSAyOSAzNS42IDI5SDE2LjRaIiBmaWxsPSIjQTJBMkEyIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTAuODA0IDMyQzQ5LjEzMzMgMzIuMDAwNiA0Ny40ODU1IDMyLjM4ODUgNDUuOTkgMzMuMTMzMkM0NC40OTQ1IDMzLjg3NzggNDMuMTkyIDM0Ljk1OSA0Mi4xODQ4IDM2LjI5MThDNDEuMTc3NiAzNy42MjQ1IDQwLjQ5MzIgMzkuMTcyNiA0MC4xODUyIDQwLjgxNDRDMzkuODc3MiA0Mi40NTYyIDM5Ljk1NDEgNDQuMTQ3IDQwLjQwOTkgNDUuNzU0MUM0MC44NjU2IDQ3LjM2MTIgNDEuNjg3OCA0OC44NDA4IDQyLjgxMTggNTAuMDc2NkM0My45MzU4IDUxLjMxMjUgNDUuMzMxIDUyLjI3MSA0Ni44ODggNTIuODc2OUM0OC40NDQ5IDUzLjQ4MjggNTAuMTIxMSA1My43MTk1IDUxLjc4NSA1My41Njg1QzUzLjQ0ODkgNTMuNDE3NiA1NS4wNTUxIDUyLjg4MyA1Ni40Nzc1IDUyLjAwNjhMNjAuNjgxIDU2LjIwNjNDNjAuOTA5NCA1Ni40NTEzIDYxLjE4NDcgNTYuNjQ3OCA2MS40OTA3IDU2Ljc4NDFDNjEuNzk2NiA1Ni45MjA0IDYyLjEyNjkgNTYuOTkzNyA2Mi40NjE4IDU2Ljk5OTZDNjIuNzk2NyA1Ny4wMDU1IDYzLjEyOTQgNTYuOTQzOSA2My40Mzk5IDU2LjgxODVDNjMuNzUwNSA1Ni42OTMxIDY0LjAzMjYgNTYuNTA2NCA2NC4yNjk1IDU2LjI2OTZDNjQuNTA2MyA1Ni4wMzI4IDY0LjY5MyA1NS43NTA3IDY0LjgxODUgNTUuNDQwMkM2NC45NDM5IDU1LjEyOTcgNjUuMDA1NSA1NC43OTcxIDY0Ljk5OTYgNTQuNDYyMkM2NC45OTM3IDU0LjEyNzQgNjQuOTIwNCA1My43OTcyIDY0Ljc4NDEgNTMuNDkxM0M2NC42NDc4IDUzLjE4NTQgNjQuNDUxMiA1Mi45MSA2NC4yMDYyIDUyLjY4MTdMNjAuMDA1OSA0OC40Nzg5QzYxLjAxNTkgNDYuODQxNSA2MS41NzA0IDQ0Ljk2NDMgNjEuNjEyMiA0My4wNDFDNjEuNjU0IDQxLjExNzcgNjEuMTgxNSAzOS4yMTgxIDYwLjI0MzUgMzcuNTM4NUM1OS4zMDU2IDM1Ljg1ODggNTcuOTM2MiAzNC40NTk5IDU2LjI3NjggMzMuNDg2M0M1NC42MTc0IDMyLjUxMjYgNTIuNzI4MSAzMS45OTk1IDUwLjgwNCAzMlpNNDQuOTg0MyA0Mi44MDY0QzQ0Ljk4NDMgNDEuMjYzMSA0NS41OTc0IDM5Ljc4MzEgNDYuNjg4OCAzOC42OTE5QzQ3Ljc4MDMgMzcuNjAwNiA0OS4yNjA1IDM2Ljk4NzYgNTAuODA0IDM2Ljk4NzZDNTIuMzQ3NSAzNi45ODc2IDUzLjgyNzggMzcuNjAwNiA1NC45MTkyIDM4LjY5MTlDNTYuMDEwNyAzOS43ODMxIDU2LjYyMzggNDEuMjYzMSA1Ni42MjM4IDQyLjgwNjRDNTYuNjIzOCA0NC4zNDk2IDU2LjAxMDcgNDUuODI5NyA1NC45MTkyIDQ2LjkyMDlDNTMuODI3OCA0OC4wMTIxIDUyLjM0NzUgNDguNjI1MiA1MC44MDQgNDguNjI1MkM0OS4yNjA1IDQ4LjYyNTIgNDcuNzgwMyA0OC4wMTIxIDQ2LjY4ODggNDYuOTIwOUM0NS41OTc0IDQ1LjgyOTcgNDQuOTg0MyA0NC4zNDk2IDQ0Ljk4NDMgNDIuODA2NFoiIGZpbGw9IiNBMkEyQTIiLz4KPHBhdGggZD0iTTE2LjQyMzEgMzZDMTUuNzgwNCAzNiAxNS4xNjQxIDM2LjI1NTMgMTQuNzA5NyAzNi43MDk3QzE0LjI1NTMgMzcuMTY0MSAxNCAzNy43ODA0IDE0IDM4LjQyMzFDMTQgMzkuMDY1NyAxNC4yNTUzIDM5LjY4MiAxNC43MDk3IDQwLjEzNjRDMTUuMTY0MSA0MC41OTA5IDE1Ljc4MDQgNDAuODQ2MiAxNi40MjMxIDQwLjg0NjJIMjYuMTE1NEMyNi43NTggNDAuODQ2MiAyNy4zNzQzIDQwLjU5MDkgMjcuODI4OCA0MC4xMzY0QzI4LjI4MzIgMzkuNjgyIDI4LjUzODUgMzkuMDY1NyAyOC41Mzg1IDM4LjQyMzFDMjguNTM4NSAzNy43ODA0IDI4LjI4MzIgMzcuMTY0MSAyNy44Mjg4IDM2LjcwOTdDMjcuMzc0MyAzNi4yNTUzIDI2Ljc1OCAzNiAyNi4xMTU0IDM2SDE2LjQyMzFaTTE2LjQyMzEgNDUuNjkyM0MxNS43ODA0IDQ1LjY5MjMgMTUuMTY0MSA0NS45NDc2IDE0LjcwOTcgNDYuNDAyQzE0LjI1NTMgNDYuODU2NCAxNCA0Ny40NzI3IDE0IDQ4LjExNTRDMTQgNDguNzU4IDE0LjI1NTMgNDkuMzc0MyAxNC43MDk3IDQ5LjgyODhDMTUuMTY0MSA1MC4yODMyIDE1Ljc4MDQgNTAuNTM4NSAxNi40MjMxIDUwLjUzODVIMzIuNTc2OUMzMy4yMTk2IDUwLjUzODUgMzMuODM1OSA1MC4yODMyIDM0LjI5MDMgNDkuODI4OEMzNC43NDQ3IDQ5LjM3NDMgMzUgNDguNzU4IDM1IDQ4LjExNTRDMzUgNDcuNDcyNyAzNC43NDQ3IDQ2Ljg1NjQgMzQuMjkwMyA0Ni40MDJDMzMuODM1OSA0NS45NDc2IDMzLjIxOTYgNDUuNjkyMyAzMi41NzY5IDQ1LjY5MjNIMTYuNDIzMVpNMTYuNDIzMSA1Mi4xNTM4QzE1Ljc4MDQgNTIuMTUzOCAxNS4xNjQxIDUyLjQwOTEgMTQuNzA5NyA1Mi44NjM1QzE0LjI1NTMgNTMuMzE4IDE0IDUzLjkzNDMgMTQgNTQuNTc2OUMxNCA1NS4yMTk2IDE0LjI1NTMgNTUuODM1OSAxNC43MDk3IDU2LjI5MDNDMTUuMTY0MSA1Ni43NDQ3IDE1Ljc4MDQgNTcgMTYuNDIzMSA1N0gyNi4xMTU0QzI2Ljc1OCA1NyAyNy4zNzQzIDU2Ljc0NDcgMjcuODI4OCA1Ni4yOTAzQzI4LjI4MzIgNTUuODM1OSAyOC41Mzg1IDU1LjIxOTYgMjguNTM4NSA1NC41NzY5QzI4LjUzODUgNTMuOTM0MyAyOC4yODMyIDUzLjMxOCAyNy44Mjg4IDUyLjg2MzVDMjcuMzc0MyA1Mi40MDkxIDI2Ljc1OCA1Mi4xNTM4IDI2LjExNTQgNTIuMTUzOEgxNi40MjMxWiIgZmlsbD0iI0EyQTJBMiIvPgo8L3N2Zz4K' +description: 'Display an automatic feed of filtered content or manually selected content' +behavior_plugins: { } diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php b/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php new file mode 100644 index 000000000..7b0cf255a --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php @@ -0,0 +1,105 @@ +entityTypeManager = $entity_type_manager; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container): ContentCollectionUIAutocomplete|AutowireTrait|static { + return new static( + $container->get('entity_type.manager') + ); + } + + /** + * Only allow authenticated users to access this endpoint. + * Note: we leave this open during local development. + */ + public static function access(AccountInterface $account): AccessResult { + if (Settings::get('environment') === 'local') { + return AccessResult::allowed()->setCacheMaxAge(0); + } + + return AccessResult::allowedIf($account->isAuthenticated() && $account->hasPermission('access content'))->setCacheMaxAge(0); + } + + /** + * Returns node autocomplete suggestions. + */ + public function index(Request $request): JsonResponse { + $results = []; + $query = $request->query->get('q', ''); + $site = $request->query->get('site', ''); + + if (!empty($query)) { + try { + $node_storage = $this->entityTypeManager->getStorage('node'); + } catch (InvalidPluginDefinitionException|PluginNotFoundException) { + return new JsonResponse([]); + } + + $query_builder = $node_storage->getQuery() + ->condition('status', 1) + ->condition('title', $query, 'CONTAINS') + ->range(0, 10) + ->accessCheck(); + + if ($site && is_numeric($site)) { + $query_builder->condition('field_node_site.target_id', $site); + } + + $ids = $query_builder->execute(); + + if (!empty($ids)) { + $nodes = $node_storage->loadMultiple($ids); + + foreach ($nodes as $node) { + /** @var \Drupal\node\NodeInterface $node */ + $results[] = [ + 'id' => $node->id(), + 'uuid' => $node->uuid(), + 'label' => $node->getTitle(), + 'value' => $node->getTitle(), + ]; + } + } + } + + return new JsonResponse($results); + } + +} diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php new file mode 100644 index 000000000..b9244e8ba --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php @@ -0,0 +1,36 @@ + $item) { + $elements[$delta] = [ + '#type' => 'markup', + '#markup' => $this->t(''), + ]; + } + + return $elements; + } + +} diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php new file mode 100644 index 000000000..4dd623180 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php @@ -0,0 +1,57 @@ +setLabel(new TranslatableMarkup('JSON')) + ->setRequired(TRUE); + + return $properties; + } + + /** + * {@inheritdoc} + */ + public static function schema(FieldStorageDefinitionInterface $field_definition): array { + return [ + 'columns' => [ + 'value' => [ + 'type' => 'text', + 'size' => 'big', + ], + ], + ]; + } + + /** + * {@inheritdoc} + */ + public function isEmpty(): bool { + $value = $this->get('value')->getValue(); + + return $value === NULL || $value === ''; + } + +} diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php new file mode 100644 index 000000000..3e1356db4 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php @@ -0,0 +1,133 @@ + 0) { + $id_map = []; + $node_ids = array_map('intval', $value['manualItems']); + + $nodes = Node::loadMultiple($node_ids); + + foreach ($nodes as $node) { + if ($node instanceof NodeInterface) { + $id_map[$node->id()] = $node->getTitle(); + } + } + + $config['contentMap'] = $id_map; + } + + return $config; + } + + /** + * {@inheritdoc} + */ + public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state): array { + // Get the index of the parent field. + $index = $element['#field_parents'][1] ?? 0; + + // Setup any needed Drupal supplied data. + $config = $this->getConfig($items[$delta]->value); + + // Add the application container. + $element['tide_content_collection_ui'] = [ + '#type' => 'html_tag', + '#tag' => 'div', + '#attributes' => [ + 'id' => 'content-collection-app-' . $index, + 'class' => ['content-collection-app'], + 'data-type' => $form["#entity_type"] ?? 'default', + 'data-config' => json_encode($config), + 'data-index' => "{$index}", + ], + ]; + + // Add a hidden input to store the JSON data. + $element['value'] = [ + '#type' => 'hidden', + '#default_value' => $items[$delta]->value ?? '{}', + '#attributes' => [ + 'id' => 'content-collection-value-' . $index, + 'class' => ['content-collection-value'], + ], + '#element_validate' => [ + [static::class, 'validateJSON'], + ], + '#required' => TRUE + ]; + + // Attach the application. + //$element['#attached']['library'][] = 'tide_content_collection_ui/tide_content_collection_ui'; + + return $element; + } + + /** + * Element validator for the hidden JSON value. + * + * @param array $element + * The form element render array. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The form state. + * @param array $form + * The complete form render array. + */ + public static function validateJSON(array &$element, FormStateInterface $form_state, array &$form): void { + $value = $form_state->getValue($element['#parents']); + $data = json_decode($value, TRUE); + + // Make sure we have a source selected. + if (!$data || !is_array($data) || !isset($data['source'])) { + $form_state->setError($element, new TranslatableMarkup('Please select a content source.')); + return; + } + + // Make sure we have a content type selected when using the 'auto' source. + if ($data['source'] === 'auto' && (!isset($data['contentType']) || !$data['contentType'])) { + $form_state->setError($element, new TranslatableMarkup('Please select a content type.')); + } + + // Make sure we have at least one manual item selected. + if ( + $data['source'] === 'manual' && + ( + !isset($data['manualItems']) || + !is_array($data['manualItems']) || + count($data['manualItems']) === 0 || + (count($data['manualItems']) === 1 && !$data['manualItems'][0]) + ) + ) { + $form_state->setError($element, new TranslatableMarkup('Please add at least one content item.')); + } + } + +} diff --git a/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.info.yml b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.info.yml new file mode 100644 index 000000000..761617f35 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.info.yml @@ -0,0 +1,10 @@ +name: Tide Content Collection UI +type: module +description: Provides a custom field type to handle content collection UI configuration. +core_version_requirement: ^9 || ^10 +package: Fields +dependencies: + - paragraphs:paragraphs + - dpc-sdp:tide_core + - dpc-sdp:tide_api + - dpc-sdp:tide_search diff --git a/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.libraries.yml b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.libraries.yml new file mode 100644 index 000000000..5366c3662 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.libraries.yml @@ -0,0 +1,8 @@ +tide_content_collection_ui: + version: 1.x + js: + js/dist/main.js: {} + dependencies: + - core/drupal + - core/once + - core/jquery diff --git a/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.module b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.module new file mode 100644 index 000000000..c4f147a82 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/tide_content_collection_ui.module @@ -0,0 +1,6 @@ + Date: Fri, 19 Sep 2025 14:40:58 +1000 Subject: [PATCH 02/20] test --- ..._term.searchable_content_types.default.yml | 0 ..._term.searchable_content_types.default.yml | 30 +++++++++++++++++++ ...hable_content_types.field_machine_name.yml | 0 ...archable_fields.field_elasticsearch_id.yml | 0 ..._fields.field_searchable_content_types.yml | 0 ...e.taxonomy_term.field_elasticsearch_id.yml | 0 ...my_term.field_searchable_content_types.yml | 0 ...my.vocabulary.searchable_content_types.yml | 0 ...axonomy_term.searchable_fields.default.yml | 24 ++------------- ...axonomy_term.searchable_fields.default.yml | 18 ----------- ...hable_fields.field_elasticsearch_field.yml | 4 +-- 11 files changed, 34 insertions(+), 42 deletions(-) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml (100%) create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.taxonomy_term.searchable_content_types.default.yml rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml (100%) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml (100%) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml (100%) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/field.storage.taxonomy_term.field_elasticsearch_id.yml (100%) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/field.storage.taxonomy_term.field_searchable_content_types.yml (100%) rename modules/{tide_search/config/optional => tide_api/modules/tide_content_collection_ui/config/install}/taxonomy.vocabulary.searchable_content_types.yml (100%) diff --git a/modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml similarity index 100% rename from modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_form_display.taxonomy_term.searchable_content_types.default.yml diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.taxonomy_term.searchable_content_types.default.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.taxonomy_term.searchable_content_types.default.yml new file mode 100644 index 000000000..2dcaa6fc5 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/core.entity_view_display.taxonomy_term.searchable_content_types.default.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - field.field.taxonomy_term.searchable_content_types.field_machine_name + - taxonomy.vocabulary.searchable_content_types + module: + - text +id: taxonomy_term.searchable_content_types.default +targetEntityType: taxonomy_term +bundle: searchable_content_types +mode: default +content: + description: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 0 + region: content + field_machine_name: + type: string + label: above + settings: + link_to_entity: false + third_party_settings: { } + weight: 1 + region: content +hidden: + search_api_excerpt: true diff --git a/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml similarity index 100% rename from modules/tide_search/config/optional/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_content_types.field_machine_name.yml diff --git a/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml similarity index 100% rename from modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_fields.field_elasticsearch_id.yml diff --git a/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml similarity index 100% rename from modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.taxonomy_term.searchable_fields.field_searchable_content_types.yml diff --git a/modules/tide_search/config/optional/field.storage.taxonomy_term.field_elasticsearch_id.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.taxonomy_term.field_elasticsearch_id.yml similarity index 100% rename from modules/tide_search/config/optional/field.storage.taxonomy_term.field_elasticsearch_id.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.taxonomy_term.field_elasticsearch_id.yml diff --git a/modules/tide_search/config/optional/field.storage.taxonomy_term.field_searchable_content_types.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.taxonomy_term.field_searchable_content_types.yml similarity index 100% rename from modules/tide_search/config/optional/field.storage.taxonomy_term.field_searchable_content_types.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.taxonomy_term.field_searchable_content_types.yml diff --git a/modules/tide_search/config/optional/taxonomy.vocabulary.searchable_content_types.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/taxonomy.vocabulary.searchable_content_types.yml similarity index 100% rename from modules/tide_search/config/optional/taxonomy.vocabulary.searchable_content_types.yml rename to modules/tide_api/modules/tide_content_collection_ui/config/install/taxonomy.vocabulary.searchable_content_types.yml diff --git a/modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_fields.default.yml b/modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_fields.default.yml index 65475bc17..e0254c726 100644 --- a/modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_fields.default.yml +++ b/modules/tide_search/config/optional/core.entity_form_display.taxonomy_term.searchable_fields.default.yml @@ -3,8 +3,6 @@ status: true dependencies: config: - field.field.taxonomy_term.searchable_fields.field_elasticsearch_field - - field.field.taxonomy_term.searchable_fields.field_elasticsearch_id - - field.field.taxonomy_term.searchable_fields.field_searchable_content_types - field.field.taxonomy_term.searchable_fields.field_taxonomy_machine_name - taxonomy.vocabulary.searchable_fields module: @@ -25,33 +23,15 @@ content: third_party_settings: { } field_elasticsearch_field: type: string_textfield - weight: 5 + weight: 101 region: content settings: size: 60 placeholder: '' third_party_settings: { } - field_elasticsearch_id: - type: string_textfield - weight: 4 - region: content - settings: - size: 60 - placeholder: '' - third_party_settings: { } - field_searchable_content_types: - type: entity_reference_autocomplete - weight: 7 - region: content - settings: - match_operator: CONTAINS - match_limit: 10 - size: 60 - placeholder: '' - third_party_settings: { } field_taxonomy_machine_name: type: string_textfield - weight: 6 + weight: 102 region: content settings: size: 60 diff --git a/modules/tide_search/config/optional/core.entity_view_display.taxonomy_term.searchable_fields.default.yml b/modules/tide_search/config/optional/core.entity_view_display.taxonomy_term.searchable_fields.default.yml index fc1e85b02..8ba816985 100644 --- a/modules/tide_search/config/optional/core.entity_view_display.taxonomy_term.searchable_fields.default.yml +++ b/modules/tide_search/config/optional/core.entity_view_display.taxonomy_term.searchable_fields.default.yml @@ -3,8 +3,6 @@ status: true dependencies: config: - field.field.taxonomy_term.searchable_fields.field_elasticsearch_field - - field.field.taxonomy_term.searchable_fields.field_elasticsearch_id - - field.field.taxonomy_term.searchable_fields.field_searchable_content_types - field.field.taxonomy_term.searchable_fields.field_taxonomy_machine_name - taxonomy.vocabulary.searchable_fields module: @@ -29,22 +27,6 @@ content: third_party_settings: { } weight: 1 region: content - field_elasticsearch_id: - type: string - label: above - settings: - link_to_entity: false - third_party_settings: { } - weight: 3 - region: content - field_searchable_content_types: - type: entity_reference_label - label: above - settings: - link: true - third_party_settings: { } - weight: 4 - region: content field_taxonomy_machine_name: type: string label: above diff --git a/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_field.yml b/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_field.yml index 7191ced72..9ef32753b 100644 --- a/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_field.yml +++ b/modules/tide_search/config/optional/field.field.taxonomy_term.searchable_fields.field_elasticsearch_field.yml @@ -9,8 +9,8 @@ field_name: field_elasticsearch_field entity_type: taxonomy_term bundle: searchable_fields label: 'Elasticsearch field' -description: 'This is the elastic key of the displayed field value, for example this could be a term called "Community".' -required: true +description: '' +required: false translatable: false default_value: { } default_value_callback: '' From e3190e89c709fdaa43e80d5eafd351a46b909a99 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Fri, 19 Sep 2025 15:31:45 +1000 Subject: [PATCH 03/20] chore: testing and text updates --- ...aragraphs.paragraphs_type.content_collection_ui.yml | 2 +- ...plete.php => ContentCollectionNodeAutocomplete.php} | 10 +++------- .../FieldFormatter/ContentCollectionUIFormatter.php | 2 +- .../Plugin/Field/FieldType/ContentCollectionUIItem.php | 4 ++-- .../FieldWidget/ContentCollectionUIDefaultWidget.php | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) rename modules/tide_api/modules/tide_content_collection_ui/src/Controller/{ContentCollectionUIAutocomplete.php => ContentCollectionNodeAutocomplete.php} (90%) diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml index 7eb620eae..dd627909c 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/paragraphs.paragraphs_type.content_collection_ui.yml @@ -6,7 +6,7 @@ dependencies: _core: default_config_hash: epwlG1_yWnseA1q5W7Ajymn3b3NQEyTjdnCPjXzNFyA id: content_collection_ui -label: 'Tide Content Collection UI' +label: 'Content Collection UI' icon_uuid: bd168646-7145-4b4b-b6c8-8552d2d7b0b8 icon_default: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzciIHZpZXdCb3g9IjAgMCA2OCA3NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjY4IiBoZWlnaHQ9Ijc3IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjIzMiAxMUgxNi43NjhDMTUuMDI1NCAxMSAxMy41NzYgMTEgMTIuMzg3MSAxMS4wOTgyQzcuNzkxMzEgMTEuNDc0NSA0LjQ2NTc3IDE0LjkwNzYgNC4wOTc3MSAxOS40MjczQzQgMjAuNjIxOCA0IDIyLjA4NDcgNCAyMy44MjkxVjUyLjE3MDlDNCA1My45MjE4IDQgNTUuMzc4MiA0LjA5NzcxIDU2LjU3MjdDNC4xOTU0MyA1Ny44MTY0IDQuNDE2OTEgNTguOTgxNSA0Ljk3NzE0IDYwLjA4NDRDNS44MzU5NiA2MS43NzgyIDcuMjA2NDggNjMuMTU1MyA4Ljg5MjIzIDY0LjAxODJDOS45ODk4OSA2NC41ODExIDExLjE0OTQgNjQuODAzNiAxMi4zODcxIDY0LjkwMThDMTMuNTc2IDY1IDE1LjAyNTQgNjUgMTYuNzY0NyA2NUg0OC4yMzUzQzQ5Ljk3NDYgNjUgNTEuNDI3MyA2NSA1Mi42MTI5IDY0LjkwMThDNTMuODUwNiA2NC44MDM2IDU1LjAxMDEgNjQuNTgxMSA1Ni4xMDc4IDY0LjAxODJDNTYuNjYxOCA2My43MTAxIDU3LjA3NTEgNjMuMTk3OSA1Ny4yNjA2IDYyLjU4OTVDNTcuNDQ2MSA2MS45ODEyIDU3LjM4OTIgNjEuMzI0MiA1Ny4xMDE5IDYwLjc1NzJDNTYuODE0NyA2MC4xOTAyIDU2LjMxOTYgNTkuNzU3NCA1NS43MjA5IDU5LjU1QzU1LjEyMjMgNTkuMzQyNyA1NC40NjY5IDU5LjM3NyA1My44OTI5IDU5LjY0NThDNTMuNTk2NSA1OS43OTY0IDUzLjE1MDMgNTkuOTMzOCA1Mi4yMTIyIDYwLjAwOTFDNTEuMjUxNCA2MC4wODc2IDQ5Ljk5NzQgNjAuMDkwOSA0OC4xMzQzIDYwLjA5MDlIMTYuODY1N0MxNS4wMDI2IDYwLjA5MDkgMTMuNzQ4NiA2MC4wOTA5IDEyLjc4NDUgNjAuMDA5MUMxMS44NDk3IDU5LjkzMzggMTEuNDAzNSA1OS43OTY0IDExLjExMDMgNTkuNjQ1OEMxMC4zNDMgNTkuMjUzNCA5LjcxOTI0IDU4LjYyNjYgOS4zMjg2OSA1Ny44NTU2QzkuMTc4ODYgNTcuNTYxMSA5LjA0MjA2IDU3LjExMjcgOC45NjcxNCA1Ni4xNzAyQzguODg4OTcgNTUuMjA0NyA4Ljg4NTcxIDUzLjk0NDcgOC44ODU3MSA1Mi4wNzI3VjI1LjcyNzNINTYuMDY4N0M1Ni4wOTQ3IDI3LjA5MDkgNTYuMTA5OSAyOC40NTQ1IDU2LjExNDMgMjkuODE4MkM1Ni4xMTQzIDMwLjQ2OTIgNTYuMzcxNyAzMS4wOTM1IDU2LjgyOTggMzEuNTUzOEM1Ny4yODc5IDMyLjAxNDEgNTcuOTA5MyAzMi4yNzI3IDU4LjU1NzEgMzIuMjcyN0M1OS4yMDUgMzIuMjcyNyA1OS44MjY0IDMyLjAxNDEgNjAuMjg0NSAzMS41NTM4QzYwLjc0MjYgMzEuMDkzNSA2MSAzMC40NjkyIDYxIDI5LjgxODJDNjEgMjkuMjA3MyA2MC45OTY3IDI4LjU5ODUgNjAuOTkwMiAyNy45OTJDNjAuOTY3NCAyNS43OTkzIDYwLjkwMjMgMjIuMDc4MiA2MC42OTM4IDE5LjQyNEM2MC4zMjU4IDE0Ljc2MzYgNTcuMjAyMiAxMS40NzEzIDUyLjYxMjkgMTEuMDk4MkM1MS40MjQgMTEgNDkuOTc0NiAxMSA0OC4yMzIgMTFaTTU1Ljg5MjggMjAuODE4MkM1NS43MzY1IDE4LjIwOTggNTQuOTg3MyAxNi4yMTY3IDUyLjIxMjIgMTUuOTkwOUM1MS4yNTE0IDE1LjkxMjQgNDkuOTk3NCAxNS45MDkxIDQ4LjEzNDMgMTUuOTA5MUgxNi44NjU3QzE1LjAwMjYgMTUuOTA5MSAxMy43NDg2IDE1LjkwOTEgMTIuNzg0NSAxNS45OTA5QzEwLjEyMDIgMTYuMjEwMiA4Ljk5NjQ2IDE4LjIxNjQgOC45MTE3NyAyMC44MTgySDU1Ljg5MjhaIiBmaWxsPSIjQzRDNEM0Ii8+CjxwYXRoIGQ9Ik0xNi40IDI5QzE1Ljc2MzUgMjkgMTUuMTUzIDI5LjI2MzQgMTQuNzAyOSAyOS43MzIyQzE0LjI1MjkgMzAuMjAxMSAxNCAzMC44MzcgMTQgMzEuNUMxNCAzMi4xNjMgMTQuMjUyOSAzMi43OTg5IDE0LjcwMjkgMzMuMjY3OEMxNS4xNTMgMzMuNzM2NiAxNS43NjM1IDM0IDE2LjQgMzRIMzUuNkMzNi4yMzY1IDM0IDM2Ljg0NyAzMy43MzY2IDM3LjI5NzEgMzMuMjY3OEMzNy43NDcxIDMyLjc5ODkgMzggMzIuMTYzIDM4IDMxLjVDMzggMzAuODM3IDM3Ljc0NzEgMzAuMjAxMSAzNy4yOTcxIDI5LjczMjJDMzYuODQ3IDI5LjI2MzQgMzYuMjM2NSAyOSAzNS42IDI5SDE2LjRaIiBmaWxsPSIjQTJBMkEyIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTAuODA0IDMyQzQ5LjEzMzMgMzIuMDAwNiA0Ny40ODU1IDMyLjM4ODUgNDUuOTkgMzMuMTMzMkM0NC40OTQ1IDMzLjg3NzggNDMuMTkyIDM0Ljk1OSA0Mi4xODQ4IDM2LjI5MThDNDEuMTc3NiAzNy42MjQ1IDQwLjQ5MzIgMzkuMTcyNiA0MC4xODUyIDQwLjgxNDRDMzkuODc3MiA0Mi40NTYyIDM5Ljk1NDEgNDQuMTQ3IDQwLjQwOTkgNDUuNzU0MUM0MC44NjU2IDQ3LjM2MTIgNDEuNjg3OCA0OC44NDA4IDQyLjgxMTggNTAuMDc2NkM0My45MzU4IDUxLjMxMjUgNDUuMzMxIDUyLjI3MSA0Ni44ODggNTIuODc2OUM0OC40NDQ5IDUzLjQ4MjggNTAuMTIxMSA1My43MTk1IDUxLjc4NSA1My41Njg1QzUzLjQ0ODkgNTMuNDE3NiA1NS4wNTUxIDUyLjg4MyA1Ni40Nzc1IDUyLjAwNjhMNjAuNjgxIDU2LjIwNjNDNjAuOTA5NCA1Ni40NTEzIDYxLjE4NDcgNTYuNjQ3OCA2MS40OTA3IDU2Ljc4NDFDNjEuNzk2NiA1Ni45MjA0IDYyLjEyNjkgNTYuOTkzNyA2Mi40NjE4IDU2Ljk5OTZDNjIuNzk2NyA1Ny4wMDU1IDYzLjEyOTQgNTYuOTQzOSA2My40Mzk5IDU2LjgxODVDNjMuNzUwNSA1Ni42OTMxIDY0LjAzMjYgNTYuNTA2NCA2NC4yNjk1IDU2LjI2OTZDNjQuNTA2MyA1Ni4wMzI4IDY0LjY5MyA1NS43NTA3IDY0LjgxODUgNTUuNDQwMkM2NC45NDM5IDU1LjEyOTcgNjUuMDA1NSA1NC43OTcxIDY0Ljk5OTYgNTQuNDYyMkM2NC45OTM3IDU0LjEyNzQgNjQuOTIwNCA1My43OTcyIDY0Ljc4NDEgNTMuNDkxM0M2NC42NDc4IDUzLjE4NTQgNjQuNDUxMiA1Mi45MSA2NC4yMDYyIDUyLjY4MTdMNjAuMDA1OSA0OC40Nzg5QzYxLjAxNTkgNDYuODQxNSA2MS41NzA0IDQ0Ljk2NDMgNjEuNjEyMiA0My4wNDFDNjEuNjU0IDQxLjExNzcgNjEuMTgxNSAzOS4yMTgxIDYwLjI0MzUgMzcuNTM4NUM1OS4zMDU2IDM1Ljg1ODggNTcuOTM2MiAzNC40NTk5IDU2LjI3NjggMzMuNDg2M0M1NC42MTc0IDMyLjUxMjYgNTIuNzI4MSAzMS45OTk1IDUwLjgwNCAzMlpNNDQuOTg0MyA0Mi44MDY0QzQ0Ljk4NDMgNDEuMjYzMSA0NS41OTc0IDM5Ljc4MzEgNDYuNjg4OCAzOC42OTE5QzQ3Ljc4MDMgMzcuNjAwNiA0OS4yNjA1IDM2Ljk4NzYgNTAuODA0IDM2Ljk4NzZDNTIuMzQ3NSAzNi45ODc2IDUzLjgyNzggMzcuNjAwNiA1NC45MTkyIDM4LjY5MTlDNTYuMDEwNyAzOS43ODMxIDU2LjYyMzggNDEuMjYzMSA1Ni42MjM4IDQyLjgwNjRDNTYuNjIzOCA0NC4zNDk2IDU2LjAxMDcgNDUuODI5NyA1NC45MTkyIDQ2LjkyMDlDNTMuODI3OCA0OC4wMTIxIDUyLjM0NzUgNDguNjI1MiA1MC44MDQgNDguNjI1MkM0OS4yNjA1IDQ4LjYyNTIgNDcuNzgwMyA0OC4wMTIxIDQ2LjY4ODggNDYuOTIwOUM0NS41OTc0IDQ1LjgyOTcgNDQuOTg0MyA0NC4zNDk2IDQ0Ljk4NDMgNDIuODA2NFoiIGZpbGw9IiNBMkEyQTIiLz4KPHBhdGggZD0iTTE2LjQyMzEgMzZDMTUuNzgwNCAzNiAxNS4xNjQxIDM2LjI1NTMgMTQuNzA5NyAzNi43MDk3QzE0LjI1NTMgMzcuMTY0MSAxNCAzNy43ODA0IDE0IDM4LjQyMzFDMTQgMzkuMDY1NyAxNC4yNTUzIDM5LjY4MiAxNC43MDk3IDQwLjEzNjRDMTUuMTY0MSA0MC41OTA5IDE1Ljc4MDQgNDAuODQ2MiAxNi40MjMxIDQwLjg0NjJIMjYuMTE1NEMyNi43NTggNDAuODQ2MiAyNy4zNzQzIDQwLjU5MDkgMjcuODI4OCA0MC4xMzY0QzI4LjI4MzIgMzkuNjgyIDI4LjUzODUgMzkuMDY1NyAyOC41Mzg1IDM4LjQyMzFDMjguNTM4NSAzNy43ODA0IDI4LjI4MzIgMzcuMTY0MSAyNy44Mjg4IDM2LjcwOTdDMjcuMzc0MyAzNi4yNTUzIDI2Ljc1OCAzNiAyNi4xMTU0IDM2SDE2LjQyMzFaTTE2LjQyMzEgNDUuNjkyM0MxNS43ODA0IDQ1LjY5MjMgMTUuMTY0MSA0NS45NDc2IDE0LjcwOTcgNDYuNDAyQzE0LjI1NTMgNDYuODU2NCAxNCA0Ny40NzI3IDE0IDQ4LjExNTRDMTQgNDguNzU4IDE0LjI1NTMgNDkuMzc0MyAxNC43MDk3IDQ5LjgyODhDMTUuMTY0MSA1MC4yODMyIDE1Ljc4MDQgNTAuNTM4NSAxNi40MjMxIDUwLjUzODVIMzIuNTc2OUMzMy4yMTk2IDUwLjUzODUgMzMuODM1OSA1MC4yODMyIDM0LjI5MDMgNDkuODI4OEMzNC43NDQ3IDQ5LjM3NDMgMzUgNDguNzU4IDM1IDQ4LjExNTRDMzUgNDcuNDcyNyAzNC43NDQ3IDQ2Ljg1NjQgMzQuMjkwMyA0Ni40MDJDMzMuODM1OSA0NS45NDc2IDMzLjIxOTYgNDUuNjkyMyAzMi41NzY5IDQ1LjY5MjNIMTYuNDIzMVpNMTYuNDIzMSA1Mi4xNTM4QzE1Ljc4MDQgNTIuMTUzOCAxNS4xNjQxIDUyLjQwOTEgMTQuNzA5NyA1Mi44NjM1QzE0LjI1NTMgNTMuMzE4IDE0IDUzLjkzNDMgMTQgNTQuNTc2OUMxNCA1NS4yMTk2IDE0LjI1NTMgNTUuODM1OSAxNC43MDk3IDU2LjI5MDNDMTUuMTY0MSA1Ni43NDQ3IDE1Ljc4MDQgNTcgMTYuNDIzMSA1N0gyNi4xMTU0QzI2Ljc1OCA1NyAyNy4zNzQzIDU2Ljc0NDcgMjcuODI4OCA1Ni4yOTAzQzI4LjI4MzIgNTUuODM1OSAyOC41Mzg1IDU1LjIxOTYgMjguNTM4NSA1NC41NzY5QzI4LjUzODUgNTMuOTM0MyAyOC4yODMyIDUzLjMxOCAyNy44Mjg4IDUyLjg2MzVDMjcuMzc0MyA1Mi40MDkxIDI2Ljc1OCA1Mi4xNTM4IDI2LjExNTQgNTIuMTUzOEgxNi40MjMxWiIgZmlsbD0iI0EyQTJBMiIvPgo8L3N2Zz4K' description: 'Display an automatic feed of filtered content or manually selected content' diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php b/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionNodeAutocomplete.php similarity index 90% rename from modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php rename to modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionNodeAutocomplete.php index 7b0cf255a..29380e13d 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionUIAutocomplete.php +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Controller/ContentCollectionNodeAutocomplete.php @@ -13,11 +13,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; +use Drupal\tide_site_restriction\Helper; /** * Controller for Tide Content Collection UI node autocomplete endpoints. */ -class ContentCollectionUIAutocomplete extends ControllerBase { +class ContentCollectionNodeAutocomplete extends ControllerBase { /** * The entity type manager. @@ -39,7 +40,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager) { /** * {@inheritdoc} */ - public static function create(ContainerInterface $container): ContentCollectionUIAutocomplete|AutowireTrait|static { + public static function create(ContainerInterface $container): ContentCollectionNodeAutocomplete|AutowireTrait|static { return new static( $container->get('entity_type.manager') ); @@ -63,7 +64,6 @@ public static function access(AccountInterface $account): AccessResult { public function index(Request $request): JsonResponse { $results = []; $query = $request->query->get('q', ''); - $site = $request->query->get('site', ''); if (!empty($query)) { try { @@ -78,10 +78,6 @@ public function index(Request $request): JsonResponse { ->range(0, 10) ->accessCheck(); - if ($site && is_numeric($site)) { - $query_builder->condition('field_node_site.target_id', $site); - } - $ids = $query_builder->execute(); if (!empty($ids)) { diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php index b9244e8ba..c2047021b 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldFormatter/ContentCollectionUIFormatter.php @@ -12,7 +12,7 @@ */ #[FieldFormatter( id: 'tide_content_collection_ui_formatter', - label: new TranslatableMarkup('Tide Content Collection UI'), + label: new TranslatableMarkup('Content Collection UI'), field_types: ['tide_content_collection_ui'], )] class ContentCollectionUIFormatter extends FormatterBase { diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php index 4dd623180..5e5039cb6 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldType/ContentCollectionUIItem.php @@ -13,8 +13,8 @@ */ #[FieldType( id: "tide_content_collection_ui", - label: new TranslatableMarkup("Tide Content Collection UI"), - description: new TranslatableMarkup("Field to store Tide Content Collection UI config as JSON."), + label: new TranslatableMarkup("Content Collection JSON"), + description: new TranslatableMarkup("Field to store Content Collection UI config as JSON."), default_widget: "tide_content_collection_ui_default", default_formatter: "tide_content_collection_ui_formatter" )] diff --git a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php index 3e1356db4..7e92be24b 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php +++ b/modules/tide_api/modules/tide_content_collection_ui/src/Plugin/Field/FieldWidget/ContentCollectionUIDefaultWidget.php @@ -15,7 +15,7 @@ */ #[FieldWidget( id: 'tide_content_collection_ui_default', - label: new TranslatableMarkup('Tide Content Collection UI'), + label: new TranslatableMarkup('Content Collection UI'), field_types: ['tide_content_collection_ui'], )] class ContentCollectionUIDefaultWidget extends WidgetBase { From c11d3c58158213e7fa531f182ae26e1bc4094f95 Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Fri, 19 Sep 2025 16:35:12 +1000 Subject: [PATCH 04/20] added field_content_collection field configs --- ...collection_ui.field_content_collection.yml | 22 +++++++++++++++++++ ...age.paragraph.field_content_collection.yml | 18 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_content_collection.yml create mode 100644 modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.paragraph.field_content_collection.yml diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_content_collection.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_content_collection.yml new file mode 100644 index 000000000..fa0183303 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.field.paragraph.content_collection_ui.field_content_collection.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_content_collection + - paragraphs.paragraphs_type.content_collection_ui + module: + - tide_content_collection_ui +id: paragraph.content_collection_ui.field_content_collection +field_name: field_content_collection +entity_type: paragraph +bundle: content_collection_ui +label: 'Content collection' +description: '' +required: false +translatable: false +default_value: + - + value: '{}' +default_value_callback: '' +settings: { } +field_type: tide_content_collection_ui diff --git a/modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.paragraph.field_content_collection.yml b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.paragraph.field_content_collection.yml new file mode 100644 index 000000000..517bd9237 --- /dev/null +++ b/modules/tide_api/modules/tide_content_collection_ui/config/install/field.storage.paragraph.field_content_collection.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - paragraphs + - tide_content_collection_ui +id: paragraph.field_content_collection +field_name: field_content_collection +entity_type: paragraph +type: tide_content_collection_ui +settings: { } +module: tide_content_collection_ui +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false From 48302c0d4082ce254f240f992fa4317c594734a2 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Fri, 19 Sep 2025 16:38:44 +1000 Subject: [PATCH 05/20] chore: update path and field requirement --- .../tide_content_collection_ui/app/dist/main.js | 3 +-- .../tide_content_collection_ui/app/dist/main.js.map | 1 - .../tide_content_collection_ui/app/src/index.js | 2 +- .../tide_content_collection_ui/app/vite.config.js | 1 - .../FieldWidget/ContentCollectionUIDefaultWidget.php | 11 +++++++---- .../tide_content_collection_ui.libraries.yml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js.map diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js b/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js index 3b036a4ac..f953b15eb 100644 --- a/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js +++ b/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js @@ -29,5 +29,4 @@ Expected function or array of functions, received type ${typeof e}.`),qe)}functi * @author RubaXa * @author owenm * @license MIT - */function Rp(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Wa(e){for(var a=1;a=0)&&(t[o]=e[o]);return t}function Wh(e,a){if(e==null)return{};var t=Bh(e,a),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var Hh="1.15.6";function it(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var rt=it(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vn=it(/Edge/i),Mp=it(/firefox/i),$n=it(/safari/i)&&!it(/chrome/i)&&!it(/android/i),jr=it(/iP(ad|od|hone)/i),Fp=it(/chrome/i)&&it(/android/i),zp={capture:!1,passive:!1};function se(e,a,t){e.addEventListener(a,t,!rt&&zp)}function ie(e,a,t){e.removeEventListener(a,t,!rt&&zp)}function Vo(e,a){if(a){if(a[0]===">"&&(a=a.substring(1)),e)try{if(e.matches)return e.matches(a);if(e.msMatchesSelector)return e.msMatchesSelector(a);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(a)}catch{return!1}return!1}}function Up(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ia(e,a,t,n){if(e){t=t||document;do{if(a!=null&&(a[0]===">"?e.parentNode===t&&Vo(e,a):Vo(e,a))||n&&e===t)return e;if(e===t)break}while(e=Up(e))}return null}var Lp=/\s+/g;function va(e,a,t){if(e&&a)if(e.classList)e.classList[t?"add":"remove"](a);else{var n=(" "+e.className+" ").replace(Lp," ").replace(" "+a+" "," ");e.className=(n+(t?" "+a:"")).replace(Lp," ")}}function X(e,a,t){var n=e&&e.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),a===void 0?t:t[a];!(a in n)&&a.indexOf("webkit")===-1&&(a="-webkit-"+a),n[a]=t+(typeof t=="string"?"":"px")}}function en(e,a){var t="";if(typeof e=="string")t=e;else do{var n=X(e,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!a&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function qp(e,a,t){if(e){var n=e.getElementsByTagName(a),o=0,i=n.length;if(t)for(;o=i,!r)return n;if(n===Ha())break;n=ht(n,!1)}return!1}function an(e,a,t,n){for(var o=0,i=0,r=e.children;i2&&arguments[2]!==void 0?arguments[2]:{},n=t.evt,o=Wh(t,eg);Mn.pluginEvent.bind(J)(e,a,Wa({dragEl:R,parentEl:Ae,ghostEl:ee,rootEl:De,nextEl:Pt,lastDownEl:$o,cloneEl:Ce,cloneHidden:gt,dragStarted:zn,putSortable:Ye,activeSortable:J.active,originalEvent:n,oldIndex:nn,oldDraggableIndex:Fn,newIndex:ha,newDraggableIndex:xt,hideGhostForTarget:tu,unhideGhostForTarget:nu,cloneNowHidden:function(){gt=!0},cloneNowShown:function(){gt=!1},dispatchSortableEvent:function(i){na({sortable:a,name:i,originalEvent:n})}},o))};function na(e){Zh(Wa({putSortable:Ye,cloneEl:Ce,targetEl:R,rootEl:De,oldIndex:nn,oldDraggableIndex:Fn,newIndex:ha,newDraggableIndex:xt},e))}var R,Ae,ee,De,Pt,$o,Ce,gt,nn,ha,Fn,xt,Ro,Ye,on=!1,Mo=!1,Fo=[],Vt,Pa,Dr,Cr,Qp,Xp,zn,rn,Un,Ln=!1,zo=!1,Uo,Je,Tr=[],Ar=!1,Lo=[],qo=typeof document<"u",Bo=jr,Jp=Vn||rt?"cssFloat":"float",ag=qo&&!Fp&&!jr&&"draggable"in document.createElement("div"),Zp=function(){if(qo){if(rt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),eu=function(e,a){var t=X(e),n=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),o=an(e,0,a),i=an(e,1,a),r=o&&X(o),s=i&&X(i),c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Fe(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Fe(i).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&r.float!=="none"){var p=r.float==="left"?"left":"right";return i&&(s.clear==="both"||s.clear===p)?"vertical":"horizontal"}return o&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||c>=n&&t[Jp]==="none"||i&&t[Jp]==="none"&&c+l>n)?"vertical":"horizontal"},tg=function(e,a,t){var n=t?e.left:e.top,o=t?e.right:e.bottom,i=t?e.width:e.height,r=t?a.left:a.top,s=t?a.right:a.bottom,c=t?a.width:a.height;return n===r||o===s||n+i/2===r+c/2},ng=function(e,a){var t;return Fo.some(function(n){var o=n[la].options.emptyInsertThreshold;if(!(!o||Or(n))){var i=Fe(n),r=e>=i.left-o&&e<=i.right+o,s=a>=i.top-o&&a<=i.bottom+o;if(r&&s)return t=n}}),t},au=function(e){function a(o,i){return function(r,s,c,l){var p=r.options.group.name&&s.options.group.name&&r.options.group.name===s.options.group.name;if(o==null&&(i||p))return!0;if(o==null||o===!1)return!1;if(i&&o==="clone")return o;if(typeof o=="function")return a(o(r,s,c,l),i)(r,s,c,l);var u=(i?r:s).options.group.name;return o===!0||typeof o=="string"&&o===u||o.join&&o.indexOf(u)>-1}}var t={},n=e.group;(!n||Po(n)!="object")&&(n={name:n}),t.name=n.name,t.checkPull=a(n.pull,!0),t.checkPut=a(n.put),t.revertClone=n.revertClone,e.group=t},tu=function(){!Zp&&ee&&X(ee,"display","none")},nu=function(){!Zp&&ee&&X(ee,"display","")};qo&&!Fp&&document.addEventListener("click",function(e){if(Mo)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Mo=!1,!1},!0);var $t=function(e){if(R){e=e.touches?e.touches[0]:e;var a=ng(e.clientX,e.clientY);if(a){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.target=t.rootEl=a,t.preventDefault=void 0,t.stopPropagation=void 0,a[la]._onDragOver(t)}}},og=function(e){R&&R.parentNode[la]._isOutsideThisEl(e.target)};function J(e,a){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=a=ot({},a),e[la]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eu(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,r){i.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:J.supportPointer!==!1&&"PointerEvent"in window&&(!$n||jr),emptyInsertThreshold:5};Mn.initializePlugins(this,e,t);for(var n in t)!(n in a)&&(a[n]=t[n]);au(a);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=a.forceFallback?!1:ag,this.nativeDraggable&&(this.options.touchStartThreshold=1),a.supportPointer?se(e,"pointerdown",this._onTapStart):(se(e,"mousedown",this._onTapStart),se(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(se(e,"dragover",this),se(e,"dragenter",this)),Fo.push(this.el),a.store&&a.store.get&&this.sort(a.store.get(this)||[]),ot(this,Qh())}J.prototype={constructor:J,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(rn=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,R):this.options.direction},_onTapStart:function(e){if(e.cancelable){var a=this,t=this.el,n=this.options,o=n.preventOnFilter,i=e.type,r=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(r||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=n.filter;if(dg(t),!R&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||n.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&$n&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Ia(s,n.draggable,t,!1),!(s&&s.animated)&&$o!==s)){if(nn=ka(s),Fn=ka(s,n.draggable),typeof l=="function"){if(l.call(this,e,s,this)){na({sortable:a,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),pa("filter",a,{evt:e}),o&&e.preventDefault();return}}else if(l&&(l=l.split(",").some(function(p){if(p=Ia(c,p.trim(),t,!1),p)return na({sortable:a,rootEl:p,name:"filter",targetEl:s,fromEl:t,toEl:t}),pa("filter",a,{evt:e}),!0}),l)){o&&e.preventDefault();return}n.handle&&!Ia(c,n.handle,t,!1)||this._prepareDragStart(e,r,s)}}},_prepareDragStart:function(e,a,t){var n=this,o=n.el,i=n.options,r=o.ownerDocument,s;if(t&&!R&&t.parentNode===o){var c=Fe(t);if(De=o,R=t,Ae=R.parentNode,Pt=R.nextSibling,$o=t,Ro=i.group,J.dragged=R,Vt={target:R,clientX:(a||e).clientX,clientY:(a||e).clientY},Qp=Vt.clientX-c.left,Xp=Vt.clientY-c.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,R.style["will-change"]="all",s=function(){if(pa("delayEnded",n,{evt:e}),J.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Mp&&n.nativeDraggable&&(R.draggable=!0),n._triggerDragStart(e,a),na({sortable:n,name:"choose",originalEvent:e}),va(R,i.chosenClass,!0)},i.ignore.split(",").forEach(function(l){qp(R,l.trim(),Ir)}),se(r,"dragover",$t),se(r,"mousemove",$t),se(r,"touchmove",$t),i.supportPointer?(se(r,"pointerup",n._onDrop),!this.nativeDraggable&&se(r,"pointercancel",n._onDrop)):(se(r,"mouseup",n._onDrop),se(r,"touchend",n._onDrop),se(r,"touchcancel",n._onDrop)),Mp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,R.draggable=!0),pa("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Vn||rt))){if(J.eventCanceled){this._onDrop();return}i.supportPointer?(se(r,"pointerup",n._disableDelayedDrag),se(r,"pointercancel",n._disableDelayedDrag)):(se(r,"mouseup",n._disableDelayedDrag),se(r,"touchend",n._disableDelayedDrag),se(r,"touchcancel",n._disableDelayedDrag)),se(r,"mousemove",n._delayedDragTouchMoveHandler),se(r,"touchmove",n._delayedDragTouchMoveHandler),i.supportPointer&&se(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(s,i.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){R&&Ir(R),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ie(e,"mouseup",this._disableDelayedDrag),ie(e,"touchend",this._disableDelayedDrag),ie(e,"touchcancel",this._disableDelayedDrag),ie(e,"pointerup",this._disableDelayedDrag),ie(e,"pointercancel",this._disableDelayedDrag),ie(e,"mousemove",this._delayedDragTouchMoveHandler),ie(e,"touchmove",this._delayedDragTouchMoveHandler),ie(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?se(document,"pointermove",this._onTouchMove):a?se(document,"touchmove",this._onTouchMove):se(document,"mousemove",this._onTouchMove):(se(R,"dragend",this),se(De,"dragstart",this._onDragStart));try{document.selection?Ho(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(on=!1,De&&R){pa("dragStarted",this,{evt:a}),this.nativeDraggable&&se(document,"dragover",og);var t=this.options;!e&&va(R,t.dragClass,!1),va(R,t.ghostClass,!0),J.active=this,e&&this._appendGhost(),na({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Pa){this._lastX=Pa.clientX,this._lastY=Pa.clientY,tu();for(var e=document.elementFromPoint(Pa.clientX,Pa.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pa.clientX,Pa.clientY),e!==a);)a=e;if(R.parentNode[la]._isOutsideThisEl(e),a)do{if(a[la]){var t=void 0;if(t=a[la]._onDragOver({clientX:Pa.clientX,clientY:Pa.clientY,target:e,rootEl:a}),t&&!this.options.dragoverBubble)break}e=a}while(a=Up(a));nu()}},_onTouchMove:function(e){if(Vt){var a=this.options,t=a.fallbackTolerance,n=a.fallbackOffset,o=e.touches?e.touches[0]:e,i=ee&&en(ee,!0),r=ee&&i&&i.a,s=ee&&i&&i.d,c=Bo&&Je&&Wp(Je),l=(o.clientX-Vt.clientX+n.x)/(r||1)+(c?c[0]-Tr[0]:0)/(r||1),p=(o.clientY-Vt.clientY+n.y)/(s||1)+(c?c[1]-Tr[1]:0)/(s||1);if(!J.active&&!on){if(t&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(na({rootEl:Ae,name:"add",toEl:Ae,fromEl:De,originalEvent:e}),na({sortable:this,name:"remove",toEl:Ae,originalEvent:e}),na({rootEl:Ae,name:"sort",toEl:Ae,fromEl:De,originalEvent:e}),na({sortable:this,name:"sort",toEl:Ae,originalEvent:e})),Ye&&Ye.save()):ha!==nn&&ha>=0&&(na({sortable:this,name:"update",toEl:Ae,originalEvent:e}),na({sortable:this,name:"sort",toEl:Ae,originalEvent:e})),J.active&&((ha==null||ha===-1)&&(ha=nn,xt=Fn),na({sortable:this,name:"end",toEl:Ae,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){pa("nulling",this),De=R=Ae=ee=Pt=Ce=$o=gt=Vt=Pa=zn=ha=xt=nn=Fn=rn=Un=Ye=Ro=J.dragged=J.ghost=J.clone=J.active=null,Lo.forEach(function(e){e.checked=!0}),Lo.length=Dr=Cr=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":R&&(this._onDragOver(e),ig(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,t=this.el.children,n=0,o=t.length,i=this.options;no.right+i||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>o.bottom+i||e.clientX>n.right&&e.clientY>n.top}function lg(e,a,t,n,o,i,r,s){var c=n?e.clientY:e.clientX,l=n?t.height:t.width,p=n?t.top:t.left,u=n?t.bottom:t.right,d=!1;if(!r){if(s&&Uop+l*i/2:cu-Uo)return-Un}else if(c>p+l*(1-o)/2&&cu-l*i/2)?c>p+l/2?1:-1:0}function pg(e){return ka(R){ru(a,p.oldIndex,p.newIndex,p)}},s=()=>{const p=typeof e=="string"?o?.querySelector(e):Lh(e);!p||n!==void 0||(n=new J(p,{...r,...i}))},c=()=>{n?.destroy(),n=void 0},l=(p,u)=>{if(u!==void 0)n?.option(p,u);else return n?.option(p)};return zh(s),Rh(c),{stop:c,start:s,option:l}}function vg(e,a,t){const n=e.children[t];e.insertBefore(a,n)}function hg(e){e.parentNode&&e.parentNode.removeChild(e)}function ru(e,a,t,n=null){n!=null&&(hg(n.item),vg(n.from,n.item,a));const o=Ie(e),i=o?[...hi(e)]:hi(e);if(t>=0&&t{i.splice(t,0,r),o&&(e.value=i)})}}const gg=["disabled"],su=Me({__name:"TideButton",props:{variant:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1}},setup(e){return(a,t)=>(W(),te("button",{type:"button",class:wa(`tide-button tide-button--${a.variant} tide-button--${a.size}`),disabled:a.disabled},[Kt(a.$slots,"default")],10,gg))}}),xg={key:0,class:"tide-field-group__action"},bg=Me({__name:"TideFieldGroup",props:{repeatable:{type:Boolean,default:!1},repeatLabel:{default:"Add +"},sortable:{type:Boolean,default:!1},sortItems:{default:()=>[]}},emits:["add","sort"],setup(e,{emit:a}){const t=e,n=a,o=Es(t.sortItems),i=Pd("content");return t.sortable&&fg(i,o,{onUpdate:r=>{n("sort",r.newIndex,r.oldIndex)}}),(r,s)=>(W(),te("div",{class:wa({"tide-field-group":!0,"tide-field-group--repeatable":r.repeatable})},[Ee("div",{ref_key:"content",ref:i,class:"tide-field-group__content"},[Kt(r.$slots,"default",{},void 0,!0)],512),r.repeatable?(W(),te("div",xg,[xe(su,{onClick:s[0]||(s[0]=c=>r.$emit("add"))},{default:Pe(()=>[Tn(ra(r.repeatLabel),1)]),_:1})])):Ve("",!0)],2))}}),cu=tt(bg,[["__scopeId","data-v-787c34d8"]]),yg={class:wa({"tide-dropdown-list__autocomplete":!0,"tide-form__element":!0})},wg={key:0,class:"tide-dropdown-list__tags"},_g={class:"tide-dropdown-list__tag-text"},kg=["tabindex","aria-label","onClick"],Eg=["name","id","placeholder","aria-expanded","aria-controls","aria-activedescendant","disabled","required","onKeydown"],jg={key:1,class:"tide-dropdown-list__loading-icon",width:"18",height:"18",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Og=["id"],Ng={key:0,class:"tide-dropdown-list__menu-item tide-dropdown-list__menu-empty"},Sg=["id","aria-selected","aria-current","onClick"],Dg=Me({__name:"TideDropdown",props:{id:{},multiple:{type:Boolean,default:!0},options:{default:()=>[]},dynamic:{type:Boolean,default:!1},placeholder:{default:"Type to search..."},value:{},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minQuery:{default:0}},emits:["change","search"],setup(e,{emit:a}){const t=e,n=a,o=Ta(""),i=Ta(!1),r=Ta(null);ut(o,()=>{n("search",o.value),!o.value||!l.value.length?y(null):t.dynamic&&o.value.lengtht.loading,(N,H)=>{!N&&H&&t.dynamic&&O()});const s=ca(()=>t.value?Array.isArray(t.value)?t.value:[t.value]:[]),c=ca(()=>t.multiple||!s.value.length),l=ca(()=>t.dynamic||!o.value?t.options:t.options.filter(N=>N.label.toLowerCase().includes(o.value.toLowerCase()))),p=N=>r.value?N.value===r.value?.value:!1,u=N=>!!s.value.find(H=>H.value===N.value);function d(N){n("change",t.multiple?[...s.value,N]:N),t.multiple||(o.value="",L())}function f(N){n("change",t.multiple?s.value.filter(H=>H.value!==N.value):null)}function g(){!o.value&&s.value.length&&n("change",s.value.slice(0,-1))}function h(){r.value?j(r.value):o.value||O()}function j(N){N&&(s.value.find(H=>H.value===N.value)?f(N):d(N))}function y(N){r.value=N}function w(){return l.value.findIndex(N=>N.value===r.value?.value)}function _(){if(!l.value.length)return;const N=w();N0?y(l.value[N-1]):y(l.value[l.value.length-1])}function O(){t.dynamic&&o.value.length=t.minQuery)&&O()}const q=N=>{N.target?.closest(".tide-dropdown-list")||L()};return Ht(()=>window.addEventListener("pointerdown",q)),Oi(()=>window.removeEventListener("pointerdown",q)),(N,H)=>(W(),te("div",{class:wa({"tide-dropdown-list":!0,"tide-dropdown-list--single":!N.multiple})},[Ee("div",yg,[s.value.length?(W(),te("div",wg,[(W(!0),te(Te,null,lt(s.value,z=>(W(),te("span",{key:z.value,class:"tide-dropdown-list__tag"},[Ee("span",_g,ra(z.label),1),Ee("button",{type:"button",tabindex:N.multiple?-1:0,class:"tide-dropdown-list__tag-remove","aria-label":`Remove ${z.label}`,onClick:ae=>j(z)},H[1]||(H[1]=[Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[Ee("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ee("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]),8,kg)]))),128))])):Ve("",!0),Td(Ee("input",{name:N.id,id:N.id,type:"text",class:wa({"tide-dropdown-list__input":!0,"tide-visually-hidden":!c.value}),autocomplete:"off",placeholder:N.placeholder,role:"combobox","aria-expanded":i.value,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i.value?`${N.id}-menu`:void 0,"aria-activedescendant":i.value&&r.value?`${N.id}-menu-${r.value}`:void 0,disabled:N.disabled,required:N.multiple?!1:N.required,"onUpdate:modelValue":H[0]||(H[0]=z=>o.value=z),onFocus:F,onKeydown:[Jt(L,["tab"]),Jt(L,["esc"]),Jt(Ki(M,["prevent"]),["up"]),Jt(Ki(_,["prevent"]),["down"]),Jt(g,["delete"]),Jt(Ki(h,["prevent"]),["enter"])]},null,42,Eg),[[gf,o.value]]),N.loading?(W(),te("svg",jg,H[2]||(H[2]=[Ee("path",{d:"M10,1V3a7,7,0,1,1-7,7H1a9,9,0,1,0,9-9Z"},null,-1)]))):Ve("",!0),i.value?(W(),te("ul",{key:2,id:`${N.id}-menu`,role:"listbox",tabindex:"-1","aria-multiselectable":"true",class:"tide-dropdown-list__menu"},[!l.value.length&&o.value&&!N.loading?(W(),te("li",Ng,H[3]||(H[3]=[Ee("span",null,"No matching results",-1)]))):Ve("",!0),(W(!0),te(Te,null,lt(l.value,z=>(W(),te("li",{key:z.value,id:`${N.id}-menu-${z.value}`,role:"option",class:"tide-dropdown-list__menu-item","aria-selected":u(z),"aria-current":p(z),onClick:ae=>j(z)},ra(z.label),9,Sg))),128))],8,Og)):Ve("",!0)])],2))}}),lu=tt(Dg,[["__scopeId","data-v-af4a810a"]]),Cg=Me({__name:"FiltersSectionTerms",props:{id:{},value:{default:()=>[]},source:{default:void 0}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=Ta([]),i=Ta(!0),r=Ta(!1),s=ca(()=>!t.value.length||!o.value?[]:o.value.filter(l=>t.value.includes(l.value))),c=l=>{n("change",l.map(p=>p.value))};return ut(()=>t.source,async()=>{t.source?(r.value=!0,o.value=await Ih(t.source)):o.value=[],r.value=!1,i.value=!1}),(l,p)=>(W(),We(lu,{id:l.id,value:s.value,options:o.value,disabled:i.value,loading:r.value,onChange:c},null,8,["id","value","options","disabled","loading"]))}}),Tg={key:0,class:"tide-field-group__sort","aria-label":"Drag to sort"},Ag={class:"tide-field-group-row__content"},Ig={key:1,class:"tide-field-group-row__action"},Pg=Me({__name:"TideFieldGroupRow",props:{sortable:{type:Boolean,default:!1},removeable:{type:Boolean,default:!1},removeLabel:{default:"Remove row"}},emits:["remove"],setup(e){return(a,t)=>(W(),te("div",{class:wa({"tide-field-group-row":!0,"tide-field-group-row--sortable":a.sortable,"tide-field-group-row--removeable":a.removeable})},[a.sortable?(W(),te("div",Tg,t[1]||(t[1]=[Ee("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[Ee("path",{d:"M5.2 9l-3 3 3 3M9 5.2l3-3 3 3M15 18.9l-3 3-3-3M18.9 9l3 3-3 3M3.3 12h17.4M12 3.2v17.6"})],-1)]))):Ve("",!0),Ee("div",Ag,[Kt(a.$slots,"default",{},void 0,!0)]),a.removeable?(W(),te("div",Ig,[xe(su,{size:"medium",class:"tide-field-group-row__action-button",onClick:t[0]||(t[0]=n=>a.$emit("remove"))},{default:Pe(()=>t[2]||(t[2]=[Tn(" Remove ",-1)])),_:1,__:[2]})])):Ve("",!0)],2))}}),pu=tt(Pg,[["__scopeId","data-v-77f91b0d"]]),Vg=Me({__name:"FiltersSection",setup(e){const{form:a,getField:t,setField:n}=ft(),o=Ta([]),i=ca(()=>{const p=t("filters");return p.length?p:[]}),r=()=>{n("filters",[...i.value,{}])},s=p=>{n("filters",i.value.filter((u,d)=>d!==p))},c=p=>o.value.find(u=>u.value===p)?.machineName,l=ca(()=>{const p=t("contentType");return o.value.filter(u=>u.contentTypes.length?u.contentTypes.includes(p):!0)});return ut(()=>a.contentType,p=>{const u=i.value.filter(d=>d.taxonomy?o.value.some(f=>f.value===d.taxonomy&&(!f.contentTypes.length||f.contentTypes.includes(p))):!0);u.length!==i.value.length&&n("filters",u)}),Ht(async()=>{o.value=await Ah()}),(p,u)=>(W(),We(So,{title:"Refine Content",description:"This section allows you to filter content to only the relevant items."},{default:Pe(()=>[xe(cu,{repeatable:!0,"repeat-label":"Add filter",onAdd:r},{default:Pe(()=>[(W(!0),te(Te,null,lt(i.value,(d,f)=>(W(),We(pu,{key:`filters-${f}`,removeable:!0,onRemove:g=>s(f)},{default:Pe(()=>[xe(vt,{id:"filters",index:f,scope:"tax",label:"Filter by",description:"Select a taxonomy term to filter by"},{default:Pe(({id:g,value:h,update:j})=>[xe(Jc,{id:g,value:h?.taxonomy,options:l.value,onChange:y=>j({taxonomy:y},f)},null,8,["id","value","options","onChange"])]),_:2},1032,["index"]),xe(vt,{id:"filters",index:f,scope:"terms",label:"Filter terms",description:"Show content with the selected terms"},{default:Pe(({id:g,value:h,update:j})=>[xe(Cg,{id:g,value:h?.terms,source:c(h.taxonomy),onChange:y=>j({taxonomy:h.taxonomy,terms:y},f)},null,8,["id","value","source","onChange"])]),_:2},1032,["index"])]),_:2},1032,["onRemove"]))),128))]),_:1})]),_:1}))}}),uu=(e="{}")=>{let a={};if(!e)return a;try{a=JSON.parse(e)}catch(t){console.error("Error parsing JSON value:",t)}return a},$g=e=>{let a="{}";try{a=JSON.stringify(e)}catch(t){console.error("Error stringify-ing value:",t)}return a},Rg=(e,a=300)=>{let t;return(...n)=>{clearTimeout(t),t=setTimeout(()=>e(...n),a)}},Mg=Me({__name:"ManualSectionItem",props:{id:{},value:{},source:{default:void 0}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,{getConfig:o,setConfig:i}=ft(),r=Ta([]),s=Ta(!1),c=ca(()=>{const u=o("contentMap");return t.value&&Object.keys(u).length?{label:u[t.value]||"Not found",value:t.value}:null}),l=u=>{const d=typeof u=="object"&&u!==null;d&&i("contentMap",{[u.value]:u.label},!0),n("change",d?u.value:"")},p=Rg(async u=>{u.length>=2?(s.value=!0,r.value=await Vh(u)):r.value=[],s.value=!1});return(u,d)=>(W(),We(lu,{id:u.id,value:c.value,options:r.value,loading:s.value,dynamic:!0,multiple:!1,required:!0,"min-query":2,onChange:l,onSearch:Ot(p)},null,8,["id","value","options","loading","onSearch"]))}}),Fg=Me({__name:"ManualSection",setup(e){const{getField:a,setField:t}=ft(),n=ca(()=>a("manualItems")||[""]),o=()=>{t("manualItems",[...n.value,""])},i=s=>{t("manualItems",n.value.filter((c,l)=>l!==s))},r=(s,c)=>{const l=[...n.value];ru(l,c,s),t("manualItems",l)};return(s,c)=>(W(),We(So,{title:"Select content",description:"Search for individual content items, add them to the list, then drag to reorder or remove as needed.",required:!0},{default:Pe(()=>[xe(cu,{repeatable:!0,"repeat-label":"Add content",sortable:!0,"sort-items":n.value,onAdd:o,onSort:r},{default:Pe(()=>[(W(!0),te(Te,null,lt(n.value,(l,p)=>(W(),We(pu,{key:`manual-${l}-${p}`,removeable:!0,sortable:!0,onRemove:u=>i(p)},{default:Pe(()=>[xe(vt,{id:"manualItems",index:p,label:"Search content","hide-label":!0},{default:Pe(({id:u,value:d,update:f})=>[xe(Mg,{id:u,value:d,onChange:g=>f(g,p)},null,8,["id","value","onChange"])]),_:2},1032,["index"])]),_:2},1032,["onRemove"]))),128))]),_:1},8,["sort-items"])]),_:1}))}}),zg=["name","type","id","min","max","value","required"],Ug=Me({__name:"TideInput",props:{id:{},type:{default:"text"},value:{default:void 0},min:{default:void 0},max:{default:void 0},required:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=i=>{let r=i.target.value;t.type==="number"&&(r=Number(r)),n("change",r)};return(i,r)=>(W(),te("input",{name:i.id,type:i.type,id:i.id,min:i.min,max:i.max,value:i.value,required:i.required,class:"tide-input tide-form__element",onInput:o},null,40,zg))}}),Lg={class:"tide-radio__label"},qg=["name","value","checked","required","onChange"],Bg=Me({__name:"TideRadio",props:{id:{},options:{},value:{},required:{type:Boolean,default:!1},display:{default:"block"}},emits:["change"],setup(e){return(a,t)=>(W(),te("div",{class:wa(`tide-radio tide-radio--${a.display}`)},[(W(!0),te(Te,null,lt(a.options,n=>(W(),te("label",Lg,[Ee("input",{type:"radio",name:a.id,class:"tide-radio__input",value:n.value,checked:n.value===a.value,required:a.required,onChange:o=>a.$emit("change",n.value)},null,40,qg),Ee("span",null,ra(n.label),1)]))),256))],2))}}),Wg=tt(Bg,[["__scopeId","data-v-df50077b"]]),Hg={class:"tide-checkbox__label"},Kg=["name","value","checked","required","onChange"],Gg=Me({__name:"TideCheckbox",props:{id:{},options:{},value:{type:[String,Boolean]},required:{type:Boolean,default:!1},display:{default:"block"}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=(i,r)=>{const s=t.options.length>1;n("change",s?i:!r)};return(i,r)=>(W(),te("div",{class:wa(`tide-checkbox tide-checkbox--${i.display}`)},[(W(!0),te(Te,null,lt(i.options,s=>(W(),te("label",Hg,[Ee("input",{type:"checkbox",name:i.id,class:"tide-checkbox__input",value:s.value,checked:s.value===i.value,required:i.required,onChange:c=>o(s.value,i.value)},null,40,Kg),Ee("span",null,ra(s.label),1)]))),256))],2))}}),Yg=tt(Gg,[["__scopeId","data-v-3a00e669"]]),Qg=Me({__name:"DisplaySection",setup(e){const{getField:a}=ft();return(t,n)=>(W(),We(So,{title:"Display Options"},{default:Pe(()=>[xe(vt,{id:"displayType",type:"legend",label:"Display type",required:!0,description:"How would you like to display the content?"},{default:Pe(({id:o,value:i,update:r})=>[xe(Wg,{id:o,display:"inline",options:[{value:"grid",label:"Grid"},{value:"list",label:"List"},{value:"carousel",label:"Carousel"}],value:i,required:!0,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1}),Ot(a)("displayType")==="grid"||Ot(a)("displayType")==="carousel"?(W(),We(vt,{key:0,id:"showImage",type:"legend",label:"Show images"},{default:Pe(({id:o,value:i,update:r})=>[xe(Yg,{id:o,options:[{value:!0,label:"Would you like to display card images?"}],value:i,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1})):Ve("",!0),Ot(a)("source")==="auto"?(W(),We(vt,{key:1,id:"displayNumber",label:"Number of items",description:"How many items would you like display?",required:!0},{default:Pe(({id:o,value:i,update:r})=>[xe(Ug,{id:o,type:"number",value:i,min:1,max:100,required:!0,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1})):Ve("",!0)]),_:1}))}}),Xg=Me({__name:"ContentForm",setup(e){const{getField:a}=ft(),t=ca(()=>a("source")&&a("contentType")||a("source")==="manual"),n=ca(()=>a("source")==="manual"),o=ca(()=>a("source")==="auto");return(i,r)=>(W(),We(Pf,null,{default:Pe(()=>[xe($h),t.value?(W(),te(Te,{key:0},[n.value?(W(),We(Fg,{key:0})):Ve("",!0),o.value?(W(),We(Vg,{key:1})):Ve("",!0),xe(Qg)],64)):Ve("",!0)]),_:1}))}}),Jg={key:0,class:"tide-collection"},Zg=Me({__name:"App",props:{index:{},form:{},config:{},baseUrl:{},update:{type:Function}},setup(e){const a=e,t=Ta(!1),{form:n}=ft(a.index,{form:a.form,config:a.config});return Ht(()=>{Th(a.baseUrl),t.value=!0}),ut(n,o=>{a.update(o)},{deep:!0}),(o,i)=>t.value?(W(),te("div",Jg,[xe(Xg)])):Ve("",!0)}});function ex(e,a={}){kf(Zg,a).mount(e)}(e=>{Drupal.behaviors.contentCollection={attach:function(a){once("content-collection-init",".content-collection-app",a).forEach(function(t){const n=t.closest(".field--type-content-collection"),o=t.getAttribute("data-index")||"0",i=t.getAttribute("data-config")||"{}",r=n?.querySelector(`#content-collection-value-${o}`);r&&ex(t,{index:o,form:uu(r.value),config:uu(i),update:s=>r.value=$g(s),baseUrl:"http://content-sdp.docker.internal/"})})}}})(jQuery)})(); -//# sourceMappingURL=main.js.map + */function Rp(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Wa(e){for(var a=1;a=0)&&(t[o]=e[o]);return t}function Wh(e,a){if(e==null)return{};var t=Bh(e,a),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var Hh="1.15.6";function it(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var rt=it(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vn=it(/Edge/i),Mp=it(/firefox/i),$n=it(/safari/i)&&!it(/chrome/i)&&!it(/android/i),jr=it(/iP(ad|od|hone)/i),Fp=it(/chrome/i)&&it(/android/i),zp={capture:!1,passive:!1};function se(e,a,t){e.addEventListener(a,t,!rt&&zp)}function ie(e,a,t){e.removeEventListener(a,t,!rt&&zp)}function Vo(e,a){if(a){if(a[0]===">"&&(a=a.substring(1)),e)try{if(e.matches)return e.matches(a);if(e.msMatchesSelector)return e.msMatchesSelector(a);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(a)}catch{return!1}return!1}}function Up(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ia(e,a,t,n){if(e){t=t||document;do{if(a!=null&&(a[0]===">"?e.parentNode===t&&Vo(e,a):Vo(e,a))||n&&e===t)return e;if(e===t)break}while(e=Up(e))}return null}var Lp=/\s+/g;function va(e,a,t){if(e&&a)if(e.classList)e.classList[t?"add":"remove"](a);else{var n=(" "+e.className+" ").replace(Lp," ").replace(" "+a+" "," ");e.className=(n+(t?" "+a:"")).replace(Lp," ")}}function X(e,a,t){var n=e&&e.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),a===void 0?t:t[a];!(a in n)&&a.indexOf("webkit")===-1&&(a="-webkit-"+a),n[a]=t+(typeof t=="string"?"":"px")}}function en(e,a){var t="";if(typeof e=="string")t=e;else do{var n=X(e,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!a&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function qp(e,a,t){if(e){var n=e.getElementsByTagName(a),o=0,i=n.length;if(t)for(;o=i,!r)return n;if(n===Ha())break;n=ht(n,!1)}return!1}function an(e,a,t,n){for(var o=0,i=0,r=e.children;i2&&arguments[2]!==void 0?arguments[2]:{},n=t.evt,o=Wh(t,eg);Mn.pluginEvent.bind(J)(e,a,Wa({dragEl:R,parentEl:Ae,ghostEl:ee,rootEl:De,nextEl:Pt,lastDownEl:$o,cloneEl:Ce,cloneHidden:gt,dragStarted:zn,putSortable:Ye,activeSortable:J.active,originalEvent:n,oldIndex:nn,oldDraggableIndex:Fn,newIndex:ha,newDraggableIndex:xt,hideGhostForTarget:tu,unhideGhostForTarget:nu,cloneNowHidden:function(){gt=!0},cloneNowShown:function(){gt=!1},dispatchSortableEvent:function(i){na({sortable:a,name:i,originalEvent:n})}},o))};function na(e){Zh(Wa({putSortable:Ye,cloneEl:Ce,targetEl:R,rootEl:De,oldIndex:nn,oldDraggableIndex:Fn,newIndex:ha,newDraggableIndex:xt},e))}var R,Ae,ee,De,Pt,$o,Ce,gt,nn,ha,Fn,xt,Ro,Ye,on=!1,Mo=!1,Fo=[],Vt,Pa,Dr,Cr,Qp,Xp,zn,rn,Un,Ln=!1,zo=!1,Uo,Je,Tr=[],Ar=!1,Lo=[],qo=typeof document<"u",Bo=jr,Jp=Vn||rt?"cssFloat":"float",ag=qo&&!Fp&&!jr&&"draggable"in document.createElement("div"),Zp=function(){if(qo){if(rt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),eu=function(e,a){var t=X(e),n=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),o=an(e,0,a),i=an(e,1,a),r=o&&X(o),s=i&&X(i),c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Fe(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Fe(i).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r.float&&r.float!=="none"){var p=r.float==="left"?"left":"right";return i&&(s.clear==="both"||s.clear===p)?"vertical":"horizontal"}return o&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||c>=n&&t[Jp]==="none"||i&&t[Jp]==="none"&&c+l>n)?"vertical":"horizontal"},tg=function(e,a,t){var n=t?e.left:e.top,o=t?e.right:e.bottom,i=t?e.width:e.height,r=t?a.left:a.top,s=t?a.right:a.bottom,c=t?a.width:a.height;return n===r||o===s||n+i/2===r+c/2},ng=function(e,a){var t;return Fo.some(function(n){var o=n[la].options.emptyInsertThreshold;if(!(!o||Or(n))){var i=Fe(n),r=e>=i.left-o&&e<=i.right+o,s=a>=i.top-o&&a<=i.bottom+o;if(r&&s)return t=n}}),t},au=function(e){function a(o,i){return function(r,s,c,l){var p=r.options.group.name&&s.options.group.name&&r.options.group.name===s.options.group.name;if(o==null&&(i||p))return!0;if(o==null||o===!1)return!1;if(i&&o==="clone")return o;if(typeof o=="function")return a(o(r,s,c,l),i)(r,s,c,l);var u=(i?r:s).options.group.name;return o===!0||typeof o=="string"&&o===u||o.join&&o.indexOf(u)>-1}}var t={},n=e.group;(!n||Po(n)!="object")&&(n={name:n}),t.name=n.name,t.checkPull=a(n.pull,!0),t.checkPut=a(n.put),t.revertClone=n.revertClone,e.group=t},tu=function(){!Zp&&ee&&X(ee,"display","none")},nu=function(){!Zp&&ee&&X(ee,"display","")};qo&&!Fp&&document.addEventListener("click",function(e){if(Mo)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Mo=!1,!1},!0);var $t=function(e){if(R){e=e.touches?e.touches[0]:e;var a=ng(e.clientX,e.clientY);if(a){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.target=t.rootEl=a,t.preventDefault=void 0,t.stopPropagation=void 0,a[la]._onDragOver(t)}}},og=function(e){R&&R.parentNode[la]._isOutsideThisEl(e.target)};function J(e,a){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=a=ot({},a),e[la]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eu(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,r){i.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:J.supportPointer!==!1&&"PointerEvent"in window&&(!$n||jr),emptyInsertThreshold:5};Mn.initializePlugins(this,e,t);for(var n in t)!(n in a)&&(a[n]=t[n]);au(a);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=a.forceFallback?!1:ag,this.nativeDraggable&&(this.options.touchStartThreshold=1),a.supportPointer?se(e,"pointerdown",this._onTapStart):(se(e,"mousedown",this._onTapStart),se(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(se(e,"dragover",this),se(e,"dragenter",this)),Fo.push(this.el),a.store&&a.store.get&&this.sort(a.store.get(this)||[]),ot(this,Qh())}J.prototype={constructor:J,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(rn=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,R):this.options.direction},_onTapStart:function(e){if(e.cancelable){var a=this,t=this.el,n=this.options,o=n.preventOnFilter,i=e.type,r=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(r||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=n.filter;if(dg(t),!R&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||n.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&$n&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Ia(s,n.draggable,t,!1),!(s&&s.animated)&&$o!==s)){if(nn=ka(s),Fn=ka(s,n.draggable),typeof l=="function"){if(l.call(this,e,s,this)){na({sortable:a,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),pa("filter",a,{evt:e}),o&&e.preventDefault();return}}else if(l&&(l=l.split(",").some(function(p){if(p=Ia(c,p.trim(),t,!1),p)return na({sortable:a,rootEl:p,name:"filter",targetEl:s,fromEl:t,toEl:t}),pa("filter",a,{evt:e}),!0}),l)){o&&e.preventDefault();return}n.handle&&!Ia(c,n.handle,t,!1)||this._prepareDragStart(e,r,s)}}},_prepareDragStart:function(e,a,t){var n=this,o=n.el,i=n.options,r=o.ownerDocument,s;if(t&&!R&&t.parentNode===o){var c=Fe(t);if(De=o,R=t,Ae=R.parentNode,Pt=R.nextSibling,$o=t,Ro=i.group,J.dragged=R,Vt={target:R,clientX:(a||e).clientX,clientY:(a||e).clientY},Qp=Vt.clientX-c.left,Xp=Vt.clientY-c.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,R.style["will-change"]="all",s=function(){if(pa("delayEnded",n,{evt:e}),J.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Mp&&n.nativeDraggable&&(R.draggable=!0),n._triggerDragStart(e,a),na({sortable:n,name:"choose",originalEvent:e}),va(R,i.chosenClass,!0)},i.ignore.split(",").forEach(function(l){qp(R,l.trim(),Ir)}),se(r,"dragover",$t),se(r,"mousemove",$t),se(r,"touchmove",$t),i.supportPointer?(se(r,"pointerup",n._onDrop),!this.nativeDraggable&&se(r,"pointercancel",n._onDrop)):(se(r,"mouseup",n._onDrop),se(r,"touchend",n._onDrop),se(r,"touchcancel",n._onDrop)),Mp&&this.nativeDraggable&&(this.options.touchStartThreshold=4,R.draggable=!0),pa("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Vn||rt))){if(J.eventCanceled){this._onDrop();return}i.supportPointer?(se(r,"pointerup",n._disableDelayedDrag),se(r,"pointercancel",n._disableDelayedDrag)):(se(r,"mouseup",n._disableDelayedDrag),se(r,"touchend",n._disableDelayedDrag),se(r,"touchcancel",n._disableDelayedDrag)),se(r,"mousemove",n._delayedDragTouchMoveHandler),se(r,"touchmove",n._delayedDragTouchMoveHandler),i.supportPointer&&se(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(s,i.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){R&&Ir(R),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ie(e,"mouseup",this._disableDelayedDrag),ie(e,"touchend",this._disableDelayedDrag),ie(e,"touchcancel",this._disableDelayedDrag),ie(e,"pointerup",this._disableDelayedDrag),ie(e,"pointercancel",this._disableDelayedDrag),ie(e,"mousemove",this._delayedDragTouchMoveHandler),ie(e,"touchmove",this._delayedDragTouchMoveHandler),ie(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?se(document,"pointermove",this._onTouchMove):a?se(document,"touchmove",this._onTouchMove):se(document,"mousemove",this._onTouchMove):(se(R,"dragend",this),se(De,"dragstart",this._onDragStart));try{document.selection?Ho(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(on=!1,De&&R){pa("dragStarted",this,{evt:a}),this.nativeDraggable&&se(document,"dragover",og);var t=this.options;!e&&va(R,t.dragClass,!1),va(R,t.ghostClass,!0),J.active=this,e&&this._appendGhost(),na({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Pa){this._lastX=Pa.clientX,this._lastY=Pa.clientY,tu();for(var e=document.elementFromPoint(Pa.clientX,Pa.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pa.clientX,Pa.clientY),e!==a);)a=e;if(R.parentNode[la]._isOutsideThisEl(e),a)do{if(a[la]){var t=void 0;if(t=a[la]._onDragOver({clientX:Pa.clientX,clientY:Pa.clientY,target:e,rootEl:a}),t&&!this.options.dragoverBubble)break}e=a}while(a=Up(a));nu()}},_onTouchMove:function(e){if(Vt){var a=this.options,t=a.fallbackTolerance,n=a.fallbackOffset,o=e.touches?e.touches[0]:e,i=ee&&en(ee,!0),r=ee&&i&&i.a,s=ee&&i&&i.d,c=Bo&&Je&&Wp(Je),l=(o.clientX-Vt.clientX+n.x)/(r||1)+(c?c[0]-Tr[0]:0)/(r||1),p=(o.clientY-Vt.clientY+n.y)/(s||1)+(c?c[1]-Tr[1]:0)/(s||1);if(!J.active&&!on){if(t&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(na({rootEl:Ae,name:"add",toEl:Ae,fromEl:De,originalEvent:e}),na({sortable:this,name:"remove",toEl:Ae,originalEvent:e}),na({rootEl:Ae,name:"sort",toEl:Ae,fromEl:De,originalEvent:e}),na({sortable:this,name:"sort",toEl:Ae,originalEvent:e})),Ye&&Ye.save()):ha!==nn&&ha>=0&&(na({sortable:this,name:"update",toEl:Ae,originalEvent:e}),na({sortable:this,name:"sort",toEl:Ae,originalEvent:e})),J.active&&((ha==null||ha===-1)&&(ha=nn,xt=Fn),na({sortable:this,name:"end",toEl:Ae,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){pa("nulling",this),De=R=Ae=ee=Pt=Ce=$o=gt=Vt=Pa=zn=ha=xt=nn=Fn=rn=Un=Ye=Ro=J.dragged=J.ghost=J.clone=J.active=null,Lo.forEach(function(e){e.checked=!0}),Lo.length=Dr=Cr=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":R&&(this._onDragOver(e),ig(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,t=this.el.children,n=0,o=t.length,i=this.options;no.right+i||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>o.bottom+i||e.clientX>n.right&&e.clientY>n.top}function lg(e,a,t,n,o,i,r,s){var c=n?e.clientY:e.clientX,l=n?t.height:t.width,p=n?t.top:t.left,u=n?t.bottom:t.right,d=!1;if(!r){if(s&&Uop+l*i/2:cu-Uo)return-Un}else if(c>p+l*(1-o)/2&&cu-l*i/2)?c>p+l/2?1:-1:0}function pg(e){return ka(R){ru(a,p.oldIndex,p.newIndex,p)}},s=()=>{const p=typeof e=="string"?o?.querySelector(e):Lh(e);!p||n!==void 0||(n=new J(p,{...r,...i}))},c=()=>{n?.destroy(),n=void 0},l=(p,u)=>{if(u!==void 0)n?.option(p,u);else return n?.option(p)};return zh(s),Rh(c),{stop:c,start:s,option:l}}function vg(e,a,t){const n=e.children[t];e.insertBefore(a,n)}function hg(e){e.parentNode&&e.parentNode.removeChild(e)}function ru(e,a,t,n=null){n!=null&&(hg(n.item),vg(n.from,n.item,a));const o=Ie(e),i=o?[...hi(e)]:hi(e);if(t>=0&&t{i.splice(t,0,r),o&&(e.value=i)})}}const gg=["disabled"],su=Me({__name:"TideButton",props:{variant:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1}},setup(e){return(a,t)=>(W(),te("button",{type:"button",class:wa(`tide-button tide-button--${a.variant} tide-button--${a.size}`),disabled:a.disabled},[Kt(a.$slots,"default")],10,gg))}}),xg={key:0,class:"tide-field-group__action"},bg=Me({__name:"TideFieldGroup",props:{repeatable:{type:Boolean,default:!1},repeatLabel:{default:"Add +"},sortable:{type:Boolean,default:!1},sortItems:{default:()=>[]}},emits:["add","sort"],setup(e,{emit:a}){const t=e,n=a,o=Es(t.sortItems),i=Pd("content");return t.sortable&&fg(i,o,{onUpdate:r=>{n("sort",r.newIndex,r.oldIndex)}}),(r,s)=>(W(),te("div",{class:wa({"tide-field-group":!0,"tide-field-group--repeatable":r.repeatable})},[Ee("div",{ref_key:"content",ref:i,class:"tide-field-group__content"},[Kt(r.$slots,"default",{},void 0,!0)],512),r.repeatable?(W(),te("div",xg,[xe(su,{onClick:s[0]||(s[0]=c=>r.$emit("add"))},{default:Pe(()=>[Tn(ra(r.repeatLabel),1)]),_:1})])):Ve("",!0)],2))}}),cu=tt(bg,[["__scopeId","data-v-787c34d8"]]),yg={class:wa({"tide-dropdown-list__autocomplete":!0,"tide-form__element":!0})},wg={key:0,class:"tide-dropdown-list__tags"},_g={class:"tide-dropdown-list__tag-text"},kg=["tabindex","aria-label","onClick"],Eg=["name","id","placeholder","aria-expanded","aria-controls","aria-activedescendant","disabled","required","onKeydown"],jg={key:1,class:"tide-dropdown-list__loading-icon",width:"18",height:"18",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Og=["id"],Ng={key:0,class:"tide-dropdown-list__menu-item tide-dropdown-list__menu-empty"},Sg=["id","aria-selected","aria-current","onClick"],Dg=Me({__name:"TideDropdown",props:{id:{},multiple:{type:Boolean,default:!0},options:{default:()=>[]},dynamic:{type:Boolean,default:!1},placeholder:{default:"Type to search..."},value:{},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minQuery:{default:0}},emits:["change","search"],setup(e,{emit:a}){const t=e,n=a,o=Ta(""),i=Ta(!1),r=Ta(null);ut(o,()=>{n("search",o.value),!o.value||!l.value.length?y(null):t.dynamic&&o.value.lengtht.loading,(N,H)=>{!N&&H&&t.dynamic&&O()});const s=ca(()=>t.value?Array.isArray(t.value)?t.value:[t.value]:[]),c=ca(()=>t.multiple||!s.value.length),l=ca(()=>t.dynamic||!o.value?t.options:t.options.filter(N=>N.label.toLowerCase().includes(o.value.toLowerCase()))),p=N=>r.value?N.value===r.value?.value:!1,u=N=>!!s.value.find(H=>H.value===N.value);function d(N){n("change",t.multiple?[...s.value,N]:N),t.multiple||(o.value="",L())}function f(N){n("change",t.multiple?s.value.filter(H=>H.value!==N.value):null)}function g(){!o.value&&s.value.length&&n("change",s.value.slice(0,-1))}function h(){r.value?j(r.value):o.value||O()}function j(N){N&&(s.value.find(H=>H.value===N.value)?f(N):d(N))}function y(N){r.value=N}function w(){return l.value.findIndex(N=>N.value===r.value?.value)}function _(){if(!l.value.length)return;const N=w();N0?y(l.value[N-1]):y(l.value[l.value.length-1])}function O(){t.dynamic&&o.value.length=t.minQuery)&&O()}const q=N=>{N.target?.closest(".tide-dropdown-list")||L()};return Ht(()=>window.addEventListener("pointerdown",q)),Oi(()=>window.removeEventListener("pointerdown",q)),(N,H)=>(W(),te("div",{class:wa({"tide-dropdown-list":!0,"tide-dropdown-list--single":!N.multiple})},[Ee("div",yg,[s.value.length?(W(),te("div",wg,[(W(!0),te(Te,null,lt(s.value,z=>(W(),te("span",{key:z.value,class:"tide-dropdown-list__tag"},[Ee("span",_g,ra(z.label),1),Ee("button",{type:"button",tabindex:N.multiple?-1:0,class:"tide-dropdown-list__tag-remove","aria-label":`Remove ${z.label}`,onClick:ae=>j(z)},H[1]||(H[1]=[Ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[Ee("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ee("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]),8,kg)]))),128))])):Ve("",!0),Td(Ee("input",{name:N.id,id:N.id,type:"text",class:wa({"tide-dropdown-list__input":!0,"tide-visually-hidden":!c.value}),autocomplete:"off",placeholder:N.placeholder,role:"combobox","aria-expanded":i.value,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i.value?`${N.id}-menu`:void 0,"aria-activedescendant":i.value&&r.value?`${N.id}-menu-${r.value}`:void 0,disabled:N.disabled,required:N.multiple?!1:N.required,"onUpdate:modelValue":H[0]||(H[0]=z=>o.value=z),onFocus:F,onKeydown:[Jt(L,["tab"]),Jt(L,["esc"]),Jt(Ki(M,["prevent"]),["up"]),Jt(Ki(_,["prevent"]),["down"]),Jt(g,["delete"]),Jt(Ki(h,["prevent"]),["enter"])]},null,42,Eg),[[gf,o.value]]),N.loading?(W(),te("svg",jg,H[2]||(H[2]=[Ee("path",{d:"M10,1V3a7,7,0,1,1-7,7H1a9,9,0,1,0,9-9Z"},null,-1)]))):Ve("",!0),i.value?(W(),te("ul",{key:2,id:`${N.id}-menu`,role:"listbox",tabindex:"-1","aria-multiselectable":"true",class:"tide-dropdown-list__menu"},[!l.value.length&&o.value&&!N.loading?(W(),te("li",Ng,H[3]||(H[3]=[Ee("span",null,"No matching results",-1)]))):Ve("",!0),(W(!0),te(Te,null,lt(l.value,z=>(W(),te("li",{key:z.value,id:`${N.id}-menu-${z.value}`,role:"option",class:"tide-dropdown-list__menu-item","aria-selected":u(z),"aria-current":p(z),onClick:ae=>j(z)},ra(z.label),9,Sg))),128))],8,Og)):Ve("",!0)])],2))}}),lu=tt(Dg,[["__scopeId","data-v-af4a810a"]]),Cg=Me({__name:"FiltersSectionTerms",props:{id:{},value:{default:()=>[]},source:{default:void 0}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=Ta([]),i=Ta(!0),r=Ta(!1),s=ca(()=>!t.value.length||!o.value?[]:o.value.filter(l=>t.value.includes(l.value))),c=l=>{n("change",l.map(p=>p.value))};return ut(()=>t.source,async()=>{t.source?(r.value=!0,o.value=await Ih(t.source)):o.value=[],r.value=!1,i.value=!1}),(l,p)=>(W(),We(lu,{id:l.id,value:s.value,options:o.value,disabled:i.value,loading:r.value,onChange:c},null,8,["id","value","options","disabled","loading"]))}}),Tg={key:0,class:"tide-field-group__sort","aria-label":"Drag to sort"},Ag={class:"tide-field-group-row__content"},Ig={key:1,class:"tide-field-group-row__action"},Pg=Me({__name:"TideFieldGroupRow",props:{sortable:{type:Boolean,default:!1},removeable:{type:Boolean,default:!1},removeLabel:{default:"Remove row"}},emits:["remove"],setup(e){return(a,t)=>(W(),te("div",{class:wa({"tide-field-group-row":!0,"tide-field-group-row--sortable":a.sortable,"tide-field-group-row--removeable":a.removeable})},[a.sortable?(W(),te("div",Tg,t[1]||(t[1]=[Ee("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[Ee("path",{d:"M5.2 9l-3 3 3 3M9 5.2l3-3 3 3M15 18.9l-3 3-3-3M18.9 9l3 3-3 3M3.3 12h17.4M12 3.2v17.6"})],-1)]))):Ve("",!0),Ee("div",Ag,[Kt(a.$slots,"default",{},void 0,!0)]),a.removeable?(W(),te("div",Ig,[xe(su,{size:"medium",class:"tide-field-group-row__action-button",onClick:t[0]||(t[0]=n=>a.$emit("remove"))},{default:Pe(()=>t[2]||(t[2]=[Tn(" Remove ",-1)])),_:1,__:[2]})])):Ve("",!0)],2))}}),pu=tt(Pg,[["__scopeId","data-v-77f91b0d"]]),Vg=Me({__name:"FiltersSection",setup(e){const{form:a,getField:t,setField:n}=ft(),o=Ta([]),i=ca(()=>{const p=t("filters");return p.length?p:[]}),r=()=>{n("filters",[...i.value,{}])},s=p=>{n("filters",i.value.filter((u,d)=>d!==p))},c=p=>o.value.find(u=>u.value===p)?.machineName,l=ca(()=>{const p=t("contentType");return o.value.filter(u=>u.contentTypes.length?u.contentTypes.includes(p):!0)});return ut(()=>a.contentType,p=>{const u=i.value.filter(d=>d.taxonomy?o.value.some(f=>f.value===d.taxonomy&&(!f.contentTypes.length||f.contentTypes.includes(p))):!0);u.length!==i.value.length&&n("filters",u)}),Ht(async()=>{o.value=await Ah()}),(p,u)=>(W(),We(So,{title:"Refine Content",description:"This section allows you to filter content to only the relevant items."},{default:Pe(()=>[xe(cu,{repeatable:!0,"repeat-label":"Add filter",onAdd:r},{default:Pe(()=>[(W(!0),te(Te,null,lt(i.value,(d,f)=>(W(),We(pu,{key:`filters-${f}`,removeable:!0,onRemove:g=>s(f)},{default:Pe(()=>[xe(vt,{id:"filters",index:f,scope:"tax",label:"Filter by",description:"Select a taxonomy term to filter by"},{default:Pe(({id:g,value:h,update:j})=>[xe(Jc,{id:g,value:h?.taxonomy,options:l.value,onChange:y=>j({taxonomy:y},f)},null,8,["id","value","options","onChange"])]),_:2},1032,["index"]),xe(vt,{id:"filters",index:f,scope:"terms",label:"Filter terms",description:"Show content with the selected terms"},{default:Pe(({id:g,value:h,update:j})=>[xe(Cg,{id:g,value:h?.terms,source:c(h.taxonomy),onChange:y=>j({taxonomy:h.taxonomy,terms:y},f)},null,8,["id","value","source","onChange"])]),_:2},1032,["index"])]),_:2},1032,["onRemove"]))),128))]),_:1})]),_:1}))}}),uu=(e="{}")=>{let a={};if(!e)return a;try{a=JSON.parse(e)}catch(t){console.error("Error parsing JSON value:",t)}return a},$g=e=>{let a="{}";try{a=JSON.stringify(e)}catch(t){console.error("Error stringify-ing value:",t)}return a},Rg=(e,a=300)=>{let t;return(...n)=>{clearTimeout(t),t=setTimeout(()=>e(...n),a)}},Mg=Me({__name:"ManualSectionItem",props:{id:{},value:{},source:{default:void 0}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,{getConfig:o,setConfig:i}=ft(),r=Ta([]),s=Ta(!1),c=ca(()=>{const u=o("contentMap");return t.value&&Object.keys(u).length?{label:u[t.value]||"Not found",value:t.value}:null}),l=u=>{const d=typeof u=="object"&&u!==null;d&&i("contentMap",{[u.value]:u.label},!0),n("change",d?u.value:"")},p=Rg(async u=>{u.length>=2?(s.value=!0,r.value=await Vh(u)):r.value=[],s.value=!1});return(u,d)=>(W(),We(lu,{id:u.id,value:c.value,options:r.value,loading:s.value,dynamic:!0,multiple:!1,required:!0,"min-query":2,onChange:l,onSearch:Ot(p)},null,8,["id","value","options","loading","onSearch"]))}}),Fg=Me({__name:"ManualSection",setup(e){const{getField:a,setField:t}=ft(),n=ca(()=>a("manualItems")||[""]),o=()=>{t("manualItems",[...n.value,""])},i=s=>{t("manualItems",n.value.filter((c,l)=>l!==s))},r=(s,c)=>{const l=[...n.value];ru(l,c,s),t("manualItems",l)};return(s,c)=>(W(),We(So,{title:"Select content",description:"Search for individual content items, add them to the list, then drag to reorder or remove as needed.",required:!0},{default:Pe(()=>[xe(cu,{repeatable:!0,"repeat-label":"Add content",sortable:!0,"sort-items":n.value,onAdd:o,onSort:r},{default:Pe(()=>[(W(!0),te(Te,null,lt(n.value,(l,p)=>(W(),We(pu,{key:`manual-${l}-${p}`,removeable:!0,sortable:!0,onRemove:u=>i(p)},{default:Pe(()=>[xe(vt,{id:"manualItems",index:p,label:"Search content","hide-label":!0},{default:Pe(({id:u,value:d,update:f})=>[xe(Mg,{id:u,value:d,onChange:g=>f(g,p)},null,8,["id","value","onChange"])]),_:2},1032,["index"])]),_:2},1032,["onRemove"]))),128))]),_:1},8,["sort-items"])]),_:1}))}}),zg=["name","type","id","min","max","value","required"],Ug=Me({__name:"TideInput",props:{id:{},type:{default:"text"},value:{default:void 0},min:{default:void 0},max:{default:void 0},required:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=i=>{let r=i.target.value;t.type==="number"&&(r=Number(r)),n("change",r)};return(i,r)=>(W(),te("input",{name:i.id,type:i.type,id:i.id,min:i.min,max:i.max,value:i.value,required:i.required,class:"tide-input tide-form__element",onInput:o},null,40,zg))}}),Lg={class:"tide-radio__label"},qg=["name","value","checked","required","onChange"],Bg=Me({__name:"TideRadio",props:{id:{},options:{},value:{},required:{type:Boolean,default:!1},display:{default:"block"}},emits:["change"],setup(e){return(a,t)=>(W(),te("div",{class:wa(`tide-radio tide-radio--${a.display}`)},[(W(!0),te(Te,null,lt(a.options,n=>(W(),te("label",Lg,[Ee("input",{type:"radio",name:a.id,class:"tide-radio__input",value:n.value,checked:n.value===a.value,required:a.required,onChange:o=>a.$emit("change",n.value)},null,40,qg),Ee("span",null,ra(n.label),1)]))),256))],2))}}),Wg=tt(Bg,[["__scopeId","data-v-df50077b"]]),Hg={class:"tide-checkbox__label"},Kg=["name","value","checked","required","onChange"],Gg=Me({__name:"TideCheckbox",props:{id:{},options:{},value:{type:[String,Boolean]},required:{type:Boolean,default:!1},display:{default:"block"}},emits:["change"],setup(e,{emit:a}){const t=e,n=a,o=(i,r)=>{const s=t.options.length>1;n("change",s?i:!r)};return(i,r)=>(W(),te("div",{class:wa(`tide-checkbox tide-checkbox--${i.display}`)},[(W(!0),te(Te,null,lt(i.options,s=>(W(),te("label",Hg,[Ee("input",{type:"checkbox",name:i.id,class:"tide-checkbox__input",value:s.value,checked:s.value===i.value,required:i.required,onChange:c=>o(s.value,i.value)},null,40,Kg),Ee("span",null,ra(s.label),1)]))),256))],2))}}),Yg=tt(Gg,[["__scopeId","data-v-3a00e669"]]),Qg=Me({__name:"DisplaySection",setup(e){const{getField:a}=ft();return(t,n)=>(W(),We(So,{title:"Display Options"},{default:Pe(()=>[xe(vt,{id:"displayType",type:"legend",label:"Display type",required:!0,description:"How would you like to display the content?"},{default:Pe(({id:o,value:i,update:r})=>[xe(Wg,{id:o,display:"inline",options:[{value:"grid",label:"Grid"},{value:"list",label:"List"},{value:"carousel",label:"Carousel"}],value:i,required:!0,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1}),Ot(a)("displayType")==="grid"||Ot(a)("displayType")==="carousel"?(W(),We(vt,{key:0,id:"showImage",type:"legend",label:"Show images"},{default:Pe(({id:o,value:i,update:r})=>[xe(Yg,{id:o,options:[{value:!0,label:"Would you like to display card images?"}],value:i,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1})):Ve("",!0),Ot(a)("source")==="auto"?(W(),We(vt,{key:1,id:"displayNumber",label:"Number of items",description:"How many items would you like display?",required:!0},{default:Pe(({id:o,value:i,update:r})=>[xe(Ug,{id:o,type:"number",value:i,min:1,max:100,required:!0,onChange:s=>r(s)},null,8,["id","value","onChange"])]),_:1})):Ve("",!0)]),_:1}))}}),Xg=Me({__name:"ContentForm",setup(e){const{getField:a}=ft(),t=ca(()=>a("source")&&a("contentType")||a("source")==="manual"),n=ca(()=>a("source")==="manual"),o=ca(()=>a("source")==="auto");return(i,r)=>(W(),We(Pf,null,{default:Pe(()=>[xe($h),t.value?(W(),te(Te,{key:0},[n.value?(W(),We(Fg,{key:0})):Ve("",!0),o.value?(W(),We(Vg,{key:1})):Ve("",!0),xe(Qg)],64)):Ve("",!0)]),_:1}))}}),Jg={key:0,class:"tide-collection"},Zg=Me({__name:"App",props:{index:{},form:{},config:{},baseUrl:{},update:{type:Function}},setup(e){const a=e,t=Ta(!1),{form:n}=ft(a.index,{form:a.form,config:a.config});return Ht(()=>{Th(a.baseUrl),t.value=!0}),ut(n,o=>{a.update(o)},{deep:!0}),(o,i)=>t.value?(W(),te("div",Jg,[xe(Xg)])):Ve("",!0)}});function ex(e,a={}){kf(Zg,a).mount(e)}(e=>{Drupal.behaviors.contentCollection={attach:function(a){once("content-collection-init",".content-collection-app",a).forEach(function(t){const n=t.closest(".field--type-tide-content-collection-ui"),o=t.getAttribute("data-index")||"0",i=t.getAttribute("data-config")||"{}",r=n?.querySelector(`#content-collection-value-${o}`);r&&ex(t,{index:o,form:uu(r.value),config:uu(i),update:s=>r.value=$g(s),baseUrl:"http://content-sdp.docker.internal/"})})}}})(jQuery)})(); diff --git a/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js.map b/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js.map deleted file mode 100644 index 90c1fcf70..000000000 --- a/modules/tide_api/modules/tide_content_collection_ui/app/dist/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.js","sources":["../node_modules/@dpc-sdp/tide-content-collection-ui/dist/main.js","../src/index.js"],"sourcesContent":["var bl = {};\n/**\n* @vue/shared v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction ni(e) {\n const t = /* @__PURE__ */ Object.create(null);\n for (const i of e.split(\",\")) t[i] = 1;\n return (i) => i in t;\n}\nconst he = bl.NODE_ENV !== \"production\" ? Object.freeze({}) : {}, Zi = bl.NODE_ENV !== \"production\" ? Object.freeze([]) : [], Ue = () => {\n}, wu = () => !1, Fn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter\n(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), ga = (e) => e.startsWith(\"onUpdate:\"), qe = Object.assign, zr = (e, t) => {\n const i = e.indexOf(t);\n i > -1 && e.splice(i, 1);\n}, _u = Object.prototype.hasOwnProperty, ue = (e, t) => _u.call(e, t), Y = Array.isArray, Ci = (e) => $a(e) === \"[object Map]\", yl = (e) => $a(e) === \"[object Set]\", Q = (e) => typeof e == \"function\", je = (e) => typeof e == \"string\", ai = (e) => typeof e == \"symbol\", we = (e) => e !== null && typeof e == \"object\", Ur = (e) => (we(e) || Q(e)) && Q(e.then) && Q(e.catch), wl = Object.prototype.toString, $a = (e) => wl.call(e), Br = (e) => $a(e).slice(8, -1), _l = (e) => $a(e) === \"[object Object]\", Hr = (e) => je(e) && e !== \"NaN\" && e[0] !== \"-\" && \"\" + parseInt(e, 10) === e, yn = /* @__PURE__ */ ni(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n), Eu = /* @__PURE__ */ ni(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n), Ia = (e) => {\n const t = /* @__PURE__ */ Object.create(null);\n return (i) => t[i] || (t[i] = e(i));\n}, Su = /-(\\w)/g, at = Ia(\n (e) => e.replace(Su, (t, i) => i ? i.toUpperCase() : \"\")\n), Ou = /\\B([A-Z])/g, ei = Ia(\n (e) => e.replace(Ou, \"-$1\").toLowerCase()\n), Mi = Ia((e) => e.charAt(0).toUpperCase() + e.slice(1)), Ti = Ia(\n (e) => e ? `on${Mi(e)}` : \"\"\n), vi = (e, t) => !Object.is(e, t), Gi = (e, ...t) => {\n for (let i = 0; i < e.length; i++)\n e[i](...t);\n}, An = (e, t, i, n = !1) => {\n Object.defineProperty(e, t, {\n configurable: !0,\n enumerable: !1,\n writable: n,\n value: i\n });\n}, wr = (e) => {\n const t = parseFloat(e);\n return isNaN(t) ? e : t;\n};\nlet Ns;\nconst Mn = () => Ns || (Ns = typeof globalThis < \"u\" ? globalThis : typeof self < \"u\" ? self : typeof window < \"u\" ? window : typeof global < \"u\" ? global : {});\nfunction Wr(e) {\n if (Y(e)) {\n const t = {};\n for (let i = 0; i < e.length; i++) {\n const n = e[i], a = je(n) ? ju(n) : Wr(n);\n if (a)\n for (const o in a)\n t[o] = a[o];\n }\n return t;\n } else if (je(e) || we(e))\n return e;\n}\nconst Nu = /;(?![^(]*\\))/g, Du = /:([^]+)/, Tu = /\\/\\*[^]*?\\*\\//g;\nfunction ju(e) {\n const t = {};\n return e.replace(Tu, \"\").split(Nu).forEach((i) => {\n if (i) {\n const n = i.split(Du);\n n.length > 1 && (t[n[0].trim()] = n[1].trim());\n }\n }), t;\n}\nfunction Nt(e) {\n let t = \"\";\n if (je(e))\n t = e;\n else if (Y(e))\n for (let i = 0; i < e.length; i++) {\n const n = Nt(e[i]);\n n && (t += n + \" \");\n }\n else if (we(e))\n for (const i in e)\n e[i] && (t += i + \" \");\n return t.trim();\n}\nconst ku = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\", Au = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\", Cu = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\", $u = /* @__PURE__ */ ni(ku), Iu = /* @__PURE__ */ ni(Au), Pu = /* @__PURE__ */ ni(Cu), Ru = \"itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly\", Fu = /* @__PURE__ */ ni(Ru);\nfunction El(e) {\n return !!e || e === \"\";\n}\nconst Sl = (e) => !!(e && e.__v_isRef === !0), ut = (e) => je(e) ? e : e == null ? \"\" : Y(e) || we(e) && (e.toString === wl || !Q(e.toString)) ? Sl(e) ? ut(e.value) : JSON.stringify(e, Ol, 2) : String(e), Ol = (e, t) => Sl(t) ? Ol(e, t.value) : Ci(t) ? {\n [`Map(${t.size})`]: [...t.entries()].reduce(\n (i, [n, a], o) => (i[no(n, o) + \" =>\"] = a, i),\n {}\n )\n} : yl(t) ? {\n [`Set(${t.size})`]: [...t.values()].map((i) => no(i))\n} : ai(t) ? no(t) : we(t) && !Y(t) && !_l(t) ? String(t) : t, no = (e, t = \"\") => {\n var i;\n return (\n // Symbol.description in es2019+ so we need to cast here to pass\n // the lib: es2016 check\n ai(e) ? `Symbol(${(i = e.description) != null ? i : t})` : e\n );\n};\nvar _e = {};\nfunction It(e, ...t) {\n console.warn(`[Vue warn] ${e}`, ...t);\n}\nlet et;\nclass Mu {\n constructor(t = !1) {\n this.detached = t, this._active = !0, this._on = 0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.parent = et, !t && et && (this.index = (et.scopes || (et.scopes = [])).push(\n this\n ) - 1);\n }\n get active() {\n return this._active;\n }\n pause() {\n if (this._active) {\n this._isPaused = !0;\n let t, i;\n if (this.scopes)\n for (t = 0, i = this.scopes.length; t < i; t++)\n this.scopes[t].pause();\n for (t = 0, i = this.effects.length; t < i; t++)\n this.effects[t].pause();\n }\n }\n /**\n * Resumes the effect scope, including all child scopes and effects.\n */\n resume() {\n if (this._active && this._isPaused) {\n this._isPaused = !1;\n let t, i;\n if (this.scopes)\n for (t = 0, i = this.scopes.length; t < i; t++)\n this.scopes[t].resume();\n for (t = 0, i = this.effects.length; t < i; t++)\n this.effects[t].resume();\n }\n }\n run(t) {\n if (this._active) {\n const i = et;\n try {\n return et = this, t();\n } finally {\n et = i;\n }\n } else _e.NODE_ENV !== \"production\" && It(\"cannot run an inactive effect scope.\");\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n ++this._on === 1 && (this.prevScope = et, et = this);\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n this._on > 0 && --this._on === 0 && (et = this.prevScope, this.prevScope = void 0);\n }\n stop(t) {\n if (this._active) {\n this._active = !1;\n let i, n;\n for (i = 0, n = this.effects.length; i < n; i++)\n this.effects[i].stop();\n for (this.effects.length = 0, i = 0, n = this.cleanups.length; i < n; i++)\n this.cleanups[i]();\n if (this.cleanups.length = 0, this.scopes) {\n for (i = 0, n = this.scopes.length; i < n; i++)\n this.scopes[i].stop(!0);\n this.scopes.length = 0;\n }\n if (!this.detached && this.parent && !t) {\n const a = this.parent.scopes.pop();\n a && a !== this && (this.parent.scopes[this.index] = a, a.index = this.index);\n }\n this.parent = void 0;\n }\n }\n}\nfunction Nl() {\n return et;\n}\nfunction Vu(e, t = !1) {\n et ? et.cleanups.push(e) : _e.NODE_ENV !== \"production\" && !t && It(\n \"onScopeDispose() is called when there is no active effect scope to be associated with.\"\n );\n}\nlet ve;\nconst ao = /* @__PURE__ */ new WeakSet();\nclass Dl {\n constructor(t) {\n this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, et && et.active && et.effects.push(this);\n }\n pause() {\n this.flags |= 64;\n }\n resume() {\n this.flags & 64 && (this.flags &= -65, ao.has(this) && (ao.delete(this), this.trigger()));\n }\n /**\n * @internal\n */\n notify() {\n this.flags & 2 && !(this.flags & 32) || this.flags & 8 || jl(this);\n }\n run() {\n if (!(this.flags & 1))\n return this.fn();\n this.flags |= 2, Ds(this), kl(this);\n const t = ve, i = Ct;\n ve = this, Ct = !0;\n try {\n return this.fn();\n } finally {\n _e.NODE_ENV !== \"production\" && ve !== this && It(\n \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n ), Al(this), ve = t, Ct = i, this.flags &= -3;\n }\n }\n stop() {\n if (this.flags & 1) {\n for (let t = this.deps; t; t = t.nextDep)\n Yr(t);\n this.deps = this.depsTail = void 0, Ds(this), this.onStop && this.onStop(), this.flags &= -2;\n }\n }\n trigger() {\n this.flags & 64 ? ao.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();\n }\n /**\n * @internal\n */\n runIfDirty() {\n _r(this) && this.run();\n }\n get dirty() {\n return _r(this);\n }\n}\nlet Tl = 0, wn, _n;\nfunction jl(e, t = !1) {\n if (e.flags |= 8, t) {\n e.next = _n, _n = e;\n return;\n }\n e.next = wn, wn = e;\n}\nfunction Kr() {\n Tl++;\n}\nfunction Gr() {\n if (--Tl > 0)\n return;\n if (_n) {\n let t = _n;\n for (_n = void 0; t; ) {\n const i = t.next;\n t.next = void 0, t.flags &= -9, t = i;\n }\n }\n let e;\n for (; wn; ) {\n let t = wn;\n for (wn = void 0; t; ) {\n const i = t.next;\n if (t.next = void 0, t.flags &= -9, t.flags & 1)\n try {\n t.trigger();\n } catch (n) {\n e || (e = n);\n }\n t = i;\n }\n }\n if (e) throw e;\n}\nfunction kl(e) {\n for (let t = e.deps; t; t = t.nextDep)\n t.version = -1, t.prevActiveLink = t.dep.activeLink, t.dep.activeLink = t;\n}\nfunction Al(e) {\n let t, i = e.depsTail, n = i;\n for (; n; ) {\n const a = n.prevDep;\n n.version === -1 ? (n === i && (i = a), Yr(n), qu(n)) : t = n, n.dep.activeLink = n.prevActiveLink, n.prevActiveLink = void 0, n = a;\n }\n e.deps = t, e.depsTail = i;\n}\nfunction _r(e) {\n for (let t = e.deps; t; t = t.nextDep)\n if (t.dep.version !== t.version || t.dep.computed && (Cl(t.dep.computed) || t.dep.version !== t.version))\n return !0;\n return !!e._dirty;\n}\nfunction Cl(e) {\n if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === Cn) || (e.globalVersion = Cn, !e.isSSR && e.flags & 128 && (!e.deps && !e._dirty || !_r(e))))\n return;\n e.flags |= 2;\n const t = e.dep, i = ve, n = Ct;\n ve = e, Ct = !0;\n try {\n kl(e);\n const a = e.fn(e._value);\n (t.version === 0 || vi(a, e._value)) && (e.flags |= 128, e._value = a, t.version++);\n } catch (a) {\n throw t.version++, a;\n } finally {\n ve = i, Ct = n, Al(e), e.flags &= -3;\n }\n}\nfunction Yr(e, t = !1) {\n const { dep: i, prevSub: n, nextSub: a } = e;\n if (n && (n.nextSub = a, e.prevSub = void 0), a && (a.prevSub = n, e.nextSub = void 0), _e.NODE_ENV !== \"production\" && i.subsHead === e && (i.subsHead = a), i.subs === e && (i.subs = n, !n && i.computed)) {\n i.computed.flags &= -5;\n for (let o = i.computed.deps; o; o = o.nextDep)\n Yr(o, !0);\n }\n !t && !--i.sc && i.map && i.map.delete(i.key);\n}\nfunction qu(e) {\n const { prevDep: t, nextDep: i } = e;\n t && (t.nextDep = i, e.prevDep = void 0), i && (i.prevDep = t, e.nextDep = void 0);\n}\nlet Ct = !0;\nconst $l = [];\nfunction Pt() {\n $l.push(Ct), Ct = !1;\n}\nfunction Rt() {\n const e = $l.pop();\n Ct = e === void 0 ? !0 : e;\n}\nfunction Ds(e) {\n const { cleanup: t } = e;\n if (e.cleanup = void 0, t) {\n const i = ve;\n ve = void 0;\n try {\n t();\n } finally {\n ve = i;\n }\n }\n}\nlet Cn = 0;\nclass Lu {\n constructor(t, i) {\n this.sub = t, this.dep = i, this.version = i.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n }\n}\nclass Qr {\n // TODO isolatedDeclarations \"__v_skip\"\n constructor(t) {\n this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, this.__v_skip = !0, _e.NODE_ENV !== \"production\" && (this.subsHead = void 0);\n }\n track(t) {\n if (!ve || !Ct || ve === this.computed)\n return;\n let i = this.activeLink;\n if (i === void 0 || i.sub !== ve)\n i = this.activeLink = new Lu(ve, this), ve.deps ? (i.prevDep = ve.depsTail, ve.depsTail.nextDep = i, ve.depsTail = i) : ve.deps = ve.depsTail = i, Il(i);\n else if (i.version === -1 && (i.version = this.version, i.nextDep)) {\n const n = i.nextDep;\n n.prevDep = i.prevDep, i.prevDep && (i.prevDep.nextDep = n), i.prevDep = ve.depsTail, i.nextDep = void 0, ve.depsTail.nextDep = i, ve.depsTail = i, ve.deps === i && (ve.deps = n);\n }\n return _e.NODE_ENV !== \"production\" && ve.onTrack && ve.onTrack(\n qe(\n {\n effect: ve\n },\n t\n )\n ), i;\n }\n trigger(t) {\n this.version++, Cn++, this.notify(t);\n }\n notify(t) {\n Kr();\n try {\n if (_e.NODE_ENV !== \"production\")\n for (let i = this.subsHead; i; i = i.nextSub)\n i.sub.onTrigger && !(i.sub.flags & 8) && i.sub.onTrigger(\n qe(\n {\n effect: i.sub\n },\n t\n )\n );\n for (let i = this.subs; i; i = i.prevSub)\n i.sub.notify() && i.sub.dep.notify();\n } finally {\n Gr();\n }\n }\n}\nfunction Il(e) {\n if (e.dep.sc++, e.sub.flags & 4) {\n const t = e.dep.computed;\n if (t && !e.dep.subs) {\n t.flags |= 20;\n for (let n = t.deps; n; n = n.nextDep)\n Il(n);\n }\n const i = e.dep.subs;\n i !== e && (e.prevSub = i, i && (i.nextSub = e)), _e.NODE_ENV !== \"production\" && e.dep.subsHead === void 0 && (e.dep.subsHead = e), e.dep.subs = e;\n }\n}\nconst Er = /* @__PURE__ */ new WeakMap(), $i = Symbol(\n _e.NODE_ENV !== \"production\" ? \"Object iterate\" : \"\"\n), Sr = Symbol(\n _e.NODE_ENV !== \"production\" ? \"Map keys iterate\" : \"\"\n), $n = Symbol(\n _e.NODE_ENV !== \"production\" ? \"Array iterate\" : \"\"\n);\nfunction ze(e, t, i) {\n if (Ct && ve) {\n let n = Er.get(e);\n n || Er.set(e, n = /* @__PURE__ */ new Map());\n let a = n.get(i);\n a || (n.set(i, a = new Qr()), a.map = n, a.key = i), _e.NODE_ENV !== \"production\" ? a.track({\n target: e,\n type: t,\n key: i\n }) : a.track();\n }\n}\nfunction Vt(e, t, i, n, a, o) {\n const r = Er.get(e);\n if (!r) {\n Cn++;\n return;\n }\n const s = (c) => {\n c && (_e.NODE_ENV !== \"production\" ? c.trigger({\n target: e,\n type: t,\n key: i,\n newValue: n,\n oldValue: a,\n oldTarget: o\n }) : c.trigger());\n };\n if (Kr(), t === \"clear\")\n r.forEach(s);\n else {\n const c = Y(e), l = c && Hr(i);\n if (c && i === \"length\") {\n const p = Number(n);\n r.forEach((u, m) => {\n (m === \"length\" || m === $n || !ai(m) && m >= p) && s(u);\n });\n } else\n switch ((i !== void 0 || r.has(void 0)) && s(r.get(i)), l && s(r.get($n)), t) {\n case \"add\":\n c ? l && s(r.get(\"length\")) : (s(r.get($i)), Ci(e) && s(r.get(Sr)));\n break;\n case \"delete\":\n c || (s(r.get($i)), Ci(e) && s(r.get(Sr)));\n break;\n case \"set\":\n Ci(e) && s(r.get($i));\n break;\n }\n }\n Gr();\n}\nfunction zi(e) {\n const t = ne(e);\n return t === e ? t : (ze(t, \"iterate\", $n), ot(e) ? t : t.map(Xe));\n}\nfunction Pa(e) {\n return ze(e = ne(e), \"iterate\", $n), e;\n}\nconst zu = {\n __proto__: null,\n [Symbol.iterator]() {\n return oo(this, Symbol.iterator, Xe);\n },\n concat(...e) {\n return zi(this).concat(\n ...e.map((t) => Y(t) ? zi(t) : t)\n );\n },\n entries() {\n return oo(this, \"entries\", (e) => (e[1] = Xe(e[1]), e));\n },\n every(e, t) {\n return Gt(this, \"every\", e, t, void 0, arguments);\n },\n filter(e, t) {\n return Gt(this, \"filter\", e, t, (i) => i.map(Xe), arguments);\n },\n find(e, t) {\n return Gt(this, \"find\", e, t, Xe, arguments);\n },\n findIndex(e, t) {\n return Gt(this, \"findIndex\", e, t, void 0, arguments);\n },\n findLast(e, t) {\n return Gt(this, \"findLast\", e, t, Xe, arguments);\n },\n findLastIndex(e, t) {\n return Gt(this, \"findLastIndex\", e, t, void 0, arguments);\n },\n // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n forEach(e, t) {\n return Gt(this, \"forEach\", e, t, void 0, arguments);\n },\n includes(...e) {\n return ro(this, \"includes\", e);\n },\n indexOf(...e) {\n return ro(this, \"indexOf\", e);\n },\n join(e) {\n return zi(this).join(e);\n },\n // keys() iterator only reads `length`, no optimisation required\n lastIndexOf(...e) {\n return ro(this, \"lastIndexOf\", e);\n },\n map(e, t) {\n return Gt(this, \"map\", e, t, void 0, arguments);\n },\n pop() {\n return un(this, \"pop\");\n },\n push(...e) {\n return un(this, \"push\", e);\n },\n reduce(e, ...t) {\n return Ts(this, \"reduce\", e, t);\n },\n reduceRight(e, ...t) {\n return Ts(this, \"reduceRight\", e, t);\n },\n shift() {\n return un(this, \"shift\");\n },\n // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n some(e, t) {\n return Gt(this, \"some\", e, t, void 0, arguments);\n },\n splice(...e) {\n return un(this, \"splice\", e);\n },\n toReversed() {\n return zi(this).toReversed();\n },\n toSorted(e) {\n return zi(this).toSorted(e);\n },\n toSpliced(...e) {\n return zi(this).toSpliced(...e);\n },\n unshift(...e) {\n return un(this, \"unshift\", e);\n },\n values() {\n return oo(this, \"values\", Xe);\n }\n};\nfunction oo(e, t, i) {\n const n = Pa(e), a = n[t]();\n return n !== e && !ot(e) && (a._next = a.next, a.next = () => {\n const o = a._next();\n return o.value && (o.value = i(o.value)), o;\n }), a;\n}\nconst Uu = Array.prototype;\nfunction Gt(e, t, i, n, a, o) {\n const r = Pa(e), s = r !== e && !ot(e), c = r[t];\n if (c !== Uu[t]) {\n const u = c.apply(e, o);\n return s ? Xe(u) : u;\n }\n let l = i;\n r !== e && (s ? l = function(u, m) {\n return i.call(this, Xe(u), m, e);\n } : i.length > 2 && (l = function(u, m) {\n return i.call(this, u, m, e);\n }));\n const p = c.call(r, l, n);\n return s && a ? a(p) : p;\n}\nfunction Ts(e, t, i, n) {\n const a = Pa(e);\n let o = i;\n return a !== e && (ot(e) ? i.length > 3 && (o = function(r, s, c) {\n return i.call(this, r, s, c, e);\n }) : o = function(r, s, c) {\n return i.call(this, r, Xe(s), c, e);\n }), a[t](o, ...n);\n}\nfunction ro(e, t, i) {\n const n = ne(e);\n ze(n, \"iterate\", $n);\n const a = n[t](...i);\n return (a === -1 || a === !1) && xa(i[0]) ? (i[0] = ne(i[0]), n[t](...i)) : a;\n}\nfunction un(e, t, i = []) {\n Pt(), Kr();\n const n = ne(e)[t].apply(e, i);\n return Gr(), Rt(), n;\n}\nconst Bu = /* @__PURE__ */ ni(\"__proto__,__v_isRef,__isVue\"), Pl = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== \"arguments\" && e !== \"caller\").map((e) => Symbol[e]).filter(ai)\n);\nfunction Hu(e) {\n ai(e) || (e = String(e));\n const t = ne(this);\n return ze(t, \"has\", e), t.hasOwnProperty(e);\n}\nclass Rl {\n constructor(t = !1, i = !1) {\n this._isReadonly = t, this._isShallow = i;\n }\n get(t, i, n) {\n if (i === \"__v_skip\") return t.__v_skip;\n const a = this._isReadonly, o = this._isShallow;\n if (i === \"__v_isReactive\")\n return !a;\n if (i === \"__v_isReadonly\")\n return a;\n if (i === \"__v_isShallow\")\n return o;\n if (i === \"__v_raw\")\n return n === (a ? o ? zl : Ll : o ? ql : Vl).get(t) || // receiver is not the reactive proxy, but has the same prototype\n // this means the receiver is a user proxy of the reactive proxy\n Object.getPrototypeOf(t) === Object.getPrototypeOf(n) ? t : void 0;\n const r = Y(t);\n if (!a) {\n let c;\n if (r && (c = zu[i]))\n return c;\n if (i === \"hasOwnProperty\")\n return Hu;\n }\n const s = Reflect.get(\n t,\n i,\n // if this is a proxy wrapping a ref, return methods using the raw ref\n // as receiver so that we don't have to call `toRaw` on the ref in all\n // its class methods\n Re(t) ? t : n\n );\n return (ai(i) ? Pl.has(i) : Bu(i)) || (a || ze(t, \"get\", i), o) ? s : Re(s) ? r && Hr(i) ? s : s.value : we(s) ? a ? Xr(s) : Fa(s) : s;\n }\n}\nclass Fl extends Rl {\n constructor(t = !1) {\n super(!1, t);\n }\n set(t, i, n, a) {\n let o = t[i];\n if (!this._isShallow) {\n const c = Bt(o);\n if (!ot(n) && !Bt(n) && (o = ne(o), n = ne(n)), !Y(t) && Re(o) && !Re(n))\n return c ? !1 : (o.value = n, !0);\n }\n const r = Y(t) && Hr(i) ? Number(i) < t.length : ue(t, i), s = Reflect.set(\n t,\n i,\n n,\n Re(t) ? t : a\n );\n return t === ne(a) && (r ? vi(n, o) && Vt(t, \"set\", i, n, o) : Vt(t, \"add\", i, n)), s;\n }\n deleteProperty(t, i) {\n const n = ue(t, i), a = t[i], o = Reflect.deleteProperty(t, i);\n return o && n && Vt(t, \"delete\", i, void 0, a), o;\n }\n has(t, i) {\n const n = Reflect.has(t, i);\n return (!ai(i) || !Pl.has(i)) && ze(t, \"has\", i), n;\n }\n ownKeys(t) {\n return ze(\n t,\n \"iterate\",\n Y(t) ? \"length\" : $i\n ), Reflect.ownKeys(t);\n }\n}\nclass Ml extends Rl {\n constructor(t = !1) {\n super(!0, t);\n }\n set(t, i) {\n return _e.NODE_ENV !== \"production\" && It(\n `Set operation on key \"${String(i)}\" failed: target is readonly.`,\n t\n ), !0;\n }\n deleteProperty(t, i) {\n return _e.NODE_ENV !== \"production\" && It(\n `Delete operation on key \"${String(i)}\" failed: target is readonly.`,\n t\n ), !0;\n }\n}\nconst Wu = /* @__PURE__ */ new Fl(), Ku = /* @__PURE__ */ new Ml(), Gu = /* @__PURE__ */ new Fl(!0), Yu = /* @__PURE__ */ new Ml(!0), Or = (e) => e, Yn = (e) => Reflect.getPrototypeOf(e);\nfunction Qu(e, t, i) {\n return function(...n) {\n const a = this.__v_raw, o = ne(a), r = Ci(o), s = e === \"entries\" || e === Symbol.iterator && r, c = e === \"keys\" && r, l = a[e](...n), p = i ? Or : t ? ba : Xe;\n return !t && ze(\n o,\n \"iterate\",\n c ? Sr : $i\n ), {\n // iterator protocol\n next() {\n const { value: u, done: m } = l.next();\n return m ? { value: u, done: m } : {\n value: s ? [p(u[0]), p(u[1])] : p(u),\n done: m\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction Qn(e) {\n return function(...t) {\n if (_e.NODE_ENV !== \"production\") {\n const i = t[0] ? `on key \"${t[0]}\" ` : \"\";\n It(\n `${Mi(e)} operation ${i}failed: target is readonly.`,\n ne(this)\n );\n }\n return e === \"delete\" ? !1 : e === \"clear\" ? void 0 : this;\n };\n}\nfunction Xu(e, t) {\n const i = {\n get(a) {\n const o = this.__v_raw, r = ne(o), s = ne(a);\n e || (vi(a, s) && ze(r, \"get\", a), ze(r, \"get\", s));\n const { has: c } = Yn(r), l = t ? Or : e ? ba : Xe;\n if (c.call(r, a))\n return l(o.get(a));\n if (c.call(r, s))\n return l(o.get(s));\n o !== r && o.get(a);\n },\n get size() {\n const a = this.__v_raw;\n return !e && ze(ne(a), \"iterate\", $i), Reflect.get(a, \"size\", a);\n },\n has(a) {\n const o = this.__v_raw, r = ne(o), s = ne(a);\n return e || (vi(a, s) && ze(r, \"has\", a), ze(r, \"has\", s)), a === s ? o.has(a) : o.has(a) || o.has(s);\n },\n forEach(a, o) {\n const r = this, s = r.__v_raw, c = ne(s), l = t ? Or : e ? ba : Xe;\n return !e && ze(c, \"iterate\", $i), s.forEach((p, u) => a.call(o, l(p), l(u), r));\n }\n };\n return qe(\n i,\n e ? {\n add: Qn(\"add\"),\n set: Qn(\"set\"),\n delete: Qn(\"delete\"),\n clear: Qn(\"clear\")\n } : {\n add(a) {\n !t && !ot(a) && !Bt(a) && (a = ne(a));\n const o = ne(this);\n return Yn(o).has.call(o, a) || (o.add(a), Vt(o, \"add\", a, a)), this;\n },\n set(a, o) {\n !t && !ot(o) && !Bt(o) && (o = ne(o));\n const r = ne(this), { has: s, get: c } = Yn(r);\n let l = s.call(r, a);\n l ? _e.NODE_ENV !== \"production\" && js(r, s, a) : (a = ne(a), l = s.call(r, a));\n const p = c.call(r, a);\n return r.set(a, o), l ? vi(o, p) && Vt(r, \"set\", a, o, p) : Vt(r, \"add\", a, o), this;\n },\n delete(a) {\n const o = ne(this), { has: r, get: s } = Yn(o);\n let c = r.call(o, a);\n c ? _e.NODE_ENV !== \"production\" && js(o, r, a) : (a = ne(a), c = r.call(o, a));\n const l = s ? s.call(o, a) : void 0, p = o.delete(a);\n return c && Vt(o, \"delete\", a, void 0, l), p;\n },\n clear() {\n const a = ne(this), o = a.size !== 0, r = _e.NODE_ENV !== \"production\" ? Ci(a) ? new Map(a) : new Set(a) : void 0, s = a.clear();\n return o && Vt(\n a,\n \"clear\",\n void 0,\n void 0,\n r\n ), s;\n }\n }\n ), [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ].forEach((a) => {\n i[a] = Qu(a, e, t);\n }), i;\n}\nfunction Ra(e, t) {\n const i = Xu(e, t);\n return (n, a, o) => a === \"__v_isReactive\" ? !e : a === \"__v_isReadonly\" ? e : a === \"__v_raw\" ? n : Reflect.get(\n ue(i, a) && a in n ? i : n,\n a,\n o\n );\n}\nconst Ju = {\n get: /* @__PURE__ */ Ra(!1, !1)\n}, Zu = {\n get: /* @__PURE__ */ Ra(!1, !0)\n}, ed = {\n get: /* @__PURE__ */ Ra(!0, !1)\n}, td = {\n get: /* @__PURE__ */ Ra(!0, !0)\n};\nfunction js(e, t, i) {\n const n = ne(i);\n if (n !== i && t.call(e, n)) {\n const a = Br(e);\n It(\n `Reactive ${a} contains both the raw and reactive versions of the same object${a === \"Map\" ? \" as keys\" : \"\"}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\nconst Vl = /* @__PURE__ */ new WeakMap(), ql = /* @__PURE__ */ new WeakMap(), Ll = /* @__PURE__ */ new WeakMap(), zl = /* @__PURE__ */ new WeakMap();\nfunction id(e) {\n switch (e) {\n case \"Object\":\n case \"Array\":\n return 1;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2;\n default:\n return 0;\n }\n}\nfunction nd(e) {\n return e.__v_skip || !Object.isExtensible(e) ? 0 : id(Br(e));\n}\nfunction Fa(e) {\n return Bt(e) ? e : Ma(\n e,\n !1,\n Wu,\n Ju,\n Vl\n );\n}\nfunction ad(e) {\n return Ma(\n e,\n !1,\n Gu,\n Zu,\n ql\n );\n}\nfunction Xr(e) {\n return Ma(\n e,\n !0,\n Ku,\n ed,\n Ll\n );\n}\nfunction Lt(e) {\n return Ma(\n e,\n !0,\n Yu,\n td,\n zl\n );\n}\nfunction Ma(e, t, i, n, a) {\n if (!we(e))\n return _e.NODE_ENV !== \"production\" && It(\n `value cannot be made ${t ? \"readonly\" : \"reactive\"}: ${String(\n e\n )}`\n ), e;\n if (e.__v_raw && !(t && e.__v_isReactive))\n return e;\n const o = nd(e);\n if (o === 0)\n return e;\n const r = a.get(e);\n if (r)\n return r;\n const s = new Proxy(\n e,\n o === 2 ? n : i\n );\n return a.set(e, s), s;\n}\nfunction Ii(e) {\n return Bt(e) ? Ii(e.__v_raw) : !!(e && e.__v_isReactive);\n}\nfunction Bt(e) {\n return !!(e && e.__v_isReadonly);\n}\nfunction ot(e) {\n return !!(e && e.__v_isShallow);\n}\nfunction xa(e) {\n return e ? !!e.__v_raw : !1;\n}\nfunction ne(e) {\n const t = e && e.__v_raw;\n return t ? ne(t) : e;\n}\nfunction od(e) {\n return !ue(e, \"__v_skip\") && Object.isExtensible(e) && An(e, \"__v_skip\", !0), e;\n}\nconst Xe = (e) => we(e) ? Fa(e) : e, ba = (e) => we(e) ? Xr(e) : e;\nfunction Re(e) {\n return e ? e.__v_isRef === !0 : !1;\n}\nfunction $t(e) {\n return Bl(e, !1);\n}\nfunction Ul(e) {\n return Bl(e, !0);\n}\nfunction Bl(e, t) {\n return Re(e) ? e : new rd(e, t);\n}\nclass rd {\n constructor(t, i) {\n this.dep = new Qr(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = i ? t : ne(t), this._value = i ? t : Xe(t), this.__v_isShallow = i;\n }\n get value() {\n return _e.NODE_ENV !== \"production\" ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track(), this._value;\n }\n set value(t) {\n const i = this._rawValue, n = this.__v_isShallow || ot(t) || Bt(t);\n t = n ? t : ne(t), vi(t, i) && (this._rawValue = t, this._value = n ? t : Xe(t), _e.NODE_ENV !== \"production\" ? this.dep.trigger({\n target: this,\n type: \"set\",\n key: \"value\",\n newValue: t,\n oldValue: i\n }) : this.dep.trigger());\n }\n}\nfunction Pi(e) {\n return Re(e) ? e.value : e;\n}\nfunction Nr(e) {\n return Q(e) ? e() : Pi(e);\n}\nconst sd = {\n get: (e, t, i) => t === \"__v_raw\" ? e : Pi(Reflect.get(e, t, i)),\n set: (e, t, i, n) => {\n const a = e[t];\n return Re(a) && !Re(i) ? (a.value = i, !0) : Reflect.set(e, t, i, n);\n }\n};\nfunction Hl(e) {\n return Ii(e) ? e : new Proxy(e, sd);\n}\nclass cd {\n constructor(t, i, n) {\n this.fn = t, this.setter = i, this._value = void 0, this.dep = new Qr(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = Cn - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !i, this.isSSR = n;\n }\n /**\n * @internal\n */\n notify() {\n if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion\n ve !== this)\n return jl(this, !0), !0;\n }\n get value() {\n const t = _e.NODE_ENV !== \"production\" ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track();\n return Cl(this), t && (t.version = this.dep.version), this._value;\n }\n set value(t) {\n this.setter ? this.setter(t) : _e.NODE_ENV !== \"production\" && It(\"Write operation failed: computed value is readonly\");\n }\n}\nfunction ld(e, t, i = !1) {\n let n, a;\n return Q(e) ? n = e : (n = e.get, a = e.set), new cd(n, a, i);\n}\nconst Xn = {}, ya = /* @__PURE__ */ new WeakMap();\nlet ji;\nfunction pd(e, t = !1, i = ji) {\n if (i) {\n let n = ya.get(i);\n n || ya.set(i, n = []), n.push(e);\n } else _e.NODE_ENV !== \"production\" && !t && It(\n \"onWatcherCleanup() was called when there was no active watcher to associate with.\"\n );\n}\nfunction ud(e, t, i = he) {\n const { immediate: n, deep: a, once: o, scheduler: r, augmentJob: s, call: c } = i, l = (O) => {\n (i.onWarn || It)(\n \"Invalid watch source: \",\n O,\n \"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.\"\n );\n }, p = (O) => a ? O : ot(O) || a === !1 || a === 0 ? Xt(O, 1) : Xt(O);\n let u, m, d, h, w = !1, b = !1;\n if (Re(e) ? (m = () => e.value, w = ot(e)) : Ii(e) ? (m = () => p(e), w = !0) : Y(e) ? (b = !0, w = e.some((O) => Ii(O) || ot(O)), m = () => e.map((O) => {\n if (Re(O))\n return O.value;\n if (Ii(O))\n return p(O);\n if (Q(O))\n return c ? c(O, 2) : O();\n _e.NODE_ENV !== \"production\" && l(O);\n })) : Q(e) ? t ? m = c ? () => c(e, 2) : e : m = () => {\n if (d) {\n Pt();\n try {\n d();\n } finally {\n Rt();\n }\n }\n const O = ji;\n ji = u;\n try {\n return c ? c(e, 3, [h]) : e(h);\n } finally {\n ji = O;\n }\n } : (m = Ue, _e.NODE_ENV !== \"production\" && l(e)), t && a) {\n const O = m, P = a === !0 ? 1 / 0 : a;\n m = () => Xt(O(), P);\n }\n const x = Nl(), _ = () => {\n u.stop(), x && x.active && zr(x.effects, u);\n };\n if (o && t) {\n const O = t;\n t = (...P) => {\n O(...P), _();\n };\n }\n let T = b ? new Array(e.length).fill(Xn) : Xn;\n const j = (O) => {\n if (!(!(u.flags & 1) || !u.dirty && !O))\n if (t) {\n const P = u.run();\n if (a || w || (b ? P.some((L, U) => vi(L, T[U])) : vi(P, T))) {\n d && d();\n const L = ji;\n ji = u;\n try {\n const U = [\n P,\n // pass undefined as the old value when it's changed for the first time\n T === Xn ? void 0 : b && T[0] === Xn ? [] : T,\n h\n ];\n T = P, c ? c(t, 3, U) : (\n // @ts-expect-error\n t(...U)\n );\n } finally {\n ji = L;\n }\n }\n } else\n u.run();\n };\n return s && s(j), u = new Dl(m), u.scheduler = r ? () => r(j, !1) : j, h = (O) => pd(O, !1, u), d = u.onStop = () => {\n const O = ya.get(u);\n if (O) {\n if (c)\n c(O, 4);\n else\n for (const P of O) P();\n ya.delete(u);\n }\n }, _e.NODE_ENV !== \"production\" && (u.onTrack = i.onTrack, u.onTrigger = i.onTrigger), t ? n ? j(!0) : T = u.run() : r ? r(j.bind(null, !0), !0) : u.run(), _.pause = u.pause.bind(u), _.resume = u.resume.bind(u), _.stop = _, _;\n}\nfunction Xt(e, t = 1 / 0, i) {\n if (t <= 0 || !we(e) || e.__v_skip || (i = i || /* @__PURE__ */ new Set(), i.has(e)))\n return e;\n if (i.add(e), t--, Re(e))\n Xt(e.value, t, i);\n else if (Y(e))\n for (let n = 0; n < e.length; n++)\n Xt(e[n], t, i);\n else if (yl(e) || Ci(e))\n e.forEach((n) => {\n Xt(n, t, i);\n });\n else if (_l(e)) {\n for (const n in e)\n Xt(e[n], t, i);\n for (const n of Object.getOwnPropertySymbols(e))\n Object.prototype.propertyIsEnumerable.call(e, n) && Xt(e[n], t, i);\n }\n return e;\n}\nvar g = {};\nconst Ri = [];\nfunction na(e) {\n Ri.push(e);\n}\nfunction aa() {\n Ri.pop();\n}\nlet so = !1;\nfunction R(e, ...t) {\n if (so) return;\n so = !0, Pt();\n const i = Ri.length ? Ri[Ri.length - 1].component : null, n = i && i.appContext.config.warnHandler, a = dd();\n if (n)\n rn(\n n,\n i,\n 11,\n [\n // eslint-disable-next-line no-restricted-syntax\n e + t.map((o) => {\n var r, s;\n return (s = (r = o.toString) == null ? void 0 : r.call(o)) != null ? s : JSON.stringify(o);\n }).join(\"\"),\n i && i.proxy,\n a.map(\n ({ vnode: o }) => `at <${Ba(i, o.type)}>`\n ).join(`\n`),\n a\n ]\n );\n else {\n const o = [`[Vue warn]: ${e}`, ...t];\n a.length && o.push(`\n`, ...fd(a)), console.warn(...o);\n }\n Rt(), so = !1;\n}\nfunction dd() {\n let e = Ri[Ri.length - 1];\n if (!e)\n return [];\n const t = [];\n for (; e; ) {\n const i = t[0];\n i && i.vnode === e ? i.recurseCount++ : t.push({\n vnode: e,\n recurseCount: 0\n });\n const n = e.component && e.component.parent;\n e = n && n.vnode;\n }\n return t;\n}\nfunction fd(e) {\n const t = [];\n return e.forEach((i, n) => {\n t.push(...n === 0 ? [] : [`\n`], ...md(i));\n }), t;\n}\nfunction md({ vnode: e, recurseCount: t }) {\n const i = t > 0 ? `... (${t} recursive calls)` : \"\", n = e.component ? e.component.parent == null : !1, a = ` at <${Ba(\n e.component,\n e.type,\n n\n )}`, o = \">\" + i;\n return e.props ? [a, ...hd(e.props), o] : [a + o];\n}\nfunction hd(e) {\n const t = [], i = Object.keys(e);\n return i.slice(0, 3).forEach((n) => {\n t.push(...Wl(n, e[n]));\n }), i.length > 3 && t.push(\" ...\"), t;\n}\nfunction Wl(e, t, i) {\n return je(t) ? (t = JSON.stringify(t), i ? t : [`${e}=${t}`]) : typeof t == \"number\" || typeof t == \"boolean\" || t == null ? i ? t : [`${e}=${t}`] : Re(t) ? (t = Wl(e, ne(t.value), !0), i ? t : [`${e}=Ref<`, t, \">\"]) : Q(t) ? [`${e}=fn${t.name ? `<${t.name}>` : \"\"}`] : (t = ne(t), i ? t : [`${e}=`, t]);\n}\nconst Jr = {\n sp: \"serverPrefetch hook\",\n bc: \"beforeCreate hook\",\n c: \"created hook\",\n bm: \"beforeMount hook\",\n m: \"mounted hook\",\n bu: \"beforeUpdate hook\",\n u: \"updated\",\n bum: \"beforeUnmount hook\",\n um: \"unmounted hook\",\n a: \"activated hook\",\n da: \"deactivated hook\",\n ec: \"errorCaptured hook\",\n rtc: \"renderTracked hook\",\n rtg: \"renderTriggered hook\",\n 0: \"setup function\",\n 1: \"render function\",\n 2: \"watcher getter\",\n 3: \"watcher callback\",\n 4: \"watcher cleanup function\",\n 5: \"native event handler\",\n 6: \"component event handler\",\n 7: \"vnode hook\",\n 8: \"directive hook\",\n 9: \"transition hook\",\n 10: \"app errorHandler\",\n 11: \"app warnHandler\",\n 12: \"ref function\",\n 13: \"async component loader\",\n 14: \"scheduler flush\",\n 15: \"component update\",\n 16: \"app unmount cleanup function\"\n};\nfunction rn(e, t, i, n) {\n try {\n return n ? e(...n) : e();\n } catch (a) {\n Vn(a, t, i);\n }\n}\nfunction Ht(e, t, i, n) {\n if (Q(e)) {\n const a = rn(e, t, i, n);\n return a && Ur(a) && a.catch((o) => {\n Vn(o, t, i);\n }), a;\n }\n if (Y(e)) {\n const a = [];\n for (let o = 0; o < e.length; o++)\n a.push(Ht(e[o], t, i, n));\n return a;\n } else g.NODE_ENV !== \"production\" && R(\n `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`\n );\n}\nfunction Vn(e, t, i, n = !0) {\n const a = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: r } = t && t.appContext.config || he;\n if (t) {\n let s = t.parent;\n const c = t.proxy, l = g.NODE_ENV !== \"production\" ? Jr[i] : `https://vuejs.org/error-reference/#runtime-${i}`;\n for (; s; ) {\n const p = s.ec;\n if (p) {\n for (let u = 0; u < p.length; u++)\n if (p[u](e, c, l) === !1)\n return;\n }\n s = s.parent;\n }\n if (o) {\n Pt(), rn(o, null, 10, [\n e,\n c,\n l\n ]), Rt();\n return;\n }\n }\n vd(e, i, a, n, r);\n}\nfunction vd(e, t, i, n = !0, a = !1) {\n if (g.NODE_ENV !== \"production\") {\n const o = Jr[t];\n if (i && na(i), R(`Unhandled error${o ? ` during execution of ${o}` : \"\"}`), i && aa(), n)\n throw e;\n console.error(e);\n } else {\n if (a)\n throw e;\n console.error(e);\n }\n}\nconst nt = [];\nlet Mt = -1;\nconst en = [];\nlet pi = null, Yi = 0;\nconst Kl = /* @__PURE__ */ Promise.resolve();\nlet wa = null;\nconst gd = 100;\nfunction Zr(e) {\n const t = wa || Kl;\n return e ? t.then(this ? e.bind(this) : e) : t;\n}\nfunction xd(e) {\n let t = Mt + 1, i = nt.length;\n for (; t < i; ) {\n const n = t + i >>> 1, a = nt[n], o = In(a);\n o < e || o === e && a.flags & 2 ? t = n + 1 : i = n;\n }\n return t;\n}\nfunction Va(e) {\n if (!(e.flags & 1)) {\n const t = In(e), i = nt[nt.length - 1];\n !i || // fast path when the job id is larger than the tail\n !(e.flags & 2) && t >= In(i) ? nt.push(e) : nt.splice(xd(t), 0, e), e.flags |= 1, Gl();\n }\n}\nfunction Gl() {\n wa || (wa = Kl.then(Xl));\n}\nfunction Yl(e) {\n Y(e) ? en.push(...e) : pi && e.id === -1 ? pi.splice(Yi + 1, 0, e) : e.flags & 1 || (en.push(e), e.flags |= 1), Gl();\n}\nfunction ks(e, t, i = Mt + 1) {\n for (g.NODE_ENV !== \"production\" && (t = t || /* @__PURE__ */ new Map()); i < nt.length; i++) {\n const n = nt[i];\n if (n && n.flags & 2) {\n if (e && n.id !== e.uid || g.NODE_ENV !== \"production\" && es(t, n))\n continue;\n nt.splice(i, 1), i--, n.flags & 4 && (n.flags &= -2), n(), n.flags & 4 || (n.flags &= -2);\n }\n }\n}\nfunction Ql(e) {\n if (en.length) {\n const t = [...new Set(en)].sort(\n (i, n) => In(i) - In(n)\n );\n if (en.length = 0, pi) {\n pi.push(...t);\n return;\n }\n for (pi = t, g.NODE_ENV !== \"production\" && (e = e || /* @__PURE__ */ new Map()), Yi = 0; Yi < pi.length; Yi++) {\n const i = pi[Yi];\n g.NODE_ENV !== \"production\" && es(e, i) || (i.flags & 4 && (i.flags &= -2), i.flags & 8 || i(), i.flags &= -2);\n }\n pi = null, Yi = 0;\n }\n}\nconst In = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;\nfunction Xl(e) {\n g.NODE_ENV !== \"production\" && (e = e || /* @__PURE__ */ new Map());\n const t = g.NODE_ENV !== \"production\" ? (i) => es(e, i) : Ue;\n try {\n for (Mt = 0; Mt < nt.length; Mt++) {\n const i = nt[Mt];\n if (i && !(i.flags & 8)) {\n if (g.NODE_ENV !== \"production\" && t(i))\n continue;\n i.flags & 4 && (i.flags &= -2), rn(\n i,\n i.i,\n i.i ? 15 : 14\n ), i.flags & 4 || (i.flags &= -2);\n }\n }\n } finally {\n for (; Mt < nt.length; Mt++) {\n const i = nt[Mt];\n i && (i.flags &= -2);\n }\n Mt = -1, nt.length = 0, Ql(e), wa = null, (nt.length || en.length) && Xl(e);\n }\n}\nfunction es(e, t) {\n const i = e.get(t) || 0;\n if (i > gd) {\n const n = t.i, a = n && ps(n.type);\n return Vn(\n `Maximum recursive updates exceeded${a ? ` in component <${a}>` : \"\"}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n ), !0;\n }\n return e.set(t, i + 1), !1;\n}\nlet zt = !1;\nconst oa = /* @__PURE__ */ new Map();\ng.NODE_ENV !== \"production\" && (Mn().__VUE_HMR_RUNTIME__ = {\n createRecord: co(Jl),\n rerender: co(wd),\n reload: co(_d)\n});\nconst Vi = /* @__PURE__ */ new Map();\nfunction bd(e) {\n const t = e.type.__hmrId;\n let i = Vi.get(t);\n i || (Jl(t, e.type), i = Vi.get(t)), i.instances.add(e);\n}\nfunction yd(e) {\n Vi.get(e.type.__hmrId).instances.delete(e);\n}\nfunction Jl(e, t) {\n return Vi.has(e) ? !1 : (Vi.set(e, {\n initialDef: _a(t),\n instances: /* @__PURE__ */ new Set()\n }), !0);\n}\nfunction _a(e) {\n return Pp(e) ? e.__vccOpts : e;\n}\nfunction wd(e, t) {\n const i = Vi.get(e);\n i && (i.initialDef.render = t, [...i.instances].forEach((n) => {\n t && (n.render = t, _a(n.type).render = t), n.renderCache = [], zt = !0, n.update(), zt = !1;\n }));\n}\nfunction _d(e, t) {\n const i = Vi.get(e);\n if (!i) return;\n t = _a(t), As(i.initialDef, t);\n const n = [...i.instances];\n for (let a = 0; a < n.length; a++) {\n const o = n[a], r = _a(o.type);\n let s = oa.get(r);\n s || (r !== i.initialDef && As(r, t), oa.set(r, s = /* @__PURE__ */ new Set())), s.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (s.add(o), o.ceReload(t.styles), s.delete(o)) : o.parent ? Va(() => {\n zt = !0, o.parent.update(), zt = !1, s.delete(o);\n }) : o.appContext.reload ? o.appContext.reload() : typeof window < \"u\" ? window.location.reload() : console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n ), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(r);\n }\n Yl(() => {\n oa.clear();\n });\n}\nfunction As(e, t) {\n qe(e, t);\n for (const i in e)\n i !== \"__file\" && !(i in t) && delete e[i];\n}\nfunction co(e) {\n return (t, i) => {\n try {\n return e(t, i);\n } catch (n) {\n console.error(n), console.warn(\n \"[HMR] Something went wrong during Vue component hot-reload. Full reload required.\"\n );\n }\n };\n}\nlet qt, hn = [], Dr = !1;\nfunction qn(e, ...t) {\n qt ? qt.emit(e, ...t) : Dr || hn.push({ event: e, args: t });\n}\nfunction Zl(e, t) {\n var i, n;\n qt = e, qt ? (qt.enabled = !0, hn.forEach(({ event: a, args: o }) => qt.emit(a, ...o)), hn = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < \"u\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n // eslint-disable-next-line no-restricted-syntax\n !((n = (i = window.navigator) == null ? void 0 : i.userAgent) != null && n.includes(\"jsdom\")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((o) => {\n Zl(o, t);\n }), setTimeout(() => {\n qt || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, Dr = !0, hn = []);\n }, 3e3)) : (Dr = !0, hn = []);\n}\nfunction Ed(e, t) {\n qn(\"app:init\", e, t, {\n Fragment: Ce,\n Text: Ln,\n Comment: dt,\n Static: sa\n });\n}\nfunction Sd(e) {\n qn(\"app:unmount\", e);\n}\nconst Od = /* @__PURE__ */ ts(\n \"component:added\"\n /* COMPONENT_ADDED */\n), ep = /* @__PURE__ */ ts(\n \"component:updated\"\n /* COMPONENT_UPDATED */\n), Nd = /* @__PURE__ */ ts(\n \"component:removed\"\n /* COMPONENT_REMOVED */\n), Dd = (e) => {\n qt && typeof qt.cleanupBuffer == \"function\" && // remove the component if it wasn't buffered\n !qt.cleanupBuffer(e) && Nd(e);\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction ts(e) {\n return (t) => {\n qn(\n e,\n t.appContext.app,\n t.uid,\n t.parent ? t.parent.uid : void 0,\n t\n );\n };\n}\nconst Td = /* @__PURE__ */ tp(\n \"perf:start\"\n /* PERFORMANCE_START */\n), jd = /* @__PURE__ */ tp(\n \"perf:end\"\n /* PERFORMANCE_END */\n);\nfunction tp(e) {\n return (t, i, n) => {\n qn(e, t.appContext.app, t.uid, t, i, n);\n };\n}\nfunction kd(e, t, i) {\n qn(\n \"component:emit\",\n e.appContext.app,\n e,\n t,\n i\n );\n}\nlet Ve = null, ip = null;\nfunction Ea(e) {\n const t = Ve;\n return Ve = e, ip = e && e.type.__scopeId || null, t;\n}\nfunction Ie(e, t = Ve, i) {\n if (!t || e._n)\n return e;\n const n = (...a) => {\n n._d && Bs(-1);\n const o = Ea(t);\n let r;\n try {\n r = e(...a);\n } finally {\n Ea(o), n._d && Bs(1);\n }\n return g.NODE_ENV !== \"production\" && ep(t), r;\n };\n return n._n = !0, n._c = !0, n._d = !0, n;\n}\nfunction np(e) {\n Eu(e) && R(\"Do not use built-in directive ids as custom directive id: \" + e);\n}\nfunction Ad(e, t) {\n if (Ve === null)\n return g.NODE_ENV !== \"production\" && R(\"withDirectives can only be used inside render functions.\"), e;\n const i = Ua(Ve), n = e.dirs || (e.dirs = []);\n for (let a = 0; a < t.length; a++) {\n let [o, r, s, c = he] = t[a];\n o && (Q(o) && (o = {\n mounted: o,\n updated: o\n }), o.deep && Xt(r), n.push({\n dir: o,\n instance: i,\n value: r,\n oldValue: void 0,\n arg: s,\n modifiers: c\n }));\n }\n return e;\n}\nfunction Si(e, t, i, n) {\n const a = e.dirs, o = t && t.dirs;\n for (let r = 0; r < a.length; r++) {\n const s = a[r];\n o && (s.oldValue = o[r].value);\n let c = s.dir[n];\n c && (Pt(), Ht(c, i, 8, [\n e.el,\n s,\n e,\n t\n ]), Rt());\n }\n}\nconst Cd = Symbol(\"_vte\"), $d = (e) => e.__isTeleport;\nfunction is(e, t) {\n e.shapeFlag & 6 && e.component ? (e.transition = t, is(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;\n}\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction Le(e, t) {\n return Q(e) ? (\n // #8236: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n qe({ name: e.name }, t, { setup: e })\n ) : e;\n}\nfunction ap(e) {\n e.ids = [e.ids[0] + e.ids[2]++ + \"-\", 0, 0];\n}\nconst op = /* @__PURE__ */ new WeakSet();\nfunction Id(e) {\n const t = za(), i = Ul(null);\n if (t) {\n const a = t.refs === he ? t.refs = {} : t.refs;\n let o;\n g.NODE_ENV !== \"production\" && (o = Object.getOwnPropertyDescriptor(a, e)) && !o.configurable ? R(`useTemplateRef('${e}') already exists.`) : Object.defineProperty(a, e, {\n enumerable: !0,\n get: () => i.value,\n set: (r) => i.value = r\n });\n } else g.NODE_ENV !== \"production\" && R(\n \"useTemplateRef() is called when there is no active component instance to be associated with.\"\n );\n const n = g.NODE_ENV !== \"production\" ? Xr(i) : i;\n return g.NODE_ENV !== \"production\" && op.add(n), n;\n}\nfunction En(e, t, i, n, a = !1) {\n if (Y(e)) {\n e.forEach(\n (h, w) => En(\n h,\n t && (Y(t) ? t[w] : t),\n i,\n n,\n a\n )\n );\n return;\n }\n if (tn(n) && !a) {\n n.shapeFlag & 512 && n.type.__asyncResolved && n.component.subTree.component && En(e, t, i, n.component.subTree);\n return;\n }\n const o = n.shapeFlag & 4 ? Ua(n.component) : n.el, r = a ? null : o, { i: s, r: c } = e;\n if (g.NODE_ENV !== \"production\" && !s) {\n R(\n \"Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.\"\n );\n return;\n }\n const l = t && t.r, p = s.refs === he ? s.refs = {} : s.refs, u = s.setupState, m = ne(u), d = u === he ? () => !1 : (h) => g.NODE_ENV !== \"production\" && (ue(m, h) && !Re(m[h]) && R(\n `Template ref \"${h}\" used on a non-ref value. It will not work in the production build.`\n ), op.has(m[h])) ? !1 : ue(m, h);\n if (l != null && l !== c && (je(l) ? (p[l] = null, d(l) && (u[l] = null)) : Re(l) && (l.value = null)), Q(c))\n rn(c, s, 12, [r, p]);\n else {\n const h = je(c), w = Re(c);\n if (h || w) {\n const b = () => {\n if (e.f) {\n const x = h ? d(c) ? u[c] : p[c] : c.value;\n a ? Y(x) && zr(x, o) : Y(x) ? x.includes(o) || x.push(o) : h ? (p[c] = [o], d(c) && (u[c] = p[c])) : (c.value = [o], e.k && (p[e.k] = c.value));\n } else h ? (p[c] = r, d(c) && (u[c] = r)) : w ? (c.value = r, e.k && (p[e.k] = r)) : g.NODE_ENV !== \"production\" && R(\"Invalid template ref type:\", c, `(${typeof c})`);\n };\n r ? (b.id = -1, gt(b, i)) : b();\n } else g.NODE_ENV !== \"production\" && R(\"Invalid template ref type:\", c, `(${typeof c})`);\n }\n}\nMn().requestIdleCallback;\nMn().cancelIdleCallback;\nconst tn = (e) => !!e.type.__asyncLoader, ns = (e) => e.type.__isKeepAlive;\nfunction Pd(e, t) {\n rp(e, \"a\", t);\n}\nfunction Rd(e, t) {\n rp(e, \"da\", t);\n}\nfunction rp(e, t, i = We) {\n const n = e.__wdc || (e.__wdc = () => {\n let a = i;\n for (; a; ) {\n if (a.isDeactivated)\n return;\n a = a.parent;\n }\n return e();\n });\n if (qa(t, n, i), i) {\n let a = i.parent;\n for (; a && a.parent; )\n ns(a.parent.vnode) && Fd(n, t, i, a), a = a.parent;\n }\n}\nfunction Fd(e, t, i, n) {\n const a = qa(\n t,\n e,\n n,\n !0\n /* prepend */\n );\n as(() => {\n zr(n[t], a);\n }, i);\n}\nfunction qa(e, t, i = We, n = !1) {\n if (i) {\n const a = i[e] || (i[e] = []), o = t.__weh || (t.__weh = (...r) => {\n Pt();\n const s = Bn(i), c = Ht(t, i, e, r);\n return s(), Rt(), c;\n });\n return n ? a.unshift(o) : a.push(o), o;\n } else if (g.NODE_ENV !== \"production\") {\n const a = Ti(Jr[e].replace(/ hook$/, \"\"));\n R(\n `${a} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`\n );\n }\n}\nconst oi = (e) => (t, i = We) => {\n (!Rn || e === \"sp\") && qa(e, (...n) => t(...n), i);\n}, Md = oi(\"bm\"), sn = oi(\"m\"), Vd = oi(\n \"bu\"\n), qd = oi(\"u\"), Ld = oi(\n \"bum\"\n), as = oi(\"um\"), zd = oi(\n \"sp\"\n), Ud = oi(\"rtg\"), Bd = oi(\"rtc\");\nfunction Hd(e, t = We) {\n qa(\"ec\", e, t);\n}\nconst Wd = \"components\", sp = Symbol.for(\"v-ndc\");\nfunction Kd(e) {\n return je(e) ? Gd(Wd, e, !1) || e : e || sp;\n}\nfunction Gd(e, t, i = !0, n = !1) {\n const a = Ve || We;\n if (a) {\n const o = a.type;\n {\n const s = ps(\n o,\n !1\n );\n if (s && (s === t || s === at(t) || s === Mi(at(t))))\n return o;\n }\n const r = (\n // local registration\n // check instance[type] first which is resolved for options API\n Cs(a[e] || o[e], t) || // global registration\n Cs(a.appContext[e], t)\n );\n return !r && n ? o : (g.NODE_ENV !== \"production\" && i && !r && R(`Failed to resolve ${e.slice(0, -1)}: ${t}\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`), r);\n } else g.NODE_ENV !== \"production\" && R(\n `resolve${Mi(e.slice(0, -1))} can only be used in render() or setup().`\n );\n}\nfunction Cs(e, t) {\n return e && (e[t] || e[at(t)] || e[Mi(at(t))]);\n}\nfunction bi(e, t, i, n) {\n let a;\n const o = i, r = Y(e);\n if (r || je(e)) {\n const s = r && Ii(e);\n let c = !1, l = !1;\n s && (c = !ot(e), l = Bt(e), e = Pa(e)), a = new Array(e.length);\n for (let p = 0, u = e.length; p < u; p++)\n a[p] = t(\n c ? l ? ba(Xe(e[p])) : Xe(e[p]) : e[p],\n p,\n void 0,\n o\n );\n } else if (typeof e == \"number\") {\n g.NODE_ENV !== \"production\" && !Number.isInteger(e) && R(`The v-for range expect an integer value but got ${e}.`), a = new Array(e);\n for (let s = 0; s < e; s++)\n a[s] = t(s + 1, s, void 0, o);\n } else if (we(e))\n if (e[Symbol.iterator])\n a = Array.from(\n e,\n (s, c) => t(s, c, void 0, o)\n );\n else {\n const s = Object.keys(e);\n a = new Array(s.length);\n for (let c = 0, l = s.length; c < l; c++) {\n const p = s[c];\n a[c] = t(e[p], p, c, o);\n }\n }\n else\n a = [];\n return a;\n}\nfunction cn(e, t, i = {}, n, a) {\n if (Ve.ce || Ve.parent && tn(Ve.parent) && Ve.parent.ce)\n return K(), Be(\n Ce,\n null,\n [ge(\"slot\", i, n)],\n 64\n );\n let o = e[t];\n g.NODE_ENV !== \"production\" && o && o.length > 1 && (R(\n \"SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.\"\n ), o = () => []), o && o._c && (o._d = !1), K();\n const r = o && cp(o(i)), s = i.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n r && r.key, c = Be(\n Ce,\n {\n key: (s && !ai(s) ? s : `_${t}`) + // #7256 force differentiate fallback content from actual content\n \"\"\n },\n r || [],\n r && e._ === 1 ? 64 : -2\n );\n return !a && c.scopeId && (c.slotScopeIds = [c.scopeId + \"-s\"]), o && o._c && (o._d = !0), c;\n}\nfunction cp(e) {\n return e.some((t) => zn(t) ? !(t.type === dt || t.type === Ce && !cp(t.children)) : !0) ? e : null;\n}\nconst Tr = (e) => e ? $p(e) ? Ua(e) : Tr(e.parent) : null, Fi = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ qe(/* @__PURE__ */ Object.create(null), {\n $: (e) => e,\n $el: (e) => e.vnode.el,\n $data: (e) => e.data,\n $props: (e) => g.NODE_ENV !== \"production\" ? Lt(e.props) : e.props,\n $attrs: (e) => g.NODE_ENV !== \"production\" ? Lt(e.attrs) : e.attrs,\n $slots: (e) => g.NODE_ENV !== \"production\" ? Lt(e.slots) : e.slots,\n $refs: (e) => g.NODE_ENV !== \"production\" ? Lt(e.refs) : e.refs,\n $parent: (e) => Tr(e.parent),\n $root: (e) => Tr(e.root),\n $host: (e) => e.ce,\n $emit: (e) => e.emit,\n $options: (e) => up(e),\n $forceUpdate: (e) => e.f || (e.f = () => {\n Va(e.update);\n }),\n $nextTick: (e) => e.n || (e.n = Zr.bind(e.proxy)),\n $watch: (e) => Df.bind(e)\n })\n), os = (e) => e === \"_\" || e === \"$\", lo = (e, t) => e !== he && !e.__isScriptSetup && ue(e, t), lp = {\n get({ _: e }, t) {\n if (t === \"__v_skip\")\n return !0;\n const { ctx: i, setupState: n, data: a, props: o, accessCache: r, type: s, appContext: c } = e;\n if (g.NODE_ENV !== \"production\" && t === \"__isVue\")\n return !0;\n let l;\n if (t[0] !== \"$\") {\n const d = r[t];\n if (d !== void 0)\n switch (d) {\n case 1:\n return n[t];\n case 2:\n return a[t];\n case 4:\n return i[t];\n case 3:\n return o[t];\n }\n else {\n if (lo(n, t))\n return r[t] = 1, n[t];\n if (a !== he && ue(a, t))\n return r[t] = 2, a[t];\n if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (l = e.propsOptions[0]) && ue(l, t)\n )\n return r[t] = 3, o[t];\n if (i !== he && ue(i, t))\n return r[t] = 4, i[t];\n jr && (r[t] = 0);\n }\n }\n const p = Fi[t];\n let u, m;\n if (p)\n return t === \"$attrs\" ? (ze(e.attrs, \"get\", \"\"), g.NODE_ENV !== \"production\" && Na()) : g.NODE_ENV !== \"production\" && t === \"$slots\" && ze(e, \"get\", t), p(e);\n if (\n // css module (injected by vue-loader)\n (u = s.__cssModules) && (u = u[t])\n )\n return u;\n if (i !== he && ue(i, t))\n return r[t] = 4, i[t];\n if (\n // global properties\n m = c.config.globalProperties, ue(m, t)\n )\n return m[t];\n g.NODE_ENV !== \"production\" && Ve && (!je(t) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n t.indexOf(\"__v\") !== 0) && (a !== he && os(t[0]) && ue(a, t) ? R(\n `Property ${JSON.stringify(\n t\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n ) : e === Ve && R(\n `Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`\n ));\n },\n set({ _: e }, t, i) {\n const { data: n, setupState: a, ctx: o } = e;\n return lo(a, t) ? (a[t] = i, !0) : g.NODE_ENV !== \"production\" && a.__isScriptSetup && ue(a, t) ? (R(`Cannot mutate + +