diff --git a/archive-template.php b/archive-template.php index 4a6af78abd..90e12b610d 100644 --- a/archive-template.php +++ b/archive-template.php @@ -943,7 +943,7 @@ class="loading-spinner">

+ +

+ + +

diff --git a/docs/dt-posts-list-query.md b/docs/dt-posts-list-query.md index 40bb519f89..532f784fe0 100644 --- a/docs/dt-posts-list-query.md +++ b/docs/dt-posts-list-query.md @@ -189,6 +189,16 @@ Different field types have different filter formats: 'assigned_to' => [] ``` +### File Upload Fields + +```php +// Find posts with at least one uploaded file +'documents' => ['*'] + +// Find posts with no uploaded files +'documents' => [] +``` + ## Combining Multiple Filters Multiple filters can be combined to create complex queries: diff --git a/dt-assets/build/components/index.es.js b/dt-assets/build/components/index.es.js index 76b0a3cc5a..f875336ffc 100644 --- a/dt-assets/build/components/index.es.js +++ b/dt-assets/build/components/index.es.js @@ -1,33 +1,33 @@ -import { E as s, C as e, w as D, B as o, D as i, a as l, b as n, d as r, e as c, f as u, u as p, A as C, g as M, x as T, h as m, i as x, j as S, y as g, k as B, t as d, r as h, l as v, m as A, n as L, o as b, p as f, z as y, q as F, c as j, v as k } from "./index-B5P35fmQ.js"; +import { E as e, C as s, x as D, B as o, D as l, a as i, b as n, d as r, e as c, f as p, u, w as C, A as M, g as T, h as m, i as x, j as S, y as d, k as g, t as B, r as h, l as v, m as A, n as b, o as F, p as L, z as f, q as y, c as U, v as j } from "./index-Brc07-hb.js"; export { - s as ApiService, - e as ComponentService, + e as ApiService, + s as ComponentService, D as DtAlert, o as DtBase, - i as DtButton, - l as DtChurchHealthCircle, + l as DtButton, + i as DtChurchHealthCircle, n as DtConnection, r as DtCopyText, c as DtDate, - u as DtDatetime, - p as DtFormBase, - C as DtIcon, - M as DtLabel, - T as DtList, + p as DtDatetime, + u as DtFileUpload, + C as DtFormBase, + M as DtIcon, + T as DtLabel, m as DtLocation, x as DtLocationMap, S as DtMapModal, - g as DtModal, - B as DtMultiSelect, - d as DtMultiSelectButtonGroup, + d as DtModal, + g as DtMultiSelect, + B as DtMultiSelectButtonGroup, h as DtMultiText, v as DtNumberField, A as DtSingleSelect, - L as DtTags, - b as DtText, - f as DtTextArea, - y as DtTile, - F as DtToggle, - j as DtUsersConnection, - k as version + b as DtTags, + F as DtText, + L as DtTextArea, + f as DtTile, + y as DtToggle, + U as DtUsersConnection, + j as version }; diff --git a/dt-assets/build/components/index.js b/dt-assets/build/components/index.js index a264216fe1..174e0705eb 100644 --- a/dt-assets/build/components/index.js +++ b/dt-assets/build/components/index.js @@ -1,38 +1,38 @@ -var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr=($,q,W)=>q in $?Pr($,q,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[q]=W;var Xe=($,q,W)=>Mr($,typeof q!="symbol"?q+"":q,W);/** +var DtWebComponents=function(x){"use strict";var Pn=Object.defineProperty;var Mn=(x,D,W)=>D in x?Pn(x,D,{enumerable:!0,configurable:!0,writable:!0,value:W}):x[D]=W;var Me=(x,D,W)=>Mn(x,typeof D!="symbol"?D+"":D,W);/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var As;const q=globalThis,W=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vt=Symbol(),Bt=new WeakMap;let qs=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Bt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Bt.set(t,e))}return e}toString(){return this.cssText}};const Fs=o=>new qs(typeof o=="string"?o:o+"",void 0,Vt),Us=(o,e)=>{if(W)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=q.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},Ht=W?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Fs(t)})(o):o;/** + */var Oo;const D=globalThis,W=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ut=Symbol(),Vt=new WeakMap;let qo=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Vt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Vt.set(t,e))}return e}toString(){return this.cssText}};const Uo=s=>new qo(typeof s=="string"?s:s+"",void 0,Ut),Vo=(s,e)=>{if(W)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),o=D.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=t.cssText,s.appendChild(i)}},Bt=W?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Uo(t)})(s):s;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:Vs,defineProperty:Bs,getOwnPropertyDescriptor:Hs,getOwnPropertyNames:Gs,getOwnPropertySymbols:Ws,getPrototypeOf:Ks}=Object,K=globalThis,Gt=K.trustedTypes,Zs=Gt?Gt.emptyScript:"",et=K.reactiveElementPolyfillSupport,he=(o,e)=>o,tt={toAttribute(o,e){switch(e){case Boolean:o=o?Zs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Wt=(o,e)=>!Vs(o,e),Kt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:Wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),K.litPropertyMetadata??(K.litPropertyMetadata=new WeakMap);let pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Kt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Bs(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=Hs(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Kt}static _$Ei(){if(this.hasOwnProperty(he("elementProperties")))return;const e=Ks(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(he("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(he("properties"))){const t=this.properties,i=[...Gs(t),...Ws(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Ht(s))}else e!==void 0&&t.push(Ht(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Us(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:tt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:tt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Wt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[he("elementProperties")]=new Map,pe[he("finalized")]=new Map,et==null||et({ReactiveElement:pe}),(K.reactiveElementVersions??(K.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:Bo,defineProperty:Ho,getOwnPropertyDescriptor:Ko,getOwnPropertyNames:Wo,getOwnPropertySymbols:Go,getPrototypeOf:Zo}=Object,G=globalThis,Ht=G.trustedTypes,Jo=Ht?Ht.emptyScript:"",et=G.reactiveElementPolyfillSupport,fe=(s,e)=>s,tt={toAttribute(s,e){switch(e){case Boolean:s=s?Jo:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},Kt=(s,e)=>!Bo(s,e),Wt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:Kt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),G.litPropertyMetadata??(G.litPropertyMetadata=new WeakMap);let be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Wt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);o!==void 0&&Ho(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:a}=Ko(this.prototype,e)??{get(){return this[t]},set(r){this[t]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const n=o==null?void 0:o.call(this);a.call(this,r),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Wt}static _$Ei(){if(this.hasOwnProperty(fe("elementProperties")))return;const e=Zo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(fe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(fe("properties"))){const t=this.properties,i=[...Wo(t),...Go(t)];for(const o of i)this.createProperty(o,t[o])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,o]of t)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const o=this._$Eu(t,i);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)t.unshift(Bt(o))}else e!==void 0&&t.push(Bt(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){const r=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:tt).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const r=i.getPropertyOptions(o),n=typeof r.converter=="function"?{fromAttribute:r.converter}:((a=r.converter)==null?void 0:a.fromAttribute)!==void 0?r.converter:tt;this._$Em=o,this[o]=n.fromAttribute(t,r.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Kt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,r]of this._$Ep)this[a]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[a,r]of o)r.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(o=>{var a;return(a=o.hostUpdate)==null?void 0:a.call(o)}),this.update(t)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[fe("elementProperties")]=new Map,be[fe("finalized")]=new Map,et==null||et({ReactiveElement:be}),(G.reactiveElementVersions??(G.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const fe=globalThis,Pe=fe.trustedTypes,Zt=Pe?Pe.createPolicy("lit-html",{createHTML:o=>o}):void 0,Jt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Qt="?"+Z,Js=`<${Qt}>`,te=document,be=()=>te.createComment(""),ge=o=>o===null||typeof o!="object"&&typeof o!="function",it=Array.isArray,Qs=o=>it(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",st=`[ -\f\r]`,me=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,Xt=/>/g,ie=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),ei=/'/g,ti=/"/g,ii=/^(?:script|style|textarea|title)$/i,Ys=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),f=Ys(1),U=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),si=new WeakMap,se=te.createTreeWalker(te,129);function oi(o,e){if(!it(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(e):e}const Xs=(o,e)=>{const t=o.length-1,i=[];let s,a=e===2?"":e===3?"":"",n=me;for(let r=0;r"?(n=s??me,g=-1):b[1]===void 0?g=-2:(g=n.lastIndex-b[2].length,c=b[1],n=b[3]===void 0?ie:b[3]==='"'?ti:ei):n===ti||n===ei?n=ie:n===Yt||n===Xt?n=me:(n=ie,s=void 0);const y=n===ie&&o[r+1].startsWith("/>")?" ":"";a+=n===me?l+Js:g>=0?(i.push(c),l.slice(0,g)+Jt+l.slice(g)+Z+y):l+Z+(g===-2?r:y)}return[oi(o,a+(o[t]||"")+(e===2?"":e===3?"":"")),i]};class ve{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let a=0,n=0;const r=e.length-1,l=this.parts,[c,b]=Xs(e,t);if(this.el=ve.createElement(c,i),se.currentNode=this.el.content,t===2||t===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(s=se.nextNode())!==null&&l.length0){s.textContent=Pe?Pe.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(e,t=this,i,s){const a=this.strings;let n=!1;if(a===void 0)e=de(this,e,t,0),n=!ge(e)||e!==this._$AH&&e!==U,n&&(this._$AH=e);else{const r=e;let l,c;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new ce(e.insertBefore(be(),a),a,void 0,t??{})}return s._$AI(o),s};/** + */const me=globalThis,je=me.trustedTypes,Gt=je?je.createPolicy("lit-html",{createHTML:s=>s}):void 0,Zt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Jt="?"+Z,Qo=`<${Jt}>`,te=document,ge=()=>te.createComment(""),ve=s=>s===null||typeof s!="object"&&typeof s!="function",it=Array.isArray,Xo=s=>it(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ot=`[ +\f\r]`,ye=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qt=/-->/g,Xt=/>/g,ie=RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Yt=/'/g,ei=/"/g,ti=/^(?:script|style|textarea|title)$/i,Yo=s=>(e,...t)=>({_$litType$:s,strings:e,values:t}),p=Yo(1),U=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),ii=new WeakMap,oe=te.createTreeWalker(te,129);function oi(s,e){if(!it(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gt!==void 0?Gt.createHTML(e):e}const es=(s,e)=>{const t=s.length-1,i=[];let o,a=e===2?"":e===3?"":"",r=ye;for(let n=0;n"?(r=o??ye,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?ie:u[3]==='"'?ei:Yt):r===ei||r===Yt?r=ie:r===Qt||r===Xt?r=ye:(r=ie,o=void 0);const y=r===ie&&s[n+1].startsWith("/>")?" ":"";a+=r===ye?l+Qo:h>=0?(i.push(d),l.slice(0,h)+Zt+l.slice(h)+Z+y):l+Z+(h===-2?n:y)}return[oi(s,a+(s[t]||"")+(e===2?"":e===3?"":"")),i]};class _e{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let a=0,r=0;const n=e.length-1,l=this.parts,[d,u]=es(e,t);if(this.el=_e.createElement(d,i),oe.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=oe.nextNode())!==null&&l.length0){o.textContent=je?je.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=O}_$AI(e,t=this,i,o){const a=this.strings;let r=!1;if(a===void 0)e=ce(this,e,t,0),r=!ve(e)||e!==this._$AH&&e!==U,r&&(this._$AH=e);else{const n=e;let l,d;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let o=i._$litPart$;if(o===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=o=new ue(e.insertBefore(ge(),a),a,void 0,t??{})}return o._$AI(s),o};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const je=globalThis,at=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),ai=new WeakMap;let ni=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=ai.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ai.set(t,e))}return e}toString(){return this.cssText}};const ro=o=>new ni(typeof o=="string"?o:o+"",void 0,nt),x=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,a)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[a+1],o[0]);return new ni(t,o,nt)},lo=(o,e)=>{if(at)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=je.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},ri=at?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ro(t)})(o):o;/** + */const Fe=globalThis,at=Fe.ShadowRoot&&(Fe.ShadyCSS===void 0||Fe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),si=new WeakMap;let ai=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=si.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&si.set(t,e))}return e}toString(){return this.cssText}};const ls=s=>new ai(typeof s=="string"?s:s+"",void 0,rt),$=(s,...e)=>{const t=s.length===1?s[0]:e.reduce((i,o,a)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[a+1],s[0]);return new ai(t,s,rt)},ds=(s,e)=>{if(at)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),o=Fe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=t.cssText,s.appendChild(i)}},ri=at?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ls(t)})(s):s;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:co,defineProperty:uo,getOwnPropertyDescriptor:ho,getOwnPropertyNames:po,getOwnPropertySymbols:fo,getPrototypeOf:bo}=Object,J=globalThis,li=J.trustedTypes,go=li?li.emptyScript:"",rt=J.reactiveElementPolyfillSupport,ye=(o,e)=>o,lt={toAttribute(o,e){switch(e){case Boolean:o=o?go:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},di=(o,e)=>!co(o,e),ci={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:di};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class ue extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ci){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&uo(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=ho(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ci}static _$Ei(){if(this.hasOwnProperty(ye("elementProperties")))return;const e=bo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ye("properties"))){const t=this.properties,i=[...po(t),...fo(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(ri(s))}else e!==void 0&&t.push(ri(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:lt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:lt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??di)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},ue[ye("elementProperties")]=new Map,ue[ye("finalized")]=new Map,rt==null||rt({ReactiveElement:ue}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:cs,defineProperty:us,getOwnPropertyDescriptor:hs,getOwnPropertyNames:ps,getOwnPropertySymbols:fs,getPrototypeOf:bs}=Object,J=globalThis,ni=J.trustedTypes,ms=ni?ni.emptyScript:"",nt=J.reactiveElementPolyfillSupport,we=(s,e)=>s,lt={toAttribute(s,e){switch(e){case Boolean:s=s?ms:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},li=(s,e)=>!cs(s,e),di={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:li};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class he extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=di){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);o!==void 0&&us(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:a}=hs(this.prototype,e)??{get(){return this[t]},set(r){this[t]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const n=o==null?void 0:o.call(this);a.call(this,r),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??di}static _$Ei(){if(this.hasOwnProperty(we("elementProperties")))return;const e=bs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(we("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(we("properties"))){const t=this.properties,i=[...ps(t),...fs(t)];for(const o of i)this.createProperty(o,t[o])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,o]of t)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const o=this._$Eu(t,i);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)t.unshift(ri(o))}else e!==void 0&&t.push(ri(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ds(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){const r=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:lt).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const r=i.getPropertyOptions(o),n=typeof r.converter=="function"?{fromAttribute:r.converter}:((a=r.converter)==null?void 0:a.fromAttribute)!==void 0?r.converter:lt;this._$Em=o,this[o]=n.fromAttribute(t,r.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??li)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,r]of this._$Ep)this[a]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[a,r]of o)r.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(o=>{var a;return(a=o.hostUpdate)==null?void 0:a.call(o)}),this.update(t)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}he.elementStyles=[],he.shadowRootOptions={mode:"open"},he[we("elementProperties")]=new Map,he[we("finalized")]=new Map,nt==null||nt({ReactiveElement:he}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */let oe=class extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=no(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return U}};oe._$litElement$=!0,oe.finalized=!0,(As=globalThis.litElementHydrateSupport)==null||As.call(globalThis,{LitElement:oe});const dt=globalThis.litElementPolyfillSupport;dt==null||dt({LitElement:oe}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** + */let se=class extends he{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ns(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return U}};se._$litElement$=!0,se.finalized=!0,(Oo=globalThis.litElementHydrateSupport)==null||Oo.call(globalThis,{LitElement:se});const dt=globalThis.litElementPolyfillSupport;dt==null||dt({LitElement:se}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const ct={ATTRIBUTE:1,CHILD:2},ut=o=>(...e)=>({_$litDirective$:o,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + */const ct={ATTRIBUTE:1,CHILD:2},ut=s=>(...e)=>({_$litDirective$:s,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const A=ut(class extends ht{constructor(o){var e;if(super(o),o.type!==ct.ATTRIBUTE||o.name!=="class"||((e=o.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=o.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const n=!!e[a];n===this.st.has(a)||(s=this.nt)!=null&&s.has(a)||(n?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return U}});/** + */const A=ut(class extends ht{constructor(s){var e;if(super(s),s.type!==ct.ATTRIBUTE||s.name!=="class"||((e=s.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){var i,o;if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=s.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const r=!!e[a];r===this.st.has(a)||(o=this.nt)!=null&&o.has(a)||(r?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return U}});/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -40,35 +40,38 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const u=(o,...e)=>({strTag:!0,strings:o,values:e}),mo=o=>typeof o!="string"&&"strTag"in o,ui=(o,e,t)=>{let i=o[0];for(let s=1;s({strTag:!0,strings:s,values:e}),gs=s=>typeof s!="string"&&"strTag"in s,ci=(s,e,t)=>{let i=s[0];for(let o=1;omo(o)?ui(o.strings,o.values):o;let O=hi,pi=!1;function vo(o){if(pi)throw new Error("lit-localize can only be configured once");O=o,pi=!0}/** + */const ui=s=>gs(s)?ci(s.strings,s.values):s;let R=ui,hi=!1;function vs(s){if(hi)throw new Error("lit-localize can only be configured once");R=s,hi=!0}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class yo{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(pt,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pt,this.__litLocalizeEventHandler)}}const wo=o=>o.addController(new yo(o));/** + */class ys{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(pt,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pt,this.__litLocalizeEventHandler)}}const _s=s=>s.addController(new ys(s));/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class fi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** + */class pi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** * @license * Copyright 2014 Travis Webb * SPDX-License-Identifier: MIT - */const V=[];for(let o=0;o<256;o++)V[o]=(o>>4&15).toString(16)+(o&15).toString(16);function _o(o){let e=0,t=8997,i=0,s=33826,a=0,n=40164,r=0,l=52210;for(let c=0;c>>16,t=e&65535,a+=i>>>16,s=i&65535,l=r+(a>>>16)&65535,n=a&65535;return V[l>>8]+V[l&255]+V[n>>8]+V[n&255]+V[s>>8]+V[s&255]+V[t>>8]+V[t&255]}/** + */const V=[];for(let s=0;s<256;s++)V[s]=(s>>4&15).toString(16)+(s&15).toString(16);function ws(s){let e=0,t=8997,i=0,o=33826,a=0,r=40164,n=0,l=52210;for(let d=0;d>>16,t=e&65535,a+=i>>>16,o=i&65535,l=n+(a>>>16)&65535,r=a&65535;return V[l>>8]+V[l&255]+V[r>>8]+V[r&255]+V[o>>8]+V[o&255]+V[t>>8]+V[t&255]}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const $o="",xo="h",ko="s";function So(o,e){return(e?xo:ko)+_o(typeof o=="string"?o:o.join($o))}/** + */const $s="",xs="h",ks="s";function Ss(s,e){return(e?xs:ks)+ws(typeof s=="string"?s:s.join($s))}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const bi=new WeakMap,gi=new Map;function To(o,e,t){if(o){const i=(t==null?void 0:t.id)??Ao(e),s=o[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return ui(s.strings,e.values,s.values);{let a=bi.get(s);return a===void 0&&(a=s.values,bi.set(s,a)),{...s,values:a.map(n=>e.values[n])}}}}return hi(e)}function Ao(o){const e=typeof o=="string"?o:o.strings;let t=gi.get(e);return t===void 0&&(t=So(e,typeof o!="string"&&!("strTag"in o)),gi.set(e,t)),t}/** + */const fi=new WeakMap,bi=new Map;function Es(s,e,t){if(s){const i=(t==null?void 0:t.id)??As(e),o=s[i];if(o){if(typeof o=="string")return o;if("strTag"in o)return ci(o.strings,e.values,o.values);{let a=fi.get(o);return a===void 0&&(a=o.values,fi.set(o,a)),{...o,values:a.map(r=>e.values[r])}}}}return ui(e)}function As(s){const e=typeof s=="string"?s:s.strings;let t=bi.get(e);return t===void 0&&(t=Ss(e,typeof s!="string"&&!("strTag"in s)),bi.set(e,t)),t}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function ft(o){window.dispatchEvent(new CustomEvent(pt,{detail:o}))}let De="",bt,mi,ze,gt,vi,ae=new fi;ae.resolve();let Re=0;const Eo=o=>(vo((e,t)=>To(vi,e,t)),De=mi=o.sourceLocale,ze=new Set(o.targetLocales),ze.add(o.sourceLocale),gt=o.loadLocale,{getLocale:Oo,setLocale:Co}),Oo=()=>De,Co=o=>{if(o===(bt??De))return ae.promise;if(!ze||!gt)throw new Error("Internal error");if(!ze.has(o))throw new Error("Invalid locale code");Re++;const e=Re;return bt=o,ae.settled&&(ae=new fi),ft({status:"loading",loadingLocale:o}),(o===mi?Promise.resolve({templates:void 0}):gt(o)).then(i=>{Re===e&&(De=o,bt=void 0,vi=i.templates,ft({status:"ready",readyLocale:o}),ae.resolve())},i=>{Re===e&&(ft({status:"error",errorLocale:o,errorMessage:i.toString()}),ae.reject(i))}),ae.promise},Lo=(o,e,t)=>{const i=o[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Io="en",Po=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:Mo}=Eo({sourceLocale:Io,targetLocales:Po,loadLocale:o=>Lo(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ba),"./generated/ar.js":()=>Promise.resolve().then(()=>Ga),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Ka),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Ja),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Ya),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>en),"./generated/cs.js":()=>Promise.resolve().then(()=>sn),"./generated/de_DE.js":()=>Promise.resolve().then(()=>an),"./generated/el.js":()=>Promise.resolve().then(()=>rn),"./generated/en_US.js":()=>Promise.resolve().then(()=>dn),"./generated/es-419.js":()=>Promise.resolve().then(()=>un),"./generated/es_419.js":()=>Promise.resolve().then(()=>pn),"./generated/es_ES.js":()=>Promise.resolve().then(()=>bn),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>mn),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>yn),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>_n),"./generated/hr.js":()=>Promise.resolve().then(()=>xn),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>Sn),"./generated/id_ID.js":()=>Promise.resolve().then(()=>An),"./generated/it_IT.js":()=>Promise.resolve().then(()=>On),"./generated/ja.js":()=>Promise.resolve().then(()=>Ln),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Pn),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>jn),"./generated/mr.js":()=>Promise.resolve().then(()=>zn),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Nn),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Fn),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Vn),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Hn),"./generated/pl.js":()=>Promise.resolve().then(()=>Wn),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Zn),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Qn),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>Xn),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>tr),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>sr),"./generated/sw.js":()=>Promise.resolve().then(()=>ar),"./generated/th.js":()=>Promise.resolve().then(()=>rr),"./generated/tl.js":()=>Promise.resolve().then(()=>dr),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>ur),"./generated/uk.js":()=>Promise.resolve().then(()=>pr),"./generated/vi.js":()=>Promise.resolve().then(()=>br),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>mr),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>yr)}),`./generated/${o}.js`,3)});class mt{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,s="dt/v1/"){let a=s;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const n=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,r={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(r.body=JSON.stringify(i));const l=await fetch(n,r),c=await l.json();if(!l.ok){const b=new Error((c==null?void 0:c.message)||c.toString());throw b.args={status:l.status,statusText:l.statusText,body:c},b}return c}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const s=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${s}`)}async getLocations(e,t,i,s=""){const a=new URLSearchParams({s,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,s="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:s})}async updateComment(e,t,i,s,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:s,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,s,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:s,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,s){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:s.post,comment:s.comment,meta:s.meta,status:s.status},"dt-posts/v2/posts/search/")}}(function(){(function(o){const e=new WeakMap,t=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,b=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,w=new WeakMap,L=new WeakMap,N={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},M=(h,d)=>{for(let p in N){d[p]=null;let m=null;const _=N[p];Object.defineProperty(d,p,{get(){return m},set(k){m=k,h.isConnected?P(h,_,k):b.set(h,d)}})}};function I(h){const d=s.get(h),{form:p}=d;Ls(h,p,d),Cs(h,d.labels)}const Le=(h,d=!1)=>{const p=document.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return s.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let m=p.nextNode();const _=!d||h.disabled;for(;m;)m.formDisabledCallback&&_&&Rt(m,h.disabled),m=p.nextNode()},Ze={attributes:!0,attributeFilter:["disabled","name"]},X=Ye()?new MutationObserver(h=>{for(const d of h){const p=d.target;if(d.attributeName==="disabled"&&(p.constructor.formAssociated?Rt(p,p.hasAttribute("disabled")):p.localName==="fieldset"&&Le(p)),d.attributeName==="name"&&p.constructor.formAssociated){const m=s.get(p),_=c.get(p);m.setFormValue(_)}}}):{};function T(h){h.forEach(d=>{const{addedNodes:p,removedNodes:m}=d,_=Array.from(p),k=Array.from(m);_.forEach(S=>{var j;if(s.has(S)&&S.constructor.formAssociated&&I(S),b.has(S)){const C=b.get(S);Object.keys(N).filter(F=>C[F]!==null).forEach(F=>{P(S,N[F],C[F])}),b.delete(S)}if(L.has(S)){const C=L.get(S);P(S,"internals-valid",C.validity.valid.toString()),P(S,"internals-invalid",(!C.validity.valid).toString()),P(S,"aria-invalid",(!C.validity.valid).toString()),L.delete(S)}if(S.localName==="form"){const C=l.get(S),G=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(Ut){return s.has(Ut)&&Ut.constructor.formAssociated&&!(C&&C.has(Ut))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let F=G.nextNode();for(;F;)I(F),F=G.nextNode()}S.localName==="fieldset"&&((j=X.observe)===null||j===void 0||j.call(X,S,Ze),Le(S,!0))}),k.forEach(S=>{const j=s.get(S);j&&i.get(j)&&Es(j),r.has(S)&&r.get(S).disconnect()})})}function z(h){h.forEach(d=>{const{removedNodes:p}=d;p.forEach(m=>{const _=y.get(d.target);s.has(m)&&Ps(m),_.disconnect()})})}const le=h=>{var d,p;const m=new MutationObserver(z);!((d=window==null?void 0:window.ShadyDOM)===null||d===void 0)&&d.inUse&&h.mode&&h.host&&(h=h.host),(p=m.observe)===null||p===void 0||p.call(m,h,{childList:!0}),y.set(h,m)};Ye()&&new MutationObserver(T);const ee={childList:!0,subtree:!0},P=(h,d,p)=>{h.getAttribute(d)!==p&&h.setAttribute(d,p)},Rt=(h,d)=>{h.toggleAttribute("internals-disabled",d),d?P(h,"aria-disabled","true"):h.removeAttribute("aria-disabled"),h.formDisabledCallback&&h.formDisabledCallback.apply(h,[d])},Es=h=>{i.get(h).forEach(p=>{p.remove()}),i.set(h,[])},Os=(h,d)=>{const p=document.createElement("input");return p.type="hidden",p.name=h.getAttribute("name"),h.after(p),i.get(d).push(p),p},wr=(h,d)=>{var p;i.set(d,[]),(p=X.observe)===null||p===void 0||p.call(X,h,Ze)},Cs=(h,d)=>{if(d.length){Array.from(d).forEach(m=>m.addEventListener("click",h.click.bind(h)));let p=d[0].id;d[0].id||(p=`${d[0].htmlFor}_Label`,d[0].id=p),P(h,"aria-labelledby",p)}},Je=h=>{const d=Array.from(h.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),p=l.get(h)||[],m=Array.from(p).filter(k=>k.isConnected).map(k=>s.get(k).validity.valid),_=[...d,...m].includes(!1);h.toggleAttribute("internals-invalid",_),h.toggleAttribute("internals-valid",!_)},_r=h=>{Je(Qe(h.target))},$r=h=>{Je(Qe(h.target))},xr=h=>{const d=["button[type=submit]","input[type=submit]","button:not([type])"].map(p=>`${p}:not([disabled])`).map(p=>`${p}:not([form])${h.id?`,${p}[form='${h.id}']`:""}`).join(",");h.addEventListener("click",p=>{if(p.target.closest(d)){const _=l.get(h);if(h.noValidate)return;_.size&&Array.from(_).reverse().map(j=>s.get(j).reportValidity()).includes(!1)&&p.preventDefault()}})},kr=h=>{const d=l.get(h.target);d&&d.size&&d.forEach(p=>{p.constructor.formAssociated&&p.formResetCallback&&p.formResetCallback.apply(p)})},Ls=(h,d,p)=>{if(d){const m=l.get(d);if(m)m.add(h);else{const _=new Set;_.add(h),l.set(d,_),xr(d),d.addEventListener("reset",kr),d.addEventListener("input",_r),d.addEventListener("change",$r)}n.set(d,{ref:h,internals:p}),h.constructor.formAssociated&&h.formAssociatedCallback&&setTimeout(()=>{h.formAssociatedCallback.apply(h,[d])},0),Je(d)}},Qe=h=>{let d=h.parentNode;return d&&d.tagName!=="FORM"&&(d=Qe(d)),d},H=(h,d,p=DOMException)=>{if(!h.constructor.formAssociated)throw new p(d)},Is=(h,d,p)=>{const m=l.get(h);return m&&m.size&&m.forEach(_=>{s.get(_)[p]()||(d=!1)}),d},Ps=h=>{if(h.constructor.formAssociated){const d=s.get(h),{labels:p,form:m}=d;Cs(h,p),Ls(h,m,d)}};function Ye(){return typeof MutationObserver<"u"}class Sr{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Tr=h=>(h.badInput=!1,h.customError=!1,h.patternMismatch=!1,h.rangeOverflow=!1,h.rangeUnderflow=!1,h.stepMismatch=!1,h.tooLong=!1,h.tooShort=!1,h.typeMismatch=!1,h.valid=!0,h.valueMissing=!1,h),Ar=(h,d,p)=>(h.valid=Er(d),Object.keys(d).forEach(m=>h[m]=d[m]),p&&Je(p),h),Er=h=>{let d=!0;for(let p in h)p!=="valid"&&h[p]!==!1&&(d=!1);return d},Nt=new WeakMap;function Ms(h,d){h.toggleAttribute(d,!0),h.part&&h.part.add(d)}class qt extends Set{static get isPolyfilled(){return!0}constructor(d){if(super(),!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Nt.set(this,d)}add(d){if(!/^--/.test(d)||typeof d!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${d} must start with '--'.`);const p=super.add(d),m=Nt.get(this),_=`state${d}`;return m.isConnected?Ms(m,_):setTimeout(()=>{Ms(m,_)}),p}clear(){for(let[d]of this.entries())this.delete(d);super.clear()}delete(d){const p=super.delete(d),m=Nt.get(this);return m.isConnected?(m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)):setTimeout(()=>{m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)}),p}}function js(h,d,p,m){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?m:p==="a"?m.call(h):m?m.value:d.get(h)}function Or(h,d,p,m,_){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d.set(h,p),p}var Ie;class Cr{constructor(d){Ie.set(this,void 0),Or(this,Ie,d);for(let p=0;pG.compareDocumentPosition?G.compareDocumentPosition(F)&2?1:-1:0);return new Cr(C)}})}class Ds{static get isPolyfilled(){return!0}constructor(d){if(!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const p=d.getRootNode(),m=new Sr;this.states=new qt(d),e.set(this,d),t.set(this,m),s.set(d,this),M(d,this),wr(d,this),Object.seal(this),p instanceof DocumentFragment&&le(p)}checkValidity(){const d=e.get(this);if(H(d,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=t.get(this);if(!p.valid){const m=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});d.dispatchEvent(m)}return p.valid}get form(){const d=e.get(this);H(d,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let p;return d.constructor.formAssociated===!0&&(p=Qe(d)),p}get labels(){const d=e.get(this);H(d,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const p=d.getAttribute("id"),m=d.getRootNode();return m&&p?m.querySelectorAll(`[for="${p}"]`):[]}reportValidity(){const d=e.get(this);if(H(d,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=this.checkValidity(),m=v.get(this);if(m&&!d.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!p&&m&&(d.focus(),m.focus()),p}setFormValue(d){const p=e.get(this);if(H(p,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Es(this),d!=null&&!(d instanceof FormData)){if(p.getAttribute("name")){const m=Os(p,this);m.value=d}}else d!=null&&d instanceof FormData&&Array.from(d).reverse().forEach(([m,_])=>{if(typeof _=="string"){const k=Os(p,this);k.name=m,k.value=_}});c.set(p,d)}setValidity(d,p,m){const _=e.get(this);if(H(_,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!d)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");v.set(this,m);const k=t.get(this),S={};for(const G in d)S[G]=d[G];Object.keys(S).length===0&&Tr(k);const j=Object.assign(Object.assign({},k),S);delete j.valid;const{valid:C}=Ar(k,j,this.form);if(!C&&!p)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,C?"":p),_.isConnected?(_.toggleAttribute("internals-invalid",!C),_.toggleAttribute("internals-valid",C),P(_,"aria-invalid",`${!C}`)):L.set(_,this)}get shadowRoot(){const d=e.get(this),p=g.get(d);return p||null}get validationMessage(){const d=e.get(this);return H(d,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const d=e.get(this);return H(d,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const d=e.get(this);return H(d,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(d.disabled||d.hasAttribute("disabled")||d.hasAttribute("readonly"))}}function Ir(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class h extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const d=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(d,h);const p=new h;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(m=>m in p.internals)}let zs=!1,Rs=!1;function Ft(h){Rs||(Rs=!0,window.CustomStateSet=qt,h&&(HTMLElement.prototype.attachInternals=function(...d){const p=h.call(this,d);return p.states=new qt(this),p}))}function Ns(h=!0){if(!zs){if(zs=!0,typeof window<"u"&&(window.ElementInternals=Ds),typeof CustomElementRegistry<"u"){const d=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(p,m,_){if(m.formAssociated){const k=m.prototype.connectedCallback;m.prototype.connectedCallback=function(){w.has(this)||(w.set(this,!0),this.hasAttribute("disabled")&&Rt(this,!0)),k!=null&&k.apply(this),Ps(this)}}d.call(this,p,m,_)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(s.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Ds(this)}),typeof Element<"u"){let d=function(...m){const _=p.apply(this,m);if(g.set(this,_),Ye()){const k=new MutationObserver(T);window.ShadyDOM?k.observe(this,ee):k.observe(_,ee),r.set(this,k)}return _};const p=Element.prototype.attachShadow;Element.prototype.attachShadow=d}Ye()&&typeof document<"u"&&new MutationObserver(T).observe(document.documentElement,ee),typeof HTMLFormElement<"u"&&Lr(),(h||typeof window<"u"&&!window.CustomStateSet)&&Ft()}}return!!customElements.polyfillWrapFlushCallback||(Ir()?typeof window<"u"&&!window.CustomStateSet&&Ft(HTMLElement.prototype.attachInternals):Ns(!1)),o.forceCustomStateSetPolyfill=Ft,o.forceElementInternalsPolyfill=Ns,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})();class R extends oe{static get properties(){return{RTL:{type:Boolean},locale:{type:String},apiRoot:{type:String,reflect:!1},postType:{type:String,reflect:!1},postID:{type:String,reflect:!1}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),wo(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}connectedCallback(){super.connectedCallback(),this.apiRoot=this.apiRoot?`${this.apiRoot}/`.replace("//","/"):"/",this.api=new mt(this.nonce,this.apiRoot)}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{Mo(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class yi extends R{static get formAssociated(){return!0}static get styles(){return x` + */function ft(s){window.dispatchEvent(new CustomEvent(pt,{detail:s}))}let De="",bt,mi,Re,mt,gi,ae=new pi;ae.resolve();let Ne=0;const Os=s=>(vs((e,t)=>Es(gi,e,t)),De=mi=s.sourceLocale,Re=new Set(s.targetLocales),Re.add(s.sourceLocale),mt=s.loadLocale,{getLocale:Ts,setLocale:Cs}),Ts=()=>De,Cs=s=>{if(s===(bt??De))return ae.promise;if(!Re||!mt)throw new Error("Internal error");if(!Re.has(s))throw new Error("Invalid locale code");Ne++;const e=Ne;return bt=s,ae.settled&&(ae=new pi),ft({status:"loading",loadingLocale:s}),(s===mi?Promise.resolve({templates:void 0}):mt(s)).then(i=>{Ne===e&&(De=s,bt=void 0,gi=i.templates,ft({status:"ready",readyLocale:s}),ae.resolve())},i=>{Ne===e&&(ft({status:"error",errorLocale:s,errorMessage:i.toString()}),ae.reject(i))}),ae.promise},Ls=(s,e,t)=>{const i=s[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((o,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Is="en",Ps=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:Ms}=Os({sourceLocale:Is,targetLocales:Ps,loadLocale:s=>Ls(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ba),"./generated/ar.js":()=>Promise.resolve().then(()=>Ka),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Ga),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Ja),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Xa),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>er),"./generated/cs.js":()=>Promise.resolve().then(()=>ir),"./generated/de_DE.js":()=>Promise.resolve().then(()=>sr),"./generated/el.js":()=>Promise.resolve().then(()=>rr),"./generated/en_US.js":()=>Promise.resolve().then(()=>lr),"./generated/es-419.js":()=>Promise.resolve().then(()=>cr),"./generated/es_419.js":()=>Promise.resolve().then(()=>hr),"./generated/es_ES.js":()=>Promise.resolve().then(()=>fr),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>mr),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>vr),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>_r),"./generated/hr.js":()=>Promise.resolve().then(()=>$r),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>kr),"./generated/id_ID.js":()=>Promise.resolve().then(()=>Er),"./generated/it_IT.js":()=>Promise.resolve().then(()=>Or),"./generated/ja.js":()=>Promise.resolve().then(()=>Cr),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Ir),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>Mr),"./generated/mr.js":()=>Promise.resolve().then(()=>zr),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Dr),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Nr),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Ur),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Br),"./generated/pl.js":()=>Promise.resolve().then(()=>Kr),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Gr),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Jr),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>Xr),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>en),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>on),"./generated/sw.js":()=>Promise.resolve().then(()=>an),"./generated/th.js":()=>Promise.resolve().then(()=>nn),"./generated/tl.js":()=>Promise.resolve().then(()=>dn),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>un),"./generated/uk.js":()=>Promise.resolve().then(()=>pn),"./generated/vi.js":()=>Promise.resolve().then(()=>bn),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>gn),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>yn)}),`./generated/${s}.js`,3)});class vi{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,o="dt/v1/"){let a=o;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const r=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,n={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(n.body=JSON.stringify(i));const l=await fetch(r,n),d=await l.json();if(!l.ok){const u=new Error((d==null?void 0:d.message)||d.toString());throw u.args={status:l.status,statusText:l.statusText,body:d},u}return d}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const o=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${o}`)}async getLocations(e,t,i,o=""){const a=new URLSearchParams({s:o,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,o="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:o})}async updateComment(e,t,i,o,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:o,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,o,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:o,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,o){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:o.post,comment:o.comment,meta:o.meta,status:o.status},"dt-posts/v2/posts/search/")}async uploadFiles(e,t,i,o,a=""){const r=new FormData;i.forEach(l=>r.append("storage_upload_files[]",l)),r.append("meta_key",o),r.append("key_prefix",a),r.append("upload_type","post"),r.append("is_multi_file","true"),r.append("storage_s3_url_duration","+7 days");const n=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_upload`;return await new Promise((l,d)=>{const u=new XMLHttpRequest;u.open("POST",n,!0),u.withCredentials=!0,u.setRequestHeader("X-WP-Nonce",this.nonce),u.onload=()=>{let h={};try{h=JSON.parse(u.responseText||"{}")}catch{h={message:u.responseText||"Upload failed"}}if(u.status>=200&&u.status<300)l(h);else{const g=new Error((h==null?void 0:h.uploaded_msg)||(h==null?void 0:h.message)||"Upload failed");g.args={status:u.status,statusText:u.statusText,body:h},d(g)}},u.onerror=()=>d(new Error("Upload failed")),u.send(r)})}async deleteFile(e,t,i,o){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_delete_single`,{meta_key:i,file_key:o})}async renameFile(e,t,i,o,a){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_rename_single`,{meta_key:i,file_key:o,new_name:a})}async downloadFile(e,t,i,o){const a=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_download`,r=await fetch(a,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce},body:JSON.stringify({meta_key:i,file_key:o})});if(!r.ok){const n=await r.json().catch(()=>({message:"Download failed"}));throw new Error(n.message||"Download failed")}return await r.blob()}}(function(){(function(s){const e=new WeakMap,t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,C=new WeakMap,F={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},M=(f,c)=>{for(let b in F){c[b]=null;let v=null;const w=F[b];Object.defineProperty(c,b,{get(){return v},set(k){v=k,f.isConnected?I(f,w,k):u.set(f,c)}})}};function L(f){const c=o.get(f),{form:b}=c;Io(f,b,c),Lo(f,c.labels)}const Ie=(f,c=!1)=>{const b=document.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return o.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let v=b.nextNode();const w=!c||f.disabled;for(;v;)v.formDisabledCallback&&w&&Ft(v,f.disabled),v=b.nextNode()},Je={attributes:!0,attributeFilter:["disabled","name"]},Y=Ye()?new MutationObserver(f=>{for(const c of f){const b=c.target;if(c.attributeName==="disabled"&&(b.constructor.formAssociated?Ft(b,b.hasAttribute("disabled")):b.localName==="fieldset"&&Ie(b)),c.attributeName==="name"&&b.constructor.formAssociated){const v=o.get(b),w=d.get(b);v.setFormValue(w)}}}):{};function E(f){f.forEach(c=>{const{addedNodes:b,removedNodes:v}=c,w=Array.from(b),k=Array.from(v);w.forEach(S=>{var j;if(o.has(S)&&S.constructor.formAssociated&&L(S),u.has(S)){const T=u.get(S);Object.keys(F).filter(q=>T[q]!==null).forEach(q=>{I(S,F[q],T[q])}),u.delete(S)}if(C.has(S)){const T=C.get(S);I(S,"internals-valid",T.validity.valid.toString()),I(S,"internals-invalid",(!T.validity.valid).toString()),I(S,"aria-invalid",(!T.validity.valid).toString()),C.delete(S)}if(S.localName==="form"){const T=l.get(S),K=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(qt){return o.has(qt)&&qt.constructor.formAssociated&&!(T&&T.has(qt))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let q=K.nextNode();for(;q;)L(q),q=K.nextNode()}S.localName==="fieldset"&&((j=Y.observe)===null||j===void 0||j.call(Y,S,Je),Ie(S,!0))}),k.forEach(S=>{const j=o.get(S);j&&i.get(j)&&To(j),n.has(S)&&n.get(S).disconnect()})})}function z(f){f.forEach(c=>{const{removedNodes:b}=c;b.forEach(v=>{const w=y.get(c.target);o.has(v)&&Mo(v),w.disconnect()})})}const de=f=>{var c,b;const v=new MutationObserver(z);!((c=window==null?void 0:window.ShadyDOM)===null||c===void 0)&&c.inUse&&f.mode&&f.host&&(f=f.host),(b=v.observe)===null||b===void 0||b.call(v,f,{childList:!0}),y.set(f,v)};Ye()&&new MutationObserver(E);const ee={childList:!0,subtree:!0},I=(f,c,b)=>{f.getAttribute(c)!==b&&f.setAttribute(c,b)},Ft=(f,c)=>{f.toggleAttribute("internals-disabled",c),c?I(f,"aria-disabled","true"):f.removeAttribute("aria-disabled"),f.formDisabledCallback&&f.formDisabledCallback.apply(f,[c])},To=f=>{i.get(f).forEach(b=>{b.remove()}),i.set(f,[])},Co=(f,c)=>{const b=document.createElement("input");return b.type="hidden",b.name=f.getAttribute("name"),f.after(b),i.get(c).push(b),b},_n=(f,c)=>{var b;i.set(c,[]),(b=Y.observe)===null||b===void 0||b.call(Y,f,Je)},Lo=(f,c)=>{if(c.length){Array.from(c).forEach(v=>v.addEventListener("click",f.click.bind(f)));let b=c[0].id;c[0].id||(b=`${c[0].htmlFor}_Label`,c[0].id=b),I(f,"aria-labelledby",b)}},Qe=f=>{const c=Array.from(f.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),b=l.get(f)||[],v=Array.from(b).filter(k=>k.isConnected).map(k=>o.get(k).validity.valid),w=[...c,...v].includes(!1);f.toggleAttribute("internals-invalid",w),f.toggleAttribute("internals-valid",!w)},wn=f=>{Qe(Xe(f.target))},$n=f=>{Qe(Xe(f.target))},xn=f=>{const c=["button[type=submit]","input[type=submit]","button:not([type])"].map(b=>`${b}:not([disabled])`).map(b=>`${b}:not([form])${f.id?`,${b}[form='${f.id}']`:""}`).join(",");f.addEventListener("click",b=>{if(b.target.closest(c)){const w=l.get(f);if(f.noValidate)return;w.size&&Array.from(w).reverse().map(j=>o.get(j).reportValidity()).includes(!1)&&b.preventDefault()}})},kn=f=>{const c=l.get(f.target);c&&c.size&&c.forEach(b=>{b.constructor.formAssociated&&b.formResetCallback&&b.formResetCallback.apply(b)})},Io=(f,c,b)=>{if(c){const v=l.get(c);if(v)v.add(f);else{const w=new Set;w.add(f),l.set(c,w),xn(c),c.addEventListener("reset",kn),c.addEventListener("input",wn),c.addEventListener("change",$n)}r.set(c,{ref:f,internals:b}),f.constructor.formAssociated&&f.formAssociatedCallback&&setTimeout(()=>{f.formAssociatedCallback.apply(f,[c])},0),Qe(c)}},Xe=f=>{let c=f.parentNode;return c&&c.tagName!=="FORM"&&(c=Xe(c)),c},H=(f,c,b=DOMException)=>{if(!f.constructor.formAssociated)throw new b(c)},Po=(f,c,b)=>{const v=l.get(f);return v&&v.size&&v.forEach(w=>{o.get(w)[b]()||(c=!1)}),c},Mo=f=>{if(f.constructor.formAssociated){const c=o.get(f),{labels:b,form:v}=c;Lo(f,b),Io(f,v,c)}};function Ye(){return typeof MutationObserver<"u"}class Sn{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const En=f=>(f.badInput=!1,f.customError=!1,f.patternMismatch=!1,f.rangeOverflow=!1,f.rangeUnderflow=!1,f.stepMismatch=!1,f.tooLong=!1,f.tooShort=!1,f.typeMismatch=!1,f.valid=!0,f.valueMissing=!1,f),An=(f,c,b)=>(f.valid=On(c),Object.keys(c).forEach(v=>f[v]=c[v]),b&&Qe(b),f),On=f=>{let c=!0;for(let b in f)b!=="valid"&&f[b]!==!1&&(c=!1);return c},Dt=new WeakMap;function jo(f,c){f.toggleAttribute(c,!0),f.part&&f.part.add(c)}class Rt extends Set{static get isPolyfilled(){return!0}constructor(c){if(super(),!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Dt.set(this,c)}add(c){if(!/^--/.test(c)||typeof c!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${c} must start with '--'.`);const b=super.add(c),v=Dt.get(this),w=`state${c}`;return v.isConnected?jo(v,w):setTimeout(()=>{jo(v,w)}),b}clear(){for(let[c]of this.entries())this.delete(c);super.clear()}delete(c){const b=super.delete(c),v=Dt.get(this);return v.isConnected?(v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)):setTimeout(()=>{v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)}),b}}function zo(f,c,b,v){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot read private member from an object whose class did not declare it");return b==="m"?v:b==="a"?v.call(f):v?v.value:c.get(f)}function Tn(f,c,b,v,w){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c.set(f,b),b}var Pe;class Cn{constructor(c){Pe.set(this,void 0),Tn(this,Pe,c);for(let b=0;bK.compareDocumentPosition?K.compareDocumentPosition(q)&2?1:-1:0);return new Cn(T)}})}class Fo{static get isPolyfilled(){return!0}constructor(c){if(!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const b=c.getRootNode(),v=new Sn;this.states=new Rt(c),e.set(this,c),t.set(this,v),o.set(c,this),M(c,this),_n(c,this),Object.seal(this),b instanceof DocumentFragment&&de(b)}checkValidity(){const c=e.get(this);if(H(c,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=t.get(this);if(!b.valid){const v=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});c.dispatchEvent(v)}return b.valid}get form(){const c=e.get(this);H(c,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let b;return c.constructor.formAssociated===!0&&(b=Xe(c)),b}get labels(){const c=e.get(this);H(c,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const b=c.getAttribute("id"),v=c.getRootNode();return v&&b?v.querySelectorAll(`[for="${b}"]`):[]}reportValidity(){const c=e.get(this);if(H(c,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=this.checkValidity(),v=g.get(this);if(v&&!c.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!b&&v&&(c.focus(),v.focus()),b}setFormValue(c){const b=e.get(this);if(H(b,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),To(this),c!=null&&!(c instanceof FormData)){if(b.getAttribute("name")){const v=Co(b,this);v.value=c}}else c!=null&&c instanceof FormData&&Array.from(c).reverse().forEach(([v,w])=>{if(typeof w=="string"){const k=Co(b,this);k.name=v,k.value=w}});d.set(b,c)}setValidity(c,b,v){const w=e.get(this);if(H(w,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!c)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");g.set(this,v);const k=t.get(this),S={};for(const K in c)S[K]=c[K];Object.keys(S).length===0&&En(k);const j=Object.assign(Object.assign({},k),S);delete j.valid;const{valid:T}=An(k,j,this.form);if(!T&&!b)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,T?"":b),w.isConnected?(w.toggleAttribute("internals-invalid",!T),w.toggleAttribute("internals-valid",T),I(w,"aria-invalid",`${!T}`)):C.set(w,this)}get shadowRoot(){const c=e.get(this),b=h.get(c);return b||null}get validationMessage(){const c=e.get(this);return H(c,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const c=e.get(this);return H(c,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const c=e.get(this);return H(c,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(c.disabled||c.hasAttribute("disabled")||c.hasAttribute("readonly"))}}function In(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class f extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const c=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(c,f);const b=new f;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(v=>v in b.internals)}let Do=!1,Ro=!1;function Nt(f){Ro||(Ro=!0,window.CustomStateSet=Rt,f&&(HTMLElement.prototype.attachInternals=function(...c){const b=f.call(this,c);return b.states=new Rt(this),b}))}function No(f=!0){if(!Do){if(Do=!0,typeof window<"u"&&(window.ElementInternals=Fo),typeof CustomElementRegistry<"u"){const c=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(b,v,w){if(v.formAssociated){const k=v.prototype.connectedCallback;v.prototype.connectedCallback=function(){_.has(this)||(_.set(this,!0),this.hasAttribute("disabled")&&Ft(this,!0)),k!=null&&k.apply(this),Mo(this)}}c.call(this,b,v,w)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(o.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Fo(this)}),typeof Element<"u"){let c=function(...v){const w=b.apply(this,v);if(h.set(this,w),Ye()){const k=new MutationObserver(E);window.ShadyDOM?k.observe(this,ee):k.observe(w,ee),n.set(this,k)}return w};const b=Element.prototype.attachShadow;Element.prototype.attachShadow=c}Ye()&&typeof document<"u"&&new MutationObserver(E).observe(document.documentElement,ee),typeof HTMLFormElement<"u"&&Ln(),(f||typeof window<"u"&&!window.CustomStateSet)&&Nt()}}return!!customElements.polyfillWrapFlushCallback||(In()?typeof window<"u"&&!window.CustomStateSet&&Nt(HTMLElement.prototype.attachInternals):No(!1)),s.forceCustomStateSetPolyfill=Nt,s.forceElementInternalsPolyfill=No,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})();class N extends se{static get styles(){return[$` + :host { + } + `]}static get properties(){return{RTL:{type:Boolean},locale:{type:String}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),_s(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{Ms(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class yi extends N{static get formAssociated(){return!0}static get styles(){return $` :host { display: inline-flex; width: fit-content; @@ -205,7 +208,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr cursor: not-allowed; } } - `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return f` + `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return p` - `)),e}};class We extends Da(D){static get styles(){return[...super.styles,x` + `)),e}};class Ze extends za(P){static get styles(){return[...super.styles,$` :host { position: relative; - font-family: Helvetica, Arial, sans-serif; + font-family: var(--font-family, Helvetica, Arial, sans-serif); } .input-group { cursor: text; /* Indicates the area is clickable */ - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); } .input-group.disabled input, .input-group.disabled .field-container { - background-color: var(--disabled-color); + background-color: var( + --dt-multi-select-disabled-background-color, + var(--dt-form-disabled-background-color, var(--disabled-color)) + ); } .input-group.disabled a, .input-group.disabled button { @@ -585,10 +597,23 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .field-container { - background-color: var(--dt-multi-select-background-color, #fefefe); - border: 1px solid var(--dt-form-border-color, #cacaca); - border-radius: 0; - color: var(--dt-multi-select-text-color, #0a0a0a); + background-color: var( + --dt-multi-select-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); + border-radius: var( + --dt-multi-select-border-radius, + var(--dt-form-border-radius, 0) + ); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-size: 1rem; font-weight: 300; min-height: 2.5rem; @@ -605,6 +630,11 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr row-gap: 0.2rem; flex-wrap: wrap; min-width: 0; + transition: var( + --dt-form-transition, + box-shadow 0.5s, + border-color 0.25s ease-in-out + ); } .field-container input, @@ -614,10 +644,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .selected-option { cursor: default; - border: 1px solid var(--dt-multi-select-tag-border-color, #c2e0ff); + border: 1px solid + var( + --dt-multi-select-tag-border-color, + var(--primary-color-light-1, #c2e0ff) + ); background-color: var( --dt-multi-select-tag-background-color, - #c2e0ff + var(--primary-color-light-0, #ecf5fc) ); display: flex; @@ -651,8 +685,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr outline: 0; border: 0; border-inline-start: 1px solid - var(--dt-multi-select-tag-border-color, #c2e0ff); - color: var(--dt-multi-select-text-color, #0a0a0a); + var( + --dt-multi-select-tag-border-color, + var(--primary-color-light-1, #c2e0ff) + ); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); margin-inline-start: 4px; } .selected-option button:hover { @@ -660,13 +700,18 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .field-container input { - background-color: var(--dt-form-background-color, #fff); - color: var(--dt-form-text-color, #000); + background-color: transparent; + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); flex-grow: 1; min-width: 50px; flex-basis: 50px; border: 0; margin-block-start: 0.375rem; + font-family: inherit; + font-size: inherit; } .field-container input:focus, .field-container input:focus-visible, @@ -675,7 +720,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr outline: 0; } .field-container input::placeholder { - color: var(--dt-text-placeholder-color, #999); + color: var( + --dt-multi-select-placeholder-color, + var(--dt-form-placeholder-color, #999) + ); opacity: 1; } @@ -684,8 +732,15 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr list-style: none; margin: 0; padding: 0; - border: 1px solid var(--dt-form-border-color, #cacaca); - background: var(--dt-form-background-color, #fefefe); + border: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); + background: var( + --dt-multi-select-background-color, + var(--dt-form-background-color, #fefefe) + ); z-index: 10; position: absolute; width: 100%; @@ -696,13 +751,20 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr overflow-y: scroll; } .option-list li { - border-block-start: 1px solid var(--dt-form-border-color, #cacaca); + border-block-start: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); outline: 0; } .option-list li div, .option-list li button { padding: 0.5rem 0.75rem; - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-weight: 100; font-size: 1rem; text-decoration: none; @@ -717,40 +779,57 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .option-list li button:hover, .option-list li button.active { cursor: pointer; - background: var(--dt-multi-select-option-hover-background, #f5f5f5); + background: var( + --dt-multi-select-option-hover-background, + var(--dt-form-option-hover-background, var(--surface-2)) + ); } .field-container.invalid { - border: 1px solid var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var( + --dt-multi-select-border-color-alert, + var(--dt-form-border-color-alert, var(--alert-color)) + ); } - `]}static get properties(){return{...super.properties,placeholder:{type:String},containerHeight:{type:Number,state:!0}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length)if(typeof this.value[0]=="string")this.value=[...this.value.filter(i=>i!==`-${e}`),e];else{let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete&&(delete n.delete,i=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>i===e.target.dataset.value?`-${i}`:i),t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),s=e.has("options");(t||i||s)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>f` -
o!==`-${e}`),e];else{let o=!1;const a=this.value.map(r=>{const n={...r};return r.id===e.id&&r.delete&&(delete n.delete,o=!0),n});o||a.push(e),this.value=a}else this.value=[e];i.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(i),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=this.value,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:t}});this.value=(this.value||[]).map(o=>o===e.target.dataset.value?`-${o}`:o),i.detail.newValue=this.value,this.dispatchEvent(i),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),o=e.has("options");(t||i||o)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>p` +
- ${this.options.find(t=>t.id===e).label} + @keydown="${this._handleItemClick}" + part="tag" + > + ${this.options.find(t=>t.id===e).label}
- `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()} -
+
${this._renderSelectedOptions()}
-
    +
      ${this._renderOptions()}
    ${this.renderIcons()}
- `}}window.customElements.define("dt-multi-select",We);class za extends R{static get styles(){return x` + `}}window.customElements.define("dt-multi-select",Ze);class Fa extends N{static get styles(){return $` root { display: block; } @@ -795,16 +879,16 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } } } - `}static get properties(){return{key:{type:String},metric:{type:Object},active:{type:Boolean,reflect:!0},disabled:{type:Boolean},missingIcon:{type:String}}}renderIcon(){var s;const e=(s=window==null?void 0:window.wpApiShare)==null?void 0:s.template_dir,{metric:t,missingIcon:i=`${e}/dt-assets/images/groups/missing.svg`}=this;if(t["font-icon"]){const a=t["font-icon"].replace("mdi mdi-","mdi:");return f``}return f``}return p`${t}`}render(){const{metric:e,active:t,disabled:i}=this;return f`
`}render(){const{metric:e,active:t,disabled:i}=this;return p`
${this.renderIcon()} -
`}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",za);class ds extends D{static get styles(){return[...super.styles,x` +
`}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",Fa);class co extends P{static get styles(){return[...super.styles,$` .root { display: block; } @@ -822,7 +906,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr align-items: center; width: fit-content; cursor: pointer; - min-height: var(--dt-form-input-height, 2.5rem); + min-height: var( + --dt-toggle-input-height, + var(--dt-form-input-height, 2.5rem) + ); } .icon-overlay { @@ -853,12 +940,12 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr box-sizing: content-box; width: calc(var(--diameter) * 2 + var(--offset) * 2); height: calc(var(--diameter) + var(--offset) * 2); - border: 0.1em solid rgb(0 0 0 / 0.2); + border: 0.1em solid var(--dt-toggle-border-color, rgb(0 0 0 / 0.2)); position: relative; border-radius: 100vw; background-color: var( --dt-toggle-background-color-off, - var(--gray-2) + var(--dt-form-background-color-off, #e6e6e6) ); transition: 250ms; } @@ -873,7 +960,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr width: var(--diameter); height: var(--diameter); border-radius: 50%; - background-color: white; + background-color: var(--dt-toggle-handle-color, white); transform: translate(0, -50%); will-change: transform; transition: inherit; @@ -894,7 +981,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .toggle[aria-pressed='true'] .toggle-display, .toggle-input:checked + .toggle-display { - background-color: var(--primary-color); + background-color: var( + --dt-toggle-background-color-on, + var(--dt-form-primary-color, var(--primary-color)) + ); } .toggle[aria-pressed='true'] .toggle-display::before, @@ -904,7 +994,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .toggle[disabled] .toggle-display, .toggle-input:disabled + .toggle-display { - opacity: 0.6; + opacity: var(--dt-toggle-disabled-opacity, 0.6); filter: grayscale(40%); cursor: not-allowed; } @@ -929,15 +1019,15 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .toggle-icon--cross { - color: var(--alert-color); + color: var(--dt-toggle-icon-color-off, var(--alert-color)); font-size: 0.55em; } .toggle-icon--checkmark { font-size: 0.65em; - color: var(--success-color); + color: var(--dt-toggle-icon-color-on, var(--success-color)); } - `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.checked,newValue:e.target.checked}});this.checked=e.target.checked,this.value=e.target.checked,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(t)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=f``,t=f``;return f` + `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){super.firstUpdated(),this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=e.target.checked,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.checked,newValue:t}});this.checked=t,this.value=t,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(i)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=p``,t=p``;return p`
${this.labelTemplate()} @@ -958,13 +1048,13 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?disabled=${this.disabled} /> - ${this.icons?f` ${e} ${t} `:f``} + ${this.icons?p` ${e} ${t} `:p``} ${this.renderIcons()}
- `}}window.customElements.define("dt-toggle",ds);class cs extends We{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-toggle",co);class uo extends Ze{static get styles(){return[...super.styles,$` .health-circle__container { --icon-count: 9; /* Updated circle size based on dynamic width */ @@ -1036,7 +1126,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr transform: rotate(var(--az)) translate(var(--radius)) rotate(calc(-1 * var(--az))); } - `,x` + `,$` dt-toggle::part(root) { display: flex; align-items: center; @@ -1047,14 +1137,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr dt-toggle::part(label-container) { font-weight: 300; } - `,x` + `,$` .icon-overlay { inset-inline-end: 0; } .error-container { margin-block-start: 0.5rem; } - `]}static get properties(){const e={...super.properties,settings:{type:Object,reflect:!1},missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,s])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){return f` + `]}static get properties(){const e={...super.properties,missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,o])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){var e,t;return p`
- ${this.filteredOptions.map(([e,t],i)=>f`p` `)} @@ -1082,7 +1172,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ${this.renderError()}
- `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",cs);class Oe extends We{static get properties(){return{...super.properties,allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,x` + `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",uo);class Ce extends Ze{static get properties(){return{...super.properties,postType:{type:String,reflect:!1},allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,$` .selected-option a, .selected-option a:active, .selected-option a:visited { text-decoration: none; - color: var(--primary-color, #3f729b); + color: var( + --dt-tags-selected-link-color, + var(--primary-color, #3f729b) + ); } - .selected-option a[href="#"], - .selected-option a[href=""] { - color: var(--dt-multi-select-text-color, #0a0a0a); + .selected-option a[href='#'], + .selected-option a[href=''] { + color: var( + --dt-tags-selected-text-color, + var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ) + ); pointer-events: none; } .invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var( + --dt-tags-invalid-border-color, + var(--dt-form-border-color-alert, var(--alert-color)) + ); } .input-group { @@ -1121,21 +1223,37 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .input-addon.btn-add { - background-color: var(--dt-multi-text-background-color, #fefefe); - border: 1px solid var(--dt-multi-text-border-color, #fefefe); + background-color: var( + --dt-tags-add-button-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var( + --dt-tags-add-button-border-color, + var(--dt-form-border-color, #fefefe) + ); width: 37.5px; &:disabled { - color: var(--dt-text-placeholder-color, #999); + color: var( + --dt-tags-add-button-disabled-color, + var(--dt-form-placeholder-color, #999) + ); } &:hover:not([disabled]) { - background-color: var(--success-color, #cc4b37); - color: var(--dt-multi-text-button-hover-color, #ffffff); + background-color: var( + --dt-tags-add-button-hover-background-color, + var(--success-color, #4caf50) + ); + color: var( + --dt-tags-add-button-hover-color, + var(--dt-form-text-color-light, #ffffff) + ); } } .input-group.allowAdd .icon-overlay { inset-inline-end: 3rem; } - `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let n=a;n.length&&typeof n[0]=="string"&&(n=n.map(r=>({id:r}))),i.allOptions=n,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let r=a;r.length&&typeof r[0]=="string"&&(r=r.map(n=>({id:n}))),i.allOptions=r,i.filteredOptions=r.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_renderOption(e,t){return p`
  • - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const n=e.filter(r=>r===t||r.id===t);n.length&&(i=n[0].label||n[0].id||t)}let s;if(!s&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const n=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),r=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${r}: ${t}`}];s=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,n,l)}return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const r=e.filter(n=>n===t||n.id===t);r.length&&(i=r[0].label||r[0].id||t)}let o;if(!o&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const r=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),n=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${n}: ${t}`}];o=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,r,l)}return p`
    - ${i}
    - `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()}
    - ${this.allowAdd?f``:null}
      @@ -1203,7 +1321,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-tags",Oe);class us extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-tags",Ce);class ho extends Ce{static get styles(){return[...super.styles,$` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1238,9 +1356,9 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr fill: var(--dt-connection-icon-fill, var(--primary-color)); } .invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var(--dt-form-border-color-alert, var(--alert-color)); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const n={...a};return a.id===t&&(n.delete=!0),n}),s.detail.newValue=this.value,this.dispatchEvent(s),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((o,a)=>!o&&a.id==t?a:o,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const o=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const r={...a};return a.id===t&&(r.delete=!0),r}),o.detail.newValue=this.value,this.dispatchEvent(o),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p`
    - `)}_renderOption(e,t){const i=f`circle-08 2Created using Figma`,s=e.status||{label:"",color:""};return f` -
  • + `)}_renderOption(e,t){const i=p`circle-08 2Created using Figma`,o=e.status||{label:"",color:""};return p` +
  • - `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()}
    - ${this.allowAdd?f``:null}
      @@ -1316,7 +1434,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-connection",us);class hs extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-connection",ho);class po extends Ce{static get styles(){return[...super.styles,$` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1342,15 +1460,19 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr font-style: normal; } + li button .avatar { + margin-inline-end: 1ch; + } + li button svg { width: 20px; height: auto; margin-bottom: -4px; } li button svg use { - fill: var(--dt-connection-icon-fill, var(--primary-color)); + fill: var(--dt-users-connection-icon-fill, var(--primary-color)); } - `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length&&!this.single){let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete?(delete n.delete,i=!0):this.single&&!a.delete&&(n.delete=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){let i=!1,o=this.value.map(a=>{const r={...a};return a.id===e.id&&a.delete?(delete r.delete,i=!0):this.single&&!a.delete&&(r.delete=!0),r});i||o.push(e),this.single&&(o=o.filter(a=>!a.delete)),this.value=o}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((o,a)=>!o&&a.id==t?a:o,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const o={...i};return i.id.toString()===e.target.dataset.value&&(o.delete=!0),o}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p` - `)}_renderOption(e,t){return f` + `)}_renderOption(e,t){const i=e.avatar?p`${e.label}`:p``;return p`
  • - `}}window.customElements.define("dt-users-connection",hs);class ps extends R{static get styles(){return x` + `}}window.customElements.define("dt-users-connection",po);class fo extends N{static get styles(){return $` :root { font-size: inherit; --dt-copy-text-color: #575757; @@ -1414,7 +1538,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr :host([dir='rtl']) .copy_icon { transform: translate(1.5em, -0.3125em); } - `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return f` + `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return p`
    - `}}window.customElements.define("dt-copy-text",ps);class Dt extends D{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-copy-text",fo);class jt extends P{static get styles(){return[...super.styles,$` input { - color: var(--dt-form-text-color, #000); + color: var(--dt-date-text-color, var(--dt-form-text-color, #000)); appearance: none; - background-color: var(--dt-form-background-color, #cecece); - border: 1px solid var(--dt-form-border-color, #cacaca); - border-radius: var(--dt-date-border-radius, 0); + background-color: var( + --dt-date-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var(--dt-date-border-color, var(--dt-form-border-color, #cacaca)); + border-radius: var( + --dt-date-border-radius, + var(--dt-form-border-radius, 0) + ); box-shadow: var( --dt-date-box-shadow, var( @@ -1485,7 +1616,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .field-container.invalid .input-addon { border-color: var(--dt-date-border-color-alert, var(--alert-color)); } - `,x` + `,$` .field-container { display: flex; } @@ -1499,15 +1630,17 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr align-items: center; aspect-ratio: 1/1; padding: 10px; - border: solid 1px gray; border-collapse: collapse; background-color: var( --dt-date-background-color, - var(--dt-form-background-color, buttonface) + var(--dt-form-background-color, #fefefe) ); border: 1px solid - var(--dt-date-border-color, var(--dt-form-border-color, #fefefe)); - border-radius: var(--dt-date-border-radius, 0); + var(--dt-date-border-color, var(--dt-form-border-color, #cacaca)); + border-radius: var( + --dt-date-border-radius, + var(--dt-form-border-radius, 0) + ); box-shadow: var( --dt-date-box-shadow, var( @@ -1542,7 +1675,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .icon-overlay { inset-inline-end: 5rem; } - `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=new Date(e).getTime(),i=t/1e3,s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.timestamp,newValue:i}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(s)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=e?new Date(e).getTime():0,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:e}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(i)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),p` ${this.labelTemplate()}
    @@ -1576,11 +1709,11 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ${this.renderIcons()}
    - `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",Dt);class fs extends Dt{static get styles(){return[...super.styles,x` + `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",jt);class bo extends jt{static get styles(){return[...super.styles,$` input[type='datetime-local'] { max-width: calc(100% - 22px - 1rem); } - `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),p` ${this.labelTemplate()}
    @@ -1606,6 +1739,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr data-inputid="${this.id}" ?disabled=${this.disabled} part="clear-button" + aria-label="Clear date and time" > @@ -1613,11 +1747,11 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ${this.renderIcons()}
    - `}}window.customElements.define("dt-datetime",fs);/** + `}}window.customElements.define("dt-datetime",bo);/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function*Ke(o,e){if(o!==void 0){let t=0;for(const i of o)yield e(i,t++)}}class bs extends Oe{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,x` + */function*Da(s,e){if(s!==void 0){let t=0;for(const i of s)yield e(i,t++)}}class mo extends Ce{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,$` .input-group { display: flex; } @@ -1638,7 +1772,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr 8px ); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((s,a)=>!s&&a.id===t?a:s,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:s==null?void 0:s.value,onSuccess:n=>{i.loading=!1,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:n=>{console.warn(n),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((o,a)=>!o&&a.id===t?a:o,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const o={...i};return i.id.toString()===e.target.dataset.value&&(o.delete=!0),o}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:o==null?void 0:o.value,onSuccess:r=>{i.loading=!1,i.filteredOptions=r.filter(n=>!e.includes(n.id))},onError:r=>{console.warn(r),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return p`
  • - `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p`
    - `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return f` + `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return p` ${this.labelTemplate()}
    @@ -1697,14 +1831,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?disabled="${this.disabled}" @change="${this._filterOptions}" > - ${Ke(this.filters,t=>f``)} + ${Da(this.filters,t=>p``)}
      ${this._renderOptions()}
    ${this.renderIconInvalid()} ${this.renderError()}
    - `}}window.customElements.define("dt-location",bs);class Ra{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),s={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,r=await(await fetch(a,s)).json();return r==null?void 0:r.features}async reverseGeocode(e,t,i="en"){const s=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},n=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${s}`,l=await(await fetch(n,a)).json();return l==null?void 0:l.features}}class Na{constructor(e,t,i){var s,a,n;if(this.token=e,this.window=t,!((n=(a=(s=t.google)==null?void 0:s.maps)==null?void 0:a.places)!=null&&n.AutocompleteService)){const r=i.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(r)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const s=await this._getPlaceSuggestionsRest(e,t);if(s)return s;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,s)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){s("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(n,r)=>{r!=="OK"?s(r):i(n)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),n=await a.json();if(!a.ok&&n.error)throw n.error;return(Array.isArray(n&&n.suggestions)?n.suggestions:[]).map(b=>b&&b.placePrediction?b.placePrediction:null).filter(Boolean).map(b=>{const g=b.placeId||(b.place?String(b.place).replace("places/",""):null),v=b.text&&b.text.text||[b.structuredFormat&&b.structuredFormat.mainText&&b.structuredFormat.mainText.text,b.structuredFormat&&b.structuredFormat.secondaryText&&b.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return g&&v?{description:v,place_id:g}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const s=new window.google.maps.Geocoder;try{const{results:a}=await s.geocode({placeId:e.place_id,language:t}),n=a[0];i={lng:n.geometry.location.lng(),lat:n.geometry.location.lat(),level:this.convert_level(n.types[0]),label:e.description||n.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,r=await(await fetch(a,{method:"GET"})).json();return r==null?void 0:r.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class gs extends R{static get styles(){return x` + `}}window.customElements.define("dt-location",mo);class Ra{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),o={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,n=await(await fetch(a,o)).json();return n==null?void 0:n.features}async reverseGeocode(e,t,i="en"){const o=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},r=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${o}`,l=await(await fetch(r,a)).json();return l==null?void 0:l.features}}class Na{constructor(e,t,i){var o,a,r;if(this.token=e,this.window=t,!((r=(a=(o=t.google)==null?void 0:o.maps)==null?void 0:a.places)!=null&&r.AutocompleteService)){const n=i.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(n)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const o=await this._getPlaceSuggestionsRest(e,t);if(o)return o;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,o)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){o("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(r,n)=>{n!=="OK"?o(n):i(r)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),r=await a.json();if(!a.ok&&r.error)throw r.error;return(Array.isArray(r&&r.suggestions)?r.suggestions:[]).map(u=>u&&u.placePrediction?u.placePrediction:null).filter(Boolean).map(u=>{const h=u.placeId||(u.place?String(u.place).replace("places/",""):null),g=u.text&&u.text.text||[u.structuredFormat&&u.structuredFormat.mainText&&u.structuredFormat.mainText.text,u.structuredFormat&&u.structuredFormat.secondaryText&&u.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return h&&g?{description:g,place_id:h}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const o=new window.google.maps.Geocoder;try{const{results:a}=await o.geocode({placeId:e.place_id,language:t}),r=a[0];i={lng:r.geometry.location.lng(),lat:r.geometry.location.lat(),level:this.convert_level(r.types[0]),label:e.description||r.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,n=await(await fetch(a,{method:"GET"})).json();return n==null?void 0:n.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class go extends N{static get styles(){return $` :host { display: block; font-family: var(--font-family); @@ -1922,23 +2056,23 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr /* Styles for the content inside the named slot */ font-size: 15px;; } - `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?f``:f` + `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?p``:p`

    ${this.formattedTitle}

    - `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?f` + `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?p`
    - `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=f` + `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=p` xmlns="http://www.w3.org/2000/svg"> - `;return f` + `;return p`
    - ${this.hideButton?null:f` + ${this.hideButton?null:p` `} - `}}window.customElements.define("dt-modal",gs);class ms extends R{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[x` + `}}window.customElements.define("dt-modal",go);class vo extends N{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[$` .map { width: 100%; min-width: 50vw; min-height: 50dvb; } - `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let s=15;i==="admin0"?s=3:i==="admin1"?s=6:i==="admin2"&&(s=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(s),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return f` + `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let o=15;i==="admin0"?o=3:i==="admin1"?o=6:i==="admin2"&&(o=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(o),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return p`
    - ${this.canEdit?f`
    ${O("Save")}
    `:null} + ${this.canEdit?p`
    ${R("Save")}
    `:null} - `}}window.customElements.define("dt-map-modal",ms);class qa extends R{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[x` + `}}window.customElements.define("dt-map-modal",vo);class qa extends N{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[...super.styles,$` :host { --dt-location-map-border-color: var(--dt-form-border-color, #fefefe); position: relative; @@ -2036,7 +2170,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .input-group { - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); } .input-group.disabled input, .input-group.disabled .field-container { @@ -2075,7 +2212,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .option-list li div, .option-list li button { padding: 0.5rem 0.75rem; - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-weight: 100; font-size: 1rem; text-decoration: none; @@ -2090,9 +2230,12 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .option-list li button:hover, .option-list li button.active { cursor: pointer; - background: var(--dt-multi-select-option-hover-background, #f5f5f5); + background: var( + --dt-multi-select-option-hover-background, + var(--surface-2) + ); } - `,x` + `,$` input { color: var(--dt-form-text-color, #000); appearance: none; @@ -2145,7 +2288,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr letter-spacing: var(--dt-text-placeholder-letter-spacing, normal); } input.invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var(--dt-form-border-color-alert, var(--alert-color)); } .field-container { @@ -2199,7 +2342,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .field-container.invalid { border: 1px solid - var(--dt-text-border-color-alert, var(--alert-color)); + var(--dt-form-border-color-alert, var(--alert-color)); } .input-addon:disabled { @@ -2211,7 +2354,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr color: var(--dt-text-placeholder-color, #999); cursor: not-allowed; } - `,x` + `,$` /* === Inline Icons === */ .icon-overlay { position: absolute; @@ -2247,7 +2390,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr opacity: 0; animation: fadeOut 4s; } - `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Ra(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new Na(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:s}=e==null?void 0:e.detail,{lat:a,lng:n}=s;if(this.googleGeocodeService){const r=await this.googleGeocodeService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const r=await this.mapboxService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return f` + `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Ra(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new Na(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,o=t.offsetTop+t.clientHeight,a=e.scrollTop,r=e.scrollTop+e.clientHeight;o>r?e.scrollTo({top:o-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:o}=e==null?void 0:e.detail,{lat:a,lng:r}=o;if(this.googleGeocodeService){const n=await this.googleGeocodeService.reverseGeocode(r,a,this.locale);if(n&&n.length){const l=n[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const n=await this.mapboxService.reverseGeocode(r,a,this.locale);if(n&&n.length){const l=n[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return p`
  • - `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(f`
  • ${O("Loading...")}
  • `):e.push(f`
  • ${O("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,f`${O("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var s,a,n,r;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((s=this.metadata)!=null&&s.label),i=((a=this.metadata)==null?void 0:a.lat)&&((n=this.metadata)==null?void 0:n.lng);return f` + `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(p`
  • ${R("Loading...")}
  • `):e.push(p`
  • ${R("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,p`${R("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var o,a,r,n;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((o=this.metadata)!=null&&o.label),i=((a=this.metadata)==null?void 0:a.lat)&&((r=this.metadata)==null?void 0:r.lng);return p`
    - ${t&&i?f` + ${t&&i?p` `:null} - ${t?f` + ${t?p` - `:f` + `:p` - `,()=>f``)} + `,()=>p``)}
    - `}renderIcons(){let e=0,t=!1;for(const[a,n]of(this.value||[]).entries())!n.value&&a!==0?e+=1:n.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const s=`padding-block-end: ${i.toString()}rem`;return f` + `}renderIcons(){let e=0,t=!1;for(const[a,r]of(this.value||[]).entries())!r.value&&a!==0?e+=1:r.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const o=`padding-block-end: ${i.toString()}rem`;return p` ${this.renderIconInvalid()} ${this.renderError()} - ${this.renderIconLoading(s)} ${this.renderIconSaved(s)} - `}renderIconLoading(e){return this.loading?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?p``:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),f` - ${Ee((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return f` + >`:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),p` + ${pe((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return p` ${this.labelTemplate()}
    ${this._renderInputFields()} ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-text",$s);class xs extends D{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-multi-text",xo);class ko extends P{static get styles(){return[...super.styles,$` :host { - margin-bottom: 5px; - --dt-button-font-size: 0.75rem; - --dt-button-font-weight: 0; - --dt-button-line-height: 1em; - --dt-button-padding-y: 0.85em; - --dt-button-padding-x: 1em; + margin-bottom: var(--dt-multi-select-button-group-margin-bottom, 5px); + --dt-button-font-size: var( + --dt-multi-select-button-group-button-font-size, + 0.75rem + ); + --dt-button-font-weight: var( + --dt-multi-select-button-group-button-font-weight, + 0 + ); + --dt-button-line-height: var( + --dt-multi-select-button-group-button-line-height, + 1em + ); + --dt-button-padding-y: var( + --dt-multi-select-button-group-button-padding-y, + 0.85em + ); + --dt-button-padding-x: var( + --dt-multi-select-button-group-button-padding-x, + 1em + ); } span .icon { vertical-align: middle; @@ -2912,7 +3201,8 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr display: inline-flex; flex-direction: row; flex-wrap: wrap; - gap: 5px 10px; + gap: var(--dt-multi-select-button-group-gap-y, 5px) + var(--dt-multi-select-button-group-gap-x, 10px); } dt-button { margin: 0px; @@ -2927,12 +3217,15 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .error-container { - margin-block-start: 5px; + margin-block-start: var( + --dt-multi-select-button-group-error-margin-top, + 5px + ); } .invalid ~ .error-container { border-top-width: 1px; } - `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){const i=this.value.includes(e);this.value=[...this.value.filter(s=>s!==e&&s!==`-${e}`),i?`-${e}`:e]}else this.value=[e];t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",s=this.outline??(this.touched&&this.invalid);return f` + `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=this.value,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:t}});if(this.value&&this.value.length){const o=this.value.includes(e);this.value=[...this.value.filter(a=>a!==e&&a!==`-${e}`),o?`-${e}`:e]}else this.value=[e];i.detail.newValue=this.value,this._setFormValue(this.value),this.dispatchEvent(i)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",o=this.outline??(this.touched&&this.invalid);return p` - ${e.icon?f`${this.iconAltText}`:null} ${e.label} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return p` ${this.labelTemplate()} -
    -
    - ${Ee(this.options??[],e=>e.id,e=>this._renderButton(e))} +
    +
    + ${pe(this.options??[],e=>e.id,e=>this._renderButton(e))}
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-select-button-group",xs);class ks extends R{static get styles(){return x` - :host { - display: block; - } + `}}window.customElements.define("dt-multi-select-button-group",ko);class So extends P{constructor(){super();Me(this,"_handleUploadStagedEvent",()=>{this.uploadStagedFiles()});this.value=[],this.acceptedFileTypes=["image/*","application/pdf"],this.maxFileSize=null,this.maxFiles=null,this.deleteEnabled=!0,this.downloadEnabled=!0,this.renameEnabled=!0,this.displayLayout="grid",this.fileTypeIcon="",this.autoUpload=!0,this.postType="",this.postId="",this.metaKey="",this.keyPrefix="",this.uploading=!1,this.stagedFiles=[],this._uploadZoneExpanded=!1,this._dragOver=!1,this._editingFileKey="",this._editingFileName="",this._dragLeaveTimeout=null,this._resizeObserver=null,this._keydownAttached=!1,this._suppressRenameBlurCommit=!1,this._standaloneFilesByKey=new Map}static get styles(){return[...super.styles,$` + :host { + display: block; + } - .dt-alert { - padding: var(--dt-alert-padding, 10px); - font-family: var(--dt-alert-font-family); - font-size: var(--dt-alert-font-size, 14px); - font-weight: var(--dt-alert-font-weight, 700); - background-color: var( - --dt-alert-context-background-color, - var(--dt-alert-background-color) - ); - border: var(--dt-alert-border-width, 1px) solid - var(--dt-alert-context-border-color, var(--dt-alert-border-color)); - border-radius: var(--dt-alert-border-radius, 10px); - box-shadow: var(--dt-alert-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); - color: var(--dt-alert-context-text-color, var(--dt-alert-text-color)); - text-rendering: optimizeLegibility; - display: flex; - gap: var(--dt-alert-gap, 10px); - justify-content: space-between; - align-content: center; - align-items: center; - white-space: initial; - } + .upload-zone { + border: 2px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + text-align: center; + background-color: var(--dt-upload-background-color, #fafafa); + transition: padding 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; + cursor: pointer; + position: relative; + width: 100%; + box-sizing: border-box; + } - .dt-alert.dt-alert--outline { - background-color: transparent; - color: var(--dt-alert-context-text-color, var(--text-color-inverse)); - } + .upload-zone.compact { + padding: 0.75rem; + } - .dt-alert--primary:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--primary-color); - --dt-alert-context-background-color: var(--primary-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone.expanded { + padding: 2rem; + } - .dt-alert--alert:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--alert-color); - --dt-alert-context-background-color: var(--alert-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone:hover:not(.disabled):not(.uploading) { + border-color: var(--dt-upload-border-color-hover, #999); + background-color: var(--dt-upload-background-color-hover, #f0f0f0); + } - .dt-alert--caution:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--caution-color); - --dt-alert-context-background-color: var(--caution-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-dark); - } + .upload-zone.drag-over { + border-color: var(--primary-color, #0073aa); + background-color: var(--dt-upload-background-color-drag, #e8f4f8); + } - .dt-alert--success:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--success-color); - --dt-alert-context-background-color: var(--success-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone.disabled { + opacity: 0.6; + cursor: not-allowed; + } - .dt-alert--inactive:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--inactive-color); - --dt-alert-context-background-color: var(--inactive-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } - - .dt-alert--disabled:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--disabled-color); - --dt-alert-context-background-color: var(--disabled-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-dark); - } + .upload-zone.uploading { + pointer-events: none; + } - .dt-alert--primary.dt-alert--outline { - --dt-alert-context-border-color: var(--primary-color); - --dt-alert-context-text-color: var(--primary-color); - } + .upload-zone-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + } - .dt-alert--alert.dt-alert--outline { - --dt-alert-context-border-color: var(--alert-color); - --dt-alert-context-text-color: var(--alert-color); - } + .upload-zone-content .expandable { + transition: opacity 0.2s ease; + } - .dt-alert--caution.dt-alert--outline { - --dt-alert-context-border-color: var(--caution-color); - --dt-alert-context-text-color: var(--caution-color); - } + .upload-zone.compact .upload-zone-content .expandable { + display: none; + } - .dt-alert--success.dt-alert--outline { - --dt-alert-context-border-color: var(--success-color); - --dt-alert-context-text-color: var(--success-color); - } + .upload-zone.expanded .upload-zone-content .expandable { + display: block; + } - .dt-alert--inactive.dt-alert--outline { - --dt-alert-context-border-color: var(--inactive-color); - } + .upload-icon { + color: var(--dt-upload-icon-color, #999); + flex-shrink: 0; + transition: font-size 0.2s ease; + } - .dt-alert--disabled.dt-alert--outline { - --dt-alert-context-border-color: var(--disabled-color); - } + .upload-zone.compact .upload-icon { + font-size: 1.75rem; + } - button.toggle { - margin-inline-end: 0; - margin-inline-start: auto; - background: none; - border: none; - color: inherit; - cursor: pointer; - display: flex; - align-items: center; - } - `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return f``;const e=f` - - xmlns="http://www.w3.org/2000/svg"> - - - - `;return f` - - `}}window.customElements.define("dt-alert",ks);class Ss extends R{static get styles(){return x` - :host { - --number-of-columns: 7; - font-family: var(--dt-list-font-family, var(--font-family)); - font-size: var(--dt-list-font-size, 15px); - font-weight: var(--dt-list-font-weight, 300); - line-height: var(--dt-list-line-height, 1.5); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + .upload-zone.expanded .upload-icon { + font-size: 3rem; + } - .section { - container-type: inline-size; - background-color: var(--dt-list-background-color, #fefefe); - border: 1px solid var(--dt-list-border-color, #f1f1f1); - border-radius: var(--dt-list-border-radius, 10px); - box-shadow: var(--dt-list-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); - padding: var(--dt-list-section-padding, 1rem); - } + .upload-text { + font-size: 1rem; + color: var(--dt-upload-text-color, #666); + } - .header { - display: flex; - justify-content: flex-start; - align-items: baseline; - gap: var(--dt-list-header-gap, 1.5em); - flex-wrap: wrap; - } + .upload-hint { + font-size: 0.875rem; + color: var(--dt-upload-hint-color, #999); + } - .section-header { - color: var(--dt-list-header-color, var(--primary-color)); - font-size: 1.5rem; - display: inline-block; - text-transform: capitalize; - } + input[type='file'] { + position: absolute; + width: 0; + height: 0; + opacity: 0; + overflow: hidden; + } - .toggleButton { - color: var(--dt-list-header-color, var(--primary-color)); - font-size: 1rem; - background: transparent; - border: var(--dt-list-toggleButton, 0.1em solid rgb(0 0 0 / 0.2)); - border-radius: 0.25em; - padding: 0.25em 0.5em; - cursor: pointer; - } + .files-container { + margin-top: 1rem; + } - .toggleButton svg { - height: 0.9rem; - transform: translateY(-2px); - vertical-align: bottom; - width: 1rem; - fill: var(--dt-list-header-color, var(--primary-color)); - stroke: var(--dt-list-header-color, var(--primary-color)); - } + .files-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: 1rem; + } - .list_action_section { - background-color: var( - --dt-list-action-section-background-color, - #ecf5fc - ); - border-radius: var(--dt-list-border-radius, 10px); - margin: var(--dt-list-action-section-margin, 30px 0); - padding: var(--dt-list-action-section-padding, 20px); - } - .list_action_section_header { - display: flex; - flex-direction: row; - justify-content: space-between; - } - .close-button { - outline: none; - font-size: 2.5em; - line-height: 1; - color: var(--dt-list-action-close-button, var(--inactive-color)); - background: transparent; - border: none; - cursor: pointer; - } - .fieldsList { - list-style-type: none; - column-count: 1; - } + .files-list { + display: flex; + flex-direction: column; + gap: 0.5rem; + } - .list-field-picker-item { - list-style-type: none; - } + .file-item { + position: relative; + border: 1px solid var(--dt-file-upload-border-color, #ddd); + border-radius: 4px; + overflow: hidden; + background-color: var(--dt-file-upload-background-color, #fff); + } - .list-field-picker-item input { - margin: 1rem; - } + .file-item-grid { + aspect-ratio: 1; + display: flex; + flex-direction: column; + } - .list-field-picker-item .dt-icon { - height: var(--dt-list-field-picker-icon-size, 1rem); - width: var(--dt-list-field-picker-icon-size, 1rem); - } + .file-item-list { + display: grid; + grid-template-columns: 40px 1fr auto; + grid-template-rows: auto auto; + align-items: center; + padding: 0.5rem; + gap: 0 0.75rem; + row-gap: 0.125rem; + } + + .file-item-list .file-preview-link, + .file-item-list .file-icon-area { + grid-column: 1; + grid-row: 1 / -1; + width: 40px; + height: 40px; + min-width: 40px; + min-height: 40px; + border-radius: 6px; + overflow: hidden; + } - table { - display: grid; - border: 1px solid var(--dt-list-border-color, #f1f1f1); - border-top: 0; - border-collapse: collapse; - min-width: 100%; - grid-template-columns: 1fr; - } + .file-item-list .file-name, + .file-item-list .file-name-edit, + .file-item-list input.file-name-edit { + grid-column: 2; + grid-row: 1; + min-width: 0; + } - /* table.table-contacts { - display: table !important; - width: 100%; - border-collapse: collapse; - border-radius: 0; - margin-bottom: 1rem; - } */ + .file-item-list .file-size { + grid-column: 2; + grid-row: 2; + } - table td:last-child { - border-bottom: 1px solid var(--dt-list-border-color, #f1f1f1); - padding-bottom: 2rem; - } + .file-item-list .file-actions { + grid-column: 3; + grid-row: 1 / -1; + position: relative; + } - tbody, - tr { - display: contents; - } + .status-indicators { + display: flex; + justify-content: flex-end; + margin-top: 0.5rem; + } - thead { - display: none; - } - /* table.table-contacts thead { - display: table-header-group; - } - table.table-contacts tr { - display: table-row; - } - table.table-contacts tbody { - display: table-row-group; - } */ - tr { - cursor: pointer; - } + .status-indicators .icon-overlay { + position: static; + inset-inline-end: auto; + top: auto; + height: auto; + padding-block: 0; + } - /* table.table-contacts tr:nth-child(2n + 1) { - background: #fefefe; - } */ + .file-item-list .file-icon-area dt-icon { + font-size: 1.25rem; + } - tr:nth-child(2n + 1) { - background: #f1f1f1; - } + .file-preview-link { + display: block; + cursor: pointer; + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } - tr:hover { - background-color: var(--dt-list-hover-background-color, #ecf5fc); - } + .file-preview-link img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } - tr a { - color: var(--dt-list-link-color, var(--primary-color)); - } + .file-icon-area { + display: flex; + align-items: center; + justify-content: center; + background-color: var(--dt-file-upload-icon-background, #f5f5f5); + color: var(--dt-file-upload-icon-color, #999); + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } - .column-name { - pointer-events: none; - font-size: 15px; - font-weight: 700; - } - #sort-arrows { - grid-template-columns: 4fr 1fr; - display: flex; - flex-direction: column; - height: 1em; - justify-content: space-evenly; - } - th.all span.sort-arrow-up { - border-color: transparent transparent - var(--dt-list-sort-arrow-color, #dcdcdc) transparent; - border-style: solid; - border-width: 0 0.3em 0.3em 0.3em; - } + .file-icon-area dt-icon { + font-size: 2rem; + } - th.all span.sort-arrow-down { - content: ''; - border-color: var(--dt-list-sort-arrow-color, #dcdcdc) transparent - transparent; - border-style: solid; - border-width: 0.3em 0.3em 0; - } + .file-icon-area img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } - th.all span.sort-arrow-up.sortedBy { - border-color: transparent transparent - var(--dt-list-sort-arrow-color-highlight, #41739c) transparent; - } + .file-name { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } - th.all span.sort-arrow-down.sortedBy { - border-color: var(--dt-list-sort-arrow-color-highlight, #41739c) - transparent transparent; - } + .file-name-editable { + cursor: pointer; + position: relative; + z-index: 2; + } - td { - border: 0; - grid-column: 1 / span 3; - padding-inline-start: 1em; - } + .file-name-editable:hover { + text-decoration: underline; + } - td::before { - content: attr(title) ': '; - padding-inline-end: 1em; - } + .file-name-edit { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + width: 100%; + box-sizing: border-box; + border: 1px solid var(--primary-color, #0073aa); + border-radius: 2px; + background: var(--dt-file-upload-background-color, #fff); + } - td.no-title { - grid-column: 1 / span 3; - } + .file-name-edit:focus { + outline: none; + border-color: var(--primary-color, #0073aa); + } - td.line-count { - padding-block-start: 0.8em; - padding-inline-start: 1em; - } + .file-size { + font-size: 0.7rem; + color: var(--dt-file-upload-size-color, #999); + padding: 0 0.5rem 0.25rem; + } - td.no-title::before { - content: ''; - padding-inline-end: 0.25em; - } + .file-actions { + position: absolute; + top: 0.25rem; + inset-inline-end: 0.25rem; + display: flex; + gap: 0.25rem; + z-index: 1; + pointer-events: none; + } - th.bulk_edit_checkbox, - td.bulk_edit_checkbox { - grid-column: 1 / auto; - padding: 0; - width: 0; /* Initially no width */ - } + .file-actions button { + pointer-events: auto; + background: rgba(255, 255, 255, 0.9); + border: none; + border-radius: 4px; + padding: 0.25rem; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + } - .bulk_edit_checkbox input { - display: none; - margin: 0; - } + .file-actions button:hover { + background: #fff; + } - .bulk_editing .bulk_edit_checkbox { - grid-column: 1 / auto; - padding: 0; - width: auto; /* Width when parent has .bulk_editing */ - } - .bulk_editing .bulk_edit_checkbox input { - display: initial; - } + .file-actions button dt-icon { + font-size: 1rem; + } - ul { - margin: 0; - padding: 0; - } + .file-actions button.download { + color: var(--primary-color, #0073aa); + } - ul li { - list-style-type: none; - } + .file-actions button.delete { + color: var(--alert-color, #dc3545); + } - input[type='checkbox'] { - margin: 1rem; - } - table thead th, - table tr td { - padding: 0.5333333333rem 0.6666666667rem 0.6666666667rem; - } + .staged-files { + margin-top: 1rem; + padding: 1rem; + border: 1px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + background: var(--dt-upload-background-color, #fafafa); + } - ::slotted(svg) { - fill: var(--fav-star-not-selected-color, #c7c6c1); - } + .staged-files-title { + font-size: 0.875rem; + font-weight: 600; + margin-bottom: 0.5rem; + } - .icon-star { - fill: var(--fav-star-not-selected-color, #c7c6c1); /* Default to gray (non-favorite) */ - margin: 0; - } - .icon-star.selected { - fill: var(--fav-star-selected-color, #ffc105); /* Favorite state in yellow */ - } + .staged-file-item { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.25rem 0; + font-size: 0.875rem; + } - @media (min-width: 650px) { - .fieldsList { - column-count: 2; + .staged-file-item span { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; } - table { - grid-template-columns: - minmax(0px, 0fr) - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - repeat(var(--number-of-columns, 6), minmax(50px, 1fr)); + + .staged-file-item button.remove { + flex-shrink: 0; + margin-inline-start: auto; + padding: 0.25rem; + background: transparent; + border: none; + color: var(--alert-color, #dc3545); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; } - table.bulk_editing { - grid-template-columns: - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - repeat(var(--number-of-columns, 6), minmax(50px, 1fr)); + .staged-file-item button.remove:hover { + opacity: 0.8; } - thead { - display: contents; + .upload-staged-btn { + margin-top: 0.5rem; + padding: 0.5rem 1rem; + background: var(--primary-color, #0073aa); + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 0.875rem; } - th { - position: sticky; - top: 0; - background: var( - --dt-list-header-background-color, - var(--dt-tile-background-color, #fefefe) - ); - text-align: start; - justify-self: start; - font-weight: normal; - font-size: 1.1rem; - color: var(--dt-list-header-color, #0a0a0a); - white-space: pre-wrap; - display: grid; - place-items: center; - grid-template-columns: 2fr 1fr; + .upload-staged-btn:hover:not(:disabled) { + opacity: 0.9; } - th:last-child { - border: 0; + .upload-staged-btn:disabled { + opacity: 0.6; + cursor: not-allowed; } - td { - display: flex; - align-items: center; - grid-column: auto; + + .error-container { + margin-top: 1rem; + max-width: 100%; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-inline-start: 0; - color: var(--text-color-mid); - border-bottom: 1px solid var(--dt-list-border-color, #f1f1f1); - } - td::before { - content: ''; - display: none; } - td.no-title { - grid-column: auto; + .error-container .error-text { + flex: 1; + min-width: 0; + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-word; } + `]}static get properties(){return{...super.properties,value:{type:Array,reflect:!0,converter:{fromAttribute:t=>{if(t==null||t==="")return[];try{const i=JSON.parse(t);return Array.isArray(i)?i:[]}catch{return[]}},toAttribute:t=>Array.isArray(t)&&t.length>0?JSON.stringify(t):""}},acceptedFileTypes:{type:Array,attribute:"accepted-file-types"},maxFileSize:{type:Number,attribute:"max-file-size"},maxFiles:{type:Number,attribute:"max-files"},deleteEnabled:{type:Boolean,attribute:"delete-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},downloadEnabled:{type:Boolean,attribute:"download-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},renameEnabled:{type:Boolean,attribute:"rename-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},displayLayout:{type:String,attribute:"display-layout"},fileTypeIcon:{type:String,attribute:"file-type-icon"},autoUpload:{type:Boolean,attribute:"auto-upload",converter:{fromAttribute:t=>{if(t==null)return!0;const i=String(t).toLowerCase().trim();return i!=="false"&&i!=="0"&&t!==!1}}},postType:{type:String,attribute:"post-type"},postId:{type:String,attribute:"post-id"},metaKey:{type:String,attribute:"meta-key"},keyPrefix:{type:String,attribute:"key-prefix"},uploading:{type:Boolean,state:!0},stagedFiles:{type:Array,state:!0},_uploadZoneExpanded:{type:Boolean,state:!0},_dragOver:{type:Boolean,state:!0},_editingFileKey:{type:String,state:!0},_editingFileName:{type:String,state:!0}}}connectedCallback(){super.connectedCallback(),this.addEventListener("dt:upload-files",this._handleUploadStagedEvent),this._boundKeydown=this._handleHostKeydown.bind(this)}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("dt:upload-files",this._handleUploadStagedEvent),this._removeKeydownListener(),this._cancelScheduledCollapse(),(t=this._resizeObserver)==null||t.disconnect()}_addKeydownListener(){this._keydownAttached||(this._keydownAttached=!0,this.addEventListener("keydown",this._boundKeydown,{capture:!0}))}_removeKeydownListener(){this._keydownAttached&&(this._keydownAttached=!1,this.removeEventListener("keydown",this._boundKeydown,{capture:!0}))}_handleHostKeydown(t){var o;if(!this._editingFileKey)return;const i=(o=this.shadowRoot)==null?void 0:o.querySelector(".file-name-edit");i&&(t.key==="Enter"||t.keyCode===13?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._commitRename(this._editingFileKey,i.value)):(t.key==="Escape"||t.keyCode===27)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._cancelRename()))}firstUpdated(t){Array.isArray(this.value)||(this.value=this._parseValue(this.value)),super.firstUpdated(t),this._setupResizeObserver()}updated(t){super.updated(t),t.has("value")&&this._setFormValue(this.value),(t.has("value")||t.has("stagedFiles")||t.has("error"))&&this.updateComplete.then(()=>this._refreshMasonry()),t.has("_editingFileKey")&&(this._editingFileKey?(this._addKeydownListener(),this.updateComplete.then(()=>{var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector(".file-name-edit");i&&(i.focus(),i.select())})):this._removeKeydownListener())}_setupResizeObserver(){typeof ResizeObserver>"u"||(this._resizeObserver=new ResizeObserver(()=>{this._refreshMasonry()}),this._resizeObserver.observe(this))}_refreshMasonry(){if(typeof window<"u"&&window.jQuery){const t=this;requestAnimationFrame(()=>{let i=null;window.masonGrid&&window.masonGrid.length&&window.masonGrid.masonry?i=window.masonGrid:i=window.jQuery(t).closest(".grid, .masonry-container, .masonry, [data-masonry]"),i&&i.length&&i.masonry&&i.masonry("layout")})}}_expandUploadZone(){this._uploadZoneExpanded=!0}_scheduleCollapse(){this._cancelScheduledCollapse(),this._dragLeaveTimeout=setTimeout(()=>{this._uploadZoneExpanded=!1,this._dragLeaveTimeout=null},300)}_cancelScheduledCollapse(){this._dragLeaveTimeout&&(clearTimeout(this._dragLeaveTimeout),this._dragLeaveTimeout=null)}uploadStagedFiles(){this.stagedFiles.length>0&&this._uploadFiles(this.stagedFiles)}_removeStagedFile(t){t>=0&&to!==t),this.requestUpdate())}_parseValue(t){if(Array.isArray(t))return t;if(typeof t=="string")try{const i=JSON.parse(t);return Array.isArray(i)?i:[]}catch{return[]}return[]}_formatFileSize(t){return t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(1)} MB`}_isImage(t){return(t.type||"").toLowerCase().startsWith("image/")}_mdiToIconify(t){if(!t||typeof t!="string")return"";const i=t.trim();return i.startsWith("mdi:")?i:i.includes("mdi-")?`mdi:${i.replace(/.*mdi-/,"").replace(/\s/g,"-")}`:i.startsWith("mdi ")?`mdi:${i.replace(/^mdi\s+/,"").replace(/\s/g,"-")}`:i}_getFileTypeIconMapping(){return{"application/pdf":"mdi:file-pdf-box","text/plain":"mdi:text-box-edit-outline","application/rtf":"mdi:text-box-edit-outline","text/rtf":"mdi:text-box-edit-outline","text/csv":"mdi:text-box-edit-outline","text/html":"mdi:language-html5","application/msword":"mdi:microsoft-word","application/json":"mdi:code-json","application/xml":"mdi:file-xml-box",".pdf":"mdi:file-pdf-box",".txt":"mdi:text-box-edit-outline",".rtf":"mdi:text-box-edit-outline",".csv":"mdi:text-box-edit-outline",".html":"mdi:language-html5",".htm":"mdi:language-html5",".docx":"mdi:microsoft-word",".doc":"mdi:microsoft-word",".json":"mdi:code-json",".xml":"mdi:file-xml-box"}}_getFileTypeIcon(t){if(this.fileTypeIcon&&this.fileTypeIcon.trim())return this.fileTypeIcon.trim();const i=(t.type||"").toLowerCase(),o=this._getFileTypeIconMapping();if(i&&o[i])return o[i];if(t.name){const a=t.name.split(".");if(a.length>1){const r="."+a.pop().toLowerCase();if(o[r])return o[r]}}return null}_renderFileTypeIcon(t){const i=this._getFileTypeIcon(t);if(!i)return null;if(/^(https?:|\/|data:)/.test(i))return p``;const a=this._mdiToIconify(i);return a?p``:null}_getFilePreviewUrl(t){const i=t.thumbnail_key||t.large_thumbnail_key;if(this._isImage(t)){if(t.large_thumbnail_url)return t.large_thumbnail_url;if(t.thumbnail_url)return t.thumbnail_url;if(t.url)return t.url;if(i)return null}return null}_handleFileSelect(t){const i=Array.from(t.target.files||[]);i.length!==0&&(t.target.value="",this._processFiles(i))}_handleDrop(t){if(t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this.disabled||this.uploading)return;const i=Array.from(t.dataTransfer.files||[]);i.length!==0&&this._processFiles(i)}_handleDragOver(t){t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.uploading&&(this._dragOver=!0,this._expandUploadZone(),this._cancelScheduledCollapse(),t.currentTarget.classList.add("drag-over"))}_handleDragLeave(t){t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this._scheduleCollapse()}_handleZoneClick(t){var i;if(!t.target.closest('input[type="file"]')&&(this._expandUploadZone(),this._cancelScheduledCollapse(),!this.disabled&&!this.uploading)){const o=(i=this.shadowRoot)==null?void 0:i.querySelector('input[type="file"]');o&&o.click()}}_handleZoneMouseEnter(){!this.disabled&&!this.uploading&&(this._expandUploadZone(),this._cancelScheduledCollapse())}_handleZoneMouseLeave(){this._scheduleCollapse()}_processFiles(t){const i=this._validateFiles(t);if(i.length===0)return;this.error="";const o=(this.value||[]).length+this.stagedFiles.length;if(this.maxFiles&&o+i.length>this.maxFiles){this.error=`${this.maxFiles} files allowed`;return}this.autoUpload?this._uploadFiles(i):(this.stagedFiles=[...this.stagedFiles,...i],this._uploadZoneExpanded=!1,this.requestUpdate(),this.updateComplete.then(()=>this._refreshMasonry()))}_validateFiles(t){const i=[],o=this.maxFileSize?this.maxFileSize*1024*1024:null,a=Array.isArray(this.acceptedFileTypes)?this.acceptedFileTypes:["image/*","application/pdf"],r=a.join(",");for(const n of t){if(o&&n.size>o){this.error=`File "${n.name}" exceeds ${this.maxFileSize} MB`;continue}if(r&&r!=="*"&&!a.some(d=>{if(d.startsWith("."))return n.name.toLowerCase().endsWith(d.toLowerCase());if(d.endsWith("/*")){const u=d.slice(0,-2);return(n.type||"").startsWith(u)}return n.type===d||n.name&&n.name.toLowerCase().endsWith(`.${d.split("/")[1]}`)})){this.error=`File type not allowed: ${n.name}`;continue}i.push(n)}return i}_isStandaloneMode(){return!this.postType||!this.postId||!this.metaKey}async _filesToMockFileObjects(t){const i=[];for(const o of t){const r={key:`standalone_${Date.now()}_${Math.random().toString(36).slice(2)}_${o.name}`,name:o.name,type:o.type||"application/octet-stream",size:o.size};if(this._isImage({type:o.type}))try{const n=URL.createObjectURL(o);i.push({...r,url:n,thumbnail_url:n})}catch{i.push({...r,url:"#"})}else i.push({...r,url:"#"})}return i}getPendingFilesForUpload(){const t=[...this.stagedFiles||[]],i=new Set(t.map(a=>`${(a==null?void 0:a.name)||""}::${(a==null?void 0:a.size)||0}::${(a==null?void 0:a.lastModified)||0}`)),o=this._parseValue(this.value);for(const a of o){const r=String((a==null?void 0:a.key)||a||"");if(!r)continue;const n=this._standaloneFilesByKey.get(r);if(!n)continue;const l=`${(n==null?void 0:n.name)||""}::${(n==null?void 0:n.size)||0}::${(n==null?void 0:n.lastModified)||0}`;i.has(l)||(t.push(n),i.add(l))}return t}async _uploadFiles(t){if(this._isStandaloneMode()){const o=this._parseValue(this.value);this.uploading=!0,this.loading=!0,this.error="";try{const a=await this._filesToMockFileObjects(t);a.forEach((n,l)=>{n!=null&&n.key&&t[l]&&this._standaloneFilesByKey.set(String(n.key),t[l])});const r=[...o,...a];this.value=r,this.stagedFiles=[],this._uploadZoneExpanded=!1,this.saved=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:r}})),this._refreshMasonry()}catch(a){this.error=(a==null?void 0:a.message)||"Upload failed"}finally{this.uploading=!1,this.loading=!1}return}this.uploading=!0,this.loading=!0,this.error="";const i=new CustomEvent("dt:upload",{bubbles:!0,detail:{files:t,metaKey:this.metaKey,keyPrefix:this.keyPrefix||"",onSuccess:({result:o,fieldValue:a})=>{const r=this._parseValue(this.value);let n=r;const l=(o.uploaded_files||[]).filter(d=>d.uploaded&&d.file).map(d=>d.file);if(l.length>0){const d=new Set(r.map(h=>String(h.key||h))),u=[...r];for(const h of l){const g=String(h.key||h);d.has(g)||(u.push(h),d.add(g))}n=u,this.value=n}else Array.isArray(a)&&a.length>0&&(n=a,this.value=n);this.stagedFiles=[],this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:r,newValue:n}})),this._refreshMasonry(),this._uploadZoneExpanded=!1,this.saved=!0,this.uploading=!1,this.loading=!1},onError:o=>{console.error("Upload error:",o),this.error=o.message||"Upload failed",this.uploading=!1,this.loading=!1}}});this.dispatchEvent(i)}async _deleteFile(t){if(!this.deleteEnabled||!confirm("Are you sure you want to delete this file?"))return;if(this._isStandaloneMode()){const o=this._parseValue(this.value),a=o.find(n=>(n.key||n)===t);a&&a.url&&a.url.startsWith("blob:")&&URL.revokeObjectURL(a.url),a&&a.thumbnail_url&&a.thumbnail_url.startsWith("blob:")&&a.thumbnail_url!==a.url&&URL.revokeObjectURL(a.thumbnail_url),this._standaloneFilesByKey.delete(String(t));const r=o.filter(n=>(n.key||n)!==t);this.value=r,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:r}})),this.dispatchEvent(new CustomEvent("dt:delete-file",{bubbles:!0,detail:{fileKey:t,metaKey:this.metaKey||""}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const i=new CustomEvent("dt:delete-file",{bubbles:!0,detail:{fileKey:t,metaKey:this.metaKey,onSuccess:()=>{const o=this._parseValue(this.value),a=o.filter(r=>(r.key||r)!==t);this.value=a,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:a}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:o=>{console.error("Delete error:",o),this.error=o.message||"Delete failed",this.loading=!1}}});this.dispatchEvent(i)}async _renameFile(t,i){if(!this.renameEnabled)return;if(this._isStandaloneMode()){const a=this._parseValue(this.value),r=a.map(n=>(n.key||n)===t?{...n,name:i}:n);this.value=r,this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:a,newValue:r}})),this.dispatchEvent(new CustomEvent("dt:rename-file",{bubbles:!0,detail:{fileKey:t,newName:i,metaKey:this.metaKey||""}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const o=new CustomEvent("dt:rename-file",{bubbles:!0,detail:{fileKey:t,newName:i,metaKey:this.metaKey,onSuccess:()=>{const a=this._parseValue(this.value),r=a.map(n=>(n.key||n)===t?{...n,name:i}:n);this.value=r,this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:a,newValue:r}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:a=>{console.error("Rename error:",a),this.error=(a==null?void 0:a.message)||"Rename failed",this.loading=!1}}});this.dispatchEvent(o)}_startRename(t,i){!this.renameEnabled||this.disabled||(this._editingFileKey=typeof t=="string"?t:String(t),this._editingFileName=i||"")}_commitRename(t,i){if(this._suppressRenameBlurCommit){this._suppressRenameBlurCommit=!1;return}if(!this._editingFileKey||this._editingFileKey!==t)return;const o=(i??this._editingFileName??"").trim();if(this._editingFileKey="",this._editingFileName="",!o)return;const r=this._parseValue(this.value).find(l=>(l.key||l)===t),n=(r==null?void 0:r.name)||(typeof t=="string"?t.split("/").pop():"");o!==n&&this._renameFile(t,o)}_cancelRename(){this._suppressRenameBlurCommit=!0,this._editingFileKey="",this._editingFileName="",setTimeout(()=>{this._suppressRenameBlurCommit=!1},0)}_handleRenameBlur(t,i){if(this._suppressRenameBlurCommit){this._suppressRenameBlurCommit=!1;return}this._commitRename(t,i)}_downloadFile(t){if(!this.downloadEnabled)return;if(this._isStandaloneMode()){const r=t.url;if(!r)return;const n=t.key||t,l=t.name||(typeof n=="string"?n.split("/").pop():"download")||"download",d=document.createElement("a");d.href=r,d.download=l,d.target="_blank",d.rel="noopener",document.body.appendChild(d),d.click(),document.body.removeChild(d),this.dispatchEvent(new CustomEvent("dt:download-file",{bubbles:!0,detail:{fileKey:n,fileName:l,metaKey:this.metaKey||""}}));return}const i=t.key||t,o=t.name||(typeof i=="string"?i.split("/").pop():"download")||"download",a=new CustomEvent("dt:download-file",{bubbles:!0,detail:{fileKey:i,fileName:o,metaKey:this.metaKey,onSuccess:()=>{},onError:r=>{console.error("Download error:",r),this.error=r.message||"Download failed"}}});this.dispatchEvent(a)}_validateRequired(){var i,o,a,r;const t=Array.isArray(this.value)?this.value:[];this.required&&t.length===0?(this.invalid=!0,(o=(i=this.internals)==null?void 0:i.setValidity)==null||o.call(i,{valueMissing:!0},this.requiredMessage||"This field is required")):(this.invalid=!1,(r=(a=this.internals)==null?void 0:a.setValidity)==null||r.call(a,{}))}labelTemplate(){if(!this.label)return"";let t=null;if(this.icon&&this.icon.trim()){const i=this.icon.trim();if(i.startsWith("http://")||i.startsWith("https://")||i.startsWith("/")||i.startsWith("data:"))t=p`${this.iconAltText||`;else if(i.toLowerCase().includes("mdi")){const a=this._mdiToIconify(i);a&&(t=p``)}}return p` + + ${t?p`${t}`:p``} + ${this.label} + + `}render(){const t=this._parseValue(this.value),o=(this.displayLayout||"grid")==="grid";return p` +
    + ${this.labelTemplate()} +
    + +
    + + + +
    +
    + + ${B(this.stagedFiles.length>0&&!this.autoUpload,()=>p` +
    +
    Staged files (${this.stagedFiles.length})
    + ${pe(this.stagedFiles,(a,r)=>`${a.name}-${a.size}-${r}`,(a,r)=>p` +
    + ${a.name} (${this._formatFileSize(a.size)}) + +
    + `)} + +
    + `)} + + ${B(this.loading||this.saved,()=>p` +
    + ${this.renderIconLoading()} + ${this.renderIconSaved()} +
    + `)} + + ${B(t.length>0,()=>p` +
    +
    + ${pe(t,a=>a.key||a,a=>{const r=typeof a.key=="string"?a.key:typeof a=="string"?a:String(a.key??a.name??""),n=a.name||(typeof r=="string"?r.split("/").pop():""),l=a.size,d=this._getFilePreviewUrl(a),u=this._isImage(a),h=this._editingFileKey===r;return p` +
    + ${B(d,()=>p` + {!d&&!a.url&&g.preventDefault()}} + > + ${n} + + `,()=>p` + ${a.url?p` + + ${this._renderFileTypeIcon(a)||(u?p``:p``)} + + `:p` +
    + ${this._renderFileTypeIcon(a)||(u?p``:p``)} +
    + `} + `)} + ${B(h,()=>p` + {this._editingFileName=g.target.value}} + @keydown=${g=>{g.key==="Enter"||g.keyCode===13?(g.preventDefault(),g.stopPropagation(),this._commitRename(r,g.target.value)):(g.key==="Escape"||g.keyCode===27)&&(g.preventDefault(),this._cancelRename())}} + @blur=${g=>this._handleRenameBlur(r,g.target.value)} + @click=${g=>g.stopPropagation()} + /> + `,()=>p` +
    {g.stopPropagation(),this.renameEnabled&&!this.disabled&&this._startRename(r,n)}} + @keydown=${g=>{this.renameEnabled&&!this.disabled&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this._startRename(r,n))}} + > + ${n} +
    + `)} + ${B(l!=null,()=>p`
    ${this._formatFileSize(l)}
    `)} +
    + ${B(this.downloadEnabled&&a.url,()=>p` + + `)} + ${B(this.deleteEnabled&&!this.disabled,()=>p` + + `)} +
    +
    + `})} +
    +
    + `)} + + ${this.renderIconInvalid()} + ${this.renderError()} +
    + `}}customElements.define("dt-file-upload",So);class Eo extends N{static get styles(){return $` + :host { + display: block; } - .btn { - -webkit-appearance: none; - border: 1px solid transparent; - border-radius: 5px; - cursor: pointer; - display: inline-block; - font-family: inherit; - font-size: .9rem; - line-height: 1; - margin: 0 !important; - text-align: center; - -webkit-transition: background-color .25s ease-out, color .25s ease-out; - transition: background-color .25s ease-out, color .25s ease-out; - vertical-align: middle; + .dt-alert { + padding: var(--dt-alert-padding, 10px); + font-family: var(--dt-alert-font-family); + font-size: var(--dt-alert-font-size, 14px); + font-weight: var(--dt-alert-font-weight, 700); + background-color: var( + --dt-alert-context-background-color, + var(--dt-alert-background-color) + ); + border: var(--dt-alert-border-width, 1px) solid + var(--dt-alert-context-border-color, var(--dt-alert-border-color)); + border-radius: var(--dt-alert-border-radius, 10px); + box-shadow: var(--dt-alert-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); + color: var(--dt-alert-context-text-color, var(--dt-alert-text-color)); + text-rendering: optimizeLegibility; + display: flex; + gap: var(--dt-alert-gap, 10px); + justify-content: space-between; + align-content: center; + align-items: center; + white-space: initial; } - .btn.btn-primary { - background-color: #3f729b; - color: #fefefe; - border-radius: 5px; + .dt-alert.dt-alert--outline { + background-color: transparent; + color: var(--dt-alert-context-text-color, var(--text-color-inverse)); } - .btn.btn-primary:hover, .btn.btn-primary:focus { - background-color: #366184; - color: #fefefe; + .dt-alert--primary:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--primary-color); + --dt-alert-context-background-color: var(--primary-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - .text-center { - text-align: center; + .dt-alert--alert:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--alert-color); + --dt-alert-context-background-color: var(--alert-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - .btn.btn-primary .dt-button { - margin: 0; - border-radius: 5px; + .dt-alert--caution:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--caution-color); + --dt-alert-context-background-color: var(--caution-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-dark); } + .dt-alert--success:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--success-color); + --dt-alert-context-background-color: var(--success-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); + } - @media (min-width: 950px) { - .fieldsList { - column-count: 3; - } + .dt-alert--inactive:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--inactive-color); + --dt-alert-context-background-color: var(--inactive-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - @media (min-width: 1500px) { - .fieldsList { - column-count: 4; - } + .dt-alert--disabled:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--disabled-color); + --dt-alert-context-background-color: var(--disabled-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-dark); } - `}static get properties(){return{postType:{type:String},postTypeLabel:{type:String},posttypesettings:{type:Object,attribute:!0},posts:{type:Array},total:{type:Number},columns:{type:Array},sortedBy:{type:String},loading:{type:Boolean,default:!0},offset:{type:Number},showArchived:{type:Boolean,default:!1},showFieldsSelector:{type:Boolean,default:!1},showBulkEditSelector:{type:Boolean,default:!1},nonce:{type:String},payload:{type:Object},favorite:{type:Boolean},initialLoadPost:{type:Boolean,default:!1},loadMore:{type:Boolean,default:!1},headerClick:{type:Boolean,default:!1}}}constructor(){super(),this.sortedBy="name",this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.sortedColumns},this.initalLoadPost=!1,this.initalLoadPost||(this.posts=[],this.limit=100)}firstUpdated(){this.postTypeSettings=window.post_type_fields,this.sortedColumns=this.columns.includes("favorite")?["favorite",...this.columns.filter(e=>e!=="favorite")]:this.columns,this.style.setProperty("--number-of-columns",this.columns.length-1)}async _getPosts(e){const t=await new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:e,onSuccess:i=>{this.initalLoadPost&&this.loadMore&&(this.posts=[...this.posts,...i],this.postsLength=this.posts.length,this.total=i.length,this.loadMore=!1),this.initalLoadPost||(this.posts=[...i],this.offset=this.posts.length,this.initalLoadPost=!0,this.total=i.length),this.headerClick&&(this.posts=i,this.offset=this.posts.length,this.headerClick=!1),this.total=i.length},onError:i=>{console.warn(i)}}});this.dispatchEvent(t)}_headerClick(e){const t=e.target.dataset.id;this.sortedBy===t?t.startsWith("-")?this.sortedBy=t.replace("-",""):this.sortedBy=`-${t}`:this.sortedBy=t,this.payload={sort:this.sortedBy,overall_status:["-closed"],limit:this.limit,fields_to_return:this.columns},this.headerClick=!0,this._getPosts(this.payload)}static _rowClick(e){window.open(e,"_self")}_bulkEdit(){this.showBulkEditSelector=!this.showBulkEditSelector}_fieldsEdit(){this.showFieldsSelector=!this.showFieldsSelector}_toggleShowArchived(){if(this.showArchived=!this.showArchived,this.headerClick=!0,this.showArchived){const{overall_status:e,offset:t,...i}=this.payload;this.payload=i}else this.payload.overall_status=["-closed"];this._getPosts(this.payload)}_sortArrowsClass(e){return this.sortedBy===e?"sortedBy":""}_sortArrowsToggle(e){return this.sortedBy!==`-${e}`?`-${e}`:e}_headerTemplate(){return this.postTypeSettings?f` - - - - - - - ${Ke(this.sortedColumns,e=>{const t=e==="favorite";return f` - ${t?null:this.postTypeSettings[e].name} - ${t?"":f` - - - `} - `})} - - - `:null}_rowTemplate(){if(this.posts&&Array.isArray(this.posts)){const e=this.posts.map((t,i)=>this.showArchived||!this.showArchived&&t.overall_status!=="closed"?f` - this._rowClick(t.permalink)}> - - - - ${i+1}. - ${this._cellTemplate(t)} - - `:null).filter(t=>t!==null);return e.length>0?e:f`

    No contacts available

    `}return null}formatDate(e){const t=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(t)}_cellTemplate(e){return Ke(this.sortedColumns,t=>{if(["text","textarea","number"].includes(this.postTypeSettings[t].type))return f` - ${e[t]} - `;if(this.postTypeSettings[t].type==="date")return f` - ${this.formatDate(e[t].formatted)} - `;if(this.postTypeSettings[t].type==="user_select"&&e[t]&&e[t].display)return f` - ${B(e[t].display)} - `;if(this.postTypeSettings[t].type==="key_select"&&e[t]&&(e[t].label||e[t].name))return f` - ${e[t].label||e[t].name} - `;if(this.postTypeSettings[t].type==="multi_select"||this.postTypeSettings[t].type==="tags"&&e[t]&&e[t].length>0)return f` -
      - ${Ke(e[t],i=>f`
    • - ${this.postTypeSettings[t].default[i].label} -
    • `)} -
    - `;if(this.postTypeSettings[t].type==="location"||this.postTypeSettings[t].type==="location_meta")return f` - ${B(e[t].label)} - `;if(this.postTypeSettings[t].type==="communication_channel")return f` - ${B(e[t].value)} - `;if(this.postTypeSettings[t].type==="connection")return f` - - ${B(e[t].value)} - `;if(this.postTypeSettings[t].type==="boolean"){if(t==="favorite")return f` - - - - - - `;if(this.postTypeSettings[t]===!0)return f` - ['✓'] - `}return f``})}_fieldListIconTemplate(e){return this.postTypeSettings[e].icon?f`${this.postTypeSettings[e].name}`:null}_fieldsListTemplate(){return Ee(Object.keys(this.postTypeSettings).sort((e,t)=>{const i=this.postTypeSettings[e].name.toUpperCase(),s=this.postTypeSettings[t].name.toUpperCase();return is?1:0}),e=>e,e=>this.postTypeSettings[e].hidden?null:f`
  • - -
  • `)}_fieldsSelectorTemplate(){return this.showFieldsSelector?f`
    -
    -

    - ${O("Choose which fields to display as columns in the list")} -

    - -
    -
      - ${this._fieldsListTemplate()} -
    -
    `:null}_updateFields(e){const t=e.target.value,i=this.columns;i.includes(t)?(i.filter(s=>s!==t),i.splice(i.indexOf(t),1)):i.push(t),this.columns=i,this.style.setProperty("--number-of-columns",this.columns.length-1),this.requestUpdate()}_bulkSelectorTemplate(){return this.showBulkEditSelector?f`
    -
    -

    - ${O(u`Select all the ${this.postType} you want to update from the list, and update them below`)} -

    - -
    -
      - This is where the bulk edit form will go. -
    -
    `:null}connectedCallback(){super.connectedCallback(),this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.columns},this.posts.length===0&&this._getPosts(this.payload).then(e=>{this.posts=e})}_handleLoadMore(){this.limit=500,this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.columns,offset:this.offset,limit:this.limit},this.loadMore=!0,this._getPosts(this.payload).then(e=>{console.log(e)})}render(){const e={bulk_editing:this.showBulkEditSelector,hidden:!1};this.posts&&(this.total=this.posts.length);const t=f` - - - - - - - `,i=f``;return f` -
    -
    -
    - ${O(u`${this.postTypeLabel?this.postTypeLabel:this.postType} List`)} -
    - ${O(u`Showing ${this.total} of ${this.total}`)} - - + .dt-alert--primary.dt-alert--outline { + --dt-alert-context-border-color: var(--primary-color); + --dt-alert-context-text-color: var(--primary-color); + } - -
    + .dt-alert--alert.dt-alert--outline { + --dt-alert-context-border-color: var(--alert-color); + --dt-alert-context-text-color: var(--alert-color); + } + + .dt-alert--caution.dt-alert--outline { + --dt-alert-context-border-color: var(--caution-color); + --dt-alert-context-text-color: var(--caution-color); + } + + .dt-alert--success.dt-alert--outline { + --dt-alert-context-border-color: var(--success-color); + --dt-alert-context-text-color: var(--success-color); + } + + .dt-alert--inactive.dt-alert--outline { + --dt-alert-context-border-color: var(--inactive-color); + } + + .dt-alert--disabled.dt-alert--outline { + --dt-alert-context-border-color: var(--disabled-color); + } - ${this._fieldsSelectorTemplate()} ${this._bulkSelectorTemplate()} - - ${this._headerTemplate()} - ${this.posts?this._rowTemplate():O("Loading")} -
    - ${this.total>=100?f`
    Load More
    `:""} + button.toggle { + margin-inline-end: 0; + margin-inline-start: auto; + background: none; + border: none; + color: inherit; + cursor: pointer; + display: flex; + align-items: center; + } + `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return p``;const e=p` + + xmlns="http://www.w3.org/2000/svg"> + + + + `;return p` + - `}}window.customElements.define("dt-list",Ss);class Ts extends R{static get styles(){return x` + `}}window.customElements.define("dt-alert",Eo);class Ao extends N{static get styles(){return $` :host { font-family: var(--dt-tile-font-family, var(--font-family)); font-size: var(--dt-tile-font-size, 14px); @@ -3705,13 +3900,28 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } section { - background-color: var(--dt-tile-background-color, #fefefe); - border-top: var(--dt-tile-border-top, 1px solid #cecece); - border-bottom: var(--dt-tile-border-bottom, 1px solid #cecece); - border-right: var(--dt-tile-border-right, 1px solid #cecece); - border-left: var(--dt-tile-border-left, 1px solid #cecece); + background-color: var( + --dt-tile-background-color, + var(--surface-1, #fefefe) + ); + border-top: var( + --dt-tile-border-top, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-bottom: var( + --dt-tile-border-bottom, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-right: var( + --dt-tile-border-right, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-left: var( + --dt-tile-border-left, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); border-radius: var(--dt-tile-border-radius, 10px); - box-shadow: var(--dt-tile-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); + box-shadow: var(--dt-tile-box-shadow, var(--shadow-0)); padding: 1rem; margin: var(--dt-tile-margin, 0); } @@ -3726,7 +3936,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } .section-header { - color: var(--dt-tile-header-color, #3f729b); + color: var(--dt-tile-header-color, var(--primary-color)); font-size: 1.5rem; display: flex; text-transform: var(--dt-tile-header-text-transform, capitalize); @@ -3774,10 +3984,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr top: 0; transform: rotate(135deg); } - `}static get properties(){return{title:{type:String},expands:{type:Boolean},collapsed:{type:Boolean},gap:{type:String}}}get hasHeading(){return this.title||this.expands}_toggle(){this.collapsed=!this.collapsed}renderHeading(){return this.hasHeading?f` + `}static get properties(){return{title:{type:String},expands:{type:Boolean},collapsed:{type:Boolean},gap:{type:String}}}get hasHeading(){return this.title||this.expands}_toggle(){this.collapsed=!this.collapsed}renderHeading(){return this.hasHeading?p`

    ${this.title} - ${this.expands?f` + ${this.expands?p`

    - `:E}render(){return f` + `:O}render(){return p`
    ${this.renderHeading()}
    - `}}window.customElements.define("dt-tile",Ts);class Ce{get api(){return this._api}constructor(e,t,i,s="wp-json"){this.postType=e,this.postId=t,this.nonce=i,this.debounceTimers={},this._api=new mt(this.nonce,s),this.apiRoot=this._api.apiRoot,this.autoSaveComponents=["dt-connection","dt-users-connection","dt-date","dt-datetime","dt-location","dt-location-map","dt-multi-select","dt-number","dt-single-select","dt-tags","dt-text","dt-textarea","dt-toggle","dt-multi-text","dt-multi-select-button-group","dt-list","dt-button","dt-church-health-circle"],this.dynamicLoadComponents=["dt-connection","dt-tags","dt-modal","dt-list","dt-button","dt-location","dt-users-connection"]}initialize(){this.postId&&this.enableAutoSave(),this.attachLoadEvents()}async attachLoadEvents(e){const t=document.querySelectorAll(e||this.dynamicLoadComponents.join(","));t&&t.forEach(i=>{i.dataset.eventDtGetData||(i.addEventListener("dt:get-data",this.handleGetDataEvent.bind(this)),i.dataset.eventDtGetData=!0)})}async checkDuplicates(e,t){const i=document.querySelector("dt-modal.duplicate-detected");if(i){const s=i.shadowRoot.querySelector(".duplicates-detected-button");s&&(s.style.display="none");const a=await this._api.checkDuplicateUsers(this.postType,this.postId);t&&a.ids.length>0&&s&&(s.style.display="block")}}enableAutoSave(e){const t=document.querySelectorAll(e||this.autoSaveComponents.join(","));t&&t.forEach(i=>{i.addEventListener("change",this.handleChangeEvent.bind(this))})}async handleGetDataEvent(e){const t=e.detail;if(t){const{field:i,query:s,onSuccess:a,onError:n}=t;try{const r=e.target.tagName.toLowerCase();let l=[];switch(r){case"dt-button":l=await this._api.getContactInfo(this.postType,this.postId);break;case"dt-list":l=(await this._api.fetchPostsList(this.postType,s)).posts;break;case"dt-connection":{const c=t.postType||this.postType,b=await this._api.listPostsCompact(c,s),g={...b,posts:b.posts.filter(v=>v.ID!==parseInt(this.postId,10))};g!=null&&g.posts&&(l=Ce.convertApiValue("dt-connection",g==null?void 0:g.posts));break}case"dt-users-connection":{const c=t.postType||this.postType,b=await this._api.searchUsers(c,s),g={...b,posts:b.filter(v=>v.ID!==parseInt(this.postId,10))};g!=null&&g.posts&&(l=Ce.convertApiValue("dt-users-connection",g==null?void 0:g.posts));break}case"dt-location":{l=await this._api.getLocations(this.postType,i,t.filter,s),l=l.location_grid.map(c=>({id:c.ID,label:c.name}));break}case"dt-tags":default:l=await this._api.getMultiSelectValues(this.postType,i,s),l=l.map(c=>({id:c,label:c}));break}a(l)}catch(r){n(r)}}}async handleChangeEvent(e){const t=e.detail;if(t){const{field:i,newValue:s,oldValue:a,remove:n}=t,r=e.target.tagName.toLowerCase(),l=Ce.convertValue(r,s,a);if(e.target.removeAttribute("saved"),e.target.setAttribute("loading",!0),r==="dt-number"){const c=`${this.postType}-${this.postId}-${i}`;this.debounce(c,async()=>{try{const b=await this._api.updatePost(this.postType,this.postId,{[i]:l});document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:b,field:i,value:l,component:r}})),e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(b){console.error(b),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",b.message||b.toString())}},1e3)}else try{const c={[i]:l};if(r==="dt-location-map"){const g=l.values.filter(v=>!v.lng||!v.lat);c[i].values=l.values.filter(v=>v.lng&&v.lat),c.contact_address=g,c.contact_address.length===0&&delete c.contact_address,c[i].values.length===0&&delete c[i]}const b=await this._api.updatePost(this.postType,this.postId,c);if(document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:b,field:i,value:l,component:r}})),r==="dt-location-map"){const g=e.target;g.value=b[i]}e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(c){console.error(c),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",c.message||c.toString())}}}debounce(e,t,i){this.debounceTimers[e]&&clearTimeout(this.debounceTimers[e]),this.debounceTimers[e]=setTimeout(()=>{t()},i)}static convertApiValue(e,t){let i=t;switch(e){case"dt-connection":i=t.map(s=>({id:s.ID,label:s.name??s.post_title,link:s.permalink,status:s.status}));break;case"dt-users-connection":t&&!Array.isArray(t)&&(t.id||t.ID)?i=[{id:t.id||t.ID,label:t.display,avatar:t.avatar||""}]:Array.isArray(t)&&(i=t.map(s=>({id:s.id||s.ID,label:s.display||s.name,avatar:s.avatar||""})));break}return i}static convertValue(e,t,i=null){let s=t;if(t)switch(e.toLowerCase()){case"dt-toggle":typeof t=="string"&&(s=t.toLowerCase()==="true");break;case"dt-church-health-circle":case"dt-multi-select":case"dt-multi-select-button-group":case"dt-tags":typeof t=="string"&&(s=[t]),s={values:s.map(n=>{if(typeof n=="string"){const l={value:n};return n.startsWith("-")&&(l.delete=!0,l.value=n.substring(1)),l}const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-users-connection":{const n=[],r=s.filter(c=>!c.delete);if(r.length<=1){s=r.length===1?parseInt(r[0].id,10):"";break}const l=new Map((i||[]).map(c=>[c.id,c]));for(const c of s){const b=l.get(c.id),g={id:c.id,changes:{}};if(b){let v=!1;const y=new Set([...Object.keys(b),...Object.keys(c)]);for(const w of y)c[w]!==b[w]&&(g.changes[w]=Object.prototype.hasOwnProperty.call(c,w)?c[w]:void 0,v=!0);if(v){n.push(g);break}}else{g.changes={...c},n.push(g);break}}s=n[0].id;break}case"dt-connection":typeof t=="string"&&(s=[{id:t}]),s={values:s.map(n=>{const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-location":const a=new Set((i||[]).map(n=>n.id));typeof t=="string"?s=[{id:t}]:s=t.filter(n=>!(a.has(n.id)&&!n.delete)),s={values:s.map(n=>{const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-location-map":if(s=t.filter(n=>!((i||[]).includes(n)&&!n.delete)),i)for(const n of i)t.some(l=>n.id&&l.id&&n.id===l.id||n.key&&l.key&&n.key===l.key&&(!l.lat||!l.lng))||(n.delete=!0,s.push(n));s={values:s.map(n=>{const r=n;return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-multi-text":Array.isArray(t)?s=t.map(n=>{const r={...n};return delete r.tempKey,r}):typeof t=="string"&&(s=[{value:t}]);break}return s}static valueArrayDiff(e,t){const i={value1:[],value2:[]};if(Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.length>0&&typeof e[0]!="object")return i.value1=e.filter(r=>!t.includes(r)),i.value2=t.filter(r=>!e.includes(r)),i;const s=r=>JSON.stringify(r),a=new Map(e.map(r=>[s(r),r])),n=new Map(t.map(r=>[s(r),r]));for(const[r,l]of a)n.has(r)||i.value1.push(l);for(const[r,l]of n)a.has(r)||i.value2.push(l);return i}}const Ua="0.8.9",Va={s226be12a5b1a27e8:"ሰነዶቹን ያንብቡ",s33f85f24c0f5f008:"አስቀምጥ",s36cb242ac90353bc:"መስኮች",s41cb4006238ebd3b:"የጅምላ አርትዕ",s5e8250fb85d64c23:"ገጠመ",s625ad019db843f94:"ተጠቀም",sac83d7f9358b43db:u`${0} ዝርዝር`,sbf1ca928ec1deb62:"ተጨማሪ እገዛ ይፈልጋሉ?",sd1a8dc951b2b6a98:"በዝርዝሩ ውስጥ እንደ ዓምዶች የትኞቹን መስኮች እንደሚያሳዩ ይምረጡ",sf9aee319a006c9b4:"አክል",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ba=Object.freeze(Object.defineProperty({__proto__:null,templates:Va},Symbol.toStringTag,{value:"Module"})),Ha={s04ceadb276bbe149:"خيارات التحميل...",s226be12a5b1a27e8:"اقرأ الوثائق",s29e25f5e4622f847:"افتح",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"غلق",s625ad019db843f94:"استخدام",s9d51bfd93b5dbeca:"عرض المحفوظات",sac83d7f9358b43db:u`${0}قائمة الأعضاء`,sb1bd536b63e9e995:"المجال الخاص: أنا فقط أستطيع رؤية محتواه",sb59d68ed12d46377:"جار التحميل",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",scb9a1ff437efbd2a:u`حَدِّد جميع ${0} التي تريد تحديثها من القائمة ، وقم بتحديثها أدناه`,sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",seafe6ef133ede7da:u`عرض 1 of ${0}`,sf9aee319a006c9b4:"لأضف",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Ga=Object.freeze(Object.defineProperty({__proto__:null,templates:Ha},Symbol.toStringTag,{value:"Module"})),Wa={s226be12a5b1a27e8:"اقرأ الوثائق",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"أغلق",s625ad019db843f94:"استخدام",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",sf9aee319a006c9b4:"إضافة",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ka=Object.freeze(Object.defineProperty({__proto__:null,templates:Wa},Symbol.toStringTag,{value:"Module"})),Za={s226be12a5b1a27e8:"Прочетете документацията",s33f85f24c0f5f008:"Запазете",s36cb242ac90353bc:"Полета",s41cb4006238ebd3b:"Групово редактиране",s5e8250fb85d64c23:"Близо",s625ad019db843f94:"Използвайте",sbf1ca928ec1deb62:"Имате нужда от повече помощ?",sd1a8dc951b2b6a98:"Изберете кои полета да се показват като колони в списъка",sf9aee319a006c9b4:"Добавяне",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ja=Object.freeze(Object.defineProperty({__proto__:null,templates:Za},Symbol.toStringTag,{value:"Module"})),Qa={s226be12a5b1a27e8:"নথিপত্রাদি পাঠ করুন",s33f85f24c0f5f008:"সংরক্ষণ করুন",s36cb242ac90353bc:"ক্ষেত্র",s41cb4006238ebd3b:"বাল্ক এডিট",s5e8250fb85d64c23:"বন্ধ",s625ad019db843f94:"ব্যবহার",sbf1ca928ec1deb62:"আরও সাহায্য প্রয়োজন?",sd1a8dc951b2b6a98:"তালিকার কলাম হিসাবে কোন ক্ষেত্রগুলি প্রদর্শিত হবে তা চয়ন করুন",sf9aee319a006c9b4:"অ্যাড",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ya=Object.freeze(Object.defineProperty({__proto__:null,templates:Qa},Symbol.toStringTag,{value:"Module"})),Xa={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitajte dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate više pomoći?",scb9a1ff437efbd2a:u`Odaberite sve ${0} koje želite ažurirati sa liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Odaberite koja polja će se prikazati kao kolone na listi",seafe6ef133ede7da:u`Prikazuje se 1 od ${0}`,sf9aee319a006c9b4:"Dodati",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},en=Object.freeze(Object.defineProperty({__proto__:null,templates:Xa},Symbol.toStringTag,{value:"Module"})),tn={s226be12a5b1a27e8:"Přečtěte si dokumentaci",s33f85f24c0f5f008:"Uložit",s36cb242ac90353bc:"Pole",s41cb4006238ebd3b:"Hromadná úprava",s5e8250fb85d64c23:"Zavřít",s625ad019db843f94:"Použití",sbf1ca928ec1deb62:"Potřebujete další pomoc?",sd1a8dc951b2b6a98:"Vyberte pole, která chcete v seznamu zobrazit jako sloupce",sf9aee319a006c9b4:"Přidat",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sn=Object.freeze(Object.defineProperty({__proto__:null,templates:tn},Symbol.toStringTag,{value:"Module"})),on={s226be12a5b1a27e8:"Lesen Sie die Dokumentation",s33f85f24c0f5f008:"Speichern",s36cb242ac90353bc:"Felder",s41cb4006238ebd3b:"Im Stapel bearbeiten",s5e8250fb85d64c23:"Schließen",s625ad019db843f94:"Verwenden",sbf1ca928ec1deb62:"Benötigen Sie weitere Hilfe?",sd1a8dc951b2b6a98:"Wählen Sie aus, welche Felder in der Liste als Spalte angezeigt werden sollen",sf9aee319a006c9b4:"Hinzufügen",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},an=Object.freeze(Object.defineProperty({__proto__:null,templates:on},Symbol.toStringTag,{value:"Module"})),nn={s226be12a5b1a27e8:"Διαβάστε την τεκμηρίωση",s33f85f24c0f5f008:"Αποθήκευση",s36cb242ac90353bc:"Πεδία",s41cb4006238ebd3b:"Μαζική Επεξεργασία",s5e8250fb85d64c23:"Κλείσιμο",s625ad019db843f94:"Χρήση",sbf1ca928ec1deb62:"Χρειάζεστε περισσότερη βοήθεια;",sd1a8dc951b2b6a98:"Επιλέξτε ποια πεδία θα εμφανίζονται ως στήλες στη λίστα",sf9aee319a006c9b4:"Προσθήκη",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rn=Object.freeze(Object.defineProperty({__proto__:null,templates:nn},Symbol.toStringTag,{value:"Module"})),ln={sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",sf9aee319a006c9b4:"Add",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog",s33f85f24c0f5f008:"Save",s49730f3d5751a433:"Loading...",s625ad019db843f94:"Use",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dn=Object.freeze(Object.defineProperty({__proto__:null,templates:ln},Symbol.toStringTag,{value:"Module"})),cn={s8900c9de2dbae68b:"No hay opciones disponibles",sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sf9aee319a006c9b4:"Añadir",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sb9b8c412407d5691:"This is where the bulk edit form will go.",sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog"},un=Object.freeze(Object.defineProperty({__proto__:null,templates:cn},Symbol.toStringTag,{value:"Module"})),hn={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Leer la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:u`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:u`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},pn=Object.freeze(Object.defineProperty({__proto__:null,templates:hn},Symbol.toStringTag,{value:"Module"})),fn={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Lee la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:u`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:u`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},bn=Object.freeze(Object.defineProperty({__proto__:null,templates:fn},Symbol.toStringTag,{value:"Module"})),gn={s04ceadb276bbe149:"در حال بارگیری گزینه‌ها...",s226be12a5b1a27e8:"راهنمای سایت",s29e25f5e4622f847:"جعبه محاوره ای را باز کنید",s33f85f24c0f5f008:"صرفه جویی",s36cb242ac90353bc:"حوزه‌ها",s41cb4006238ebd3b:"ویرایش انبوه",s5e8250fb85d64c23:"بستن",s625ad019db843f94:"استفاده کنید",s9d51bfd93b5dbeca:"نمایش بایگانی شده",sac83d7f9358b43db:u`لیست ${0}`,sb1bd536b63e9e995:"زمینه خصوصی: فقط من می توانم محتوای آن را داشته باشم",sb59d68ed12d46377:"بارگیری",sbf1ca928ec1deb62:"آیا به راهنمایی بیشتری نیاز دارید؟",scb9a1ff437efbd2a:u`همۀ ${0} مورد نظر برای به روزرسانی را از لیست انتخاب کنید و آن‌ها را در زیر به روز کنید`,sd1a8dc951b2b6a98:"انتخاب کنید که کدام یک از حوزه‌ها به‌عنوان ستون در لیست نمایش داده شوند",seafe6ef133ede7da:u`نمایش 1 از ${0}`,sf9aee319a006c9b4:"افزودن",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},mn=Object.freeze(Object.defineProperty({__proto__:null,templates:gn},Symbol.toStringTag,{value:"Module"})),vn={s04ceadb276bbe149:"Chargement les options...",s226be12a5b1a27e8:"Lire la documentation",s29e25f5e4622f847:"Ouvrir la boîte de dialogue",s33f85f24c0f5f008:"sauver",s36cb242ac90353bc:"Champs",s41cb4006238ebd3b:"Modification groupée",s5e8250fb85d64c23:"Fermer",s625ad019db843f94:"Utiliser",s9d51bfd93b5dbeca:"Afficher Archivé",sac83d7f9358b43db:u`${0} Liste`,sb1bd536b63e9e995:"Champ privé : je suis le seul à voir son contenu",sb59d68ed12d46377:"Chargement",sbf1ca928ec1deb62:"Besoin d'aide ?",scb9a1ff437efbd2a:u`Sélectionnez tous les ${0} que vous souhaitez mettre à jour dans la liste et mettez-les à jour ci-dessous`,sd1a8dc951b2b6a98:"Choisissez les champs à afficher sous forme de colonnes dans la liste",seafe6ef133ede7da:u`Affichage de 1 sur ${0}`,sf9aee319a006c9b4:"Ajouter",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yn=Object.freeze(Object.defineProperty({__proto__:null,templates:vn},Symbol.toStringTag,{value:"Module"})),wn={s226be12a5b1a27e8:"डॉक्यूमेंटेशन पढ़ें",s33f85f24c0f5f008:"बचाना",s36cb242ac90353bc:"खेत",s41cb4006238ebd3b:"थोक संपादित",s5e8250fb85d64c23:"बंद",s625ad019db843f94:"उपयोग",sbf1ca928ec1deb62:"क्या और मदद चाहिये?",sd1a8dc951b2b6a98:"सूची में कॉलम के रूप में प्रदर्शित करने के लिए कौन से फ़ील्ड चुनें",sf9aee319a006c9b4:"जोडें",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},_n=Object.freeze(Object.defineProperty({__proto__:null,templates:wn},Symbol.toStringTag,{value:"Module"})),$n={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitaj dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Spremi",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvoriti",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate li pomoć?",scb9a1ff437efbd2a:u`Odaberite sve${0}koje želite ažurirati s liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Izaberite polja koja će se prikazivati kao stupci na popisu",seafe6ef133ede7da:u`Prikazuje se 1 od${0}`,sf9aee319a006c9b4:"Dodaj",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},xn=Object.freeze(Object.defineProperty({__proto__:null,templates:$n},Symbol.toStringTag,{value:"Module"})),kn={s226be12a5b1a27e8:"Olvasd el a dokumentációt",s33f85f24c0f5f008:"Megment",s36cb242ac90353bc:"Mezők",s41cb4006238ebd3b:"Tömeges Szerkesztés",s5e8250fb85d64c23:"Bezár",s625ad019db843f94:"Használ",sbf1ca928ec1deb62:"Több segítség szükséges?",sd1a8dc951b2b6a98:"Válassza ki, melyik mezők jelenjenek meg oszlopként a listában",sf9aee319a006c9b4:"Hozzáadás",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Sn=Object.freeze(Object.defineProperty({__proto__:null,templates:kn},Symbol.toStringTag,{value:"Module"})),Tn={s226be12a5b1a27e8:"Bacalah dokumentasi",s33f85f24c0f5f008:"Simpan",s36cb242ac90353bc:"Larik",s41cb4006238ebd3b:"Edit Massal",s5e8250fb85d64c23:"Menutup",s625ad019db843f94:"Gunakan",sbf1ca928ec1deb62:"Perlukan bantuan lagi?",sd1a8dc951b2b6a98:"Pilih larik mana yang akan ditampilkan sebagai kolom dalam daftar",sf9aee319a006c9b4:"Tambah",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},An=Object.freeze(Object.defineProperty({__proto__:null,templates:Tn},Symbol.toStringTag,{value:"Module"})),En={s04ceadb276bbe149:"Caricando opzioni...",s226be12a5b1a27e8:"Leggi la documentazione",s29e25f5e4622f847:"Apri Dialogo",s33f85f24c0f5f008:"Salvare",s36cb242ac90353bc:"Campi",s41cb4006238ebd3b:"Modifica in blocco",s5e8250fb85d64c23:"Chiudi",s625ad019db843f94:"Uso",s9d51bfd93b5dbeca:"Visualizza Archiviati",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privato: Solo io posso vedere i suoi contenuti",sb59d68ed12d46377:"Caricando",sbf1ca928ec1deb62:"Hai bisogno di ulteriore assistenza?",scb9a1ff437efbd2a:u`Seleziona tutti i ${0}vuoi aggiornare dalla lista e aggiornali sotto`,sd1a8dc951b2b6a98:"Scegli quali campi visualizzare come colonne nell'elenco",seafe6ef133ede7da:u`Visualizzando 1 di ${0}`,sf9aee319a006c9b4:"Inserisci",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},On=Object.freeze(Object.defineProperty({__proto__:null,templates:En},Symbol.toStringTag,{value:"Module"})),Cn={s226be12a5b1a27e8:"ドキュメントを読む",s33f85f24c0f5f008:"セーブ",s36cb242ac90353bc:"田畑",s41cb4006238ebd3b:"一括編集",s5e8250fb85d64c23:"閉じる",s625ad019db843f94:"使用する",sbf1ca928ec1deb62:"もっと助けが必要ですか?",sd1a8dc951b2b6a98:"リストの列として表示するフィールドを選択します",sf9aee319a006c9b4:"追加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ln=Object.freeze(Object.defineProperty({__proto__:null,templates:Cn},Symbol.toStringTag,{value:"Module"})),In={s226be12a5b1a27e8:"문서 읽기",s33f85f24c0f5f008:"구하다",s36cb242ac90353bc:"필드",s41cb4006238ebd3b:"대량 수정",s5e8250fb85d64c23:"닫기",s625ad019db843f94:"사용",sbf1ca928ec1deb62:"더 많은 도움이 필요하신가요?",sd1a8dc951b2b6a98:"목록에서 어떤 필드를 표시할지 고르세요",sf9aee319a006c9b4:"추가",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Pn=Object.freeze(Object.defineProperty({__proto__:null,templates:In},Symbol.toStringTag,{value:"Module"})),Mn={s226be12a5b1a27e8:"Прочитај ја документацијата",s33f85f24c0f5f008:"Зачувај",s36cb242ac90353bc:"Полиња",s41cb4006238ebd3b:"Уреди повеќе",s5e8250fb85d64c23:"Затвори",s625ad019db843f94:"Користи",sbf1ca928ec1deb62:"Дали ти треба повеќе помош?",sd1a8dc951b2b6a98:"Избери кои полиња да се прикажат како колони во листата",sf9aee319a006c9b4:"Додади",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},jn=Object.freeze(Object.defineProperty({__proto__:null,templates:Mn},Symbol.toStringTag,{value:"Module"})),Dn={s226be12a5b1a27e8:"कागदपत्रे वाचा.",s33f85f24c0f5f008:"जतन करा",s36cb242ac90353bc:"क्षेत्रे",s41cb4006238ebd3b:"बल्क एडिट करा",s5e8250fb85d64c23:"बंद करा",s625ad019db843f94:"वापर",sbf1ca928ec1deb62:"अधिक मदत आवश्यक आहे का?",sd1a8dc951b2b6a98:"यादीत कोणती क्षेत्रे स्तंभ म्हणून दर्शवली जावीत हे निवडा",sf9aee319a006c9b4:"समाविष्ट करा",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},zn=Object.freeze(Object.defineProperty({__proto__:null,templates:Dn},Symbol.toStringTag,{value:"Module"})),Rn={s226be12a5b1a27e8:"စာရွက်စာတမ်းများကိုဖတ်ပါ",s33f85f24c0f5f008:"သိမ်းဆည်းပါ",s36cb242ac90353bc:"နယ်ပယ်ဒေသများ",s5e8250fb85d64c23:"ပိတ်သည်",s625ad019db843f94:"အသုံးပြုပါ",sbf1ca928ec1deb62:"နောက်ထပ်အကူအညီလိုပါသလား။",sd1a8dc951b2b6a98:"စာရင်းရှိကော်လံများအနေဖြင့်ဖော်ပြမည့်မည်သည့်နယ်ပယ်ဒေသများကိုရွေးချယ်ပါ",sf9aee319a006c9b4:"ထည့်ပါ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Nn=Object.freeze(Object.defineProperty({__proto__:null,templates:Rn},Symbol.toStringTag,{value:"Module"})),qn={s226be12a5b1a27e8:"कागजात पढ्नुहोस्",s33f85f24c0f5f008:"सुरक्षित गर्नुहोस",s36cb242ac90353bc:"क्षेत्रहरू",s41cb4006238ebd3b:"थोक सम्पादन",s5e8250fb85d64c23:"बन्द गर्नुहोस",s625ad019db843f94:"प्रयोग गर्नुहोस्",sbf1ca928ec1deb62:"थप मद्दत चाहिन्छ?",sd1a8dc951b2b6a98:"सूचीमा स्तम्भहरूको रूपमा कुन क्षेत्रहरू प्रदर्शन गर्ने छनौट गर्नुहोस्",sf9aee319a006c9b4:"थप",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Fn=Object.freeze(Object.defineProperty({__proto__:null,templates:qn},Symbol.toStringTag,{value:"Module"})),Un={s04ceadb276bbe149:"aan het laden.....",s226be12a5b1a27e8:"Lees de documentatie",s29e25f5e4622f847:"Dialoogvenster openen",s33f85f24c0f5f008:"Opslaan",s36cb242ac90353bc:"Velden",s41cb4006238ebd3b:"Bulkbewerking",s5e8250fb85d64c23:"sluit",s625ad019db843f94:"Gebruiken",sac83d7f9358b43db:u`${0} Lijst`,sb1bd536b63e9e995:"Privéveld: alleen ik kan de inhoud zien",sb59d68ed12d46377:"aan het laden",sbf1ca928ec1deb62:"Meer hulp nodig?",sd1a8dc951b2b6a98:"Kies welke velden u als kolommen in de lijst wilt weergeven",seafe6ef133ede7da:u`1 van ${0} laten zien`,sf9aee319a006c9b4:"Toevoegen",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,s9d51bfd93b5dbeca:"Show Archived"},Vn=Object.freeze(Object.defineProperty({__proto__:null,templates:Un},Symbol.toStringTag,{value:"Module"})),Bn={s226be12a5b1a27e8:"ਦਸਤਾਵੇਜ਼ ਪੜ੍ਹੋ",s33f85f24c0f5f008:"ਸੇਵ",s36cb242ac90353bc:"ਖੇਤਰ",s41cb4006238ebd3b:"ਥੋਕ ਸੰਪਾਦਨ",s5e8250fb85d64c23:"ਬੰਦ ਕਰੋ",s625ad019db843f94:"ਵਰਤੋਂ",sbf1ca928ec1deb62:"ਹੋਰ ਮਦਦ ਦੀ ਲੋੜ ਹੈ?",sd1a8dc951b2b6a98:"ਸੂਚੀ ਵਿੱਚ ਕਾਲਮ ਦੇ ਰੂਪ ਵਿੱਚ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਨ ਲਈ ਕਿਹੜੇ ਖੇਤਰ ਚੁਣੋ",sf9aee319a006c9b4:"ਸ਼ਾਮਲ ਕਰੋ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Hn=Object.freeze(Object.defineProperty({__proto__:null,templates:Bn},Symbol.toStringTag,{value:"Module"})),Gn={s226be12a5b1a27e8:"Przeczytaj dokumentację",s33f85f24c0f5f008:"Zapisać",s36cb242ac90353bc:"Pola",s41cb4006238ebd3b:"Edycja zbiorcza",s5e8250fb85d64c23:"Zamknij",s625ad019db843f94:"Posługiwać się",sbf1ca928ec1deb62:"Potrzebujesz pomocy?",sd1a8dc951b2b6a98:"Wybierz, które pola mają być wyświetlane jako kolumny na liście",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Wn=Object.freeze(Object.defineProperty({__proto__:null,templates:Gn},Symbol.toStringTag,{value:"Module"})),Kn={s226be12a5b1a27e8:"Leia a documentação",s33f85f24c0f5f008:"Salvar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edição em massa",s5e8250fb85d64c23:"Fechar",s625ad019db843f94:"Usar",sbf1ca928ec1deb62:"Precisa de mais ajuda?",sd1a8dc951b2b6a98:"Escolha quais campos exibir como colunas na lista",sf9aee319a006c9b4:"Adicionar",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Zn=Object.freeze(Object.defineProperty({__proto__:null,templates:Kn},Symbol.toStringTag,{value:"Module"})),Jn={s226be12a5b1a27e8:"Citiți documentația",s33f85f24c0f5f008:"Salvați",s36cb242ac90353bc:"Câmpuri",s41cb4006238ebd3b:"Editare masivă",s5e8250fb85d64c23:"Închide",s625ad019db843f94:"Utilizare",sbf1ca928ec1deb62:"Ai nevoie de mai mult ajutor?",sd1a8dc951b2b6a98:"Alegeți câmpurile care să fie afișate în coloane în listă",sf9aee319a006c9b4:"Adăuga",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Qn=Object.freeze(Object.defineProperty({__proto__:null,templates:Jn},Symbol.toStringTag,{value:"Module"})),Yn={s226be12a5b1a27e8:"Читать документацию",s33f85f24c0f5f008:"Сохранить",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Массовое редактирование",s5e8250fb85d64c23:"Закрыть",s625ad019db843f94:"Использовать",sbf1ca928ec1deb62:"Нужна дополнительная помощь?",sd1a8dc951b2b6a98:"Выберите, какие поля отображать как столбцы в списке",sf9aee319a006c9b4:"Добавить",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xn=Object.freeze(Object.defineProperty({__proto__:null,templates:Yn},Symbol.toStringTag,{value:"Module"})),er={s226be12a5b1a27e8:"Preberite dokumentacijo",s33f85f24c0f5f008:"Shrani",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Urejanje v velikem obsegu",s5e8250fb85d64c23:"Zapri",s625ad019db843f94:"Uporaba",sbf1ca928ec1deb62:"Potrebujete več pomoči?",sd1a8dc951b2b6a98:"Izberite, katera polja naj bodo prikazana kot stolpci na seznamu",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},tr=Object.freeze(Object.defineProperty({__proto__:null,templates:er},Symbol.toStringTag,{value:"Module"})),ir={s226be12a5b1a27e8:"Pročitajte dokumentaciju",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"masovno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristiti",sbf1ca928ec1deb62:"Treba vam više pomoći?",sd1a8dc951b2b6a98:"Izaberite koja polja da se prikazuju kao kolone na listi",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sr=Object.freeze(Object.defineProperty({__proto__:null,templates:ir},Symbol.toStringTag,{value:"Module"})),or={s04ceadb276bbe149:"Inapakia chaguo...",s226be12a5b1a27e8:"Soma nyaraka",s29e25f5e4622f847:"Fungua Kidirisha",s33f85f24c0f5f008:"Hifadhi",s36cb242ac90353bc:"Mashamba",s41cb4006238ebd3b:"Hariri kwa Wingi",s5e8250fb85d64c23:"Funga",s625ad019db843f94:"Tumia",s9d51bfd93b5dbeca:"Onyesha Kumbukumbu",sac83d7f9358b43db:u`Orodha ya${0}`,sb1bd536b63e9e995:"Sehemu ya Faragha: Ni mimi pekee ninayeweza kuona maudhui yake",sb59d68ed12d46377:"Inapakia",sbf1ca928ec1deb62:"Unahitaji msaada zaidi?",scb9a1ff437efbd2a:u`Chagua ${0} zote ungependa kusasisha kutoka kwenye orodha, na uzisasishe hapa chini.`,sd1a8dc951b2b6a98:"Chagua ni sehemu zipi zitaonyeshwa kama safu wima kwenye orodha",seafe6ef133ede7da:u`Inaonyesha 1 kati ya ${0}`,sf9aee319a006c9b4:"Ongeza",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},ar=Object.freeze(Object.defineProperty({__proto__:null,templates:or},Symbol.toStringTag,{value:"Module"})),nr={s226be12a5b1a27e8:"อ่านเอกสาร",s33f85f24c0f5f008:"บันทึก",s36cb242ac90353bc:"ฟิลด์",s41cb4006238ebd3b:"แก้ไขเป็นกลุ่ม",s5e8250fb85d64c23:"ปิด",s625ad019db843f94:"ใช้",sbf1ca928ec1deb62:"ต้องการความช่วยเหลือเพิ่มเติมหรือไม่?",sd1a8dc951b2b6a98:"เลือกฟิลด์ที่จะแสดงเป็นคอลัมน์ในรายการ",sf9aee319a006c9b4:"เพิ่ม",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rr=Object.freeze(Object.defineProperty({__proto__:null,templates:nr},Symbol.toStringTag,{value:"Module"})),lr={s226be12a5b1a27e8:"Basahin ang dokumentasyon",s33f85f24c0f5f008:"I-save",s36cb242ac90353bc:"Mga Field",s41cb4006238ebd3b:"Maramihang Pag-edit",s5e8250fb85d64c23:"Isara",s625ad019db843f94:"Gamitin",sbf1ca928ec1deb62:"Kailangan mo pa ba ng tulong?",sd1a8dc951b2b6a98:"Piliin kung aling mga field ang ipapakita bilang mga column sa listahan",sf9aee319a006c9b4:"Idagdag",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dr=Object.freeze(Object.defineProperty({__proto__:null,templates:lr},Symbol.toStringTag,{value:"Module"})),cr={s04ceadb276bbe149:"Seçenekler Yükleniyor...",s226be12a5b1a27e8:"Belgeleri oku",s29e25f5e4622f847:"İletişim Kutusunu Aç",s33f85f24c0f5f008:"Kaydet",s36cb242ac90353bc:"Alanlar",s41cb4006238ebd3b:"Toplu Düzenleme",s5e8250fb85d64c23:"Kapat",s625ad019db843f94:"Kullan",s9d51bfd93b5dbeca:"Arşivlenmiş Göster",sac83d7f9358b43db:u`${0} Listesi`,sb1bd536b63e9e995:"Özel Alan: İçeriğini sadece ben görebilirim",sb59d68ed12d46377:"Yükleniyor",sbf1ca928ec1deb62:"Daha fazla yardıma ihtiyacınız var mı?",scb9a1ff437efbd2a:u`Listeden güncellemek istediğiniz tüm ${0} 'i seçin ve aşağıda güncelleyin`,sd1a8dc951b2b6a98:"Listede Hangi Alanların Sütun Olarak Görüntüleneceğini Seçin",seafe6ef133ede7da:u`Gösteriliyor 1 of ${0}`,sf9aee319a006c9b4:"Ekle",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},ur=Object.freeze(Object.defineProperty({__proto__:null,templates:cr},Symbol.toStringTag,{value:"Module"})),hr={s226be12a5b1a27e8:"Прочитайте документацію",s33f85f24c0f5f008:"Зберегти",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Масове редагування",s5e8250fb85d64c23:"Закрити",s625ad019db843f94:"Використати",sbf1ca928ec1deb62:"Потрібна додаткова допомога?",sd1a8dc951b2b6a98:"Виберіть, яке поле відображати у вигляді стовпців у списку",sf9aee319a006c9b4:"Додати",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},pr=Object.freeze(Object.defineProperty({__proto__:null,templates:hr},Symbol.toStringTag,{value:"Module"})),fr={s226be12a5b1a27e8:"Đọc tài liệu",s33f85f24c0f5f008:"Lưu",s36cb242ac90353bc:"Trường",s41cb4006238ebd3b:"Chỉnh sửa Hàng loạt",s5e8250fb85d64c23:"Đóng",s625ad019db843f94:"Sử dụng",sbf1ca928ec1deb62:"Bạn cần trợ giúp thêm?",sd1a8dc951b2b6a98:"Chọn các trường để hiển thị dưới dạng cột trong danh sách",sf9aee319a006c9b4:"Bổ sung",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},br=Object.freeze(Object.defineProperty({__proto__:null,templates:fr},Symbol.toStringTag,{value:"Module"})),gr={s226be12a5b1a27e8:"阅读文档",s33f85f24c0f5f008:"保存",s36cb242ac90353bc:"字段",s41cb4006238ebd3b:"批量编辑",s5e8250fb85d64c23:"关",s625ad019db843f94:"使用",sbf1ca928ec1deb62:"需要更多帮助吗?",sd1a8dc951b2b6a98:"选择哪些字段要在列表中显示为列",sf9aee319a006c9b4:"添加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},mr=Object.freeze(Object.defineProperty({__proto__:null,templates:gr},Symbol.toStringTag,{value:"Module"})),vr={s04ceadb276bbe149:"正在載入選項...",s226be12a5b1a27e8:"閱讀文檔",s29e25f5e4622f847:"開啟對話視窗",s33f85f24c0f5f008:"儲存",s36cb242ac90353bc:"欄位",s41cb4006238ebd3b:"大量編輯",s5e8250fb85d64c23:"關",s625ad019db843f94:"使用",s9d51bfd93b5dbeca:"顯示已儲存",sac83d7f9358b43db:u`${0} 清單`,sb1bd536b63e9e995:"私人欄位:只有我可以看見內容",sb59d68ed12d46377:"載入中",sbf1ca928ec1deb62:"需要更多幫助嗎?",scb9a1ff437efbd2a:u`從清單中選取要更新的項目${0},並在下面進行更新`,sd1a8dc951b2b6a98:"選擇哪些欄位要顯示為列表中的直行",seafe6ef133ede7da:u`第1頁 (共${0}頁)`,sf9aee319a006c9b4:"新增",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yr=Object.freeze(Object.defineProperty({__proto__:null,templates:vr},Symbol.toStringTag,{value:"Module"}));return $.ApiService=mt,$.ComponentService=Ce,$.DtAlert=ks,$.DtBase=R,$.DtButton=yi,$.DtChurchHealthCircle=cs,$.DtConnection=us,$.DtCopyText=ps,$.DtDate=Dt,$.DtDatetime=fs,$.DtFormBase=D,$.DtIcon=ns,$.DtLabel=_i,$.DtList=Ss,$.DtLocation=bs,$.DtLocationMap=vs,$.DtMapModal=ms,$.DtModal=gs,$.DtMultiSelect=We,$.DtMultiSelectButtonGroup=xs,$.DtMultiText=$s,$.DtNumberField=ys,$.DtSingleSelect=ws,$.DtTags=Oe,$.DtText=zt,$.DtTextArea=_s,$.DtTile=Ts,$.DtToggle=ds,$.DtUsersConnection=hs,$.version=Ua,Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),$}({}); + `}}window.customElements.define("dt-tile",Ao);class Le{get api(){return this._api}constructor(e,t,i,o="wp-json"){this.postType=e,this.postId=t,this.nonce=i,this.debounceTimers={},this._api=new vi(this.nonce,o),this.apiRoot=this._api.apiRoot,this.autoSaveComponents=["dt-connection","dt-users-connection","dt-date","dt-datetime","dt-location","dt-location-map","dt-multi-select","dt-number","dt-single-select","dt-tags","dt-text","dt-textarea","dt-toggle","dt-multi-text","dt-multi-select-button-group","dt-button","dt-church-health-circle"],this.dynamicLoadComponents=["dt-connection","dt-tags","dt-modal","dt-button","dt-location","dt-users-connection"]}initialize(){this.postId&&this.enableAutoSave(),this.attachLoadEvents(),this.attachFileUploadEvents()}async attachLoadEvents(e){const t=document.querySelectorAll(e||this.dynamicLoadComponents.join(","));t&&t.forEach(i=>{i.dataset.eventDtGetData||(i.addEventListener("dt:get-data",this.handleGetDataEvent.bind(this)),i.dataset.eventDtGetData=!0)})}async checkDuplicates(e,t){const i=document.querySelector("dt-modal.duplicate-detected");if(i){const o=i.shadowRoot.querySelector(".duplicates-detected-button");o&&(o.style.display="none");const a=await this._api.checkDuplicateUsers(this.postType,this.postId);t&&a.ids.length>0&&o&&(o.style.display="block")}}enableAutoSave(e){const t=document.querySelectorAll(e||this.autoSaveComponents.join(","));t&&t.forEach(i=>{i.addEventListener("change",this.handleChangeEvent.bind(this))})}attachFileUploadEvents(e){const t=document.querySelectorAll(e||"dt-file-upload");t&&t.forEach(i=>{i.dataset.eventDtUpload||(i.addEventListener("dt:upload",this.handleUploadEvent.bind(this)),i.addEventListener("dt:delete-file",this.handleDeleteFileEvent.bind(this)),i.addEventListener("dt:rename-file",this.handleRenameFileEvent.bind(this)),i.addEventListener("dt:download-file",this.handleDownloadFileEvent.bind(this)),i.dataset.eventDtUpload=!0)})}async handleGetDataEvent(e){const t=e.detail;if(t){const{field:i,query:o,onSuccess:a,onError:r}=t;try{const n=e.target.tagName.toLowerCase();let l=[];switch(n){case"dt-button":l=await this._api.getContactInfo(this.postType,this.postId);break;case"dt-connection":{const d=t.postType||this.postType,u=await this._api.listPostsCompact(d,o),h={...u,posts:u.posts.filter(g=>g.ID!==parseInt(this.postId,10))};h!=null&&h.posts&&(l=Le.convertApiValue("dt-connection",h==null?void 0:h.posts));break}case"dt-users-connection":{const d=t.postType||this.postType,u=await this._api.searchUsers(d,o),h={...u,posts:u.filter(g=>g.ID!==parseInt(this.postId,10))};h!=null&&h.posts&&(l=Le.convertApiValue("dt-users-connection",h==null?void 0:h.posts));break}case"dt-location":{l=await this._api.getLocations(this.postType,i,t.filter,o),l=l.location_grid.map(d=>({id:d.ID,label:d.name}));break}case"dt-tags":default:l=await this._api.getMultiSelectValues(this.postType,i,o),l=l.map(d=>({id:d,label:d}));break}a(l)}catch(n){r(n)}}}async handleChangeEvent(e){const t=e.detail;if(t){const{field:i,newValue:o,oldValue:a,remove:r}=t,n=e.target.tagName.toLowerCase(),l=Le.convertValue(n,o,a);if(e.target.removeAttribute("saved"),e.target.setAttribute("loading",!0),n==="dt-number"){const d=`${this.postType}-${this.postId}-${i}`;this.debounce(d,async()=>{try{const u=await this._api.updatePost(this.postType,this.postId,{[i]:l});document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:u,field:i,value:l,component:n}})),e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(u){console.error(u),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",u.message||u.toString())}},1e3)}else try{const d={[i]:l};if(n==="dt-location-map"){const h=l.values.filter(g=>!g.lng||!g.lat);d[i].values=l.values.filter(g=>g.lng&&g.lat),d.contact_address=h,d.contact_address.length===0&&delete d.contact_address,d[i].values.length===0&&delete d[i]}const u=await this._api.updatePost(this.postType,this.postId,d);if(document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:u,field:i,value:l,component:n}})),n==="dt-location-map"){const h=e.target;h.value=u[i]}e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(d){console.error(d),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",d.message||d.toString())}}}async handleUploadEvent(e){const t=e.detail;if(!t)return;const{files:i,metaKey:o,keyPrefix:a,onSuccess:r,onError:n}=t,l=e.target;l.setAttribute("loading",!0),l.removeAttribute("saved"),l.removeAttribute("error");try{const d=await this._api.uploadFiles(this.postType,this.postId,i,o,a||""),h=(await this._api.getPost(this.postType,this.postId))[o]||[];r&&r({result:d,fieldValue:h})}catch(d){l.setAttribute("error",d.message||"Upload failed"),n&&n(d)}finally{l.removeAttribute("loading")}}async handleDeleteFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,metaKey:o,onSuccess:a,onError:r}=t,n=e.target;n.setAttribute("loading",!0),n.removeAttribute("saved"),n.removeAttribute("error");try{await this._api.deleteFile(this.postType,this.postId,o,i),a&&a()}catch(l){n.setAttribute("error",l.message||"Delete failed"),r&&r(l)}finally{n.removeAttribute("loading")}}async handleRenameFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,newName:o,metaKey:a,onSuccess:r,onError:n}=t,l=e.target;l.setAttribute("loading",!0),l.removeAttribute("saved"),l.removeAttribute("error");try{const d=await this._api.renameFile(this.postType,this.postId,a,i,o);r&&r(d)}catch(d){l.setAttribute("error",d.message||"Rename failed"),n&&n(d)}finally{l.removeAttribute("loading")}}async handleDownloadFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,fileName:o,metaKey:a,onSuccess:r,onError:n}=t,l=e.target;try{const d=await this._api.downloadFile(this.postType,this.postId,a,i),u=window.URL.createObjectURL(d),h=document.createElement("a");h.href=u,h.download=o||"download",document.body.appendChild(h),h.click(),document.body.removeChild(h),window.URL.revokeObjectURL(u),r&&r()}catch(d){l.setAttribute("error",d.message||"Download failed"),n&&n(d)}}debounce(e,t,i){this.debounceTimers[e]&&clearTimeout(this.debounceTimers[e]),this.debounceTimers[e]=setTimeout(()=>{t()},i)}static convertApiValue(e,t){let i=t;switch(e){case"dt-connection":i=t.map(o=>({id:o.ID,label:o.name??o.post_title,link:o.permalink,status:o.status}));break;case"dt-users-connection":t&&!Array.isArray(t)&&(t.id||t.ID)?i=[{id:t.id||t.ID,label:t.display,avatar:t.avatar||""}]:Array.isArray(t)&&(i=t.map(o=>({id:o.id||o.ID,label:o.display||o.name,avatar:o.avatar||""})));break}return i}static convertValue(e,t,i=null){let o=t;if(t)switch(e.toLowerCase()){case"dt-toggle":typeof t=="string"&&(o=t.toLowerCase()==="true");break;case"dt-church-health-circle":case"dt-multi-select":case"dt-multi-select-button-group":case"dt-tags":typeof t=="string"&&(o=[t]),o={values:o.map(r=>{if(typeof r=="string"){const l={value:r};return r.startsWith("-")&&(l.delete=!0,l.value=r.substring(1)),l}const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-users-connection":{const r=[],n=o.filter(d=>!d.delete);if(n.length<=1){o=n.length===1?parseInt(n[0].id,10):"";break}const l=new Map((i||[]).map(d=>[d.id,d]));for(const d of o){const u=l.get(d.id),h={id:d.id,changes:{}};if(u){let g=!1;const y=new Set([...Object.keys(u),...Object.keys(d)]);for(const _ of y)d[_]!==u[_]&&(h.changes[_]=Object.prototype.hasOwnProperty.call(d,_)?d[_]:void 0,g=!0);if(g){r.push(h);break}}else{h.changes={...d},r.push(h);break}}o=r[0].id;break}case"dt-connection":typeof t=="string"&&(o=[{id:t}]),o={values:o.map(r=>{const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-location":const a=new Set((i||[]).map(r=>r.id));typeof t=="string"?o=[{id:t}]:o=t.filter(r=>!(a.has(r.id)&&!r.delete)),o={values:o.map(r=>{const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-location-map":if(o=t.filter(r=>!((i||[]).includes(r)&&!r.delete)),i)for(const r of i)t.some(l=>r.id&&l.id&&r.id===l.id||r.key&&l.key&&r.key===l.key&&(!l.lat||!l.lng))||(r.delete=!0,o.push(r));o={values:o.map(r=>{const n=r;return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-multi-text":Array.isArray(t)?o=t.map(r=>{const n={...r};return delete n.tempKey,n}):typeof t=="string"&&(o=[{value:t}]);break}return o}static valueArrayDiff(e,t){const i={value1:[],value2:[]};if(Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.length>0&&typeof e[0]!="object")return i.value1=e.filter(n=>!t.includes(n)),i.value2=t.filter(n=>!e.includes(n)),i;const o=n=>JSON.stringify(n),a=new Map(e.map(n=>[o(n),n])),r=new Map(t.map(n=>[o(n),n]));for(const[n,l]of a)r.has(n)||i.value1.push(l);for(const[n,l]of r)a.has(n)||i.value2.push(l);return i}}const Ua="0.8.9",Va={s226be12a5b1a27e8:"ሰነዶቹን ያንብቡ",s33f85f24c0f5f008:"አስቀምጥ",s36cb242ac90353bc:"መስኮች",s41cb4006238ebd3b:"የጅምላ አርትዕ",s5e8250fb85d64c23:"ገጠመ",s625ad019db843f94:"ተጠቀም",sac83d7f9358b43db:m`${0} ዝርዝር`,sbf1ca928ec1deb62:"ተጨማሪ እገዛ ይፈልጋሉ?",sd1a8dc951b2b6a98:"በዝርዝሩ ውስጥ እንደ ዓምዶች የትኞቹን መስኮች እንደሚያሳዩ ይምረጡ",sf9aee319a006c9b4:"አክል",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ba=Object.freeze(Object.defineProperty({__proto__:null,templates:Va},Symbol.toStringTag,{value:"Module"})),Ha={s04ceadb276bbe149:"خيارات التحميل...",s226be12a5b1a27e8:"اقرأ الوثائق",s29e25f5e4622f847:"افتح",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"غلق",s625ad019db843f94:"استخدام",s9d51bfd93b5dbeca:"عرض المحفوظات",sac83d7f9358b43db:m`${0}قائمة الأعضاء`,sb1bd536b63e9e995:"المجال الخاص: أنا فقط أستطيع رؤية محتواه",sb59d68ed12d46377:"جار التحميل",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",scb9a1ff437efbd2a:m`حَدِّد جميع ${0} التي تريد تحديثها من القائمة ، وقم بتحديثها أدناه`,sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",seafe6ef133ede7da:m`عرض 1 of ${0}`,sf9aee319a006c9b4:"لأضف",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Ka=Object.freeze(Object.defineProperty({__proto__:null,templates:Ha},Symbol.toStringTag,{value:"Module"})),Wa={s226be12a5b1a27e8:"اقرأ الوثائق",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"أغلق",s625ad019db843f94:"استخدام",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",sf9aee319a006c9b4:"إضافة",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ga=Object.freeze(Object.defineProperty({__proto__:null,templates:Wa},Symbol.toStringTag,{value:"Module"})),Za={s226be12a5b1a27e8:"Прочетете документацията",s33f85f24c0f5f008:"Запазете",s36cb242ac90353bc:"Полета",s41cb4006238ebd3b:"Групово редактиране",s5e8250fb85d64c23:"Близо",s625ad019db843f94:"Използвайте",sbf1ca928ec1deb62:"Имате нужда от повече помощ?",sd1a8dc951b2b6a98:"Изберете кои полета да се показват като колони в списъка",sf9aee319a006c9b4:"Добавяне",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ja=Object.freeze(Object.defineProperty({__proto__:null,templates:Za},Symbol.toStringTag,{value:"Module"})),Qa={s226be12a5b1a27e8:"নথিপত্রাদি পাঠ করুন",s33f85f24c0f5f008:"সংরক্ষণ করুন",s36cb242ac90353bc:"ক্ষেত্র",s41cb4006238ebd3b:"বাল্ক এডিট",s5e8250fb85d64c23:"বন্ধ",s625ad019db843f94:"ব্যবহার",sbf1ca928ec1deb62:"আরও সাহায্য প্রয়োজন?",sd1a8dc951b2b6a98:"তালিকার কলাম হিসাবে কোন ক্ষেত্রগুলি প্রদর্শিত হবে তা চয়ন করুন",sf9aee319a006c9b4:"অ্যাড",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xa=Object.freeze(Object.defineProperty({__proto__:null,templates:Qa},Symbol.toStringTag,{value:"Module"})),Ya={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitajte dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate više pomoći?",scb9a1ff437efbd2a:m`Odaberite sve ${0} koje želite ažurirati sa liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Odaberite koja polja će se prikazati kao kolone na listi",seafe6ef133ede7da:m`Prikazuje se 1 od ${0}`,sf9aee319a006c9b4:"Dodati",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},er=Object.freeze(Object.defineProperty({__proto__:null,templates:Ya},Symbol.toStringTag,{value:"Module"})),tr={s226be12a5b1a27e8:"Přečtěte si dokumentaci",s33f85f24c0f5f008:"Uložit",s36cb242ac90353bc:"Pole",s41cb4006238ebd3b:"Hromadná úprava",s5e8250fb85d64c23:"Zavřít",s625ad019db843f94:"Použití",sbf1ca928ec1deb62:"Potřebujete další pomoc?",sd1a8dc951b2b6a98:"Vyberte pole, která chcete v seznamu zobrazit jako sloupce",sf9aee319a006c9b4:"Přidat",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},ir=Object.freeze(Object.defineProperty({__proto__:null,templates:tr},Symbol.toStringTag,{value:"Module"})),or={s226be12a5b1a27e8:"Lesen Sie die Dokumentation",s33f85f24c0f5f008:"Speichern",s36cb242ac90353bc:"Felder",s41cb4006238ebd3b:"Im Stapel bearbeiten",s5e8250fb85d64c23:"Schließen",s625ad019db843f94:"Verwenden",sbf1ca928ec1deb62:"Benötigen Sie weitere Hilfe?",sd1a8dc951b2b6a98:"Wählen Sie aus, welche Felder in der Liste als Spalte angezeigt werden sollen",sf9aee319a006c9b4:"Hinzufügen",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sr=Object.freeze(Object.defineProperty({__proto__:null,templates:or},Symbol.toStringTag,{value:"Module"})),ar={s226be12a5b1a27e8:"Διαβάστε την τεκμηρίωση",s33f85f24c0f5f008:"Αποθήκευση",s36cb242ac90353bc:"Πεδία",s41cb4006238ebd3b:"Μαζική Επεξεργασία",s5e8250fb85d64c23:"Κλείσιμο",s625ad019db843f94:"Χρήση",sbf1ca928ec1deb62:"Χρειάζεστε περισσότερη βοήθεια;",sd1a8dc951b2b6a98:"Επιλέξτε ποια πεδία θα εμφανίζονται ως στήλες στη λίστα",sf9aee319a006c9b4:"Προσθήκη",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rr=Object.freeze(Object.defineProperty({__proto__:null,templates:ar},Symbol.toStringTag,{value:"Module"})),nr={sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",sf9aee319a006c9b4:"Add",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog",s33f85f24c0f5f008:"Save",s49730f3d5751a433:"Loading...",s625ad019db843f94:"Use",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},lr=Object.freeze(Object.defineProperty({__proto__:null,templates:nr},Symbol.toStringTag,{value:"Module"})),dr={s8900c9de2dbae68b:"No hay opciones disponibles",sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sf9aee319a006c9b4:"Añadir",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sb9b8c412407d5691:"This is where the bulk edit form will go.",sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog"},cr=Object.freeze(Object.defineProperty({__proto__:null,templates:dr},Symbol.toStringTag,{value:"Module"})),ur={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Leer la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:m`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:m`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},hr=Object.freeze(Object.defineProperty({__proto__:null,templates:ur},Symbol.toStringTag,{value:"Module"})),pr={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Lee la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:m`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:m`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},fr=Object.freeze(Object.defineProperty({__proto__:null,templates:pr},Symbol.toStringTag,{value:"Module"})),br={s04ceadb276bbe149:"در حال بارگیری گزینه‌ها...",s226be12a5b1a27e8:"راهنمای سایت",s29e25f5e4622f847:"جعبه محاوره ای را باز کنید",s33f85f24c0f5f008:"صرفه جویی",s36cb242ac90353bc:"حوزه‌ها",s41cb4006238ebd3b:"ویرایش انبوه",s5e8250fb85d64c23:"بستن",s625ad019db843f94:"استفاده کنید",s9d51bfd93b5dbeca:"نمایش بایگانی شده",sac83d7f9358b43db:m`لیست ${0}`,sb1bd536b63e9e995:"زمینه خصوصی: فقط من می توانم محتوای آن را داشته باشم",sb59d68ed12d46377:"بارگیری",sbf1ca928ec1deb62:"آیا به راهنمایی بیشتری نیاز دارید؟",scb9a1ff437efbd2a:m`همۀ ${0} مورد نظر برای به روزرسانی را از لیست انتخاب کنید و آن‌ها را در زیر به روز کنید`,sd1a8dc951b2b6a98:"انتخاب کنید که کدام یک از حوزه‌ها به‌عنوان ستون در لیست نمایش داده شوند",seafe6ef133ede7da:m`نمایش 1 از ${0}`,sf9aee319a006c9b4:"افزودن",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},mr=Object.freeze(Object.defineProperty({__proto__:null,templates:br},Symbol.toStringTag,{value:"Module"})),gr={s04ceadb276bbe149:"Chargement les options...",s226be12a5b1a27e8:"Lire la documentation",s29e25f5e4622f847:"Ouvrir la boîte de dialogue",s33f85f24c0f5f008:"sauver",s36cb242ac90353bc:"Champs",s41cb4006238ebd3b:"Modification groupée",s5e8250fb85d64c23:"Fermer",s625ad019db843f94:"Utiliser",s9d51bfd93b5dbeca:"Afficher Archivé",sac83d7f9358b43db:m`${0} Liste`,sb1bd536b63e9e995:"Champ privé : je suis le seul à voir son contenu",sb59d68ed12d46377:"Chargement",sbf1ca928ec1deb62:"Besoin d'aide ?",scb9a1ff437efbd2a:m`Sélectionnez tous les ${0} que vous souhaitez mettre à jour dans la liste et mettez-les à jour ci-dessous`,sd1a8dc951b2b6a98:"Choisissez les champs à afficher sous forme de colonnes dans la liste",seafe6ef133ede7da:m`Affichage de 1 sur ${0}`,sf9aee319a006c9b4:"Ajouter",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},vr=Object.freeze(Object.defineProperty({__proto__:null,templates:gr},Symbol.toStringTag,{value:"Module"})),yr={s226be12a5b1a27e8:"डॉक्यूमेंटेशन पढ़ें",s33f85f24c0f5f008:"बचाना",s36cb242ac90353bc:"खेत",s41cb4006238ebd3b:"थोक संपादित",s5e8250fb85d64c23:"बंद",s625ad019db843f94:"उपयोग",sbf1ca928ec1deb62:"क्या और मदद चाहिये?",sd1a8dc951b2b6a98:"सूची में कॉलम के रूप में प्रदर्शित करने के लिए कौन से फ़ील्ड चुनें",sf9aee319a006c9b4:"जोडें",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},_r=Object.freeze(Object.defineProperty({__proto__:null,templates:yr},Symbol.toStringTag,{value:"Module"})),wr={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitaj dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Spremi",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvoriti",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate li pomoć?",scb9a1ff437efbd2a:m`Odaberite sve${0}koje želite ažurirati s liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Izaberite polja koja će se prikazivati kao stupci na popisu",seafe6ef133ede7da:m`Prikazuje se 1 od${0}`,sf9aee319a006c9b4:"Dodaj",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},$r=Object.freeze(Object.defineProperty({__proto__:null,templates:wr},Symbol.toStringTag,{value:"Module"})),xr={s226be12a5b1a27e8:"Olvasd el a dokumentációt",s33f85f24c0f5f008:"Megment",s36cb242ac90353bc:"Mezők",s41cb4006238ebd3b:"Tömeges Szerkesztés",s5e8250fb85d64c23:"Bezár",s625ad019db843f94:"Használ",sbf1ca928ec1deb62:"Több segítség szükséges?",sd1a8dc951b2b6a98:"Válassza ki, melyik mezők jelenjenek meg oszlopként a listában",sf9aee319a006c9b4:"Hozzáadás",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},kr=Object.freeze(Object.defineProperty({__proto__:null,templates:xr},Symbol.toStringTag,{value:"Module"})),Sr={s226be12a5b1a27e8:"Bacalah dokumentasi",s33f85f24c0f5f008:"Simpan",s36cb242ac90353bc:"Larik",s41cb4006238ebd3b:"Edit Massal",s5e8250fb85d64c23:"Menutup",s625ad019db843f94:"Gunakan",sbf1ca928ec1deb62:"Perlukan bantuan lagi?",sd1a8dc951b2b6a98:"Pilih larik mana yang akan ditampilkan sebagai kolom dalam daftar",sf9aee319a006c9b4:"Tambah",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Er=Object.freeze(Object.defineProperty({__proto__:null,templates:Sr},Symbol.toStringTag,{value:"Module"})),Ar={s04ceadb276bbe149:"Caricando opzioni...",s226be12a5b1a27e8:"Leggi la documentazione",s29e25f5e4622f847:"Apri Dialogo",s33f85f24c0f5f008:"Salvare",s36cb242ac90353bc:"Campi",s41cb4006238ebd3b:"Modifica in blocco",s5e8250fb85d64c23:"Chiudi",s625ad019db843f94:"Uso",s9d51bfd93b5dbeca:"Visualizza Archiviati",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privato: Solo io posso vedere i suoi contenuti",sb59d68ed12d46377:"Caricando",sbf1ca928ec1deb62:"Hai bisogno di ulteriore assistenza?",scb9a1ff437efbd2a:m`Seleziona tutti i ${0}vuoi aggiornare dalla lista e aggiornali sotto`,sd1a8dc951b2b6a98:"Scegli quali campi visualizzare come colonne nell'elenco",seafe6ef133ede7da:m`Visualizzando 1 di ${0}`,sf9aee319a006c9b4:"Inserisci",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Or=Object.freeze(Object.defineProperty({__proto__:null,templates:Ar},Symbol.toStringTag,{value:"Module"})),Tr={s226be12a5b1a27e8:"ドキュメントを読む",s33f85f24c0f5f008:"セーブ",s36cb242ac90353bc:"田畑",s41cb4006238ebd3b:"一括編集",s5e8250fb85d64c23:"閉じる",s625ad019db843f94:"使用する",sbf1ca928ec1deb62:"もっと助けが必要ですか?",sd1a8dc951b2b6a98:"リストの列として表示するフィールドを選択します",sf9aee319a006c9b4:"追加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Cr=Object.freeze(Object.defineProperty({__proto__:null,templates:Tr},Symbol.toStringTag,{value:"Module"})),Lr={s226be12a5b1a27e8:"문서 읽기",s33f85f24c0f5f008:"구하다",s36cb242ac90353bc:"필드",s41cb4006238ebd3b:"대량 수정",s5e8250fb85d64c23:"닫기",s625ad019db843f94:"사용",sbf1ca928ec1deb62:"더 많은 도움이 필요하신가요?",sd1a8dc951b2b6a98:"목록에서 어떤 필드를 표시할지 고르세요",sf9aee319a006c9b4:"추가",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ir=Object.freeze(Object.defineProperty({__proto__:null,templates:Lr},Symbol.toStringTag,{value:"Module"})),Pr={s226be12a5b1a27e8:"Прочитај ја документацијата",s33f85f24c0f5f008:"Зачувај",s36cb242ac90353bc:"Полиња",s41cb4006238ebd3b:"Уреди повеќе",s5e8250fb85d64c23:"Затвори",s625ad019db843f94:"Користи",sbf1ca928ec1deb62:"Дали ти треба повеќе помош?",sd1a8dc951b2b6a98:"Избери кои полиња да се прикажат како колони во листата",sf9aee319a006c9b4:"Додади",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Mr=Object.freeze(Object.defineProperty({__proto__:null,templates:Pr},Symbol.toStringTag,{value:"Module"})),jr={s226be12a5b1a27e8:"कागदपत्रे वाचा.",s33f85f24c0f5f008:"जतन करा",s36cb242ac90353bc:"क्षेत्रे",s41cb4006238ebd3b:"बल्क एडिट करा",s5e8250fb85d64c23:"बंद करा",s625ad019db843f94:"वापर",sbf1ca928ec1deb62:"अधिक मदत आवश्यक आहे का?",sd1a8dc951b2b6a98:"यादीत कोणती क्षेत्रे स्तंभ म्हणून दर्शवली जावीत हे निवडा",sf9aee319a006c9b4:"समाविष्ट करा",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},zr=Object.freeze(Object.defineProperty({__proto__:null,templates:jr},Symbol.toStringTag,{value:"Module"})),Fr={s226be12a5b1a27e8:"စာရွက်စာတမ်းများကိုဖတ်ပါ",s33f85f24c0f5f008:"သိမ်းဆည်းပါ",s36cb242ac90353bc:"နယ်ပယ်ဒေသများ",s5e8250fb85d64c23:"ပိတ်သည်",s625ad019db843f94:"အသုံးပြုပါ",sbf1ca928ec1deb62:"နောက်ထပ်အကူအညီလိုပါသလား။",sd1a8dc951b2b6a98:"စာရင်းရှိကော်လံများအနေဖြင့်ဖော်ပြမည့်မည်သည့်နယ်ပယ်ဒေသများကိုရွေးချယ်ပါ",sf9aee319a006c9b4:"ထည့်ပါ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Dr=Object.freeze(Object.defineProperty({__proto__:null,templates:Fr},Symbol.toStringTag,{value:"Module"})),Rr={s226be12a5b1a27e8:"कागजात पढ्नुहोस्",s33f85f24c0f5f008:"सुरक्षित गर्नुहोस",s36cb242ac90353bc:"क्षेत्रहरू",s41cb4006238ebd3b:"थोक सम्पादन",s5e8250fb85d64c23:"बन्द गर्नुहोस",s625ad019db843f94:"प्रयोग गर्नुहोस्",sbf1ca928ec1deb62:"थप मद्दत चाहिन्छ?",sd1a8dc951b2b6a98:"सूचीमा स्तम्भहरूको रूपमा कुन क्षेत्रहरू प्रदर्शन गर्ने छनौट गर्नुहोस्",sf9aee319a006c9b4:"थप",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Nr=Object.freeze(Object.defineProperty({__proto__:null,templates:Rr},Symbol.toStringTag,{value:"Module"})),qr={s04ceadb276bbe149:"aan het laden.....",s226be12a5b1a27e8:"Lees de documentatie",s29e25f5e4622f847:"Dialoogvenster openen",s33f85f24c0f5f008:"Opslaan",s36cb242ac90353bc:"Velden",s41cb4006238ebd3b:"Bulkbewerking",s5e8250fb85d64c23:"sluit",s625ad019db843f94:"Gebruiken",sac83d7f9358b43db:m`${0} Lijst`,sb1bd536b63e9e995:"Privéveld: alleen ik kan de inhoud zien",sb59d68ed12d46377:"aan het laden",sbf1ca928ec1deb62:"Meer hulp nodig?",sd1a8dc951b2b6a98:"Kies welke velden u als kolommen in de lijst wilt weergeven",seafe6ef133ede7da:m`1 van ${0} laten zien`,sf9aee319a006c9b4:"Toevoegen",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,s9d51bfd93b5dbeca:"Show Archived"},Ur=Object.freeze(Object.defineProperty({__proto__:null,templates:qr},Symbol.toStringTag,{value:"Module"})),Vr={s226be12a5b1a27e8:"ਦਸਤਾਵੇਜ਼ ਪੜ੍ਹੋ",s33f85f24c0f5f008:"ਸੇਵ",s36cb242ac90353bc:"ਖੇਤਰ",s41cb4006238ebd3b:"ਥੋਕ ਸੰਪਾਦਨ",s5e8250fb85d64c23:"ਬੰਦ ਕਰੋ",s625ad019db843f94:"ਵਰਤੋਂ",sbf1ca928ec1deb62:"ਹੋਰ ਮਦਦ ਦੀ ਲੋੜ ਹੈ?",sd1a8dc951b2b6a98:"ਸੂਚੀ ਵਿੱਚ ਕਾਲਮ ਦੇ ਰੂਪ ਵਿੱਚ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਨ ਲਈ ਕਿਹੜੇ ਖੇਤਰ ਚੁਣੋ",sf9aee319a006c9b4:"ਸ਼ਾਮਲ ਕਰੋ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Br=Object.freeze(Object.defineProperty({__proto__:null,templates:Vr},Symbol.toStringTag,{value:"Module"})),Hr={s226be12a5b1a27e8:"Przeczytaj dokumentację",s33f85f24c0f5f008:"Zapisać",s36cb242ac90353bc:"Pola",s41cb4006238ebd3b:"Edycja zbiorcza",s5e8250fb85d64c23:"Zamknij",s625ad019db843f94:"Posługiwać się",sbf1ca928ec1deb62:"Potrzebujesz pomocy?",sd1a8dc951b2b6a98:"Wybierz, które pola mają być wyświetlane jako kolumny na liście",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Kr=Object.freeze(Object.defineProperty({__proto__:null,templates:Hr},Symbol.toStringTag,{value:"Module"})),Wr={s226be12a5b1a27e8:"Leia a documentação",s33f85f24c0f5f008:"Salvar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edição em massa",s5e8250fb85d64c23:"Fechar",s625ad019db843f94:"Usar",sbf1ca928ec1deb62:"Precisa de mais ajuda?",sd1a8dc951b2b6a98:"Escolha quais campos exibir como colunas na lista",sf9aee319a006c9b4:"Adicionar",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Gr=Object.freeze(Object.defineProperty({__proto__:null,templates:Wr},Symbol.toStringTag,{value:"Module"})),Zr={s226be12a5b1a27e8:"Citiți documentația",s33f85f24c0f5f008:"Salvați",s36cb242ac90353bc:"Câmpuri",s41cb4006238ebd3b:"Editare masivă",s5e8250fb85d64c23:"Închide",s625ad019db843f94:"Utilizare",sbf1ca928ec1deb62:"Ai nevoie de mai mult ajutor?",sd1a8dc951b2b6a98:"Alegeți câmpurile care să fie afișate în coloane în listă",sf9aee319a006c9b4:"Adăuga",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Jr=Object.freeze(Object.defineProperty({__proto__:null,templates:Zr},Symbol.toStringTag,{value:"Module"})),Qr={s226be12a5b1a27e8:"Читать документацию",s33f85f24c0f5f008:"Сохранить",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Массовое редактирование",s5e8250fb85d64c23:"Закрыть",s625ad019db843f94:"Использовать",sbf1ca928ec1deb62:"Нужна дополнительная помощь?",sd1a8dc951b2b6a98:"Выберите, какие поля отображать как столбцы в списке",sf9aee319a006c9b4:"Добавить",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xr=Object.freeze(Object.defineProperty({__proto__:null,templates:Qr},Symbol.toStringTag,{value:"Module"})),Yr={s226be12a5b1a27e8:"Preberite dokumentacijo",s33f85f24c0f5f008:"Shrani",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Urejanje v velikem obsegu",s5e8250fb85d64c23:"Zapri",s625ad019db843f94:"Uporaba",sbf1ca928ec1deb62:"Potrebujete več pomoči?",sd1a8dc951b2b6a98:"Izberite, katera polja naj bodo prikazana kot stolpci na seznamu",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},en=Object.freeze(Object.defineProperty({__proto__:null,templates:Yr},Symbol.toStringTag,{value:"Module"})),tn={s226be12a5b1a27e8:"Pročitajte dokumentaciju",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"masovno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristiti",sbf1ca928ec1deb62:"Treba vam više pomoći?",sd1a8dc951b2b6a98:"Izaberite koja polja da se prikazuju kao kolone na listi",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},on=Object.freeze(Object.defineProperty({__proto__:null,templates:tn},Symbol.toStringTag,{value:"Module"})),sn={s04ceadb276bbe149:"Inapakia chaguo...",s226be12a5b1a27e8:"Soma nyaraka",s29e25f5e4622f847:"Fungua Kidirisha",s33f85f24c0f5f008:"Hifadhi",s36cb242ac90353bc:"Mashamba",s41cb4006238ebd3b:"Hariri kwa Wingi",s5e8250fb85d64c23:"Funga",s625ad019db843f94:"Tumia",s9d51bfd93b5dbeca:"Onyesha Kumbukumbu",sac83d7f9358b43db:m`Orodha ya${0}`,sb1bd536b63e9e995:"Sehemu ya Faragha: Ni mimi pekee ninayeweza kuona maudhui yake",sb59d68ed12d46377:"Inapakia",sbf1ca928ec1deb62:"Unahitaji msaada zaidi?",scb9a1ff437efbd2a:m`Chagua ${0} zote ungependa kusasisha kutoka kwenye orodha, na uzisasishe hapa chini.`,sd1a8dc951b2b6a98:"Chagua ni sehemu zipi zitaonyeshwa kama safu wima kwenye orodha",seafe6ef133ede7da:m`Inaonyesha 1 kati ya ${0}`,sf9aee319a006c9b4:"Ongeza",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},an=Object.freeze(Object.defineProperty({__proto__:null,templates:sn},Symbol.toStringTag,{value:"Module"})),rn={s226be12a5b1a27e8:"อ่านเอกสาร",s33f85f24c0f5f008:"บันทึก",s36cb242ac90353bc:"ฟิลด์",s41cb4006238ebd3b:"แก้ไขเป็นกลุ่ม",s5e8250fb85d64c23:"ปิด",s625ad019db843f94:"ใช้",sbf1ca928ec1deb62:"ต้องการความช่วยเหลือเพิ่มเติมหรือไม่?",sd1a8dc951b2b6a98:"เลือกฟิลด์ที่จะแสดงเป็นคอลัมน์ในรายการ",sf9aee319a006c9b4:"เพิ่ม",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},nn=Object.freeze(Object.defineProperty({__proto__:null,templates:rn},Symbol.toStringTag,{value:"Module"})),ln={s226be12a5b1a27e8:"Basahin ang dokumentasyon",s33f85f24c0f5f008:"I-save",s36cb242ac90353bc:"Mga Field",s41cb4006238ebd3b:"Maramihang Pag-edit",s5e8250fb85d64c23:"Isara",s625ad019db843f94:"Gamitin",sbf1ca928ec1deb62:"Kailangan mo pa ba ng tulong?",sd1a8dc951b2b6a98:"Piliin kung aling mga field ang ipapakita bilang mga column sa listahan",sf9aee319a006c9b4:"Idagdag",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dn=Object.freeze(Object.defineProperty({__proto__:null,templates:ln},Symbol.toStringTag,{value:"Module"})),cn={s04ceadb276bbe149:"Seçenekler Yükleniyor...",s226be12a5b1a27e8:"Belgeleri oku",s29e25f5e4622f847:"İletişim Kutusunu Aç",s33f85f24c0f5f008:"Kaydet",s36cb242ac90353bc:"Alanlar",s41cb4006238ebd3b:"Toplu Düzenleme",s5e8250fb85d64c23:"Kapat",s625ad019db843f94:"Kullan",s9d51bfd93b5dbeca:"Arşivlenmiş Göster",sac83d7f9358b43db:m`${0} Listesi`,sb1bd536b63e9e995:"Özel Alan: İçeriğini sadece ben görebilirim",sb59d68ed12d46377:"Yükleniyor",sbf1ca928ec1deb62:"Daha fazla yardıma ihtiyacınız var mı?",scb9a1ff437efbd2a:m`Listeden güncellemek istediğiniz tüm ${0} 'i seçin ve aşağıda güncelleyin`,sd1a8dc951b2b6a98:"Listede Hangi Alanların Sütun Olarak Görüntüleneceğini Seçin",seafe6ef133ede7da:m`Gösteriliyor 1 of ${0}`,sf9aee319a006c9b4:"Ekle",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},un=Object.freeze(Object.defineProperty({__proto__:null,templates:cn},Symbol.toStringTag,{value:"Module"})),hn={s226be12a5b1a27e8:"Прочитайте документацію",s33f85f24c0f5f008:"Зберегти",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Масове редагування",s5e8250fb85d64c23:"Закрити",s625ad019db843f94:"Використати",sbf1ca928ec1deb62:"Потрібна додаткова допомога?",sd1a8dc951b2b6a98:"Виберіть, яке поле відображати у вигляді стовпців у списку",sf9aee319a006c9b4:"Додати",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},pn=Object.freeze(Object.defineProperty({__proto__:null,templates:hn},Symbol.toStringTag,{value:"Module"})),fn={s226be12a5b1a27e8:"Đọc tài liệu",s33f85f24c0f5f008:"Lưu",s36cb242ac90353bc:"Trường",s41cb4006238ebd3b:"Chỉnh sửa Hàng loạt",s5e8250fb85d64c23:"Đóng",s625ad019db843f94:"Sử dụng",sbf1ca928ec1deb62:"Bạn cần trợ giúp thêm?",sd1a8dc951b2b6a98:"Chọn các trường để hiển thị dưới dạng cột trong danh sách",sf9aee319a006c9b4:"Bổ sung",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},bn=Object.freeze(Object.defineProperty({__proto__:null,templates:fn},Symbol.toStringTag,{value:"Module"})),mn={s226be12a5b1a27e8:"阅读文档",s33f85f24c0f5f008:"保存",s36cb242ac90353bc:"字段",s41cb4006238ebd3b:"批量编辑",s5e8250fb85d64c23:"关",s625ad019db843f94:"使用",sbf1ca928ec1deb62:"需要更多帮助吗?",sd1a8dc951b2b6a98:"选择哪些字段要在列表中显示为列",sf9aee319a006c9b4:"添加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},gn=Object.freeze(Object.defineProperty({__proto__:null,templates:mn},Symbol.toStringTag,{value:"Module"})),vn={s04ceadb276bbe149:"正在載入選項...",s226be12a5b1a27e8:"閱讀文檔",s29e25f5e4622f847:"開啟對話視窗",s33f85f24c0f5f008:"儲存",s36cb242ac90353bc:"欄位",s41cb4006238ebd3b:"大量編輯",s5e8250fb85d64c23:"關",s625ad019db843f94:"使用",s9d51bfd93b5dbeca:"顯示已儲存",sac83d7f9358b43db:m`${0} 清單`,sb1bd536b63e9e995:"私人欄位:只有我可以看見內容",sb59d68ed12d46377:"載入中",sbf1ca928ec1deb62:"需要更多幫助嗎?",scb9a1ff437efbd2a:m`從清單中選取要更新的項目${0},並在下面進行更新`,sd1a8dc951b2b6a98:"選擇哪些欄位要顯示為列表中的直行",seafe6ef133ede7da:m`第1頁 (共${0}頁)`,sf9aee319a006c9b4:"新增",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yn=Object.freeze(Object.defineProperty({__proto__:null,templates:vn},Symbol.toStringTag,{value:"Module"}));return x.ApiService=vi,x.ComponentService=Le,x.DtAlert=Eo,x.DtBase=N,x.DtButton=yi,x.DtChurchHealthCircle=uo,x.DtConnection=ho,x.DtCopyText=fo,x.DtDate=jt,x.DtDatetime=bo,x.DtFileUpload=So,x.DtFormBase=P,x.DtIcon=ro,x.DtLabel=wi,x.DtLocation=mo,x.DtLocationMap=yo,x.DtMapModal=vo,x.DtModal=go,x.DtMultiSelect=Ze,x.DtMultiSelectButtonGroup=ko,x.DtMultiText=xo,x.DtNumberField=_o,x.DtSingleSelect=wo,x.DtTags=Ce,x.DtText=zt,x.DtTextArea=$o,x.DtTile=Ao,x.DtToggle=co,x.DtUsersConnection=po,x.version=Ua,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({}); diff --git a/dt-assets/build/components/index.umd.cjs b/dt-assets/build/components/index.umd.cjs index d9567d41b2..2917df4476 100644 --- a/dt-assets/build/components/index.umd.cjs +++ b/dt-assets/build/components/index.umd.cjs @@ -1,38 +1,38 @@ -(function($,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):($=typeof globalThis<"u"?globalThis:$||self,P($.DtWebComponents={}))})(this,function($){"use strict";var Pr=Object.defineProperty;var Mr=($,P,W)=>P in $?Pr($,P,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[P]=W;var Xe=($,P,W)=>Mr($,typeof P!="symbol"?P+"":P,W);/** +(function($,I){typeof exports=="object"&&typeof module<"u"?I(exports):typeof define=="function"&&define.amd?define(["exports"],I):($=typeof globalThis<"u"?globalThis:$||self,I($.DtWebComponents={}))})(this,function($){"use strict";var Pn=Object.defineProperty;var Mn=($,I,W)=>I in $?Pn($,I,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[I]=W;var Me=($,I,W)=>Mn($,typeof I!="symbol"?I+"":I,W);/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var As;const P=globalThis,W=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vt=Symbol(),Bt=new WeakMap;let qs=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Bt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Bt.set(t,e))}return e}toString(){return this.cssText}};const Fs=o=>new qs(typeof o=="string"?o:o+"",void 0,Vt),Us=(o,e)=>{if(W)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=P.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},Ht=W?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Fs(t)})(o):o;/** + */var Oo;const I=globalThis,W=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ut=Symbol(),Vt=new WeakMap;let qo=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Vt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Vt.set(t,e))}return e}toString(){return this.cssText}};const Uo=s=>new qo(typeof s=="string"?s:s+"",void 0,Ut),Vo=(s,e)=>{if(W)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),o=I.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=t.cssText,s.appendChild(i)}},Bt=W?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Uo(t)})(s):s;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:Vs,defineProperty:Bs,getOwnPropertyDescriptor:Hs,getOwnPropertyNames:Gs,getOwnPropertySymbols:Ws,getPrototypeOf:Ks}=Object,K=globalThis,Gt=K.trustedTypes,Zs=Gt?Gt.emptyScript:"",et=K.reactiveElementPolyfillSupport,he=(o,e)=>o,tt={toAttribute(o,e){switch(e){case Boolean:o=o?Zs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Wt=(o,e)=>!Vs(o,e),Kt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:Wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),K.litPropertyMetadata??(K.litPropertyMetadata=new WeakMap);let pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Kt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Bs(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=Hs(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Kt}static _$Ei(){if(this.hasOwnProperty(he("elementProperties")))return;const e=Ks(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(he("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(he("properties"))){const t=this.properties,i=[...Gs(t),...Ws(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Ht(s))}else e!==void 0&&t.push(Ht(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Us(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:tt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:tt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Wt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[he("elementProperties")]=new Map,pe[he("finalized")]=new Map,et==null||et({ReactiveElement:pe}),(K.reactiveElementVersions??(K.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:Bo,defineProperty:Ho,getOwnPropertyDescriptor:Ko,getOwnPropertyNames:Wo,getOwnPropertySymbols:Go,getPrototypeOf:Zo}=Object,G=globalThis,Ht=G.trustedTypes,Jo=Ht?Ht.emptyScript:"",et=G.reactiveElementPolyfillSupport,fe=(s,e)=>s,tt={toAttribute(s,e){switch(e){case Boolean:s=s?Jo:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},Kt=(s,e)=>!Bo(s,e),Wt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:Kt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),G.litPropertyMetadata??(G.litPropertyMetadata=new WeakMap);let be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Wt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);o!==void 0&&Ho(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:a}=Ko(this.prototype,e)??{get(){return this[t]},set(r){this[t]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const n=o==null?void 0:o.call(this);a.call(this,r),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Wt}static _$Ei(){if(this.hasOwnProperty(fe("elementProperties")))return;const e=Zo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(fe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(fe("properties"))){const t=this.properties,i=[...Wo(t),...Go(t)];for(const o of i)this.createProperty(o,t[o])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,o]of t)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const o=this._$Eu(t,i);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)t.unshift(Bt(o))}else e!==void 0&&t.push(Bt(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){const r=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:tt).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const r=i.getPropertyOptions(o),n=typeof r.converter=="function"?{fromAttribute:r.converter}:((a=r.converter)==null?void 0:a.fromAttribute)!==void 0?r.converter:tt;this._$Em=o,this[o]=n.fromAttribute(t,r.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Kt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,r]of this._$Ep)this[a]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[a,r]of o)r.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(o=>{var a;return(a=o.hostUpdate)==null?void 0:a.call(o)}),this.update(t)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[fe("elementProperties")]=new Map,be[fe("finalized")]=new Map,et==null||et({ReactiveElement:be}),(G.reactiveElementVersions??(G.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const fe=globalThis,Pe=fe.trustedTypes,Zt=Pe?Pe.createPolicy("lit-html",{createHTML:o=>o}):void 0,Jt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Qt="?"+Z,Js=`<${Qt}>`,te=document,be=()=>te.createComment(""),ge=o=>o===null||typeof o!="object"&&typeof o!="function",it=Array.isArray,Qs=o=>it(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",st=`[ -\f\r]`,me=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,Xt=/>/g,ie=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),ei=/'/g,ti=/"/g,ii=/^(?:script|style|textarea|title)$/i,Ys=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),f=Ys(1),U=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),si=new WeakMap,se=te.createTreeWalker(te,129);function oi(o,e){if(!it(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(e):e}const Xs=(o,e)=>{const t=o.length-1,i=[];let s,a=e===2?"":e===3?"":"",n=me;for(let r=0;r"?(n=s??me,g=-1):b[1]===void 0?g=-2:(g=n.lastIndex-b[2].length,c=b[1],n=b[3]===void 0?ie:b[3]==='"'?ti:ei):n===ti||n===ei?n=ie:n===Yt||n===Xt?n=me:(n=ie,s=void 0);const y=n===ie&&o[r+1].startsWith("/>")?" ":"";a+=n===me?l+Js:g>=0?(i.push(c),l.slice(0,g)+Jt+l.slice(g)+Z+y):l+Z+(g===-2?r:y)}return[oi(o,a+(o[t]||"")+(e===2?"":e===3?"":"")),i]};class ve{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let a=0,n=0;const r=e.length-1,l=this.parts,[c,b]=Xs(e,t);if(this.el=ve.createElement(c,i),se.currentNode=this.el.content,t===2||t===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(s=se.nextNode())!==null&&l.length0){s.textContent=Pe?Pe.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(e,t=this,i,s){const a=this.strings;let n=!1;if(a===void 0)e=de(this,e,t,0),n=!ge(e)||e!==this._$AH&&e!==U,n&&(this._$AH=e);else{const r=e;let l,c;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new ce(e.insertBefore(be(),a),a,void 0,t??{})}return s._$AI(o),s};/** + */const me=globalThis,je=me.trustedTypes,Gt=je?je.createPolicy("lit-html",{createHTML:s=>s}):void 0,Zt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Jt="?"+Z,Qo=`<${Jt}>`,te=document,ge=()=>te.createComment(""),ve=s=>s===null||typeof s!="object"&&typeof s!="function",it=Array.isArray,Xo=s=>it(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ot=`[ +\f\r]`,ye=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qt=/-->/g,Xt=/>/g,ie=RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Yt=/'/g,ei=/"/g,ti=/^(?:script|style|textarea|title)$/i,Yo=s=>(e,...t)=>({_$litType$:s,strings:e,values:t}),p=Yo(1),U=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),ii=new WeakMap,oe=te.createTreeWalker(te,129);function oi(s,e){if(!it(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gt!==void 0?Gt.createHTML(e):e}const es=(s,e)=>{const t=s.length-1,i=[];let o,a=e===2?"":e===3?"":"",r=ye;for(let n=0;n"?(r=o??ye,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?ie:u[3]==='"'?ei:Yt):r===ei||r===Yt?r=ie:r===Qt||r===Xt?r=ye:(r=ie,o=void 0);const y=r===ie&&s[n+1].startsWith("/>")?" ":"";a+=r===ye?l+Qo:h>=0?(i.push(d),l.slice(0,h)+Zt+l.slice(h)+Z+y):l+Z+(h===-2?n:y)}return[oi(s,a+(s[t]||"")+(e===2?"":e===3?"":"")),i]};class _e{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let a=0,r=0;const n=e.length-1,l=this.parts,[d,u]=es(e,t);if(this.el=_e.createElement(d,i),oe.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=oe.nextNode())!==null&&l.length0){o.textContent=je?je.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=O}_$AI(e,t=this,i,o){const a=this.strings;let r=!1;if(a===void 0)e=ce(this,e,t,0),r=!ve(e)||e!==this._$AH&&e!==U,r&&(this._$AH=e);else{const n=e;let l,d;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let o=i._$litPart$;if(o===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=o=new ue(e.insertBefore(ge(),a),a,void 0,t??{})}return o._$AI(s),o};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const je=globalThis,at=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),ai=new WeakMap;let ni=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=ai.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ai.set(t,e))}return e}toString(){return this.cssText}};const ro=o=>new ni(typeof o=="string"?o:o+"",void 0,nt),x=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,a)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[a+1],o[0]);return new ni(t,o,nt)},lo=(o,e)=>{if(at)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=je.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},ri=at?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ro(t)})(o):o;/** + */const Fe=globalThis,at=Fe.ShadowRoot&&(Fe.ShadyCSS===void 0||Fe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),si=new WeakMap;let ai=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=si.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&si.set(t,e))}return e}toString(){return this.cssText}};const ls=s=>new ai(typeof s=="string"?s:s+"",void 0,rt),x=(s,...e)=>{const t=s.length===1?s[0]:e.reduce((i,o,a)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[a+1],s[0]);return new ai(t,s,rt)},ds=(s,e)=>{if(at)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),o=Fe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=t.cssText,s.appendChild(i)}},ri=at?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ls(t)})(s):s;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:co,defineProperty:uo,getOwnPropertyDescriptor:ho,getOwnPropertyNames:po,getOwnPropertySymbols:fo,getPrototypeOf:bo}=Object,J=globalThis,li=J.trustedTypes,go=li?li.emptyScript:"",rt=J.reactiveElementPolyfillSupport,ye=(o,e)=>o,lt={toAttribute(o,e){switch(e){case Boolean:o=o?go:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},di=(o,e)=>!co(o,e),ci={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:di};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class ue extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ci){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&uo(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=ho(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ci}static _$Ei(){if(this.hasOwnProperty(ye("elementProperties")))return;const e=bo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ye("properties"))){const t=this.properties,i=[...po(t),...fo(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(ri(s))}else e!==void 0&&t.push(ri(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:lt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:lt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??di)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},ue[ye("elementProperties")]=new Map,ue[ye("finalized")]=new Map,rt==null||rt({ReactiveElement:ue}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:cs,defineProperty:us,getOwnPropertyDescriptor:hs,getOwnPropertyNames:ps,getOwnPropertySymbols:fs,getPrototypeOf:bs}=Object,J=globalThis,ni=J.trustedTypes,ms=ni?ni.emptyScript:"",nt=J.reactiveElementPolyfillSupport,we=(s,e)=>s,lt={toAttribute(s,e){switch(e){case Boolean:s=s?ms:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},li=(s,e)=>!cs(s,e),di={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:li};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class he extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=di){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);o!==void 0&&us(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:a}=hs(this.prototype,e)??{get(){return this[t]},set(r){this[t]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const n=o==null?void 0:o.call(this);a.call(this,r),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??di}static _$Ei(){if(this.hasOwnProperty(we("elementProperties")))return;const e=bs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(we("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(we("properties"))){const t=this.properties,i=[...ps(t),...fs(t)];for(const o of i)this.createProperty(o,t[o])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,o]of t)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const o=this._$Eu(t,i);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)t.unshift(ri(o))}else e!==void 0&&t.push(ri(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ds(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){const r=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:lt).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const r=i.getPropertyOptions(o),n=typeof r.converter=="function"?{fromAttribute:r.converter}:((a=r.converter)==null?void 0:a.fromAttribute)!==void 0?r.converter:lt;this._$Em=o,this[o]=n.fromAttribute(t,r.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??li)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,r]of this._$Ep)this[a]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[a,r]of o)r.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(o=>{var a;return(a=o.hostUpdate)==null?void 0:a.call(o)}),this.update(t)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}he.elementStyles=[],he.shadowRootOptions={mode:"open"},he[we("elementProperties")]=new Map,he[we("finalized")]=new Map,nt==null||nt({ReactiveElement:he}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */let oe=class extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=no(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return U}};oe._$litElement$=!0,oe.finalized=!0,(As=globalThis.litElementHydrateSupport)==null||As.call(globalThis,{LitElement:oe});const dt=globalThis.litElementPolyfillSupport;dt==null||dt({LitElement:oe}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** + */let se=class extends he{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ns(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return U}};se._$litElement$=!0,se.finalized=!0,(Oo=globalThis.litElementHydrateSupport)==null||Oo.call(globalThis,{LitElement:se});const dt=globalThis.litElementPolyfillSupport;dt==null||dt({LitElement:se}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const ct={ATTRIBUTE:1,CHILD:2},ut=o=>(...e)=>({_$litDirective$:o,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + */const ct={ATTRIBUTE:1,CHILD:2},ut=s=>(...e)=>({_$litDirective$:s,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const A=ut(class extends ht{constructor(o){var e;if(super(o),o.type!==ct.ATTRIBUTE||o.name!=="class"||((e=o.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=o.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const n=!!e[a];n===this.st.has(a)||(s=this.nt)!=null&&s.has(a)||(n?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return U}});/** + */const A=ut(class extends ht{constructor(s){var e;if(super(s),s.type!==ct.ATTRIBUTE||s.name!=="class"||((e=s.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(e=>s[e]).join(" ")+" "}update(s,[e]){var i,o;if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=s.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const r=!!e[a];r===this.st.has(a)||(o=this.nt)!=null&&o.has(a)||(r?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return U}});/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -40,35 +40,38 @@ * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const u=(o,...e)=>({strTag:!0,strings:o,values:e}),mo=o=>typeof o!="string"&&"strTag"in o,ui=(o,e,t)=>{let i=o[0];for(let s=1;s({strTag:!0,strings:s,values:e}),gs=s=>typeof s!="string"&&"strTag"in s,ci=(s,e,t)=>{let i=s[0];for(let o=1;omo(o)?ui(o.strings,o.values):o;let O=hi,pi=!1;function vo(o){if(pi)throw new Error("lit-localize can only be configured once");O=o,pi=!0}/** + */const ui=s=>gs(s)?ci(s.strings,s.values):s;let R=ui,hi=!1;function vs(s){if(hi)throw new Error("lit-localize can only be configured once");R=s,hi=!0}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class yo{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(pt,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pt,this.__litLocalizeEventHandler)}}const wo=o=>o.addController(new yo(o));/** + */class ys{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(pt,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pt,this.__litLocalizeEventHandler)}}const _s=s=>s.addController(new ys(s));/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class fi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** + */class pi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** * @license * Copyright 2014 Travis Webb * SPDX-License-Identifier: MIT - */const V=[];for(let o=0;o<256;o++)V[o]=(o>>4&15).toString(16)+(o&15).toString(16);function _o(o){let e=0,t=8997,i=0,s=33826,a=0,n=40164,r=0,l=52210;for(let c=0;c>>16,t=e&65535,a+=i>>>16,s=i&65535,l=r+(a>>>16)&65535,n=a&65535;return V[l>>8]+V[l&255]+V[n>>8]+V[n&255]+V[s>>8]+V[s&255]+V[t>>8]+V[t&255]}/** + */const V=[];for(let s=0;s<256;s++)V[s]=(s>>4&15).toString(16)+(s&15).toString(16);function ws(s){let e=0,t=8997,i=0,o=33826,a=0,r=40164,n=0,l=52210;for(let d=0;d>>16,t=e&65535,a+=i>>>16,o=i&65535,l=n+(a>>>16)&65535,r=a&65535;return V[l>>8]+V[l&255]+V[r>>8]+V[r&255]+V[o>>8]+V[o&255]+V[t>>8]+V[t&255]}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const $o="",xo="h",ko="s";function So(o,e){return(e?xo:ko)+_o(typeof o=="string"?o:o.join($o))}/** + */const $s="",xs="h",ks="s";function Ss(s,e){return(e?xs:ks)+ws(typeof s=="string"?s:s.join($s))}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const bi=new WeakMap,gi=new Map;function To(o,e,t){if(o){const i=(t==null?void 0:t.id)??Ao(e),s=o[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return ui(s.strings,e.values,s.values);{let a=bi.get(s);return a===void 0&&(a=s.values,bi.set(s,a)),{...s,values:a.map(n=>e.values[n])}}}}return hi(e)}function Ao(o){const e=typeof o=="string"?o:o.strings;let t=gi.get(e);return t===void 0&&(t=So(e,typeof o!="string"&&!("strTag"in o)),gi.set(e,t)),t}/** + */const fi=new WeakMap,bi=new Map;function Es(s,e,t){if(s){const i=(t==null?void 0:t.id)??As(e),o=s[i];if(o){if(typeof o=="string")return o;if("strTag"in o)return ci(o.strings,e.values,o.values);{let a=fi.get(o);return a===void 0&&(a=o.values,fi.set(o,a)),{...o,values:a.map(r=>e.values[r])}}}}return ui(e)}function As(s){const e=typeof s=="string"?s:s.strings;let t=bi.get(e);return t===void 0&&(t=Ss(e,typeof s!="string"&&!("strTag"in s)),bi.set(e,t)),t}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function ft(o){window.dispatchEvent(new CustomEvent(pt,{detail:o}))}let De="",bt,mi,ze,gt,vi,ae=new fi;ae.resolve();let Re=0;const Eo=o=>(vo((e,t)=>To(vi,e,t)),De=mi=o.sourceLocale,ze=new Set(o.targetLocales),ze.add(o.sourceLocale),gt=o.loadLocale,{getLocale:Oo,setLocale:Co}),Oo=()=>De,Co=o=>{if(o===(bt??De))return ae.promise;if(!ze||!gt)throw new Error("Internal error");if(!ze.has(o))throw new Error("Invalid locale code");Re++;const e=Re;return bt=o,ae.settled&&(ae=new fi),ft({status:"loading",loadingLocale:o}),(o===mi?Promise.resolve({templates:void 0}):gt(o)).then(i=>{Re===e&&(De=o,bt=void 0,vi=i.templates,ft({status:"ready",readyLocale:o}),ae.resolve())},i=>{Re===e&&(ft({status:"error",errorLocale:o,errorMessage:i.toString()}),ae.reject(i))}),ae.promise},Lo=(o,e,t)=>{const i=o[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Io="en",Po=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:Mo}=Eo({sourceLocale:Io,targetLocales:Po,loadLocale:o=>Lo(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ba),"./generated/ar.js":()=>Promise.resolve().then(()=>Ga),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Ka),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Ja),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Ya),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>en),"./generated/cs.js":()=>Promise.resolve().then(()=>sn),"./generated/de_DE.js":()=>Promise.resolve().then(()=>an),"./generated/el.js":()=>Promise.resolve().then(()=>rn),"./generated/en_US.js":()=>Promise.resolve().then(()=>dn),"./generated/es-419.js":()=>Promise.resolve().then(()=>un),"./generated/es_419.js":()=>Promise.resolve().then(()=>pn),"./generated/es_ES.js":()=>Promise.resolve().then(()=>bn),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>mn),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>yn),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>_n),"./generated/hr.js":()=>Promise.resolve().then(()=>xn),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>Sn),"./generated/id_ID.js":()=>Promise.resolve().then(()=>An),"./generated/it_IT.js":()=>Promise.resolve().then(()=>On),"./generated/ja.js":()=>Promise.resolve().then(()=>Ln),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Pn),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>jn),"./generated/mr.js":()=>Promise.resolve().then(()=>zn),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Nn),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Fn),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Vn),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Hn),"./generated/pl.js":()=>Promise.resolve().then(()=>Wn),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Zn),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Qn),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>Xn),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>tr),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>sr),"./generated/sw.js":()=>Promise.resolve().then(()=>ar),"./generated/th.js":()=>Promise.resolve().then(()=>rr),"./generated/tl.js":()=>Promise.resolve().then(()=>dr),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>ur),"./generated/uk.js":()=>Promise.resolve().then(()=>pr),"./generated/vi.js":()=>Promise.resolve().then(()=>br),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>mr),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>yr)}),`./generated/${o}.js`,3)});class mt{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,s="dt/v1/"){let a=s;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const n=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,r={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(r.body=JSON.stringify(i));const l=await fetch(n,r),c=await l.json();if(!l.ok){const b=new Error((c==null?void 0:c.message)||c.toString());throw b.args={status:l.status,statusText:l.statusText,body:c},b}return c}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const s=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${s}`)}async getLocations(e,t,i,s=""){const a=new URLSearchParams({s,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,s="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:s})}async updateComment(e,t,i,s,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:s,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,s,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:s,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,s){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:s.post,comment:s.comment,meta:s.meta,status:s.status},"dt-posts/v2/posts/search/")}}(function(){(function(o){const e=new WeakMap,t=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,b=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,w=new WeakMap,L=new WeakMap,q={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},j=(h,d)=>{for(let p in q){d[p]=null;let m=null;const _=q[p];Object.defineProperty(d,p,{get(){return m},set(k){m=k,h.isConnected?M(h,_,k):b.set(h,d)}})}};function I(h){const d=s.get(h),{form:p}=d;Ls(h,p,d),Cs(h,d.labels)}const Le=(h,d=!1)=>{const p=document.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return s.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let m=p.nextNode();const _=!d||h.disabled;for(;m;)m.formDisabledCallback&&_&&Rt(m,h.disabled),m=p.nextNode()},Ze={attributes:!0,attributeFilter:["disabled","name"]},X=Ye()?new MutationObserver(h=>{for(const d of h){const p=d.target;if(d.attributeName==="disabled"&&(p.constructor.formAssociated?Rt(p,p.hasAttribute("disabled")):p.localName==="fieldset"&&Le(p)),d.attributeName==="name"&&p.constructor.formAssociated){const m=s.get(p),_=c.get(p);m.setFormValue(_)}}}):{};function T(h){h.forEach(d=>{const{addedNodes:p,removedNodes:m}=d,_=Array.from(p),k=Array.from(m);_.forEach(S=>{var D;if(s.has(S)&&S.constructor.formAssociated&&I(S),b.has(S)){const C=b.get(S);Object.keys(q).filter(F=>C[F]!==null).forEach(F=>{M(S,q[F],C[F])}),b.delete(S)}if(L.has(S)){const C=L.get(S);M(S,"internals-valid",C.validity.valid.toString()),M(S,"internals-invalid",(!C.validity.valid).toString()),M(S,"aria-invalid",(!C.validity.valid).toString()),L.delete(S)}if(S.localName==="form"){const C=l.get(S),G=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(Ut){return s.has(Ut)&&Ut.constructor.formAssociated&&!(C&&C.has(Ut))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let F=G.nextNode();for(;F;)I(F),F=G.nextNode()}S.localName==="fieldset"&&((D=X.observe)===null||D===void 0||D.call(X,S,Ze),Le(S,!0))}),k.forEach(S=>{const D=s.get(S);D&&i.get(D)&&Es(D),r.has(S)&&r.get(S).disconnect()})})}function R(h){h.forEach(d=>{const{removedNodes:p}=d;p.forEach(m=>{const _=y.get(d.target);s.has(m)&&Ps(m),_.disconnect()})})}const le=h=>{var d,p;const m=new MutationObserver(R);!((d=window==null?void 0:window.ShadyDOM)===null||d===void 0)&&d.inUse&&h.mode&&h.host&&(h=h.host),(p=m.observe)===null||p===void 0||p.call(m,h,{childList:!0}),y.set(h,m)};Ye()&&new MutationObserver(T);const ee={childList:!0,subtree:!0},M=(h,d,p)=>{h.getAttribute(d)!==p&&h.setAttribute(d,p)},Rt=(h,d)=>{h.toggleAttribute("internals-disabled",d),d?M(h,"aria-disabled","true"):h.removeAttribute("aria-disabled"),h.formDisabledCallback&&h.formDisabledCallback.apply(h,[d])},Es=h=>{i.get(h).forEach(p=>{p.remove()}),i.set(h,[])},Os=(h,d)=>{const p=document.createElement("input");return p.type="hidden",p.name=h.getAttribute("name"),h.after(p),i.get(d).push(p),p},wr=(h,d)=>{var p;i.set(d,[]),(p=X.observe)===null||p===void 0||p.call(X,h,Ze)},Cs=(h,d)=>{if(d.length){Array.from(d).forEach(m=>m.addEventListener("click",h.click.bind(h)));let p=d[0].id;d[0].id||(p=`${d[0].htmlFor}_Label`,d[0].id=p),M(h,"aria-labelledby",p)}},Je=h=>{const d=Array.from(h.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),p=l.get(h)||[],m=Array.from(p).filter(k=>k.isConnected).map(k=>s.get(k).validity.valid),_=[...d,...m].includes(!1);h.toggleAttribute("internals-invalid",_),h.toggleAttribute("internals-valid",!_)},_r=h=>{Je(Qe(h.target))},$r=h=>{Je(Qe(h.target))},xr=h=>{const d=["button[type=submit]","input[type=submit]","button:not([type])"].map(p=>`${p}:not([disabled])`).map(p=>`${p}:not([form])${h.id?`,${p}[form='${h.id}']`:""}`).join(",");h.addEventListener("click",p=>{if(p.target.closest(d)){const _=l.get(h);if(h.noValidate)return;_.size&&Array.from(_).reverse().map(D=>s.get(D).reportValidity()).includes(!1)&&p.preventDefault()}})},kr=h=>{const d=l.get(h.target);d&&d.size&&d.forEach(p=>{p.constructor.formAssociated&&p.formResetCallback&&p.formResetCallback.apply(p)})},Ls=(h,d,p)=>{if(d){const m=l.get(d);if(m)m.add(h);else{const _=new Set;_.add(h),l.set(d,_),xr(d),d.addEventListener("reset",kr),d.addEventListener("input",_r),d.addEventListener("change",$r)}n.set(d,{ref:h,internals:p}),h.constructor.formAssociated&&h.formAssociatedCallback&&setTimeout(()=>{h.formAssociatedCallback.apply(h,[d])},0),Je(d)}},Qe=h=>{let d=h.parentNode;return d&&d.tagName!=="FORM"&&(d=Qe(d)),d},H=(h,d,p=DOMException)=>{if(!h.constructor.formAssociated)throw new p(d)},Is=(h,d,p)=>{const m=l.get(h);return m&&m.size&&m.forEach(_=>{s.get(_)[p]()||(d=!1)}),d},Ps=h=>{if(h.constructor.formAssociated){const d=s.get(h),{labels:p,form:m}=d;Cs(h,p),Ls(h,m,d)}};function Ye(){return typeof MutationObserver<"u"}class Sr{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Tr=h=>(h.badInput=!1,h.customError=!1,h.patternMismatch=!1,h.rangeOverflow=!1,h.rangeUnderflow=!1,h.stepMismatch=!1,h.tooLong=!1,h.tooShort=!1,h.typeMismatch=!1,h.valid=!0,h.valueMissing=!1,h),Ar=(h,d,p)=>(h.valid=Er(d),Object.keys(d).forEach(m=>h[m]=d[m]),p&&Je(p),h),Er=h=>{let d=!0;for(let p in h)p!=="valid"&&h[p]!==!1&&(d=!1);return d},Nt=new WeakMap;function Ms(h,d){h.toggleAttribute(d,!0),h.part&&h.part.add(d)}class qt extends Set{static get isPolyfilled(){return!0}constructor(d){if(super(),!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Nt.set(this,d)}add(d){if(!/^--/.test(d)||typeof d!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${d} must start with '--'.`);const p=super.add(d),m=Nt.get(this),_=`state${d}`;return m.isConnected?Ms(m,_):setTimeout(()=>{Ms(m,_)}),p}clear(){for(let[d]of this.entries())this.delete(d);super.clear()}delete(d){const p=super.delete(d),m=Nt.get(this);return m.isConnected?(m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)):setTimeout(()=>{m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)}),p}}function js(h,d,p,m){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?m:p==="a"?m.call(h):m?m.value:d.get(h)}function Or(h,d,p,m,_){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d.set(h,p),p}var Ie;class Cr{constructor(d){Ie.set(this,void 0),Or(this,Ie,d);for(let p=0;pG.compareDocumentPosition?G.compareDocumentPosition(F)&2?1:-1:0);return new Cr(C)}})}class Ds{static get isPolyfilled(){return!0}constructor(d){if(!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const p=d.getRootNode(),m=new Sr;this.states=new qt(d),e.set(this,d),t.set(this,m),s.set(d,this),j(d,this),wr(d,this),Object.seal(this),p instanceof DocumentFragment&&le(p)}checkValidity(){const d=e.get(this);if(H(d,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=t.get(this);if(!p.valid){const m=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});d.dispatchEvent(m)}return p.valid}get form(){const d=e.get(this);H(d,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let p;return d.constructor.formAssociated===!0&&(p=Qe(d)),p}get labels(){const d=e.get(this);H(d,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const p=d.getAttribute("id"),m=d.getRootNode();return m&&p?m.querySelectorAll(`[for="${p}"]`):[]}reportValidity(){const d=e.get(this);if(H(d,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=this.checkValidity(),m=v.get(this);if(m&&!d.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!p&&m&&(d.focus(),m.focus()),p}setFormValue(d){const p=e.get(this);if(H(p,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Es(this),d!=null&&!(d instanceof FormData)){if(p.getAttribute("name")){const m=Os(p,this);m.value=d}}else d!=null&&d instanceof FormData&&Array.from(d).reverse().forEach(([m,_])=>{if(typeof _=="string"){const k=Os(p,this);k.name=m,k.value=_}});c.set(p,d)}setValidity(d,p,m){const _=e.get(this);if(H(_,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!d)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");v.set(this,m);const k=t.get(this),S={};for(const G in d)S[G]=d[G];Object.keys(S).length===0&&Tr(k);const D=Object.assign(Object.assign({},k),S);delete D.valid;const{valid:C}=Ar(k,D,this.form);if(!C&&!p)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,C?"":p),_.isConnected?(_.toggleAttribute("internals-invalid",!C),_.toggleAttribute("internals-valid",C),M(_,"aria-invalid",`${!C}`)):L.set(_,this)}get shadowRoot(){const d=e.get(this),p=g.get(d);return p||null}get validationMessage(){const d=e.get(this);return H(d,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const d=e.get(this);return H(d,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const d=e.get(this);return H(d,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(d.disabled||d.hasAttribute("disabled")||d.hasAttribute("readonly"))}}function Ir(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class h extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const d=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(d,h);const p=new h;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(m=>m in p.internals)}let zs=!1,Rs=!1;function Ft(h){Rs||(Rs=!0,window.CustomStateSet=qt,h&&(HTMLElement.prototype.attachInternals=function(...d){const p=h.call(this,d);return p.states=new qt(this),p}))}function Ns(h=!0){if(!zs){if(zs=!0,typeof window<"u"&&(window.ElementInternals=Ds),typeof CustomElementRegistry<"u"){const d=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(p,m,_){if(m.formAssociated){const k=m.prototype.connectedCallback;m.prototype.connectedCallback=function(){w.has(this)||(w.set(this,!0),this.hasAttribute("disabled")&&Rt(this,!0)),k!=null&&k.apply(this),Ps(this)}}d.call(this,p,m,_)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(s.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Ds(this)}),typeof Element<"u"){let d=function(...m){const _=p.apply(this,m);if(g.set(this,_),Ye()){const k=new MutationObserver(T);window.ShadyDOM?k.observe(this,ee):k.observe(_,ee),r.set(this,k)}return _};const p=Element.prototype.attachShadow;Element.prototype.attachShadow=d}Ye()&&typeof document<"u"&&new MutationObserver(T).observe(document.documentElement,ee),typeof HTMLFormElement<"u"&&Lr(),(h||typeof window<"u"&&!window.CustomStateSet)&&Ft()}}return!!customElements.polyfillWrapFlushCallback||(Ir()?typeof window<"u"&&!window.CustomStateSet&&Ft(HTMLElement.prototype.attachInternals):Ns(!1)),o.forceCustomStateSetPolyfill=Ft,o.forceElementInternalsPolyfill=Ns,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})();class N extends oe{static get properties(){return{RTL:{type:Boolean},locale:{type:String},apiRoot:{type:String,reflect:!1},postType:{type:String,reflect:!1},postID:{type:String,reflect:!1}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),wo(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}connectedCallback(){super.connectedCallback(),this.apiRoot=this.apiRoot?`${this.apiRoot}/`.replace("//","/"):"/",this.api=new mt(this.nonce,this.apiRoot)}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{Mo(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class yi extends N{static get formAssociated(){return!0}static get styles(){return x` + */function ft(s){window.dispatchEvent(new CustomEvent(pt,{detail:s}))}let De="",bt,mi,Re,mt,gi,ae=new pi;ae.resolve();let Ne=0;const Os=s=>(vs((e,t)=>Es(gi,e,t)),De=mi=s.sourceLocale,Re=new Set(s.targetLocales),Re.add(s.sourceLocale),mt=s.loadLocale,{getLocale:Ts,setLocale:Cs}),Ts=()=>De,Cs=s=>{if(s===(bt??De))return ae.promise;if(!Re||!mt)throw new Error("Internal error");if(!Re.has(s))throw new Error("Invalid locale code");Ne++;const e=Ne;return bt=s,ae.settled&&(ae=new pi),ft({status:"loading",loadingLocale:s}),(s===mi?Promise.resolve({templates:void 0}):mt(s)).then(i=>{Ne===e&&(De=s,bt=void 0,gi=i.templates,ft({status:"ready",readyLocale:s}),ae.resolve())},i=>{Ne===e&&(ft({status:"error",errorLocale:s,errorMessage:i.toString()}),ae.reject(i))}),ae.promise},Ls=(s,e,t)=>{const i=s[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((o,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Is="en",Ps=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:Ms}=Os({sourceLocale:Is,targetLocales:Ps,loadLocale:s=>Ls(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ba),"./generated/ar.js":()=>Promise.resolve().then(()=>Ka),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Ga),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Ja),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Xa),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>er),"./generated/cs.js":()=>Promise.resolve().then(()=>ir),"./generated/de_DE.js":()=>Promise.resolve().then(()=>sr),"./generated/el.js":()=>Promise.resolve().then(()=>rr),"./generated/en_US.js":()=>Promise.resolve().then(()=>lr),"./generated/es-419.js":()=>Promise.resolve().then(()=>cr),"./generated/es_419.js":()=>Promise.resolve().then(()=>hr),"./generated/es_ES.js":()=>Promise.resolve().then(()=>fr),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>mr),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>vr),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>_r),"./generated/hr.js":()=>Promise.resolve().then(()=>$r),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>kr),"./generated/id_ID.js":()=>Promise.resolve().then(()=>Er),"./generated/it_IT.js":()=>Promise.resolve().then(()=>Or),"./generated/ja.js":()=>Promise.resolve().then(()=>Cr),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Ir),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>Mr),"./generated/mr.js":()=>Promise.resolve().then(()=>zr),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Dr),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Nr),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Ur),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Br),"./generated/pl.js":()=>Promise.resolve().then(()=>Kr),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Gr),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Jr),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>Xr),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>en),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>on),"./generated/sw.js":()=>Promise.resolve().then(()=>an),"./generated/th.js":()=>Promise.resolve().then(()=>nn),"./generated/tl.js":()=>Promise.resolve().then(()=>dn),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>un),"./generated/uk.js":()=>Promise.resolve().then(()=>pn),"./generated/vi.js":()=>Promise.resolve().then(()=>bn),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>gn),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>yn)}),`./generated/${s}.js`,3)});class vi{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,o="dt/v1/"){let a=o;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const r=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,n={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(n.body=JSON.stringify(i));const l=await fetch(r,n),d=await l.json();if(!l.ok){const u=new Error((d==null?void 0:d.message)||d.toString());throw u.args={status:l.status,statusText:l.statusText,body:d},u}return d}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const o=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${o}`)}async getLocations(e,t,i,o=""){const a=new URLSearchParams({s:o,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,o="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:o})}async updateComment(e,t,i,o,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:o,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,o,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:o,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,o){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:o.post,comment:o.comment,meta:o.meta,status:o.status},"dt-posts/v2/posts/search/")}async uploadFiles(e,t,i,o,a=""){const r=new FormData;i.forEach(l=>r.append("storage_upload_files[]",l)),r.append("meta_key",o),r.append("key_prefix",a),r.append("upload_type","post"),r.append("is_multi_file","true"),r.append("storage_s3_url_duration","+7 days");const n=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_upload`;return await new Promise((l,d)=>{const u=new XMLHttpRequest;u.open("POST",n,!0),u.withCredentials=!0,u.setRequestHeader("X-WP-Nonce",this.nonce),u.onload=()=>{let h={};try{h=JSON.parse(u.responseText||"{}")}catch{h={message:u.responseText||"Upload failed"}}if(u.status>=200&&u.status<300)l(h);else{const g=new Error((h==null?void 0:h.uploaded_msg)||(h==null?void 0:h.message)||"Upload failed");g.args={status:u.status,statusText:u.statusText,body:h},d(g)}},u.onerror=()=>d(new Error("Upload failed")),u.send(r)})}async deleteFile(e,t,i,o){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_delete_single`,{meta_key:i,file_key:o})}async renameFile(e,t,i,o,a){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_rename_single`,{meta_key:i,file_key:o,new_name:a})}async downloadFile(e,t,i,o){const a=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_download`,r=await fetch(a,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce},body:JSON.stringify({meta_key:i,file_key:o})});if(!r.ok){const n=await r.json().catch(()=>({message:"Download failed"}));throw new Error(n.message||"Download failed")}return await r.blob()}}(function(){(function(s){const e=new WeakMap,t=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,C=new WeakMap,D={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},j=(f,c)=>{for(let b in D){c[b]=null;let v=null;const w=D[b];Object.defineProperty(c,b,{get(){return v},set(k){v=k,f.isConnected?P(f,w,k):u.set(f,c)}})}};function L(f){const c=o.get(f),{form:b}=c;Io(f,b,c),Lo(f,c.labels)}const Ie=(f,c=!1)=>{const b=document.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return o.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let v=b.nextNode();const w=!c||f.disabled;for(;v;)v.formDisabledCallback&&w&&Ft(v,f.disabled),v=b.nextNode()},Je={attributes:!0,attributeFilter:["disabled","name"]},Y=Ye()?new MutationObserver(f=>{for(const c of f){const b=c.target;if(c.attributeName==="disabled"&&(b.constructor.formAssociated?Ft(b,b.hasAttribute("disabled")):b.localName==="fieldset"&&Ie(b)),c.attributeName==="name"&&b.constructor.formAssociated){const v=o.get(b),w=d.get(b);v.setFormValue(w)}}}):{};function E(f){f.forEach(c=>{const{addedNodes:b,removedNodes:v}=c,w=Array.from(b),k=Array.from(v);w.forEach(S=>{var z;if(o.has(S)&&S.constructor.formAssociated&&L(S),u.has(S)){const T=u.get(S);Object.keys(D).filter(q=>T[q]!==null).forEach(q=>{P(S,D[q],T[q])}),u.delete(S)}if(C.has(S)){const T=C.get(S);P(S,"internals-valid",T.validity.valid.toString()),P(S,"internals-invalid",(!T.validity.valid).toString()),P(S,"aria-invalid",(!T.validity.valid).toString()),C.delete(S)}if(S.localName==="form"){const T=l.get(S),K=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(qt){return o.has(qt)&&qt.constructor.formAssociated&&!(T&&T.has(qt))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let q=K.nextNode();for(;q;)L(q),q=K.nextNode()}S.localName==="fieldset"&&((z=Y.observe)===null||z===void 0||z.call(Y,S,Je),Ie(S,!0))}),k.forEach(S=>{const z=o.get(S);z&&i.get(z)&&To(z),n.has(S)&&n.get(S).disconnect()})})}function F(f){f.forEach(c=>{const{removedNodes:b}=c;b.forEach(v=>{const w=y.get(c.target);o.has(v)&&Mo(v),w.disconnect()})})}const de=f=>{var c,b;const v=new MutationObserver(F);!((c=window==null?void 0:window.ShadyDOM)===null||c===void 0)&&c.inUse&&f.mode&&f.host&&(f=f.host),(b=v.observe)===null||b===void 0||b.call(v,f,{childList:!0}),y.set(f,v)};Ye()&&new MutationObserver(E);const ee={childList:!0,subtree:!0},P=(f,c,b)=>{f.getAttribute(c)!==b&&f.setAttribute(c,b)},Ft=(f,c)=>{f.toggleAttribute("internals-disabled",c),c?P(f,"aria-disabled","true"):f.removeAttribute("aria-disabled"),f.formDisabledCallback&&f.formDisabledCallback.apply(f,[c])},To=f=>{i.get(f).forEach(b=>{b.remove()}),i.set(f,[])},Co=(f,c)=>{const b=document.createElement("input");return b.type="hidden",b.name=f.getAttribute("name"),f.after(b),i.get(c).push(b),b},_n=(f,c)=>{var b;i.set(c,[]),(b=Y.observe)===null||b===void 0||b.call(Y,f,Je)},Lo=(f,c)=>{if(c.length){Array.from(c).forEach(v=>v.addEventListener("click",f.click.bind(f)));let b=c[0].id;c[0].id||(b=`${c[0].htmlFor}_Label`,c[0].id=b),P(f,"aria-labelledby",b)}},Qe=f=>{const c=Array.from(f.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),b=l.get(f)||[],v=Array.from(b).filter(k=>k.isConnected).map(k=>o.get(k).validity.valid),w=[...c,...v].includes(!1);f.toggleAttribute("internals-invalid",w),f.toggleAttribute("internals-valid",!w)},wn=f=>{Qe(Xe(f.target))},$n=f=>{Qe(Xe(f.target))},xn=f=>{const c=["button[type=submit]","input[type=submit]","button:not([type])"].map(b=>`${b}:not([disabled])`).map(b=>`${b}:not([form])${f.id?`,${b}[form='${f.id}']`:""}`).join(",");f.addEventListener("click",b=>{if(b.target.closest(c)){const w=l.get(f);if(f.noValidate)return;w.size&&Array.from(w).reverse().map(z=>o.get(z).reportValidity()).includes(!1)&&b.preventDefault()}})},kn=f=>{const c=l.get(f.target);c&&c.size&&c.forEach(b=>{b.constructor.formAssociated&&b.formResetCallback&&b.formResetCallback.apply(b)})},Io=(f,c,b)=>{if(c){const v=l.get(c);if(v)v.add(f);else{const w=new Set;w.add(f),l.set(c,w),xn(c),c.addEventListener("reset",kn),c.addEventListener("input",wn),c.addEventListener("change",$n)}r.set(c,{ref:f,internals:b}),f.constructor.formAssociated&&f.formAssociatedCallback&&setTimeout(()=>{f.formAssociatedCallback.apply(f,[c])},0),Qe(c)}},Xe=f=>{let c=f.parentNode;return c&&c.tagName!=="FORM"&&(c=Xe(c)),c},H=(f,c,b=DOMException)=>{if(!f.constructor.formAssociated)throw new b(c)},Po=(f,c,b)=>{const v=l.get(f);return v&&v.size&&v.forEach(w=>{o.get(w)[b]()||(c=!1)}),c},Mo=f=>{if(f.constructor.formAssociated){const c=o.get(f),{labels:b,form:v}=c;Lo(f,b),Io(f,v,c)}};function Ye(){return typeof MutationObserver<"u"}class Sn{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const En=f=>(f.badInput=!1,f.customError=!1,f.patternMismatch=!1,f.rangeOverflow=!1,f.rangeUnderflow=!1,f.stepMismatch=!1,f.tooLong=!1,f.tooShort=!1,f.typeMismatch=!1,f.valid=!0,f.valueMissing=!1,f),An=(f,c,b)=>(f.valid=On(c),Object.keys(c).forEach(v=>f[v]=c[v]),b&&Qe(b),f),On=f=>{let c=!0;for(let b in f)b!=="valid"&&f[b]!==!1&&(c=!1);return c},Dt=new WeakMap;function jo(f,c){f.toggleAttribute(c,!0),f.part&&f.part.add(c)}class Rt extends Set{static get isPolyfilled(){return!0}constructor(c){if(super(),!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Dt.set(this,c)}add(c){if(!/^--/.test(c)||typeof c!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${c} must start with '--'.`);const b=super.add(c),v=Dt.get(this),w=`state${c}`;return v.isConnected?jo(v,w):setTimeout(()=>{jo(v,w)}),b}clear(){for(let[c]of this.entries())this.delete(c);super.clear()}delete(c){const b=super.delete(c),v=Dt.get(this);return v.isConnected?(v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)):setTimeout(()=>{v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)}),b}}function zo(f,c,b,v){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot read private member from an object whose class did not declare it");return b==="m"?v:b==="a"?v.call(f):v?v.value:c.get(f)}function Tn(f,c,b,v,w){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c.set(f,b),b}var Pe;class Cn{constructor(c){Pe.set(this,void 0),Tn(this,Pe,c);for(let b=0;bK.compareDocumentPosition?K.compareDocumentPosition(q)&2?1:-1:0);return new Cn(T)}})}class Fo{static get isPolyfilled(){return!0}constructor(c){if(!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const b=c.getRootNode(),v=new Sn;this.states=new Rt(c),e.set(this,c),t.set(this,v),o.set(c,this),j(c,this),_n(c,this),Object.seal(this),b instanceof DocumentFragment&&de(b)}checkValidity(){const c=e.get(this);if(H(c,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=t.get(this);if(!b.valid){const v=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});c.dispatchEvent(v)}return b.valid}get form(){const c=e.get(this);H(c,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let b;return c.constructor.formAssociated===!0&&(b=Xe(c)),b}get labels(){const c=e.get(this);H(c,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const b=c.getAttribute("id"),v=c.getRootNode();return v&&b?v.querySelectorAll(`[for="${b}"]`):[]}reportValidity(){const c=e.get(this);if(H(c,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=this.checkValidity(),v=g.get(this);if(v&&!c.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!b&&v&&(c.focus(),v.focus()),b}setFormValue(c){const b=e.get(this);if(H(b,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),To(this),c!=null&&!(c instanceof FormData)){if(b.getAttribute("name")){const v=Co(b,this);v.value=c}}else c!=null&&c instanceof FormData&&Array.from(c).reverse().forEach(([v,w])=>{if(typeof w=="string"){const k=Co(b,this);k.name=v,k.value=w}});d.set(b,c)}setValidity(c,b,v){const w=e.get(this);if(H(w,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!c)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");g.set(this,v);const k=t.get(this),S={};for(const K in c)S[K]=c[K];Object.keys(S).length===0&&En(k);const z=Object.assign(Object.assign({},k),S);delete z.valid;const{valid:T}=An(k,z,this.form);if(!T&&!b)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,T?"":b),w.isConnected?(w.toggleAttribute("internals-invalid",!T),w.toggleAttribute("internals-valid",T),P(w,"aria-invalid",`${!T}`)):C.set(w,this)}get shadowRoot(){const c=e.get(this),b=h.get(c);return b||null}get validationMessage(){const c=e.get(this);return H(c,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const c=e.get(this);return H(c,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const c=e.get(this);return H(c,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(c.disabled||c.hasAttribute("disabled")||c.hasAttribute("readonly"))}}function In(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class f extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const c=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(c,f);const b=new f;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(v=>v in b.internals)}let Do=!1,Ro=!1;function Nt(f){Ro||(Ro=!0,window.CustomStateSet=Rt,f&&(HTMLElement.prototype.attachInternals=function(...c){const b=f.call(this,c);return b.states=new Rt(this),b}))}function No(f=!0){if(!Do){if(Do=!0,typeof window<"u"&&(window.ElementInternals=Fo),typeof CustomElementRegistry<"u"){const c=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(b,v,w){if(v.formAssociated){const k=v.prototype.connectedCallback;v.prototype.connectedCallback=function(){_.has(this)||(_.set(this,!0),this.hasAttribute("disabled")&&Ft(this,!0)),k!=null&&k.apply(this),Mo(this)}}c.call(this,b,v,w)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(o.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Fo(this)}),typeof Element<"u"){let c=function(...v){const w=b.apply(this,v);if(h.set(this,w),Ye()){const k=new MutationObserver(E);window.ShadyDOM?k.observe(this,ee):k.observe(w,ee),n.set(this,k)}return w};const b=Element.prototype.attachShadow;Element.prototype.attachShadow=c}Ye()&&typeof document<"u"&&new MutationObserver(E).observe(document.documentElement,ee),typeof HTMLFormElement<"u"&&Ln(),(f||typeof window<"u"&&!window.CustomStateSet)&&Nt()}}return!!customElements.polyfillWrapFlushCallback||(In()?typeof window<"u"&&!window.CustomStateSet&&Nt(HTMLElement.prototype.attachInternals):No(!1)),s.forceCustomStateSetPolyfill=Nt,s.forceElementInternalsPolyfill=No,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})();class N extends se{static get styles(){return[x` + :host { + } + `]}static get properties(){return{RTL:{type:Boolean},locale:{type:String}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),_s(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{Ms(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class yi extends N{static get formAssociated(){return!0}static get styles(){return x` :host { display: inline-flex; width: fit-content; @@ -205,7 +208,7 @@ cursor: not-allowed; } } - `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return f` + `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return p` - `)),e}};class We extends Da(z){static get styles(){return[...super.styles,x` + `)),e}};class Ze extends za(M){static get styles(){return[...super.styles,x` :host { position: relative; - font-family: Helvetica, Arial, sans-serif; + font-family: var(--font-family, Helvetica, Arial, sans-serif); } .input-group { cursor: text; /* Indicates the area is clickable */ - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); } .input-group.disabled input, .input-group.disabled .field-container { - background-color: var(--disabled-color); + background-color: var( + --dt-multi-select-disabled-background-color, + var(--dt-form-disabled-background-color, var(--disabled-color)) + ); } .input-group.disabled a, .input-group.disabled button { @@ -585,10 +597,23 @@ } .field-container { - background-color: var(--dt-multi-select-background-color, #fefefe); - border: 1px solid var(--dt-form-border-color, #cacaca); - border-radius: 0; - color: var(--dt-multi-select-text-color, #0a0a0a); + background-color: var( + --dt-multi-select-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); + border-radius: var( + --dt-multi-select-border-radius, + var(--dt-form-border-radius, 0) + ); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-size: 1rem; font-weight: 300; min-height: 2.5rem; @@ -605,6 +630,11 @@ row-gap: 0.2rem; flex-wrap: wrap; min-width: 0; + transition: var( + --dt-form-transition, + box-shadow 0.5s, + border-color 0.25s ease-in-out + ); } .field-container input, @@ -614,10 +644,14 @@ .selected-option { cursor: default; - border: 1px solid var(--dt-multi-select-tag-border-color, #c2e0ff); + border: 1px solid + var( + --dt-multi-select-tag-border-color, + var(--primary-color-light-1, #c2e0ff) + ); background-color: var( --dt-multi-select-tag-background-color, - #c2e0ff + var(--primary-color-light-0, #ecf5fc) ); display: flex; @@ -651,8 +685,14 @@ outline: 0; border: 0; border-inline-start: 1px solid - var(--dt-multi-select-tag-border-color, #c2e0ff); - color: var(--dt-multi-select-text-color, #0a0a0a); + var( + --dt-multi-select-tag-border-color, + var(--primary-color-light-1, #c2e0ff) + ); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); margin-inline-start: 4px; } .selected-option button:hover { @@ -660,13 +700,18 @@ } .field-container input { - background-color: var(--dt-form-background-color, #fff); - color: var(--dt-form-text-color, #000); + background-color: transparent; + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); flex-grow: 1; min-width: 50px; flex-basis: 50px; border: 0; margin-block-start: 0.375rem; + font-family: inherit; + font-size: inherit; } .field-container input:focus, .field-container input:focus-visible, @@ -675,7 +720,10 @@ outline: 0; } .field-container input::placeholder { - color: var(--dt-text-placeholder-color, #999); + color: var( + --dt-multi-select-placeholder-color, + var(--dt-form-placeholder-color, #999) + ); opacity: 1; } @@ -684,8 +732,15 @@ list-style: none; margin: 0; padding: 0; - border: 1px solid var(--dt-form-border-color, #cacaca); - background: var(--dt-form-background-color, #fefefe); + border: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); + background: var( + --dt-multi-select-background-color, + var(--dt-form-background-color, #fefefe) + ); z-index: 10; position: absolute; width: 100%; @@ -696,13 +751,20 @@ overflow-y: scroll; } .option-list li { - border-block-start: 1px solid var(--dt-form-border-color, #cacaca); + border-block-start: 1px solid + var( + --dt-multi-select-border-color, + var(--dt-form-border-color, #cacaca) + ); outline: 0; } .option-list li div, .option-list li button { padding: 0.5rem 0.75rem; - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-weight: 100; font-size: 1rem; text-decoration: none; @@ -717,40 +779,57 @@ .option-list li button:hover, .option-list li button.active { cursor: pointer; - background: var(--dt-multi-select-option-hover-background, #f5f5f5); + background: var( + --dt-multi-select-option-hover-background, + var(--dt-form-option-hover-background, var(--surface-2)) + ); } .field-container.invalid { - border: 1px solid var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var( + --dt-multi-select-border-color-alert, + var(--dt-form-border-color-alert, var(--alert-color)) + ); } - `]}static get properties(){return{...super.properties,placeholder:{type:String},containerHeight:{type:Number,state:!0}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length)if(typeof this.value[0]=="string")this.value=[...this.value.filter(i=>i!==`-${e}`),e];else{let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete&&(delete n.delete,i=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>i===e.target.dataset.value?`-${i}`:i),t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),s=e.has("options");(t||i||s)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>f` -
    o!==`-${e}`),e];else{let o=!1;const a=this.value.map(r=>{const n={...r};return r.id===e.id&&r.delete&&(delete n.delete,o=!0),n});o||a.push(e),this.value=a}else this.value=[e];i.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(i),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=this.value,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:t}});this.value=(this.value||[]).map(o=>o===e.target.dataset.value?`-${o}`:o),i.detail.newValue=this.value,this.dispatchEvent(i),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),o=e.has("options");(t||i||o)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>p` +
    - ${this.options.find(t=>t.id===e).label} + @keydown="${this._handleItemClick}" + part="tag" + > + ${this.options.find(t=>t.id===e).label}
    - `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()} -
    +
    ${this._renderSelectedOptions()}
    -
      +
        ${this._renderOptions()}
      ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-select",We);class za extends N{static get styles(){return x` + `}}window.customElements.define("dt-multi-select",Ze);class Fa extends N{static get styles(){return x` root { display: block; } @@ -795,16 +879,16 @@ } } } - `}static get properties(){return{key:{type:String},metric:{type:Object},active:{type:Boolean,reflect:!0},disabled:{type:Boolean},missingIcon:{type:String}}}renderIcon(){var s;const e=(s=window==null?void 0:window.wpApiShare)==null?void 0:s.template_dir,{metric:t,missingIcon:i=`${e}/dt-assets/images/groups/missing.svg`}=this;if(t["font-icon"]){const a=t["font-icon"].replace("mdi mdi-","mdi:");return f``}return f``}return p`${t}`}render(){const{metric:e,active:t,disabled:i}=this;return f`
    `}render(){const{metric:e,active:t,disabled:i}=this;return p`
    ${this.renderIcon()} -
    `}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",za);class ds extends z{static get styles(){return[...super.styles,x` +
    `}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",Fa);class co extends M{static get styles(){return[...super.styles,x` .root { display: block; } @@ -822,7 +906,10 @@ align-items: center; width: fit-content; cursor: pointer; - min-height: var(--dt-form-input-height, 2.5rem); + min-height: var( + --dt-toggle-input-height, + var(--dt-form-input-height, 2.5rem) + ); } .icon-overlay { @@ -853,12 +940,12 @@ box-sizing: content-box; width: calc(var(--diameter) * 2 + var(--offset) * 2); height: calc(var(--diameter) + var(--offset) * 2); - border: 0.1em solid rgb(0 0 0 / 0.2); + border: 0.1em solid var(--dt-toggle-border-color, rgb(0 0 0 / 0.2)); position: relative; border-radius: 100vw; background-color: var( --dt-toggle-background-color-off, - var(--gray-2) + var(--dt-form-background-color-off, #e6e6e6) ); transition: 250ms; } @@ -873,7 +960,7 @@ width: var(--diameter); height: var(--diameter); border-radius: 50%; - background-color: white; + background-color: var(--dt-toggle-handle-color, white); transform: translate(0, -50%); will-change: transform; transition: inherit; @@ -894,7 +981,10 @@ .toggle[aria-pressed='true'] .toggle-display, .toggle-input:checked + .toggle-display { - background-color: var(--primary-color); + background-color: var( + --dt-toggle-background-color-on, + var(--dt-form-primary-color, var(--primary-color)) + ); } .toggle[aria-pressed='true'] .toggle-display::before, @@ -904,7 +994,7 @@ .toggle[disabled] .toggle-display, .toggle-input:disabled + .toggle-display { - opacity: 0.6; + opacity: var(--dt-toggle-disabled-opacity, 0.6); filter: grayscale(40%); cursor: not-allowed; } @@ -929,15 +1019,15 @@ } .toggle-icon--cross { - color: var(--alert-color); + color: var(--dt-toggle-icon-color-off, var(--alert-color)); font-size: 0.55em; } .toggle-icon--checkmark { font-size: 0.65em; - color: var(--success-color); + color: var(--dt-toggle-icon-color-on, var(--success-color)); } - `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.checked,newValue:e.target.checked}});this.checked=e.target.checked,this.value=e.target.checked,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(t)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=f``,t=f``;return f` + `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){super.firstUpdated(),this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=e.target.checked,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.checked,newValue:t}});this.checked=t,this.value=t,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(i)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=p``,t=p``;return p`
    ${this.labelTemplate()} @@ -958,13 +1048,13 @@ ?disabled=${this.disabled} /> - ${this.icons?f` ${e} ${t} `:f``} + ${this.icons?p` ${e} ${t} `:p``} ${this.renderIcons()}
    - `}}window.customElements.define("dt-toggle",ds);class cs extends We{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-toggle",co);class uo extends Ze{static get styles(){return[...super.styles,x` .health-circle__container { --icon-count: 9; /* Updated circle size based on dynamic width */ @@ -1054,7 +1144,7 @@ .error-container { margin-block-start: 0.5rem; } - `]}static get properties(){const e={...super.properties,settings:{type:Object,reflect:!1},missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,s])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){return f` + `]}static get properties(){const e={...super.properties,missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,o])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){var e,t;return p`
    - ${this.filteredOptions.map(([e,t],i)=>f`p` `)} @@ -1082,7 +1172,7 @@ ${this.renderError()}
    - `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",cs);class Oe extends We{static get properties(){return{...super.properties,allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,x` + `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",uo);class Ce extends Ze{static get properties(){return{...super.properties,postType:{type:String,reflect:!1},allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,x` .selected-option a, .selected-option a:active, .selected-option a:visited { text-decoration: none; - color: var(--primary-color, #3f729b); + color: var( + --dt-tags-selected-link-color, + var(--primary-color, #3f729b) + ); } - .selected-option a[href="#"], - .selected-option a[href=""] { - color: var(--dt-multi-select-text-color, #0a0a0a); + .selected-option a[href='#'], + .selected-option a[href=''] { + color: var( + --dt-tags-selected-text-color, + var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ) + ); pointer-events: none; } .invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var( + --dt-tags-invalid-border-color, + var(--dt-form-border-color-alert, var(--alert-color)) + ); } .input-group { @@ -1121,21 +1223,37 @@ } .input-addon.btn-add { - background-color: var(--dt-multi-text-background-color, #fefefe); - border: 1px solid var(--dt-multi-text-border-color, #fefefe); + background-color: var( + --dt-tags-add-button-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var( + --dt-tags-add-button-border-color, + var(--dt-form-border-color, #fefefe) + ); width: 37.5px; &:disabled { - color: var(--dt-text-placeholder-color, #999); + color: var( + --dt-tags-add-button-disabled-color, + var(--dt-form-placeholder-color, #999) + ); } &:hover:not([disabled]) { - background-color: var(--success-color, #cc4b37); - color: var(--dt-multi-text-button-hover-color, #ffffff); + background-color: var( + --dt-tags-add-button-hover-background-color, + var(--success-color, #4caf50) + ); + color: var( + --dt-tags-add-button-hover-color, + var(--dt-form-text-color-light, #ffffff) + ); } } .input-group.allowAdd .icon-overlay { inset-inline-end: 3rem; } - `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let n=a;n.length&&typeof n[0]=="string"&&(n=n.map(r=>({id:r}))),i.allOptions=n,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let r=a;r.length&&typeof r[0]=="string"&&(r=r.map(n=>({id:n}))),i.allOptions=r,i.filteredOptions=r.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_renderOption(e,t){return p`
  • - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const n=e.filter(r=>r===t||r.id===t);n.length&&(i=n[0].label||n[0].id||t)}let s;if(!s&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const n=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),r=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${r}: ${t}`}];s=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,n,l)}return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const r=e.filter(n=>n===t||n.id===t);r.length&&(i=r[0].label||r[0].id||t)}let o;if(!o&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const r=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),n=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${n}: ${t}`}];o=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,r,l)}return p`
    - ${i}
    - `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()}
    - ${this.allowAdd?f``:null}
      @@ -1203,7 +1321,7 @@
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-tags",Oe);class us extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-tags",Ce);class ho extends Ce{static get styles(){return[...super.styles,x` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1238,9 +1356,9 @@ fill: var(--dt-connection-icon-fill, var(--primary-color)); } .invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var(--dt-form-border-color-alert, var(--alert-color)); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const n={...a};return a.id===t&&(n.delete=!0),n}),s.detail.newValue=this.value,this.dispatchEvent(s),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((o,a)=>!o&&a.id==t?a:o,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const o=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const r={...a};return a.id===t&&(r.delete=!0),r}),o.detail.newValue=this.value,this.dispatchEvent(o),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p`
    - `)}_renderOption(e,t){const i=f`circle-08 2Created using Figma`,s=e.status||{label:"",color:""};return f` -
  • + `)}_renderOption(e,t){const i=p`circle-08 2Created using Figma`,o=e.status||{label:"",color:""};return p` +
  • - `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return p` ${this.labelTemplate()}
    - ${this.allowAdd?f``:null}
      @@ -1316,7 +1434,7 @@
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-connection",us);class hs extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-connection",ho);class po extends Ce{static get styles(){return[...super.styles,x` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1342,15 +1460,19 @@ font-style: normal; } + li button .avatar { + margin-inline-end: 1ch; + } + li button svg { width: 20px; height: auto; margin-bottom: -4px; } li button svg use { - fill: var(--dt-connection-icon-fill, var(--primary-color)); + fill: var(--dt-users-connection-icon-fill, var(--primary-color)); } - `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length&&!this.single){let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete?(delete n.delete,i=!0):this.single&&!a.delete&&(n.delete=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){let i=!1,o=this.value.map(a=>{const r={...a};return a.id===e.id&&a.delete?(delete r.delete,i=!0):this.single&&!a.delete&&(r.delete=!0),r});i||o.push(e),this.single&&(o=o.filter(a=>!a.delete)),this.value=o}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((o,a)=>!o&&a.id==t?a:o,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const o={...i};return i.id.toString()===e.target.dataset.value&&(o.delete=!0),o}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(o)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p` - `)}_renderOption(e,t){return f` + `)}_renderOption(e,t){const i=e.avatar?p`${e.label}`:p``;return p`
  • - `}}window.customElements.define("dt-users-connection",hs);class ps extends N{static get styles(){return x` + `}}window.customElements.define("dt-users-connection",po);class fo extends N{static get styles(){return x` :root { font-size: inherit; --dt-copy-text-color: #575757; @@ -1414,7 +1538,7 @@ :host([dir='rtl']) .copy_icon { transform: translate(1.5em, -0.3125em); } - `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return f` + `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return p`
    - `}}window.customElements.define("dt-copy-text",ps);class Dt extends z{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-copy-text",fo);class jt extends M{static get styles(){return[...super.styles,x` input { - color: var(--dt-form-text-color, #000); + color: var(--dt-date-text-color, var(--dt-form-text-color, #000)); appearance: none; - background-color: var(--dt-form-background-color, #cecece); - border: 1px solid var(--dt-form-border-color, #cacaca); - border-radius: var(--dt-date-border-radius, 0); + background-color: var( + --dt-date-background-color, + var(--dt-form-background-color, #fefefe) + ); + border: 1px solid + var(--dt-date-border-color, var(--dt-form-border-color, #cacaca)); + border-radius: var( + --dt-date-border-radius, + var(--dt-form-border-radius, 0) + ); box-shadow: var( --dt-date-box-shadow, var( @@ -1499,15 +1630,17 @@ align-items: center; aspect-ratio: 1/1; padding: 10px; - border: solid 1px gray; border-collapse: collapse; background-color: var( --dt-date-background-color, - var(--dt-form-background-color, buttonface) + var(--dt-form-background-color, #fefefe) ); border: 1px solid - var(--dt-date-border-color, var(--dt-form-border-color, #fefefe)); - border-radius: var(--dt-date-border-radius, 0); + var(--dt-date-border-color, var(--dt-form-border-color, #cacaca)); + border-radius: var( + --dt-date-border-radius, + var(--dt-form-border-radius, 0) + ); box-shadow: var( --dt-date-box-shadow, var( @@ -1542,7 +1675,7 @@ .icon-overlay { inset-inline-end: 5rem; } - `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=new Date(e).getTime(),i=t/1e3,s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.timestamp,newValue:i}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(s)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=e?new Date(e).getTime():0,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:e}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(i)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),p` ${this.labelTemplate()}
    @@ -1576,11 +1709,11 @@ ${this.renderIcons()}
    - `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",Dt);class fs extends Dt{static get styles(){return[...super.styles,x` + `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",jt);class bo extends jt{static get styles(){return[...super.styles,x` input[type='datetime-local'] { max-width: calc(100% - 22px - 1rem); } - `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),p` ${this.labelTemplate()}
    @@ -1606,6 +1739,7 @@ data-inputid="${this.id}" ?disabled=${this.disabled} part="clear-button" + aria-label="Clear date and time" > @@ -1613,11 +1747,11 @@ ${this.renderIcons()}
    - `}}window.customElements.define("dt-datetime",fs);/** + `}}window.customElements.define("dt-datetime",bo);/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function*Ke(o,e){if(o!==void 0){let t=0;for(const i of o)yield e(i,t++)}}class bs extends Oe{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,x` + */function*Da(s,e){if(s!==void 0){let t=0;for(const i of s)yield e(i,t++)}}class mo extends Ce{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,x` .input-group { display: flex; } @@ -1638,7 +1772,7 @@ 8px ); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((s,a)=>!s&&a.id===t?a:s,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:s==null?void 0:s.value,onSuccess:n=>{i.loading=!1,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:n=>{console.warn(n),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((o,a)=>!o&&a.id===t?a:o,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const o=this.shadowRoot.querySelector("input");o&&(o.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const o={...i};return i.id.toString()===e.target.dataset.value&&(o.delete=!0),o}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,o=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:o==null?void 0:o.value,onSuccess:r=>{i.loading=!1,i.filteredOptions=r.filter(n=>!e.includes(n.id))},onError:r=>{console.warn(r),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return p`
  • - `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>p`
    - `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return f` + `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return p` ${this.labelTemplate()}
    @@ -1697,14 +1831,14 @@ ?disabled="${this.disabled}" @change="${this._filterOptions}" > - ${Ke(this.filters,t=>f``)} + ${Da(this.filters,t=>p``)}
      ${this._renderOptions()}
    ${this.renderIconInvalid()} ${this.renderError()}
    - `}}window.customElements.define("dt-location",bs);class Ra{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),s={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,r=await(await fetch(a,s)).json();return r==null?void 0:r.features}async reverseGeocode(e,t,i="en"){const s=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},n=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${s}`,l=await(await fetch(n,a)).json();return l==null?void 0:l.features}}class Na{constructor(e,t,i){var s,a,n;if(this.token=e,this.window=t,!((n=(a=(s=t.google)==null?void 0:s.maps)==null?void 0:a.places)!=null&&n.AutocompleteService)){const r=i.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(r)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const s=await this._getPlaceSuggestionsRest(e,t);if(s)return s;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,s)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){s("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(n,r)=>{r!=="OK"?s(r):i(n)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),n=await a.json();if(!a.ok&&n.error)throw n.error;return(Array.isArray(n&&n.suggestions)?n.suggestions:[]).map(b=>b&&b.placePrediction?b.placePrediction:null).filter(Boolean).map(b=>{const g=b.placeId||(b.place?String(b.place).replace("places/",""):null),v=b.text&&b.text.text||[b.structuredFormat&&b.structuredFormat.mainText&&b.structuredFormat.mainText.text,b.structuredFormat&&b.structuredFormat.secondaryText&&b.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return g&&v?{description:v,place_id:g}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const s=new window.google.maps.Geocoder;try{const{results:a}=await s.geocode({placeId:e.place_id,language:t}),n=a[0];i={lng:n.geometry.location.lng(),lat:n.geometry.location.lat(),level:this.convert_level(n.types[0]),label:e.description||n.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,r=await(await fetch(a,{method:"GET"})).json();return r==null?void 0:r.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class gs extends N{static get styles(){return x` + `}}window.customElements.define("dt-location",mo);class Ra{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),o={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,n=await(await fetch(a,o)).json();return n==null?void 0:n.features}async reverseGeocode(e,t,i="en"){const o=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},r=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${o}`,l=await(await fetch(r,a)).json();return l==null?void 0:l.features}}class Na{constructor(e,t,i){var o,a,r;if(this.token=e,this.window=t,!((r=(a=(o=t.google)==null?void 0:o.maps)==null?void 0:a.places)!=null&&r.AutocompleteService)){const n=i.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(n)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const o=await this._getPlaceSuggestionsRest(e,t);if(o)return o;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,o)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){o("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(r,n)=>{n!=="OK"?o(n):i(r)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),r=await a.json();if(!a.ok&&r.error)throw r.error;return(Array.isArray(r&&r.suggestions)?r.suggestions:[]).map(u=>u&&u.placePrediction?u.placePrediction:null).filter(Boolean).map(u=>{const h=u.placeId||(u.place?String(u.place).replace("places/",""):null),g=u.text&&u.text.text||[u.structuredFormat&&u.structuredFormat.mainText&&u.structuredFormat.mainText.text,u.structuredFormat&&u.structuredFormat.secondaryText&&u.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return h&&g?{description:g,place_id:h}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const o=new window.google.maps.Geocoder;try{const{results:a}=await o.geocode({placeId:e.place_id,language:t}),r=a[0];i={lng:r.geometry.location.lng(),lat:r.geometry.location.lat(),level:this.convert_level(r.types[0]),label:e.description||r.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,n=await(await fetch(a,{method:"GET"})).json();return n==null?void 0:n.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class go extends N{static get styles(){return x` :host { display: block; font-family: var(--font-family); @@ -1922,23 +2056,23 @@ /* Styles for the content inside the named slot */ font-size: 15px;; } - `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?f``:f` + `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?p``:p`

    ${this.formattedTitle}

    - `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?f` + `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?p`
    - `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=f` + `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=p` xmlns="http://www.w3.org/2000/svg"> - `;return f` + `;return p`
    - ${this.hideButton?null:f` + ${this.hideButton?null:p` `} - `}}window.customElements.define("dt-modal",gs);class ms extends N{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[x` + `}}window.customElements.define("dt-modal",go);class vo extends N{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[x` .map { width: 100%; min-width: 50vw; min-height: 50dvb; } - `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let s=15;i==="admin0"?s=3:i==="admin1"?s=6:i==="admin2"&&(s=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(s),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return f` + `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let o=15;i==="admin0"?o=3:i==="admin1"?o=6:i==="admin2"&&(o=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(o),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return p`
    - ${this.canEdit?f`
    ${O("Save")}
    `:null} + ${this.canEdit?p`
    ${R("Save")}
    `:null} - `}}window.customElements.define("dt-map-modal",ms);class qa extends N{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[x` + `}}window.customElements.define("dt-map-modal",vo);class qa extends N{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[...super.styles,x` :host { --dt-location-map-border-color: var(--dt-form-border-color, #fefefe); position: relative; @@ -2036,7 +2170,10 @@ } .input-group { - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); } .input-group.disabled input, .input-group.disabled .field-container { @@ -2075,7 +2212,10 @@ .option-list li div, .option-list li button { padding: 0.5rem 0.75rem; - color: var(--dt-multi-select-text-color, #0a0a0a); + color: var( + --dt-multi-select-text-color, + var(--dt-form-text-color, #0a0a0a) + ); font-weight: 100; font-size: 1rem; text-decoration: none; @@ -2090,7 +2230,10 @@ .option-list li button:hover, .option-list li button.active { cursor: pointer; - background: var(--dt-multi-select-option-hover-background, #f5f5f5); + background: var( + --dt-multi-select-option-hover-background, + var(--surface-2) + ); } `,x` input { @@ -2145,7 +2288,7 @@ letter-spacing: var(--dt-text-placeholder-letter-spacing, normal); } input.invalid { - border-color: var(--dt-text-border-color-alert, var(--alert-color)); + border-color: var(--dt-form-border-color-alert, var(--alert-color)); } .field-container { @@ -2199,7 +2342,7 @@ } .field-container.invalid { border: 1px solid - var(--dt-text-border-color-alert, var(--alert-color)); + var(--dt-form-border-color-alert, var(--alert-color)); } .input-addon:disabled { @@ -2247,7 +2390,7 @@ opacity: 0; animation: fadeOut 4s; } - `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Ra(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new Na(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:s}=e==null?void 0:e.detail,{lat:a,lng:n}=s;if(this.googleGeocodeService){const r=await this.googleGeocodeService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const r=await this.mapboxService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return f` + `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Ra(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new Na(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,o=t.offsetTop+t.clientHeight,a=e.scrollTop,r=e.scrollTop+e.clientHeight;o>r?e.scrollTo({top:o-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:o}=e==null?void 0:e.detail,{lat:a,lng:r}=o;if(this.googleGeocodeService){const n=await this.googleGeocodeService.reverseGeocode(r,a,this.locale);if(n&&n.length){const l=n[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const n=await this.mapboxService.reverseGeocode(r,a,this.locale);if(n&&n.length){const l=n[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return p`
  • - `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(f`
  • ${O("Loading...")}
  • `):e.push(f`
  • ${O("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,f`${O("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var s,a,n,r;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((s=this.metadata)!=null&&s.label),i=((a=this.metadata)==null?void 0:a.lat)&&((n=this.metadata)==null?void 0:n.lng);return f` + `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(p`
  • ${R("Loading...")}
  • `):e.push(p`
  • ${R("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,p`${R("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var o,a,r,n;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((o=this.metadata)!=null&&o.label),i=((a=this.metadata)==null?void 0:a.lat)&&((r=this.metadata)==null?void 0:r.lng);return p`
    - ${t&&i?f` + ${t&&i?p` `:null} - ${t?f` + ${t?p` - `:f` + `:p` - `,()=>f``)} + `,()=>p``)}
    - `}renderIcons(){let e=0,t=!1;for(const[a,n]of(this.value||[]).entries())!n.value&&a!==0?e+=1:n.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const s=`padding-block-end: ${i.toString()}rem`;return f` + `}renderIcons(){let e=0,t=!1;for(const[a,r]of(this.value||[]).entries())!r.value&&a!==0?e+=1:r.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const o=`padding-block-end: ${i.toString()}rem`;return p` ${this.renderIconInvalid()} ${this.renderError()} - ${this.renderIconLoading(s)} ${this.renderIconSaved(s)} - `}renderIconLoading(e){return this.loading?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?p``:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),f` - ${Ee((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return f` + >`:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),p` + ${pe((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return p` ${this.labelTemplate()}
    ${this._renderInputFields()} ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-text",$s);class xs extends z{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-multi-text",xo);class ko extends M{static get styles(){return[...super.styles,x` :host { - margin-bottom: 5px; - --dt-button-font-size: 0.75rem; - --dt-button-font-weight: 0; - --dt-button-line-height: 1em; - --dt-button-padding-y: 0.85em; - --dt-button-padding-x: 1em; + margin-bottom: var(--dt-multi-select-button-group-margin-bottom, 5px); + --dt-button-font-size: var( + --dt-multi-select-button-group-button-font-size, + 0.75rem + ); + --dt-button-font-weight: var( + --dt-multi-select-button-group-button-font-weight, + 0 + ); + --dt-button-line-height: var( + --dt-multi-select-button-group-button-line-height, + 1em + ); + --dt-button-padding-y: var( + --dt-multi-select-button-group-button-padding-y, + 0.85em + ); + --dt-button-padding-x: var( + --dt-multi-select-button-group-button-padding-x, + 1em + ); } span .icon { vertical-align: middle; @@ -2912,7 +3201,8 @@ display: inline-flex; flex-direction: row; flex-wrap: wrap; - gap: 5px 10px; + gap: var(--dt-multi-select-button-group-gap-y, 5px) + var(--dt-multi-select-button-group-gap-x, 10px); } dt-button { margin: 0px; @@ -2927,12 +3217,15 @@ } .error-container { - margin-block-start: 5px; + margin-block-start: var( + --dt-multi-select-button-group-error-margin-top, + 5px + ); } .invalid ~ .error-container { border-top-width: 1px; } - `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){const i=this.value.includes(e);this.value=[...this.value.filter(s=>s!==e&&s!==`-${e}`),i?`-${e}`:e]}else this.value=[e];t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",s=this.outline??(this.touched&&this.invalid);return f` + `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=this.value,i=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:t}});if(this.value&&this.value.length){const o=this.value.includes(e);this.value=[...this.value.filter(a=>a!==e&&a!==`-${e}`),o?`-${e}`:e]}else this.value=[e];i.detail.newValue=this.value,this._setFormValue(this.value),this.dispatchEvent(i)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",o=this.outline??(this.touched&&this.invalid);return p` - ${e.icon?f`${this.iconAltText}`:null} ${e.label} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return p` ${this.labelTemplate()} -
    -
    - ${Ee(this.options??[],e=>e.id,e=>this._renderButton(e))} +
    +
    + ${pe(this.options??[],e=>e.id,e=>this._renderButton(e))}
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-select-button-group",xs);class ks extends N{static get styles(){return x` - :host { - display: block; - } + `}}window.customElements.define("dt-multi-select-button-group",ko);class So extends M{constructor(){super();Me(this,"_handleUploadStagedEvent",()=>{this.uploadStagedFiles()});this.value=[],this.acceptedFileTypes=["image/*","application/pdf"],this.maxFileSize=null,this.maxFiles=null,this.deleteEnabled=!0,this.downloadEnabled=!0,this.renameEnabled=!0,this.displayLayout="grid",this.fileTypeIcon="",this.autoUpload=!0,this.postType="",this.postId="",this.metaKey="",this.keyPrefix="",this.uploading=!1,this.stagedFiles=[],this._uploadZoneExpanded=!1,this._dragOver=!1,this._editingFileKey="",this._editingFileName="",this._dragLeaveTimeout=null,this._resizeObserver=null,this._keydownAttached=!1,this._suppressRenameBlurCommit=!1,this._standaloneFilesByKey=new Map}static get styles(){return[...super.styles,x` + :host { + display: block; + } - .dt-alert { - padding: var(--dt-alert-padding, 10px); - font-family: var(--dt-alert-font-family); - font-size: var(--dt-alert-font-size, 14px); - font-weight: var(--dt-alert-font-weight, 700); - background-color: var( - --dt-alert-context-background-color, - var(--dt-alert-background-color) - ); - border: var(--dt-alert-border-width, 1px) solid - var(--dt-alert-context-border-color, var(--dt-alert-border-color)); - border-radius: var(--dt-alert-border-radius, 10px); - box-shadow: var(--dt-alert-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); - color: var(--dt-alert-context-text-color, var(--dt-alert-text-color)); - text-rendering: optimizeLegibility; - display: flex; - gap: var(--dt-alert-gap, 10px); - justify-content: space-between; - align-content: center; - align-items: center; - white-space: initial; - } + .upload-zone { + border: 2px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + text-align: center; + background-color: var(--dt-upload-background-color, #fafafa); + transition: padding 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; + cursor: pointer; + position: relative; + width: 100%; + box-sizing: border-box; + } - .dt-alert.dt-alert--outline { - background-color: transparent; - color: var(--dt-alert-context-text-color, var(--text-color-inverse)); - } + .upload-zone.compact { + padding: 0.75rem; + } - .dt-alert--primary:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--primary-color); - --dt-alert-context-background-color: var(--primary-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone.expanded { + padding: 2rem; + } - .dt-alert--alert:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--alert-color); - --dt-alert-context-background-color: var(--alert-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone:hover:not(.disabled):not(.uploading) { + border-color: var(--dt-upload-border-color-hover, #999); + background-color: var(--dt-upload-background-color-hover, #f0f0f0); + } - .dt-alert--caution:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--caution-color); - --dt-alert-context-background-color: var(--caution-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-dark); - } + .upload-zone.drag-over { + border-color: var(--primary-color, #0073aa); + background-color: var(--dt-upload-background-color-drag, #e8f4f8); + } - .dt-alert--success:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--success-color); - --dt-alert-context-background-color: var(--success-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } + .upload-zone.disabled { + opacity: 0.6; + cursor: not-allowed; + } - .dt-alert--inactive:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--inactive-color); - --dt-alert-context-background-color: var(--inactive-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-light); - } - - .dt-alert--disabled:not(.dt-alert--outline) { - --dt-alert-context-border-color: var(--disabled-color); - --dt-alert-context-background-color: var(--disabled-color); - --dt-alert-context-text-color: var(--dt-alert-text-color-dark); - } + .upload-zone.uploading { + pointer-events: none; + } - .dt-alert--primary.dt-alert--outline { - --dt-alert-context-border-color: var(--primary-color); - --dt-alert-context-text-color: var(--primary-color); - } + .upload-zone-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + } - .dt-alert--alert.dt-alert--outline { - --dt-alert-context-border-color: var(--alert-color); - --dt-alert-context-text-color: var(--alert-color); - } + .upload-zone-content .expandable { + transition: opacity 0.2s ease; + } - .dt-alert--caution.dt-alert--outline { - --dt-alert-context-border-color: var(--caution-color); - --dt-alert-context-text-color: var(--caution-color); - } + .upload-zone.compact .upload-zone-content .expandable { + display: none; + } - .dt-alert--success.dt-alert--outline { - --dt-alert-context-border-color: var(--success-color); - --dt-alert-context-text-color: var(--success-color); - } + .upload-zone.expanded .upload-zone-content .expandable { + display: block; + } - .dt-alert--inactive.dt-alert--outline { - --dt-alert-context-border-color: var(--inactive-color); - } + .upload-icon { + color: var(--dt-upload-icon-color, #999); + flex-shrink: 0; + transition: font-size 0.2s ease; + } - .dt-alert--disabled.dt-alert--outline { - --dt-alert-context-border-color: var(--disabled-color); - } + .upload-zone.compact .upload-icon { + font-size: 1.75rem; + } - button.toggle { - margin-inline-end: 0; - margin-inline-start: auto; - background: none; - border: none; - color: inherit; - cursor: pointer; - display: flex; - align-items: center; - } - `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return f``;const e=f` - - xmlns="http://www.w3.org/2000/svg"> - - - - `;return f` - - `}}window.customElements.define("dt-alert",ks);class Ss extends N{static get styles(){return x` - :host { - --number-of-columns: 7; - font-family: var(--dt-list-font-family, var(--font-family)); - font-size: var(--dt-list-font-size, 15px); - font-weight: var(--dt-list-font-weight, 300); - line-height: var(--dt-list-line-height, 1.5); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + .upload-zone.expanded .upload-icon { + font-size: 3rem; + } - .section { - container-type: inline-size; - background-color: var(--dt-list-background-color, #fefefe); - border: 1px solid var(--dt-list-border-color, #f1f1f1); - border-radius: var(--dt-list-border-radius, 10px); - box-shadow: var(--dt-list-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); - padding: var(--dt-list-section-padding, 1rem); - } + .upload-text { + font-size: 1rem; + color: var(--dt-upload-text-color, #666); + } - .header { - display: flex; - justify-content: flex-start; - align-items: baseline; - gap: var(--dt-list-header-gap, 1.5em); - flex-wrap: wrap; - } + .upload-hint { + font-size: 0.875rem; + color: var(--dt-upload-hint-color, #999); + } - .section-header { - color: var(--dt-list-header-color, var(--primary-color)); - font-size: 1.5rem; - display: inline-block; - text-transform: capitalize; - } + input[type='file'] { + position: absolute; + width: 0; + height: 0; + opacity: 0; + overflow: hidden; + } - .toggleButton { - color: var(--dt-list-header-color, var(--primary-color)); - font-size: 1rem; - background: transparent; - border: var(--dt-list-toggleButton, 0.1em solid rgb(0 0 0 / 0.2)); - border-radius: 0.25em; - padding: 0.25em 0.5em; - cursor: pointer; - } + .files-container { + margin-top: 1rem; + } - .toggleButton svg { - height: 0.9rem; - transform: translateY(-2px); - vertical-align: bottom; - width: 1rem; - fill: var(--dt-list-header-color, var(--primary-color)); - stroke: var(--dt-list-header-color, var(--primary-color)); - } + .files-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: 1rem; + } - .list_action_section { - background-color: var( - --dt-list-action-section-background-color, - #ecf5fc - ); - border-radius: var(--dt-list-border-radius, 10px); - margin: var(--dt-list-action-section-margin, 30px 0); - padding: var(--dt-list-action-section-padding, 20px); - } - .list_action_section_header { - display: flex; - flex-direction: row; - justify-content: space-between; - } - .close-button { - outline: none; - font-size: 2.5em; - line-height: 1; - color: var(--dt-list-action-close-button, var(--inactive-color)); - background: transparent; - border: none; - cursor: pointer; - } - .fieldsList { - list-style-type: none; - column-count: 1; - } + .files-list { + display: flex; + flex-direction: column; + gap: 0.5rem; + } - .list-field-picker-item { - list-style-type: none; - } + .file-item { + position: relative; + border: 1px solid var(--dt-file-upload-border-color, #ddd); + border-radius: 4px; + overflow: hidden; + background-color: var(--dt-file-upload-background-color, #fff); + } - .list-field-picker-item input { - margin: 1rem; - } + .file-item-grid { + aspect-ratio: 1; + display: flex; + flex-direction: column; + } - .list-field-picker-item .dt-icon { - height: var(--dt-list-field-picker-icon-size, 1rem); - width: var(--dt-list-field-picker-icon-size, 1rem); - } + .file-item-list { + display: grid; + grid-template-columns: 40px 1fr auto; + grid-template-rows: auto auto; + align-items: center; + padding: 0.5rem; + gap: 0 0.75rem; + row-gap: 0.125rem; + } + + .file-item-list .file-preview-link, + .file-item-list .file-icon-area { + grid-column: 1; + grid-row: 1 / -1; + width: 40px; + height: 40px; + min-width: 40px; + min-height: 40px; + border-radius: 6px; + overflow: hidden; + } - table { - display: grid; - border: 1px solid var(--dt-list-border-color, #f1f1f1); - border-top: 0; - border-collapse: collapse; - min-width: 100%; - grid-template-columns: 1fr; - } + .file-item-list .file-name, + .file-item-list .file-name-edit, + .file-item-list input.file-name-edit { + grid-column: 2; + grid-row: 1; + min-width: 0; + } - /* table.table-contacts { - display: table !important; - width: 100%; - border-collapse: collapse; - border-radius: 0; - margin-bottom: 1rem; - } */ + .file-item-list .file-size { + grid-column: 2; + grid-row: 2; + } - table td:last-child { - border-bottom: 1px solid var(--dt-list-border-color, #f1f1f1); - padding-bottom: 2rem; - } + .file-item-list .file-actions { + grid-column: 3; + grid-row: 1 / -1; + position: relative; + } - tbody, - tr { - display: contents; - } + .status-indicators { + display: flex; + justify-content: flex-end; + margin-top: 0.5rem; + } - thead { - display: none; - } - /* table.table-contacts thead { - display: table-header-group; - } - table.table-contacts tr { - display: table-row; - } - table.table-contacts tbody { - display: table-row-group; - } */ - tr { - cursor: pointer; - } + .status-indicators .icon-overlay { + position: static; + inset-inline-end: auto; + top: auto; + height: auto; + padding-block: 0; + } - /* table.table-contacts tr:nth-child(2n + 1) { - background: #fefefe; - } */ + .file-item-list .file-icon-area dt-icon { + font-size: 1.25rem; + } - tr:nth-child(2n + 1) { - background: #f1f1f1; - } + .file-preview-link { + display: block; + cursor: pointer; + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } - tr:hover { - background-color: var(--dt-list-hover-background-color, #ecf5fc); - } + .file-preview-link img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } - tr a { - color: var(--dt-list-link-color, var(--primary-color)); - } + .file-icon-area { + display: flex; + align-items: center; + justify-content: center; + background-color: var(--dt-file-upload-icon-background, #f5f5f5); + color: var(--dt-file-upload-icon-color, #999); + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } - .column-name { - pointer-events: none; - font-size: 15px; - font-weight: 700; - } - #sort-arrows { - grid-template-columns: 4fr 1fr; - display: flex; - flex-direction: column; - height: 1em; - justify-content: space-evenly; - } - th.all span.sort-arrow-up { - border-color: transparent transparent - var(--dt-list-sort-arrow-color, #dcdcdc) transparent; - border-style: solid; - border-width: 0 0.3em 0.3em 0.3em; - } + .file-icon-area dt-icon { + font-size: 2rem; + } - th.all span.sort-arrow-down { - content: ''; - border-color: var(--dt-list-sort-arrow-color, #dcdcdc) transparent - transparent; - border-style: solid; - border-width: 0.3em 0.3em 0; - } + .file-icon-area img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } - th.all span.sort-arrow-up.sortedBy { - border-color: transparent transparent - var(--dt-list-sort-arrow-color-highlight, #41739c) transparent; - } + .file-name { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } - th.all span.sort-arrow-down.sortedBy { - border-color: var(--dt-list-sort-arrow-color-highlight, #41739c) - transparent transparent; - } + .file-name-editable { + cursor: pointer; + position: relative; + z-index: 2; + } - td { - border: 0; - grid-column: 1 / span 3; - padding-inline-start: 1em; - } + .file-name-editable:hover { + text-decoration: underline; + } - td::before { - content: attr(title) ': '; - padding-inline-end: 1em; - } + .file-name-edit { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + width: 100%; + box-sizing: border-box; + border: 1px solid var(--primary-color, #0073aa); + border-radius: 2px; + background: var(--dt-file-upload-background-color, #fff); + } - td.no-title { - grid-column: 1 / span 3; - } + .file-name-edit:focus { + outline: none; + border-color: var(--primary-color, #0073aa); + } - td.line-count { - padding-block-start: 0.8em; - padding-inline-start: 1em; - } + .file-size { + font-size: 0.7rem; + color: var(--dt-file-upload-size-color, #999); + padding: 0 0.5rem 0.25rem; + } - td.no-title::before { - content: ''; - padding-inline-end: 0.25em; - } + .file-actions { + position: absolute; + top: 0.25rem; + inset-inline-end: 0.25rem; + display: flex; + gap: 0.25rem; + z-index: 1; + pointer-events: none; + } - th.bulk_edit_checkbox, - td.bulk_edit_checkbox { - grid-column: 1 / auto; - padding: 0; - width: 0; /* Initially no width */ - } + .file-actions button { + pointer-events: auto; + background: rgba(255, 255, 255, 0.9); + border: none; + border-radius: 4px; + padding: 0.25rem; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + } - .bulk_edit_checkbox input { - display: none; - margin: 0; - } + .file-actions button:hover { + background: #fff; + } - .bulk_editing .bulk_edit_checkbox { - grid-column: 1 / auto; - padding: 0; - width: auto; /* Width when parent has .bulk_editing */ - } - .bulk_editing .bulk_edit_checkbox input { - display: initial; - } + .file-actions button dt-icon { + font-size: 1rem; + } - ul { - margin: 0; - padding: 0; - } + .file-actions button.download { + color: var(--primary-color, #0073aa); + } - ul li { - list-style-type: none; - } + .file-actions button.delete { + color: var(--alert-color, #dc3545); + } - input[type='checkbox'] { - margin: 1rem; - } - table thead th, - table tr td { - padding: 0.5333333333rem 0.6666666667rem 0.6666666667rem; - } + .staged-files { + margin-top: 1rem; + padding: 1rem; + border: 1px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + background: var(--dt-upload-background-color, #fafafa); + } - ::slotted(svg) { - fill: var(--fav-star-not-selected-color, #c7c6c1); - } + .staged-files-title { + font-size: 0.875rem; + font-weight: 600; + margin-bottom: 0.5rem; + } - .icon-star { - fill: var(--fav-star-not-selected-color, #c7c6c1); /* Default to gray (non-favorite) */ - margin: 0; - } - .icon-star.selected { - fill: var(--fav-star-selected-color, #ffc105); /* Favorite state in yellow */ - } + .staged-file-item { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.25rem 0; + font-size: 0.875rem; + } - @media (min-width: 650px) { - .fieldsList { - column-count: 2; + .staged-file-item span { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; } - table { - grid-template-columns: - minmax(0px, 0fr) - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - repeat(var(--number-of-columns, 6), minmax(50px, 1fr)); + + .staged-file-item button.remove { + flex-shrink: 0; + margin-inline-start: auto; + padding: 0.25rem; + background: transparent; + border: none; + color: var(--alert-color, #dc3545); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; } - table.bulk_editing { - grid-template-columns: - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - minmax(32px, 0.25fr) - repeat(var(--number-of-columns, 6), minmax(50px, 1fr)); + .staged-file-item button.remove:hover { + opacity: 0.8; } - thead { - display: contents; + .upload-staged-btn { + margin-top: 0.5rem; + padding: 0.5rem 1rem; + background: var(--primary-color, #0073aa); + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 0.875rem; } - th { - position: sticky; - top: 0; - background: var( - --dt-list-header-background-color, - var(--dt-tile-background-color, #fefefe) - ); - text-align: start; - justify-self: start; - font-weight: normal; - font-size: 1.1rem; - color: var(--dt-list-header-color, #0a0a0a); - white-space: pre-wrap; - display: grid; - place-items: center; - grid-template-columns: 2fr 1fr; + .upload-staged-btn:hover:not(:disabled) { + opacity: 0.9; } - th:last-child { - border: 0; + .upload-staged-btn:disabled { + opacity: 0.6; + cursor: not-allowed; } - td { - display: flex; - align-items: center; - grid-column: auto; + + .error-container { + margin-top: 1rem; + max-width: 100%; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-inline-start: 0; - color: var(--text-color-mid); - border-bottom: 1px solid var(--dt-list-border-color, #f1f1f1); - } - td::before { - content: ''; - display: none; } - td.no-title { - grid-column: auto; + .error-container .error-text { + flex: 1; + min-width: 0; + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-word; } + `]}static get properties(){return{...super.properties,value:{type:Array,reflect:!0,converter:{fromAttribute:t=>{if(t==null||t==="")return[];try{const i=JSON.parse(t);return Array.isArray(i)?i:[]}catch{return[]}},toAttribute:t=>Array.isArray(t)&&t.length>0?JSON.stringify(t):""}},acceptedFileTypes:{type:Array,attribute:"accepted-file-types"},maxFileSize:{type:Number,attribute:"max-file-size"},maxFiles:{type:Number,attribute:"max-files"},deleteEnabled:{type:Boolean,attribute:"delete-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},downloadEnabled:{type:Boolean,attribute:"download-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},renameEnabled:{type:Boolean,attribute:"rename-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},displayLayout:{type:String,attribute:"display-layout"},fileTypeIcon:{type:String,attribute:"file-type-icon"},autoUpload:{type:Boolean,attribute:"auto-upload",converter:{fromAttribute:t=>{if(t==null)return!0;const i=String(t).toLowerCase().trim();return i!=="false"&&i!=="0"&&t!==!1}}},postType:{type:String,attribute:"post-type"},postId:{type:String,attribute:"post-id"},metaKey:{type:String,attribute:"meta-key"},keyPrefix:{type:String,attribute:"key-prefix"},uploading:{type:Boolean,state:!0},stagedFiles:{type:Array,state:!0},_uploadZoneExpanded:{type:Boolean,state:!0},_dragOver:{type:Boolean,state:!0},_editingFileKey:{type:String,state:!0},_editingFileName:{type:String,state:!0}}}connectedCallback(){super.connectedCallback(),this.addEventListener("dt:upload-files",this._handleUploadStagedEvent),this._boundKeydown=this._handleHostKeydown.bind(this)}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("dt:upload-files",this._handleUploadStagedEvent),this._removeKeydownListener(),this._cancelScheduledCollapse(),(t=this._resizeObserver)==null||t.disconnect()}_addKeydownListener(){this._keydownAttached||(this._keydownAttached=!0,this.addEventListener("keydown",this._boundKeydown,{capture:!0}))}_removeKeydownListener(){this._keydownAttached&&(this._keydownAttached=!1,this.removeEventListener("keydown",this._boundKeydown,{capture:!0}))}_handleHostKeydown(t){var o;if(!this._editingFileKey)return;const i=(o=this.shadowRoot)==null?void 0:o.querySelector(".file-name-edit");i&&(t.key==="Enter"||t.keyCode===13?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._commitRename(this._editingFileKey,i.value)):(t.key==="Escape"||t.keyCode===27)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._cancelRename()))}firstUpdated(t){Array.isArray(this.value)||(this.value=this._parseValue(this.value)),super.firstUpdated(t),this._setupResizeObserver()}updated(t){super.updated(t),t.has("value")&&this._setFormValue(this.value),(t.has("value")||t.has("stagedFiles")||t.has("error"))&&this.updateComplete.then(()=>this._refreshMasonry()),t.has("_editingFileKey")&&(this._editingFileKey?(this._addKeydownListener(),this.updateComplete.then(()=>{var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector(".file-name-edit");i&&(i.focus(),i.select())})):this._removeKeydownListener())}_setupResizeObserver(){typeof ResizeObserver>"u"||(this._resizeObserver=new ResizeObserver(()=>{this._refreshMasonry()}),this._resizeObserver.observe(this))}_refreshMasonry(){if(typeof window<"u"&&window.jQuery){const t=this;requestAnimationFrame(()=>{let i=null;window.masonGrid&&window.masonGrid.length&&window.masonGrid.masonry?i=window.masonGrid:i=window.jQuery(t).closest(".grid, .masonry-container, .masonry, [data-masonry]"),i&&i.length&&i.masonry&&i.masonry("layout")})}}_expandUploadZone(){this._uploadZoneExpanded=!0}_scheduleCollapse(){this._cancelScheduledCollapse(),this._dragLeaveTimeout=setTimeout(()=>{this._uploadZoneExpanded=!1,this._dragLeaveTimeout=null},300)}_cancelScheduledCollapse(){this._dragLeaveTimeout&&(clearTimeout(this._dragLeaveTimeout),this._dragLeaveTimeout=null)}uploadStagedFiles(){this.stagedFiles.length>0&&this._uploadFiles(this.stagedFiles)}_removeStagedFile(t){t>=0&&to!==t),this.requestUpdate())}_parseValue(t){if(Array.isArray(t))return t;if(typeof t=="string")try{const i=JSON.parse(t);return Array.isArray(i)?i:[]}catch{return[]}return[]}_formatFileSize(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}_isImage(t){return(t.type||"").toLowerCase().startsWith("image/")}_mdiToIconify(t){if(!t||typeof t!="string")return"";const i=t.trim();return i.startsWith("mdi:")?i:i.includes("mdi-")?`mdi:${i.replace(/.*mdi-/,"").replace(/\s/g,"-")}`:i.startsWith("mdi ")?`mdi:${i.replace(/^mdi\s+/,"").replace(/\s/g,"-")}`:i}_getFileTypeIconMapping(){return{"application/pdf":"mdi:file-pdf-box","text/plain":"mdi:text-box-edit-outline","application/rtf":"mdi:text-box-edit-outline","text/rtf":"mdi:text-box-edit-outline","text/csv":"mdi:text-box-edit-outline","text/html":"mdi:language-html5","application/msword":"mdi:microsoft-word","application/json":"mdi:code-json","application/xml":"mdi:file-xml-box",".pdf":"mdi:file-pdf-box",".txt":"mdi:text-box-edit-outline",".rtf":"mdi:text-box-edit-outline",".csv":"mdi:text-box-edit-outline",".html":"mdi:language-html5",".htm":"mdi:language-html5",".docx":"mdi:microsoft-word",".doc":"mdi:microsoft-word",".json":"mdi:code-json",".xml":"mdi:file-xml-box"}}_getFileTypeIcon(t){if(this.fileTypeIcon&&this.fileTypeIcon.trim())return this.fileTypeIcon.trim();const i=(t.type||"").toLowerCase(),o=this._getFileTypeIconMapping();if(i&&o[i])return o[i];if(t.name){const a=t.name.split(".");if(a.length>1){const r="."+a.pop().toLowerCase();if(o[r])return o[r]}}return null}_renderFileTypeIcon(t){const i=this._getFileTypeIcon(t);if(!i)return null;if(/^(https?:|\/|data:)/.test(i))return p``;const a=this._mdiToIconify(i);return a?p``:null}_getFilePreviewUrl(t){const i=t.thumbnail_key||t.large_thumbnail_key;if(this._isImage(t)){if(t.large_thumbnail_url)return t.large_thumbnail_url;if(t.thumbnail_url)return t.thumbnail_url;if(t.url)return t.url;if(i)return null}return null}_handleFileSelect(t){const i=Array.from(t.target.files||[]);i.length!==0&&(t.target.value="",this._processFiles(i))}_handleDrop(t){if(t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this.disabled||this.uploading)return;const i=Array.from(t.dataTransfer.files||[]);i.length!==0&&this._processFiles(i)}_handleDragOver(t){t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.uploading&&(this._dragOver=!0,this._expandUploadZone(),this._cancelScheduledCollapse(),t.currentTarget.classList.add("drag-over"))}_handleDragLeave(t){t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this._scheduleCollapse()}_handleZoneClick(t){var i;if(!t.target.closest('input[type="file"]')&&(this._expandUploadZone(),this._cancelScheduledCollapse(),!this.disabled&&!this.uploading)){const o=(i=this.shadowRoot)==null?void 0:i.querySelector('input[type="file"]');o&&o.click()}}_handleZoneMouseEnter(){!this.disabled&&!this.uploading&&(this._expandUploadZone(),this._cancelScheduledCollapse())}_handleZoneMouseLeave(){this._scheduleCollapse()}_processFiles(t){const i=this._validateFiles(t);if(i.length===0)return;this.error="";const o=(this.value||[]).length+this.stagedFiles.length;if(this.maxFiles&&o+i.length>this.maxFiles){this.error=`${this.maxFiles} files allowed`;return}this.autoUpload?this._uploadFiles(i):(this.stagedFiles=[...this.stagedFiles,...i],this._uploadZoneExpanded=!1,this.requestUpdate(),this.updateComplete.then(()=>this._refreshMasonry()))}_validateFiles(t){const i=[],o=this.maxFileSize?this.maxFileSize*1024*1024:null,a=Array.isArray(this.acceptedFileTypes)?this.acceptedFileTypes:["image/*","application/pdf"],r=a.join(",");for(const n of t){if(o&&n.size>o){this.error=`File "${n.name}" exceeds ${this.maxFileSize} MB`;continue}if(r&&r!=="*"&&!a.some(d=>{if(d.startsWith("."))return n.name.toLowerCase().endsWith(d.toLowerCase());if(d.endsWith("/*")){const u=d.slice(0,-2);return(n.type||"").startsWith(u)}return n.type===d||n.name&&n.name.toLowerCase().endsWith(`.${d.split("/")[1]}`)})){this.error=`File type not allowed: ${n.name}`;continue}i.push(n)}return i}_isStandaloneMode(){return!this.postType||!this.postId||!this.metaKey}async _filesToMockFileObjects(t){const i=[];for(const o of t){const r={key:`standalone_${Date.now()}_${Math.random().toString(36).slice(2)}_${o.name}`,name:o.name,type:o.type||"application/octet-stream",size:o.size};if(this._isImage({type:o.type}))try{const n=URL.createObjectURL(o);i.push({...r,url:n,thumbnail_url:n})}catch{i.push({...r,url:"#"})}else i.push({...r,url:"#"})}return i}getPendingFilesForUpload(){const t=[...this.stagedFiles||[]],i=new Set(t.map(a=>`${(a==null?void 0:a.name)||""}::${(a==null?void 0:a.size)||0}::${(a==null?void 0:a.lastModified)||0}`)),o=this._parseValue(this.value);for(const a of o){const r=String((a==null?void 0:a.key)||a||"");if(!r)continue;const n=this._standaloneFilesByKey.get(r);if(!n)continue;const l=`${(n==null?void 0:n.name)||""}::${(n==null?void 0:n.size)||0}::${(n==null?void 0:n.lastModified)||0}`;i.has(l)||(t.push(n),i.add(l))}return t}async _uploadFiles(t){if(this._isStandaloneMode()){const o=this._parseValue(this.value);this.uploading=!0,this.loading=!0,this.error="";try{const a=await this._filesToMockFileObjects(t);a.forEach((n,l)=>{n!=null&&n.key&&t[l]&&this._standaloneFilesByKey.set(String(n.key),t[l])});const r=[...o,...a];this.value=r,this.stagedFiles=[],this._uploadZoneExpanded=!1,this.saved=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:r}})),this._refreshMasonry()}catch(a){this.error=(a==null?void 0:a.message)||"Upload failed"}finally{this.uploading=!1,this.loading=!1}return}this.uploading=!0,this.loading=!0,this.error="";const i=new CustomEvent("dt:upload",{bubbles:!0,detail:{files:t,metaKey:this.metaKey,keyPrefix:this.keyPrefix||"",onSuccess:({result:o,fieldValue:a})=>{const r=this._parseValue(this.value);let n=r;const l=(o.uploaded_files||[]).filter(d=>d.uploaded&&d.file).map(d=>d.file);if(l.length>0){const d=new Set(r.map(h=>String(h.key||h))),u=[...r];for(const h of l){const g=String(h.key||h);d.has(g)||(u.push(h),d.add(g))}n=u,this.value=n}else Array.isArray(a)&&a.length>0&&(n=a,this.value=n);this.stagedFiles=[],this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:r,newValue:n}})),this._refreshMasonry(),this._uploadZoneExpanded=!1,this.saved=!0,this.uploading=!1,this.loading=!1},onError:o=>{console.error("Upload error:",o),this.error=o.message||"Upload failed",this.uploading=!1,this.loading=!1}}});this.dispatchEvent(i)}async _deleteFile(t){if(!this.deleteEnabled||!confirm("Are you sure you want to delete this file?"))return;if(this._isStandaloneMode()){const o=this._parseValue(this.value),a=o.find(n=>(n.key||n)===t);a&&a.url&&a.url.startsWith("blob:")&&URL.revokeObjectURL(a.url),a&&a.thumbnail_url&&a.thumbnail_url.startsWith("blob:")&&a.thumbnail_url!==a.url&&URL.revokeObjectURL(a.thumbnail_url),this._standaloneFilesByKey.delete(String(t));const r=o.filter(n=>(n.key||n)!==t);this.value=r,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:r}})),this.dispatchEvent(new CustomEvent("dt:delete-file",{bubbles:!0,detail:{fileKey:t,metaKey:this.metaKey||""}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const i=new CustomEvent("dt:delete-file",{bubbles:!0,detail:{fileKey:t,metaKey:this.metaKey,onSuccess:()=>{const o=this._parseValue(this.value),a=o.filter(r=>(r.key||r)!==t);this.value=a,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:o,newValue:a}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:o=>{console.error("Delete error:",o),this.error=o.message||"Delete failed",this.loading=!1}}});this.dispatchEvent(i)}async _renameFile(t,i){if(!this.renameEnabled)return;if(this._isStandaloneMode()){const a=this._parseValue(this.value),r=a.map(n=>(n.key||n)===t?{...n,name:i}:n);this.value=r,this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:a,newValue:r}})),this.dispatchEvent(new CustomEvent("dt:rename-file",{bubbles:!0,detail:{fileKey:t,newName:i,metaKey:this.metaKey||""}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const o=new CustomEvent("dt:rename-file",{bubbles:!0,detail:{fileKey:t,newName:i,metaKey:this.metaKey,onSuccess:()=>{const a=this._parseValue(this.value),r=a.map(n=>(n.key||n)===t?{...n,name:i}:n);this.value=r,this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:a,newValue:r}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:a=>{console.error("Rename error:",a),this.error=(a==null?void 0:a.message)||"Rename failed",this.loading=!1}}});this.dispatchEvent(o)}_startRename(t,i){!this.renameEnabled||this.disabled||(this._editingFileKey=typeof t=="string"?t:String(t),this._editingFileName=i||"")}_commitRename(t,i){if(this._suppressRenameBlurCommit){this._suppressRenameBlurCommit=!1;return}if(!this._editingFileKey||this._editingFileKey!==t)return;const o=(i??this._editingFileName??"").trim();if(this._editingFileKey="",this._editingFileName="",!o)return;const r=this._parseValue(this.value).find(l=>(l.key||l)===t),n=(r==null?void 0:r.name)||(typeof t=="string"?t.split("/").pop():"");o!==n&&this._renameFile(t,o)}_cancelRename(){this._suppressRenameBlurCommit=!0,this._editingFileKey="",this._editingFileName="",setTimeout(()=>{this._suppressRenameBlurCommit=!1},0)}_handleRenameBlur(t,i){if(this._suppressRenameBlurCommit){this._suppressRenameBlurCommit=!1;return}this._commitRename(t,i)}_downloadFile(t){if(!this.downloadEnabled)return;if(this._isStandaloneMode()){const r=t.url;if(!r)return;const n=t.key||t,l=t.name||(typeof n=="string"?n.split("/").pop():"download")||"download",d=document.createElement("a");d.href=r,d.download=l,d.target="_blank",d.rel="noopener",document.body.appendChild(d),d.click(),document.body.removeChild(d),this.dispatchEvent(new CustomEvent("dt:download-file",{bubbles:!0,detail:{fileKey:n,fileName:l,metaKey:this.metaKey||""}}));return}const i=t.key||t,o=t.name||(typeof i=="string"?i.split("/").pop():"download")||"download",a=new CustomEvent("dt:download-file",{bubbles:!0,detail:{fileKey:i,fileName:o,metaKey:this.metaKey,onSuccess:()=>{},onError:r=>{console.error("Download error:",r),this.error=r.message||"Download failed"}}});this.dispatchEvent(a)}_validateRequired(){var i,o,a,r;const t=Array.isArray(this.value)?this.value:[];this.required&&t.length===0?(this.invalid=!0,(o=(i=this.internals)==null?void 0:i.setValidity)==null||o.call(i,{valueMissing:!0},this.requiredMessage||"This field is required")):(this.invalid=!1,(r=(a=this.internals)==null?void 0:a.setValidity)==null||r.call(a,{}))}labelTemplate(){if(!this.label)return"";let t=null;if(this.icon&&this.icon.trim()){const i=this.icon.trim();if(i.startsWith("http://")||i.startsWith("https://")||i.startsWith("/")||i.startsWith("data:"))t=p`${this.iconAltText||`;else if(i.toLowerCase().includes("mdi")){const a=this._mdiToIconify(i);a&&(t=p``)}}return p` + + ${t?p`${t}`:p``} + ${this.label} + + `}render(){const t=this._parseValue(this.value),o=(this.displayLayout||"grid")==="grid";return p` +
    + ${this.labelTemplate()} +
    + +
    + + + +
    +
    + + ${B(this.stagedFiles.length>0&&!this.autoUpload,()=>p` +
    +
    Staged files (${this.stagedFiles.length})
    + ${pe(this.stagedFiles,(a,r)=>`${a.name}-${a.size}-${r}`,(a,r)=>p` +
    + ${a.name} (${this._formatFileSize(a.size)}) + +
    + `)} + +
    + `)} + + ${B(this.loading||this.saved,()=>p` +
    + ${this.renderIconLoading()} + ${this.renderIconSaved()} +
    + `)} + + ${B(t.length>0,()=>p` +
    +
    + ${pe(t,a=>a.key||a,a=>{const r=typeof a.key=="string"?a.key:typeof a=="string"?a:String(a.key??a.name??""),n=a.name||(typeof r=="string"?r.split("/").pop():""),l=a.size,d=this._getFilePreviewUrl(a),u=this._isImage(a),h=this._editingFileKey===r;return p` +
    + ${B(d,()=>p` + {!d&&!a.url&&g.preventDefault()}} + > + ${n} + + `,()=>p` + ${a.url?p` + + ${this._renderFileTypeIcon(a)||(u?p``:p``)} + + `:p` +
    + ${this._renderFileTypeIcon(a)||(u?p``:p``)} +
    + `} + `)} + ${B(h,()=>p` + {this._editingFileName=g.target.value}} + @keydown=${g=>{g.key==="Enter"||g.keyCode===13?(g.preventDefault(),g.stopPropagation(),this._commitRename(r,g.target.value)):(g.key==="Escape"||g.keyCode===27)&&(g.preventDefault(),this._cancelRename())}} + @blur=${g=>this._handleRenameBlur(r,g.target.value)} + @click=${g=>g.stopPropagation()} + /> + `,()=>p` +
    {g.stopPropagation(),this.renameEnabled&&!this.disabled&&this._startRename(r,n)}} + @keydown=${g=>{this.renameEnabled&&!this.disabled&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),this._startRename(r,n))}} + > + ${n} +
    + `)} + ${B(l!=null,()=>p`
    ${this._formatFileSize(l)}
    `)} +
    + ${B(this.downloadEnabled&&a.url,()=>p` + + `)} + ${B(this.deleteEnabled&&!this.disabled,()=>p` + + `)} +
    +
    + `})} +
    +
    + `)} + + ${this.renderIconInvalid()} + ${this.renderError()} +
    + `}}customElements.define("dt-file-upload",So);class Eo extends N{static get styles(){return x` + :host { + display: block; } - .btn { - -webkit-appearance: none; - border: 1px solid transparent; - border-radius: 5px; - cursor: pointer; - display: inline-block; - font-family: inherit; - font-size: .9rem; - line-height: 1; - margin: 0 !important; - text-align: center; - -webkit-transition: background-color .25s ease-out, color .25s ease-out; - transition: background-color .25s ease-out, color .25s ease-out; - vertical-align: middle; + .dt-alert { + padding: var(--dt-alert-padding, 10px); + font-family: var(--dt-alert-font-family); + font-size: var(--dt-alert-font-size, 14px); + font-weight: var(--dt-alert-font-weight, 700); + background-color: var( + --dt-alert-context-background-color, + var(--dt-alert-background-color) + ); + border: var(--dt-alert-border-width, 1px) solid + var(--dt-alert-context-border-color, var(--dt-alert-border-color)); + border-radius: var(--dt-alert-border-radius, 10px); + box-shadow: var(--dt-alert-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); + color: var(--dt-alert-context-text-color, var(--dt-alert-text-color)); + text-rendering: optimizeLegibility; + display: flex; + gap: var(--dt-alert-gap, 10px); + justify-content: space-between; + align-content: center; + align-items: center; + white-space: initial; } - .btn.btn-primary { - background-color: #3f729b; - color: #fefefe; - border-radius: 5px; + .dt-alert.dt-alert--outline { + background-color: transparent; + color: var(--dt-alert-context-text-color, var(--text-color-inverse)); } - .btn.btn-primary:hover, .btn.btn-primary:focus { - background-color: #366184; - color: #fefefe; + .dt-alert--primary:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--primary-color); + --dt-alert-context-background-color: var(--primary-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - .text-center { - text-align: center; + .dt-alert--alert:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--alert-color); + --dt-alert-context-background-color: var(--alert-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - .btn.btn-primary .dt-button { - margin: 0; - border-radius: 5px; + .dt-alert--caution:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--caution-color); + --dt-alert-context-background-color: var(--caution-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-dark); } + .dt-alert--success:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--success-color); + --dt-alert-context-background-color: var(--success-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); + } - @media (min-width: 950px) { - .fieldsList { - column-count: 3; - } + .dt-alert--inactive:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--inactive-color); + --dt-alert-context-background-color: var(--inactive-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-light); } - @media (min-width: 1500px) { - .fieldsList { - column-count: 4; - } + .dt-alert--disabled:not(.dt-alert--outline) { + --dt-alert-context-border-color: var(--disabled-color); + --dt-alert-context-background-color: var(--disabled-color); + --dt-alert-context-text-color: var(--dt-alert-text-color-dark); } - `}static get properties(){return{postType:{type:String},postTypeLabel:{type:String},posttypesettings:{type:Object,attribute:!0},posts:{type:Array},total:{type:Number},columns:{type:Array},sortedBy:{type:String},loading:{type:Boolean,default:!0},offset:{type:Number},showArchived:{type:Boolean,default:!1},showFieldsSelector:{type:Boolean,default:!1},showBulkEditSelector:{type:Boolean,default:!1},nonce:{type:String},payload:{type:Object},favorite:{type:Boolean},initialLoadPost:{type:Boolean,default:!1},loadMore:{type:Boolean,default:!1},headerClick:{type:Boolean,default:!1}}}constructor(){super(),this.sortedBy="name",this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.sortedColumns},this.initalLoadPost=!1,this.initalLoadPost||(this.posts=[],this.limit=100)}firstUpdated(){this.postTypeSettings=window.post_type_fields,this.sortedColumns=this.columns.includes("favorite")?["favorite",...this.columns.filter(e=>e!=="favorite")]:this.columns,this.style.setProperty("--number-of-columns",this.columns.length-1)}async _getPosts(e){const t=await new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:e,onSuccess:i=>{this.initalLoadPost&&this.loadMore&&(this.posts=[...this.posts,...i],this.postsLength=this.posts.length,this.total=i.length,this.loadMore=!1),this.initalLoadPost||(this.posts=[...i],this.offset=this.posts.length,this.initalLoadPost=!0,this.total=i.length),this.headerClick&&(this.posts=i,this.offset=this.posts.length,this.headerClick=!1),this.total=i.length},onError:i=>{console.warn(i)}}});this.dispatchEvent(t)}_headerClick(e){const t=e.target.dataset.id;this.sortedBy===t?t.startsWith("-")?this.sortedBy=t.replace("-",""):this.sortedBy=`-${t}`:this.sortedBy=t,this.payload={sort:this.sortedBy,overall_status:["-closed"],limit:this.limit,fields_to_return:this.columns},this.headerClick=!0,this._getPosts(this.payload)}static _rowClick(e){window.open(e,"_self")}_bulkEdit(){this.showBulkEditSelector=!this.showBulkEditSelector}_fieldsEdit(){this.showFieldsSelector=!this.showFieldsSelector}_toggleShowArchived(){if(this.showArchived=!this.showArchived,this.headerClick=!0,this.showArchived){const{overall_status:e,offset:t,...i}=this.payload;this.payload=i}else this.payload.overall_status=["-closed"];this._getPosts(this.payload)}_sortArrowsClass(e){return this.sortedBy===e?"sortedBy":""}_sortArrowsToggle(e){return this.sortedBy!==`-${e}`?`-${e}`:e}_headerTemplate(){return this.postTypeSettings?f` - - - - - - - ${Ke(this.sortedColumns,e=>{const t=e==="favorite";return f` - ${t?null:this.postTypeSettings[e].name} - ${t?"":f` - - - `} - `})} - - - `:null}_rowTemplate(){if(this.posts&&Array.isArray(this.posts)){const e=this.posts.map((t,i)=>this.showArchived||!this.showArchived&&t.overall_status!=="closed"?f` - this._rowClick(t.permalink)}> - - - - ${i+1}. - ${this._cellTemplate(t)} - - `:null).filter(t=>t!==null);return e.length>0?e:f`

    No contacts available

    `}return null}formatDate(e){const t=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(t)}_cellTemplate(e){return Ke(this.sortedColumns,t=>{if(["text","textarea","number"].includes(this.postTypeSettings[t].type))return f` - ${e[t]} - `;if(this.postTypeSettings[t].type==="date")return f` - ${this.formatDate(e[t].formatted)} - `;if(this.postTypeSettings[t].type==="user_select"&&e[t]&&e[t].display)return f` - ${B(e[t].display)} - `;if(this.postTypeSettings[t].type==="key_select"&&e[t]&&(e[t].label||e[t].name))return f` - ${e[t].label||e[t].name} - `;if(this.postTypeSettings[t].type==="multi_select"||this.postTypeSettings[t].type==="tags"&&e[t]&&e[t].length>0)return f` -
      - ${Ke(e[t],i=>f`
    • - ${this.postTypeSettings[t].default[i].label} -
    • `)} -
    - `;if(this.postTypeSettings[t].type==="location"||this.postTypeSettings[t].type==="location_meta")return f` - ${B(e[t].label)} - `;if(this.postTypeSettings[t].type==="communication_channel")return f` - ${B(e[t].value)} - `;if(this.postTypeSettings[t].type==="connection")return f` - - ${B(e[t].value)} - `;if(this.postTypeSettings[t].type==="boolean"){if(t==="favorite")return f` - - - - - - `;if(this.postTypeSettings[t]===!0)return f` - ['✓'] - `}return f``})}_fieldListIconTemplate(e){return this.postTypeSettings[e].icon?f`${this.postTypeSettings[e].name}`:null}_fieldsListTemplate(){return Ee(Object.keys(this.postTypeSettings).sort((e,t)=>{const i=this.postTypeSettings[e].name.toUpperCase(),s=this.postTypeSettings[t].name.toUpperCase();return is?1:0}),e=>e,e=>this.postTypeSettings[e].hidden?null:f`
  • - -
  • `)}_fieldsSelectorTemplate(){return this.showFieldsSelector?f`
    -
    -

    - ${O("Choose which fields to display as columns in the list")} -

    - -
    -
      - ${this._fieldsListTemplate()} -
    -
    `:null}_updateFields(e){const t=e.target.value,i=this.columns;i.includes(t)?(i.filter(s=>s!==t),i.splice(i.indexOf(t),1)):i.push(t),this.columns=i,this.style.setProperty("--number-of-columns",this.columns.length-1),this.requestUpdate()}_bulkSelectorTemplate(){return this.showBulkEditSelector?f`
    -
    -

    - ${O(u`Select all the ${this.postType} you want to update from the list, and update them below`)} -

    - -
    -
      - This is where the bulk edit form will go. -
    -
    `:null}connectedCallback(){super.connectedCallback(),this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.columns},this.posts.length===0&&this._getPosts(this.payload).then(e=>{this.posts=e})}_handleLoadMore(){this.limit=500,this.payload={sort:this.sortedBy,overall_status:["-closed"],fields_to_return:this.columns,offset:this.offset,limit:this.limit},this.loadMore=!0,this._getPosts(this.payload).then(e=>{console.log(e)})}render(){const e={bulk_editing:this.showBulkEditSelector,hidden:!1};this.posts&&(this.total=this.posts.length);const t=f` - - - - - - - `,i=f``;return f` -
    -
    -
    - ${O(u`${this.postTypeLabel?this.postTypeLabel:this.postType} List`)} -
    - ${O(u`Showing ${this.total} of ${this.total}`)} - - + .dt-alert--primary.dt-alert--outline { + --dt-alert-context-border-color: var(--primary-color); + --dt-alert-context-text-color: var(--primary-color); + } - -
    + .dt-alert--alert.dt-alert--outline { + --dt-alert-context-border-color: var(--alert-color); + --dt-alert-context-text-color: var(--alert-color); + } + + .dt-alert--caution.dt-alert--outline { + --dt-alert-context-border-color: var(--caution-color); + --dt-alert-context-text-color: var(--caution-color); + } + + .dt-alert--success.dt-alert--outline { + --dt-alert-context-border-color: var(--success-color); + --dt-alert-context-text-color: var(--success-color); + } + + .dt-alert--inactive.dt-alert--outline { + --dt-alert-context-border-color: var(--inactive-color); + } + + .dt-alert--disabled.dt-alert--outline { + --dt-alert-context-border-color: var(--disabled-color); + } - ${this._fieldsSelectorTemplate()} ${this._bulkSelectorTemplate()} - - ${this._headerTemplate()} - ${this.posts?this._rowTemplate():O("Loading")} -
    - ${this.total>=100?f`
    Load More
    `:""} + button.toggle { + margin-inline-end: 0; + margin-inline-start: auto; + background: none; + border: none; + color: inherit; + cursor: pointer; + display: flex; + align-items: center; + } + `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return p``;const e=p` + + xmlns="http://www.w3.org/2000/svg"> + + + + `;return p` + - `}}window.customElements.define("dt-list",Ss);class Ts extends N{static get styles(){return x` + `}}window.customElements.define("dt-alert",Eo);class Ao extends N{static get styles(){return x` :host { font-family: var(--dt-tile-font-family, var(--font-family)); font-size: var(--dt-tile-font-size, 14px); @@ -3705,13 +3900,28 @@ } section { - background-color: var(--dt-tile-background-color, #fefefe); - border-top: var(--dt-tile-border-top, 1px solid #cecece); - border-bottom: var(--dt-tile-border-bottom, 1px solid #cecece); - border-right: var(--dt-tile-border-right, 1px solid #cecece); - border-left: var(--dt-tile-border-left, 1px solid #cecece); + background-color: var( + --dt-tile-background-color, + var(--surface-1, #fefefe) + ); + border-top: var( + --dt-tile-border-top, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-bottom: var( + --dt-tile-border-bottom, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-right: var( + --dt-tile-border-right, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); + border-left: var( + --dt-tile-border-left, + 1px solid var(--dt-tile-border-color, var(--border-color)) + ); border-radius: var(--dt-tile-border-radius, 10px); - box-shadow: var(--dt-tile-box-shadow, 0 2px 4px rgb(0 0 0 / 25%)); + box-shadow: var(--dt-tile-box-shadow, var(--shadow-0)); padding: 1rem; margin: var(--dt-tile-margin, 0); } @@ -3726,7 +3936,7 @@ } .section-header { - color: var(--dt-tile-header-color, #3f729b); + color: var(--dt-tile-header-color, var(--primary-color)); font-size: 1.5rem; display: flex; text-transform: var(--dt-tile-header-text-transform, capitalize); @@ -3774,10 +3984,10 @@ top: 0; transform: rotate(135deg); } - `}static get properties(){return{title:{type:String},expands:{type:Boolean},collapsed:{type:Boolean},gap:{type:String}}}get hasHeading(){return this.title||this.expands}_toggle(){this.collapsed=!this.collapsed}renderHeading(){return this.hasHeading?f` + `}static get properties(){return{title:{type:String},expands:{type:Boolean},collapsed:{type:Boolean},gap:{type:String}}}get hasHeading(){return this.title||this.expands}_toggle(){this.collapsed=!this.collapsed}renderHeading(){return this.hasHeading?p`

    ${this.title} - ${this.expands?f` + ${this.expands?p`

    - `:E}render(){return f` + `:O}render(){return p`
    ${this.renderHeading()}
    - `}}window.customElements.define("dt-tile",Ts);class Ce{get api(){return this._api}constructor(e,t,i,s="wp-json"){this.postType=e,this.postId=t,this.nonce=i,this.debounceTimers={},this._api=new mt(this.nonce,s),this.apiRoot=this._api.apiRoot,this.autoSaveComponents=["dt-connection","dt-users-connection","dt-date","dt-datetime","dt-location","dt-location-map","dt-multi-select","dt-number","dt-single-select","dt-tags","dt-text","dt-textarea","dt-toggle","dt-multi-text","dt-multi-select-button-group","dt-list","dt-button","dt-church-health-circle"],this.dynamicLoadComponents=["dt-connection","dt-tags","dt-modal","dt-list","dt-button","dt-location","dt-users-connection"]}initialize(){this.postId&&this.enableAutoSave(),this.attachLoadEvents()}async attachLoadEvents(e){const t=document.querySelectorAll(e||this.dynamicLoadComponents.join(","));t&&t.forEach(i=>{i.dataset.eventDtGetData||(i.addEventListener("dt:get-data",this.handleGetDataEvent.bind(this)),i.dataset.eventDtGetData=!0)})}async checkDuplicates(e,t){const i=document.querySelector("dt-modal.duplicate-detected");if(i){const s=i.shadowRoot.querySelector(".duplicates-detected-button");s&&(s.style.display="none");const a=await this._api.checkDuplicateUsers(this.postType,this.postId);t&&a.ids.length>0&&s&&(s.style.display="block")}}enableAutoSave(e){const t=document.querySelectorAll(e||this.autoSaveComponents.join(","));t&&t.forEach(i=>{i.addEventListener("change",this.handleChangeEvent.bind(this))})}async handleGetDataEvent(e){const t=e.detail;if(t){const{field:i,query:s,onSuccess:a,onError:n}=t;try{const r=e.target.tagName.toLowerCase();let l=[];switch(r){case"dt-button":l=await this._api.getContactInfo(this.postType,this.postId);break;case"dt-list":l=(await this._api.fetchPostsList(this.postType,s)).posts;break;case"dt-connection":{const c=t.postType||this.postType,b=await this._api.listPostsCompact(c,s),g={...b,posts:b.posts.filter(v=>v.ID!==parseInt(this.postId,10))};g!=null&&g.posts&&(l=Ce.convertApiValue("dt-connection",g==null?void 0:g.posts));break}case"dt-users-connection":{const c=t.postType||this.postType,b=await this._api.searchUsers(c,s),g={...b,posts:b.filter(v=>v.ID!==parseInt(this.postId,10))};g!=null&&g.posts&&(l=Ce.convertApiValue("dt-users-connection",g==null?void 0:g.posts));break}case"dt-location":{l=await this._api.getLocations(this.postType,i,t.filter,s),l=l.location_grid.map(c=>({id:c.ID,label:c.name}));break}case"dt-tags":default:l=await this._api.getMultiSelectValues(this.postType,i,s),l=l.map(c=>({id:c,label:c}));break}a(l)}catch(r){n(r)}}}async handleChangeEvent(e){const t=e.detail;if(t){const{field:i,newValue:s,oldValue:a,remove:n}=t,r=e.target.tagName.toLowerCase(),l=Ce.convertValue(r,s,a);if(e.target.removeAttribute("saved"),e.target.setAttribute("loading",!0),r==="dt-number"){const c=`${this.postType}-${this.postId}-${i}`;this.debounce(c,async()=>{try{const b=await this._api.updatePost(this.postType,this.postId,{[i]:l});document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:b,field:i,value:l,component:r}})),e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(b){console.error(b),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",b.message||b.toString())}},1e3)}else try{const c={[i]:l};if(r==="dt-location-map"){const g=l.values.filter(v=>!v.lng||!v.lat);c[i].values=l.values.filter(v=>v.lng&&v.lat),c.contact_address=g,c.contact_address.length===0&&delete c.contact_address,c[i].values.length===0&&delete c[i]}const b=await this._api.updatePost(this.postType,this.postId,c);if(document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:b,field:i,value:l,component:r}})),r==="dt-location-map"){const g=e.target;g.value=b[i]}e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(c){console.error(c),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",c.message||c.toString())}}}debounce(e,t,i){this.debounceTimers[e]&&clearTimeout(this.debounceTimers[e]),this.debounceTimers[e]=setTimeout(()=>{t()},i)}static convertApiValue(e,t){let i=t;switch(e){case"dt-connection":i=t.map(s=>({id:s.ID,label:s.name??s.post_title,link:s.permalink,status:s.status}));break;case"dt-users-connection":t&&!Array.isArray(t)&&(t.id||t.ID)?i=[{id:t.id||t.ID,label:t.display,avatar:t.avatar||""}]:Array.isArray(t)&&(i=t.map(s=>({id:s.id||s.ID,label:s.display||s.name,avatar:s.avatar||""})));break}return i}static convertValue(e,t,i=null){let s=t;if(t)switch(e.toLowerCase()){case"dt-toggle":typeof t=="string"&&(s=t.toLowerCase()==="true");break;case"dt-church-health-circle":case"dt-multi-select":case"dt-multi-select-button-group":case"dt-tags":typeof t=="string"&&(s=[t]),s={values:s.map(n=>{if(typeof n=="string"){const l={value:n};return n.startsWith("-")&&(l.delete=!0,l.value=n.substring(1)),l}const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-users-connection":{const n=[],r=s.filter(c=>!c.delete);if(r.length<=1){s=r.length===1?parseInt(r[0].id,10):"";break}const l=new Map((i||[]).map(c=>[c.id,c]));for(const c of s){const b=l.get(c.id),g={id:c.id,changes:{}};if(b){let v=!1;const y=new Set([...Object.keys(b),...Object.keys(c)]);for(const w of y)c[w]!==b[w]&&(g.changes[w]=Object.prototype.hasOwnProperty.call(c,w)?c[w]:void 0,v=!0);if(v){n.push(g);break}}else{g.changes={...c},n.push(g);break}}s=n[0].id;break}case"dt-connection":typeof t=="string"&&(s=[{id:t}]),s={values:s.map(n=>{const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-location":const a=new Set((i||[]).map(n=>n.id));typeof t=="string"?s=[{id:t}]:s=t.filter(n=>!(a.has(n.id)&&!n.delete)),s={values:s.map(n=>{const r={value:n.id};return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-location-map":if(s=t.filter(n=>!((i||[]).includes(n)&&!n.delete)),i)for(const n of i)t.some(l=>n.id&&l.id&&n.id===l.id||n.key&&l.key&&n.key===l.key&&(!l.lat||!l.lng))||(n.delete=!0,s.push(n));s={values:s.map(n=>{const r=n;return n.delete&&(r.delete=n.delete),r}),force_values:!1};break;case"dt-multi-text":Array.isArray(t)?s=t.map(n=>{const r={...n};return delete r.tempKey,r}):typeof t=="string"&&(s=[{value:t}]);break}return s}static valueArrayDiff(e,t){const i={value1:[],value2:[]};if(Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.length>0&&typeof e[0]!="object")return i.value1=e.filter(r=>!t.includes(r)),i.value2=t.filter(r=>!e.includes(r)),i;const s=r=>JSON.stringify(r),a=new Map(e.map(r=>[s(r),r])),n=new Map(t.map(r=>[s(r),r]));for(const[r,l]of a)n.has(r)||i.value1.push(l);for(const[r,l]of n)a.has(r)||i.value2.push(l);return i}}const Ua="0.8.9",Va={s226be12a5b1a27e8:"ሰነዶቹን ያንብቡ",s33f85f24c0f5f008:"አስቀምጥ",s36cb242ac90353bc:"መስኮች",s41cb4006238ebd3b:"የጅምላ አርትዕ",s5e8250fb85d64c23:"ገጠመ",s625ad019db843f94:"ተጠቀም",sac83d7f9358b43db:u`${0} ዝርዝር`,sbf1ca928ec1deb62:"ተጨማሪ እገዛ ይፈልጋሉ?",sd1a8dc951b2b6a98:"በዝርዝሩ ውስጥ እንደ ዓምዶች የትኞቹን መስኮች እንደሚያሳዩ ይምረጡ",sf9aee319a006c9b4:"አክል",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ba=Object.freeze(Object.defineProperty({__proto__:null,templates:Va},Symbol.toStringTag,{value:"Module"})),Ha={s04ceadb276bbe149:"خيارات التحميل...",s226be12a5b1a27e8:"اقرأ الوثائق",s29e25f5e4622f847:"افتح",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"غلق",s625ad019db843f94:"استخدام",s9d51bfd93b5dbeca:"عرض المحفوظات",sac83d7f9358b43db:u`${0}قائمة الأعضاء`,sb1bd536b63e9e995:"المجال الخاص: أنا فقط أستطيع رؤية محتواه",sb59d68ed12d46377:"جار التحميل",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",scb9a1ff437efbd2a:u`حَدِّد جميع ${0} التي تريد تحديثها من القائمة ، وقم بتحديثها أدناه`,sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",seafe6ef133ede7da:u`عرض 1 of ${0}`,sf9aee319a006c9b4:"لأضف",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Ga=Object.freeze(Object.defineProperty({__proto__:null,templates:Ha},Symbol.toStringTag,{value:"Module"})),Wa={s226be12a5b1a27e8:"اقرأ الوثائق",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"أغلق",s625ad019db843f94:"استخدام",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",sf9aee319a006c9b4:"إضافة",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ka=Object.freeze(Object.defineProperty({__proto__:null,templates:Wa},Symbol.toStringTag,{value:"Module"})),Za={s226be12a5b1a27e8:"Прочетете документацията",s33f85f24c0f5f008:"Запазете",s36cb242ac90353bc:"Полета",s41cb4006238ebd3b:"Групово редактиране",s5e8250fb85d64c23:"Близо",s625ad019db843f94:"Използвайте",sbf1ca928ec1deb62:"Имате нужда от повече помощ?",sd1a8dc951b2b6a98:"Изберете кои полета да се показват като колони в списъка",sf9aee319a006c9b4:"Добавяне",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ja=Object.freeze(Object.defineProperty({__proto__:null,templates:Za},Symbol.toStringTag,{value:"Module"})),Qa={s226be12a5b1a27e8:"নথিপত্রাদি পাঠ করুন",s33f85f24c0f5f008:"সংরক্ষণ করুন",s36cb242ac90353bc:"ক্ষেত্র",s41cb4006238ebd3b:"বাল্ক এডিট",s5e8250fb85d64c23:"বন্ধ",s625ad019db843f94:"ব্যবহার",sbf1ca928ec1deb62:"আরও সাহায্য প্রয়োজন?",sd1a8dc951b2b6a98:"তালিকার কলাম হিসাবে কোন ক্ষেত্রগুলি প্রদর্শিত হবে তা চয়ন করুন",sf9aee319a006c9b4:"অ্যাড",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ya=Object.freeze(Object.defineProperty({__proto__:null,templates:Qa},Symbol.toStringTag,{value:"Module"})),Xa={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitajte dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate više pomoći?",scb9a1ff437efbd2a:u`Odaberite sve ${0} koje želite ažurirati sa liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Odaberite koja polja će se prikazati kao kolone na listi",seafe6ef133ede7da:u`Prikazuje se 1 od ${0}`,sf9aee319a006c9b4:"Dodati",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},en=Object.freeze(Object.defineProperty({__proto__:null,templates:Xa},Symbol.toStringTag,{value:"Module"})),tn={s226be12a5b1a27e8:"Přečtěte si dokumentaci",s33f85f24c0f5f008:"Uložit",s36cb242ac90353bc:"Pole",s41cb4006238ebd3b:"Hromadná úprava",s5e8250fb85d64c23:"Zavřít",s625ad019db843f94:"Použití",sbf1ca928ec1deb62:"Potřebujete další pomoc?",sd1a8dc951b2b6a98:"Vyberte pole, která chcete v seznamu zobrazit jako sloupce",sf9aee319a006c9b4:"Přidat",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sn=Object.freeze(Object.defineProperty({__proto__:null,templates:tn},Symbol.toStringTag,{value:"Module"})),on={s226be12a5b1a27e8:"Lesen Sie die Dokumentation",s33f85f24c0f5f008:"Speichern",s36cb242ac90353bc:"Felder",s41cb4006238ebd3b:"Im Stapel bearbeiten",s5e8250fb85d64c23:"Schließen",s625ad019db843f94:"Verwenden",sbf1ca928ec1deb62:"Benötigen Sie weitere Hilfe?",sd1a8dc951b2b6a98:"Wählen Sie aus, welche Felder in der Liste als Spalte angezeigt werden sollen",sf9aee319a006c9b4:"Hinzufügen",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},an=Object.freeze(Object.defineProperty({__proto__:null,templates:on},Symbol.toStringTag,{value:"Module"})),nn={s226be12a5b1a27e8:"Διαβάστε την τεκμηρίωση",s33f85f24c0f5f008:"Αποθήκευση",s36cb242ac90353bc:"Πεδία",s41cb4006238ebd3b:"Μαζική Επεξεργασία",s5e8250fb85d64c23:"Κλείσιμο",s625ad019db843f94:"Χρήση",sbf1ca928ec1deb62:"Χρειάζεστε περισσότερη βοήθεια;",sd1a8dc951b2b6a98:"Επιλέξτε ποια πεδία θα εμφανίζονται ως στήλες στη λίστα",sf9aee319a006c9b4:"Προσθήκη",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rn=Object.freeze(Object.defineProperty({__proto__:null,templates:nn},Symbol.toStringTag,{value:"Module"})),ln={sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",sf9aee319a006c9b4:"Add",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog",s33f85f24c0f5f008:"Save",s49730f3d5751a433:"Loading...",s625ad019db843f94:"Use",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dn=Object.freeze(Object.defineProperty({__proto__:null,templates:ln},Symbol.toStringTag,{value:"Module"})),cn={s8900c9de2dbae68b:"No hay opciones disponibles",sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sf9aee319a006c9b4:"Añadir",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sb9b8c412407d5691:"This is where the bulk edit form will go.",sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog"},un=Object.freeze(Object.defineProperty({__proto__:null,templates:cn},Symbol.toStringTag,{value:"Module"})),hn={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Leer la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:u`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:u`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},pn=Object.freeze(Object.defineProperty({__proto__:null,templates:hn},Symbol.toStringTag,{value:"Module"})),fn={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Lee la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:u`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:u`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},bn=Object.freeze(Object.defineProperty({__proto__:null,templates:fn},Symbol.toStringTag,{value:"Module"})),gn={s04ceadb276bbe149:"در حال بارگیری گزینه‌ها...",s226be12a5b1a27e8:"راهنمای سایت",s29e25f5e4622f847:"جعبه محاوره ای را باز کنید",s33f85f24c0f5f008:"صرفه جویی",s36cb242ac90353bc:"حوزه‌ها",s41cb4006238ebd3b:"ویرایش انبوه",s5e8250fb85d64c23:"بستن",s625ad019db843f94:"استفاده کنید",s9d51bfd93b5dbeca:"نمایش بایگانی شده",sac83d7f9358b43db:u`لیست ${0}`,sb1bd536b63e9e995:"زمینه خصوصی: فقط من می توانم محتوای آن را داشته باشم",sb59d68ed12d46377:"بارگیری",sbf1ca928ec1deb62:"آیا به راهنمایی بیشتری نیاز دارید؟",scb9a1ff437efbd2a:u`همۀ ${0} مورد نظر برای به روزرسانی را از لیست انتخاب کنید و آن‌ها را در زیر به روز کنید`,sd1a8dc951b2b6a98:"انتخاب کنید که کدام یک از حوزه‌ها به‌عنوان ستون در لیست نمایش داده شوند",seafe6ef133ede7da:u`نمایش 1 از ${0}`,sf9aee319a006c9b4:"افزودن",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},mn=Object.freeze(Object.defineProperty({__proto__:null,templates:gn},Symbol.toStringTag,{value:"Module"})),vn={s04ceadb276bbe149:"Chargement les options...",s226be12a5b1a27e8:"Lire la documentation",s29e25f5e4622f847:"Ouvrir la boîte de dialogue",s33f85f24c0f5f008:"sauver",s36cb242ac90353bc:"Champs",s41cb4006238ebd3b:"Modification groupée",s5e8250fb85d64c23:"Fermer",s625ad019db843f94:"Utiliser",s9d51bfd93b5dbeca:"Afficher Archivé",sac83d7f9358b43db:u`${0} Liste`,sb1bd536b63e9e995:"Champ privé : je suis le seul à voir son contenu",sb59d68ed12d46377:"Chargement",sbf1ca928ec1deb62:"Besoin d'aide ?",scb9a1ff437efbd2a:u`Sélectionnez tous les ${0} que vous souhaitez mettre à jour dans la liste et mettez-les à jour ci-dessous`,sd1a8dc951b2b6a98:"Choisissez les champs à afficher sous forme de colonnes dans la liste",seafe6ef133ede7da:u`Affichage de 1 sur ${0}`,sf9aee319a006c9b4:"Ajouter",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yn=Object.freeze(Object.defineProperty({__proto__:null,templates:vn},Symbol.toStringTag,{value:"Module"})),wn={s226be12a5b1a27e8:"डॉक्यूमेंटेशन पढ़ें",s33f85f24c0f5f008:"बचाना",s36cb242ac90353bc:"खेत",s41cb4006238ebd3b:"थोक संपादित",s5e8250fb85d64c23:"बंद",s625ad019db843f94:"उपयोग",sbf1ca928ec1deb62:"क्या और मदद चाहिये?",sd1a8dc951b2b6a98:"सूची में कॉलम के रूप में प्रदर्शित करने के लिए कौन से फ़ील्ड चुनें",sf9aee319a006c9b4:"जोडें",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},_n=Object.freeze(Object.defineProperty({__proto__:null,templates:wn},Symbol.toStringTag,{value:"Module"})),$n={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitaj dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Spremi",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvoriti",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate li pomoć?",scb9a1ff437efbd2a:u`Odaberite sve${0}koje želite ažurirati s liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Izaberite polja koja će se prikazivati kao stupci na popisu",seafe6ef133ede7da:u`Prikazuje se 1 od${0}`,sf9aee319a006c9b4:"Dodaj",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},xn=Object.freeze(Object.defineProperty({__proto__:null,templates:$n},Symbol.toStringTag,{value:"Module"})),kn={s226be12a5b1a27e8:"Olvasd el a dokumentációt",s33f85f24c0f5f008:"Megment",s36cb242ac90353bc:"Mezők",s41cb4006238ebd3b:"Tömeges Szerkesztés",s5e8250fb85d64c23:"Bezár",s625ad019db843f94:"Használ",sbf1ca928ec1deb62:"Több segítség szükséges?",sd1a8dc951b2b6a98:"Válassza ki, melyik mezők jelenjenek meg oszlopként a listában",sf9aee319a006c9b4:"Hozzáadás",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Sn=Object.freeze(Object.defineProperty({__proto__:null,templates:kn},Symbol.toStringTag,{value:"Module"})),Tn={s226be12a5b1a27e8:"Bacalah dokumentasi",s33f85f24c0f5f008:"Simpan",s36cb242ac90353bc:"Larik",s41cb4006238ebd3b:"Edit Massal",s5e8250fb85d64c23:"Menutup",s625ad019db843f94:"Gunakan",sbf1ca928ec1deb62:"Perlukan bantuan lagi?",sd1a8dc951b2b6a98:"Pilih larik mana yang akan ditampilkan sebagai kolom dalam daftar",sf9aee319a006c9b4:"Tambah",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},An=Object.freeze(Object.defineProperty({__proto__:null,templates:Tn},Symbol.toStringTag,{value:"Module"})),En={s04ceadb276bbe149:"Caricando opzioni...",s226be12a5b1a27e8:"Leggi la documentazione",s29e25f5e4622f847:"Apri Dialogo",s33f85f24c0f5f008:"Salvare",s36cb242ac90353bc:"Campi",s41cb4006238ebd3b:"Modifica in blocco",s5e8250fb85d64c23:"Chiudi",s625ad019db843f94:"Uso",s9d51bfd93b5dbeca:"Visualizza Archiviati",sac83d7f9358b43db:u`${0} Lista`,sb1bd536b63e9e995:"Campo Privato: Solo io posso vedere i suoi contenuti",sb59d68ed12d46377:"Caricando",sbf1ca928ec1deb62:"Hai bisogno di ulteriore assistenza?",scb9a1ff437efbd2a:u`Seleziona tutti i ${0}vuoi aggiornare dalla lista e aggiornali sotto`,sd1a8dc951b2b6a98:"Scegli quali campi visualizzare come colonne nell'elenco",seafe6ef133ede7da:u`Visualizzando 1 di ${0}`,sf9aee319a006c9b4:"Inserisci",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},On=Object.freeze(Object.defineProperty({__proto__:null,templates:En},Symbol.toStringTag,{value:"Module"})),Cn={s226be12a5b1a27e8:"ドキュメントを読む",s33f85f24c0f5f008:"セーブ",s36cb242ac90353bc:"田畑",s41cb4006238ebd3b:"一括編集",s5e8250fb85d64c23:"閉じる",s625ad019db843f94:"使用する",sbf1ca928ec1deb62:"もっと助けが必要ですか?",sd1a8dc951b2b6a98:"リストの列として表示するフィールドを選択します",sf9aee319a006c9b4:"追加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ln=Object.freeze(Object.defineProperty({__proto__:null,templates:Cn},Symbol.toStringTag,{value:"Module"})),In={s226be12a5b1a27e8:"문서 읽기",s33f85f24c0f5f008:"구하다",s36cb242ac90353bc:"필드",s41cb4006238ebd3b:"대량 수정",s5e8250fb85d64c23:"닫기",s625ad019db843f94:"사용",sbf1ca928ec1deb62:"더 많은 도움이 필요하신가요?",sd1a8dc951b2b6a98:"목록에서 어떤 필드를 표시할지 고르세요",sf9aee319a006c9b4:"추가",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Pn=Object.freeze(Object.defineProperty({__proto__:null,templates:In},Symbol.toStringTag,{value:"Module"})),Mn={s226be12a5b1a27e8:"Прочитај ја документацијата",s33f85f24c0f5f008:"Зачувај",s36cb242ac90353bc:"Полиња",s41cb4006238ebd3b:"Уреди повеќе",s5e8250fb85d64c23:"Затвори",s625ad019db843f94:"Користи",sbf1ca928ec1deb62:"Дали ти треба повеќе помош?",sd1a8dc951b2b6a98:"Избери кои полиња да се прикажат како колони во листата",sf9aee319a006c9b4:"Додади",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},jn=Object.freeze(Object.defineProperty({__proto__:null,templates:Mn},Symbol.toStringTag,{value:"Module"})),Dn={s226be12a5b1a27e8:"कागदपत्रे वाचा.",s33f85f24c0f5f008:"जतन करा",s36cb242ac90353bc:"क्षेत्रे",s41cb4006238ebd3b:"बल्क एडिट करा",s5e8250fb85d64c23:"बंद करा",s625ad019db843f94:"वापर",sbf1ca928ec1deb62:"अधिक मदत आवश्यक आहे का?",sd1a8dc951b2b6a98:"यादीत कोणती क्षेत्रे स्तंभ म्हणून दर्शवली जावीत हे निवडा",sf9aee319a006c9b4:"समाविष्ट करा",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},zn=Object.freeze(Object.defineProperty({__proto__:null,templates:Dn},Symbol.toStringTag,{value:"Module"})),Rn={s226be12a5b1a27e8:"စာရွက်စာတမ်းများကိုဖတ်ပါ",s33f85f24c0f5f008:"သိမ်းဆည်းပါ",s36cb242ac90353bc:"နယ်ပယ်ဒေသများ",s5e8250fb85d64c23:"ပိတ်သည်",s625ad019db843f94:"အသုံးပြုပါ",sbf1ca928ec1deb62:"နောက်ထပ်အကူအညီလိုပါသလား။",sd1a8dc951b2b6a98:"စာရင်းရှိကော်လံများအနေဖြင့်ဖော်ပြမည့်မည်သည့်နယ်ပယ်ဒေသများကိုရွေးချယ်ပါ",sf9aee319a006c9b4:"ထည့်ပါ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Nn=Object.freeze(Object.defineProperty({__proto__:null,templates:Rn},Symbol.toStringTag,{value:"Module"})),qn={s226be12a5b1a27e8:"कागजात पढ्नुहोस्",s33f85f24c0f5f008:"सुरक्षित गर्नुहोस",s36cb242ac90353bc:"क्षेत्रहरू",s41cb4006238ebd3b:"थोक सम्पादन",s5e8250fb85d64c23:"बन्द गर्नुहोस",s625ad019db843f94:"प्रयोग गर्नुहोस्",sbf1ca928ec1deb62:"थप मद्दत चाहिन्छ?",sd1a8dc951b2b6a98:"सूचीमा स्तम्भहरूको रूपमा कुन क्षेत्रहरू प्रदर्शन गर्ने छनौट गर्नुहोस्",sf9aee319a006c9b4:"थप",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Fn=Object.freeze(Object.defineProperty({__proto__:null,templates:qn},Symbol.toStringTag,{value:"Module"})),Un={s04ceadb276bbe149:"aan het laden.....",s226be12a5b1a27e8:"Lees de documentatie",s29e25f5e4622f847:"Dialoogvenster openen",s33f85f24c0f5f008:"Opslaan",s36cb242ac90353bc:"Velden",s41cb4006238ebd3b:"Bulkbewerking",s5e8250fb85d64c23:"sluit",s625ad019db843f94:"Gebruiken",sac83d7f9358b43db:u`${0} Lijst`,sb1bd536b63e9e995:"Privéveld: alleen ik kan de inhoud zien",sb59d68ed12d46377:"aan het laden",sbf1ca928ec1deb62:"Meer hulp nodig?",sd1a8dc951b2b6a98:"Kies welke velden u als kolommen in de lijst wilt weergeven",seafe6ef133ede7da:u`1 van ${0} laten zien`,sf9aee319a006c9b4:"Toevoegen",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,s9d51bfd93b5dbeca:"Show Archived"},Vn=Object.freeze(Object.defineProperty({__proto__:null,templates:Un},Symbol.toStringTag,{value:"Module"})),Bn={s226be12a5b1a27e8:"ਦਸਤਾਵੇਜ਼ ਪੜ੍ਹੋ",s33f85f24c0f5f008:"ਸੇਵ",s36cb242ac90353bc:"ਖੇਤਰ",s41cb4006238ebd3b:"ਥੋਕ ਸੰਪਾਦਨ",s5e8250fb85d64c23:"ਬੰਦ ਕਰੋ",s625ad019db843f94:"ਵਰਤੋਂ",sbf1ca928ec1deb62:"ਹੋਰ ਮਦਦ ਦੀ ਲੋੜ ਹੈ?",sd1a8dc951b2b6a98:"ਸੂਚੀ ਵਿੱਚ ਕਾਲਮ ਦੇ ਰੂਪ ਵਿੱਚ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਨ ਲਈ ਕਿਹੜੇ ਖੇਤਰ ਚੁਣੋ",sf9aee319a006c9b4:"ਸ਼ਾਮਲ ਕਰੋ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Hn=Object.freeze(Object.defineProperty({__proto__:null,templates:Bn},Symbol.toStringTag,{value:"Module"})),Gn={s226be12a5b1a27e8:"Przeczytaj dokumentację",s33f85f24c0f5f008:"Zapisać",s36cb242ac90353bc:"Pola",s41cb4006238ebd3b:"Edycja zbiorcza",s5e8250fb85d64c23:"Zamknij",s625ad019db843f94:"Posługiwać się",sbf1ca928ec1deb62:"Potrzebujesz pomocy?",sd1a8dc951b2b6a98:"Wybierz, które pola mają być wyświetlane jako kolumny na liście",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Wn=Object.freeze(Object.defineProperty({__proto__:null,templates:Gn},Symbol.toStringTag,{value:"Module"})),Kn={s226be12a5b1a27e8:"Leia a documentação",s33f85f24c0f5f008:"Salvar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edição em massa",s5e8250fb85d64c23:"Fechar",s625ad019db843f94:"Usar",sbf1ca928ec1deb62:"Precisa de mais ajuda?",sd1a8dc951b2b6a98:"Escolha quais campos exibir como colunas na lista",sf9aee319a006c9b4:"Adicionar",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Zn=Object.freeze(Object.defineProperty({__proto__:null,templates:Kn},Symbol.toStringTag,{value:"Module"})),Jn={s226be12a5b1a27e8:"Citiți documentația",s33f85f24c0f5f008:"Salvați",s36cb242ac90353bc:"Câmpuri",s41cb4006238ebd3b:"Editare masivă",s5e8250fb85d64c23:"Închide",s625ad019db843f94:"Utilizare",sbf1ca928ec1deb62:"Ai nevoie de mai mult ajutor?",sd1a8dc951b2b6a98:"Alegeți câmpurile care să fie afișate în coloane în listă",sf9aee319a006c9b4:"Adăuga",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Qn=Object.freeze(Object.defineProperty({__proto__:null,templates:Jn},Symbol.toStringTag,{value:"Module"})),Yn={s226be12a5b1a27e8:"Читать документацию",s33f85f24c0f5f008:"Сохранить",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Массовое редактирование",s5e8250fb85d64c23:"Закрыть",s625ad019db843f94:"Использовать",sbf1ca928ec1deb62:"Нужна дополнительная помощь?",sd1a8dc951b2b6a98:"Выберите, какие поля отображать как столбцы в списке",sf9aee319a006c9b4:"Добавить",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xn=Object.freeze(Object.defineProperty({__proto__:null,templates:Yn},Symbol.toStringTag,{value:"Module"})),er={s226be12a5b1a27e8:"Preberite dokumentacijo",s33f85f24c0f5f008:"Shrani",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Urejanje v velikem obsegu",s5e8250fb85d64c23:"Zapri",s625ad019db843f94:"Uporaba",sbf1ca928ec1deb62:"Potrebujete več pomoči?",sd1a8dc951b2b6a98:"Izberite, katera polja naj bodo prikazana kot stolpci na seznamu",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},tr=Object.freeze(Object.defineProperty({__proto__:null,templates:er},Symbol.toStringTag,{value:"Module"})),ir={s226be12a5b1a27e8:"Pročitajte dokumentaciju",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"masovno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristiti",sbf1ca928ec1deb62:"Treba vam više pomoći?",sd1a8dc951b2b6a98:"Izaberite koja polja da se prikazuju kao kolone na listi",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sr=Object.freeze(Object.defineProperty({__proto__:null,templates:ir},Symbol.toStringTag,{value:"Module"})),or={s04ceadb276bbe149:"Inapakia chaguo...",s226be12a5b1a27e8:"Soma nyaraka",s29e25f5e4622f847:"Fungua Kidirisha",s33f85f24c0f5f008:"Hifadhi",s36cb242ac90353bc:"Mashamba",s41cb4006238ebd3b:"Hariri kwa Wingi",s5e8250fb85d64c23:"Funga",s625ad019db843f94:"Tumia",s9d51bfd93b5dbeca:"Onyesha Kumbukumbu",sac83d7f9358b43db:u`Orodha ya${0}`,sb1bd536b63e9e995:"Sehemu ya Faragha: Ni mimi pekee ninayeweza kuona maudhui yake",sb59d68ed12d46377:"Inapakia",sbf1ca928ec1deb62:"Unahitaji msaada zaidi?",scb9a1ff437efbd2a:u`Chagua ${0} zote ungependa kusasisha kutoka kwenye orodha, na uzisasishe hapa chini.`,sd1a8dc951b2b6a98:"Chagua ni sehemu zipi zitaonyeshwa kama safu wima kwenye orodha",seafe6ef133ede7da:u`Inaonyesha 1 kati ya ${0}`,sf9aee319a006c9b4:"Ongeza",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},ar=Object.freeze(Object.defineProperty({__proto__:null,templates:or},Symbol.toStringTag,{value:"Module"})),nr={s226be12a5b1a27e8:"อ่านเอกสาร",s33f85f24c0f5f008:"บันทึก",s36cb242ac90353bc:"ฟิลด์",s41cb4006238ebd3b:"แก้ไขเป็นกลุ่ม",s5e8250fb85d64c23:"ปิด",s625ad019db843f94:"ใช้",sbf1ca928ec1deb62:"ต้องการความช่วยเหลือเพิ่มเติมหรือไม่?",sd1a8dc951b2b6a98:"เลือกฟิลด์ที่จะแสดงเป็นคอลัมน์ในรายการ",sf9aee319a006c9b4:"เพิ่ม",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rr=Object.freeze(Object.defineProperty({__proto__:null,templates:nr},Symbol.toStringTag,{value:"Module"})),lr={s226be12a5b1a27e8:"Basahin ang dokumentasyon",s33f85f24c0f5f008:"I-save",s36cb242ac90353bc:"Mga Field",s41cb4006238ebd3b:"Maramihang Pag-edit",s5e8250fb85d64c23:"Isara",s625ad019db843f94:"Gamitin",sbf1ca928ec1deb62:"Kailangan mo pa ba ng tulong?",sd1a8dc951b2b6a98:"Piliin kung aling mga field ang ipapakita bilang mga column sa listahan",sf9aee319a006c9b4:"Idagdag",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dr=Object.freeze(Object.defineProperty({__proto__:null,templates:lr},Symbol.toStringTag,{value:"Module"})),cr={s04ceadb276bbe149:"Seçenekler Yükleniyor...",s226be12a5b1a27e8:"Belgeleri oku",s29e25f5e4622f847:"İletişim Kutusunu Aç",s33f85f24c0f5f008:"Kaydet",s36cb242ac90353bc:"Alanlar",s41cb4006238ebd3b:"Toplu Düzenleme",s5e8250fb85d64c23:"Kapat",s625ad019db843f94:"Kullan",s9d51bfd93b5dbeca:"Arşivlenmiş Göster",sac83d7f9358b43db:u`${0} Listesi`,sb1bd536b63e9e995:"Özel Alan: İçeriğini sadece ben görebilirim",sb59d68ed12d46377:"Yükleniyor",sbf1ca928ec1deb62:"Daha fazla yardıma ihtiyacınız var mı?",scb9a1ff437efbd2a:u`Listeden güncellemek istediğiniz tüm ${0} 'i seçin ve aşağıda güncelleyin`,sd1a8dc951b2b6a98:"Listede Hangi Alanların Sütun Olarak Görüntüleneceğini Seçin",seafe6ef133ede7da:u`Gösteriliyor 1 of ${0}`,sf9aee319a006c9b4:"Ekle",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},ur=Object.freeze(Object.defineProperty({__proto__:null,templates:cr},Symbol.toStringTag,{value:"Module"})),hr={s226be12a5b1a27e8:"Прочитайте документацію",s33f85f24c0f5f008:"Зберегти",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Масове редагування",s5e8250fb85d64c23:"Закрити",s625ad019db843f94:"Використати",sbf1ca928ec1deb62:"Потрібна додаткова допомога?",sd1a8dc951b2b6a98:"Виберіть, яке поле відображати у вигляді стовпців у списку",sf9aee319a006c9b4:"Додати",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},pr=Object.freeze(Object.defineProperty({__proto__:null,templates:hr},Symbol.toStringTag,{value:"Module"})),fr={s226be12a5b1a27e8:"Đọc tài liệu",s33f85f24c0f5f008:"Lưu",s36cb242ac90353bc:"Trường",s41cb4006238ebd3b:"Chỉnh sửa Hàng loạt",s5e8250fb85d64c23:"Đóng",s625ad019db843f94:"Sử dụng",sbf1ca928ec1deb62:"Bạn cần trợ giúp thêm?",sd1a8dc951b2b6a98:"Chọn các trường để hiển thị dưới dạng cột trong danh sách",sf9aee319a006c9b4:"Bổ sung",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},br=Object.freeze(Object.defineProperty({__proto__:null,templates:fr},Symbol.toStringTag,{value:"Module"})),gr={s226be12a5b1a27e8:"阅读文档",s33f85f24c0f5f008:"保存",s36cb242ac90353bc:"字段",s41cb4006238ebd3b:"批量编辑",s5e8250fb85d64c23:"关",s625ad019db843f94:"使用",sbf1ca928ec1deb62:"需要更多帮助吗?",sd1a8dc951b2b6a98:"选择哪些字段要在列表中显示为列",sf9aee319a006c9b4:"添加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:u`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:u`${0} List`,seafe6ef133ede7da:u`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},mr=Object.freeze(Object.defineProperty({__proto__:null,templates:gr},Symbol.toStringTag,{value:"Module"})),vr={s04ceadb276bbe149:"正在載入選項...",s226be12a5b1a27e8:"閱讀文檔",s29e25f5e4622f847:"開啟對話視窗",s33f85f24c0f5f008:"儲存",s36cb242ac90353bc:"欄位",s41cb4006238ebd3b:"大量編輯",s5e8250fb85d64c23:"關",s625ad019db843f94:"使用",s9d51bfd93b5dbeca:"顯示已儲存",sac83d7f9358b43db:u`${0} 清單`,sb1bd536b63e9e995:"私人欄位:只有我可以看見內容",sb59d68ed12d46377:"載入中",sbf1ca928ec1deb62:"需要更多幫助嗎?",scb9a1ff437efbd2a:u`從清單中選取要更新的項目${0},並在下面進行更新`,sd1a8dc951b2b6a98:"選擇哪些欄位要顯示為列表中的直行",seafe6ef133ede7da:u`第1頁 (共${0}頁)`,sf9aee319a006c9b4:"新增",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yr=Object.freeze(Object.defineProperty({__proto__:null,templates:vr},Symbol.toStringTag,{value:"Module"}));$.ApiService=mt,$.ComponentService=Ce,$.DtAlert=ks,$.DtBase=N,$.DtButton=yi,$.DtChurchHealthCircle=cs,$.DtConnection=us,$.DtCopyText=ps,$.DtDate=Dt,$.DtDatetime=fs,$.DtFormBase=z,$.DtIcon=ns,$.DtLabel=_i,$.DtList=Ss,$.DtLocation=bs,$.DtLocationMap=vs,$.DtMapModal=ms,$.DtModal=gs,$.DtMultiSelect=We,$.DtMultiSelectButtonGroup=xs,$.DtMultiText=$s,$.DtNumberField=ys,$.DtSingleSelect=ws,$.DtTags=Oe,$.DtText=zt,$.DtTextArea=_s,$.DtTile=Ts,$.DtToggle=ds,$.DtUsersConnection=hs,$.version=Ua,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}); + `}}window.customElements.define("dt-tile",Ao);class Le{get api(){return this._api}constructor(e,t,i,o="wp-json"){this.postType=e,this.postId=t,this.nonce=i,this.debounceTimers={},this._api=new vi(this.nonce,o),this.apiRoot=this._api.apiRoot,this.autoSaveComponents=["dt-connection","dt-users-connection","dt-date","dt-datetime","dt-location","dt-location-map","dt-multi-select","dt-number","dt-single-select","dt-tags","dt-text","dt-textarea","dt-toggle","dt-multi-text","dt-multi-select-button-group","dt-button","dt-church-health-circle"],this.dynamicLoadComponents=["dt-connection","dt-tags","dt-modal","dt-button","dt-location","dt-users-connection"]}initialize(){this.postId&&this.enableAutoSave(),this.attachLoadEvents(),this.attachFileUploadEvents()}async attachLoadEvents(e){const t=document.querySelectorAll(e||this.dynamicLoadComponents.join(","));t&&t.forEach(i=>{i.dataset.eventDtGetData||(i.addEventListener("dt:get-data",this.handleGetDataEvent.bind(this)),i.dataset.eventDtGetData=!0)})}async checkDuplicates(e,t){const i=document.querySelector("dt-modal.duplicate-detected");if(i){const o=i.shadowRoot.querySelector(".duplicates-detected-button");o&&(o.style.display="none");const a=await this._api.checkDuplicateUsers(this.postType,this.postId);t&&a.ids.length>0&&o&&(o.style.display="block")}}enableAutoSave(e){const t=document.querySelectorAll(e||this.autoSaveComponents.join(","));t&&t.forEach(i=>{i.addEventListener("change",this.handleChangeEvent.bind(this))})}attachFileUploadEvents(e){const t=document.querySelectorAll(e||"dt-file-upload");t&&t.forEach(i=>{i.dataset.eventDtUpload||(i.addEventListener("dt:upload",this.handleUploadEvent.bind(this)),i.addEventListener("dt:delete-file",this.handleDeleteFileEvent.bind(this)),i.addEventListener("dt:rename-file",this.handleRenameFileEvent.bind(this)),i.addEventListener("dt:download-file",this.handleDownloadFileEvent.bind(this)),i.dataset.eventDtUpload=!0)})}async handleGetDataEvent(e){const t=e.detail;if(t){const{field:i,query:o,onSuccess:a,onError:r}=t;try{const n=e.target.tagName.toLowerCase();let l=[];switch(n){case"dt-button":l=await this._api.getContactInfo(this.postType,this.postId);break;case"dt-connection":{const d=t.postType||this.postType,u=await this._api.listPostsCompact(d,o),h={...u,posts:u.posts.filter(g=>g.ID!==parseInt(this.postId,10))};h!=null&&h.posts&&(l=Le.convertApiValue("dt-connection",h==null?void 0:h.posts));break}case"dt-users-connection":{const d=t.postType||this.postType,u=await this._api.searchUsers(d,o),h={...u,posts:u.filter(g=>g.ID!==parseInt(this.postId,10))};h!=null&&h.posts&&(l=Le.convertApiValue("dt-users-connection",h==null?void 0:h.posts));break}case"dt-location":{l=await this._api.getLocations(this.postType,i,t.filter,o),l=l.location_grid.map(d=>({id:d.ID,label:d.name}));break}case"dt-tags":default:l=await this._api.getMultiSelectValues(this.postType,i,o),l=l.map(d=>({id:d,label:d}));break}a(l)}catch(n){r(n)}}}async handleChangeEvent(e){const t=e.detail;if(t){const{field:i,newValue:o,oldValue:a,remove:r}=t,n=e.target.tagName.toLowerCase(),l=Le.convertValue(n,o,a);if(e.target.removeAttribute("saved"),e.target.setAttribute("loading",!0),n==="dt-number"){const d=`${this.postType}-${this.postId}-${i}`;this.debounce(d,async()=>{try{const u=await this._api.updatePost(this.postType,this.postId,{[i]:l});document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:u,field:i,value:l,component:n}})),e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(u){console.error(u),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",u.message||u.toString())}},1e3)}else try{const d={[i]:l};if(n==="dt-location-map"){const h=l.values.filter(g=>!g.lng||!g.lat);d[i].values=l.values.filter(g=>g.lng&&g.lat),d.contact_address=h,d.contact_address.length===0&&delete d.contact_address,d[i].values.length===0&&delete d[i]}const u=await this._api.updatePost(this.postType,this.postId,d);if(document.dispatchEvent(new CustomEvent("dt:post:update",{detail:{response:u,field:i,value:l,component:n}})),n==="dt-location-map"){const h=e.target;h.value=u[i]}e.target.removeAttribute("loading"),e.target.setAttribute("error",""),e.target.setAttribute("saved",!0)}catch(d){console.error(d),e.target.removeAttribute("loading"),e.target.setAttribute("invalid",!0),e.target.setAttribute("error",d.message||d.toString())}}}async handleUploadEvent(e){const t=e.detail;if(!t)return;const{files:i,metaKey:o,keyPrefix:a,onSuccess:r,onError:n}=t,l=e.target;l.setAttribute("loading",!0),l.removeAttribute("saved"),l.removeAttribute("error");try{const d=await this._api.uploadFiles(this.postType,this.postId,i,o,a||""),h=(await this._api.getPost(this.postType,this.postId))[o]||[];r&&r({result:d,fieldValue:h})}catch(d){l.setAttribute("error",d.message||"Upload failed"),n&&n(d)}finally{l.removeAttribute("loading")}}async handleDeleteFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,metaKey:o,onSuccess:a,onError:r}=t,n=e.target;n.setAttribute("loading",!0),n.removeAttribute("saved"),n.removeAttribute("error");try{await this._api.deleteFile(this.postType,this.postId,o,i),a&&a()}catch(l){n.setAttribute("error",l.message||"Delete failed"),r&&r(l)}finally{n.removeAttribute("loading")}}async handleRenameFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,newName:o,metaKey:a,onSuccess:r,onError:n}=t,l=e.target;l.setAttribute("loading",!0),l.removeAttribute("saved"),l.removeAttribute("error");try{const d=await this._api.renameFile(this.postType,this.postId,a,i,o);r&&r(d)}catch(d){l.setAttribute("error",d.message||"Rename failed"),n&&n(d)}finally{l.removeAttribute("loading")}}async handleDownloadFileEvent(e){const t=e.detail;if(!t)return;const{fileKey:i,fileName:o,metaKey:a,onSuccess:r,onError:n}=t,l=e.target;try{const d=await this._api.downloadFile(this.postType,this.postId,a,i),u=window.URL.createObjectURL(d),h=document.createElement("a");h.href=u,h.download=o||"download",document.body.appendChild(h),h.click(),document.body.removeChild(h),window.URL.revokeObjectURL(u),r&&r()}catch(d){l.setAttribute("error",d.message||"Download failed"),n&&n(d)}}debounce(e,t,i){this.debounceTimers[e]&&clearTimeout(this.debounceTimers[e]),this.debounceTimers[e]=setTimeout(()=>{t()},i)}static convertApiValue(e,t){let i=t;switch(e){case"dt-connection":i=t.map(o=>({id:o.ID,label:o.name??o.post_title,link:o.permalink,status:o.status}));break;case"dt-users-connection":t&&!Array.isArray(t)&&(t.id||t.ID)?i=[{id:t.id||t.ID,label:t.display,avatar:t.avatar||""}]:Array.isArray(t)&&(i=t.map(o=>({id:o.id||o.ID,label:o.display||o.name,avatar:o.avatar||""})));break}return i}static convertValue(e,t,i=null){let o=t;if(t)switch(e.toLowerCase()){case"dt-toggle":typeof t=="string"&&(o=t.toLowerCase()==="true");break;case"dt-church-health-circle":case"dt-multi-select":case"dt-multi-select-button-group":case"dt-tags":typeof t=="string"&&(o=[t]),o={values:o.map(r=>{if(typeof r=="string"){const l={value:r};return r.startsWith("-")&&(l.delete=!0,l.value=r.substring(1)),l}const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-users-connection":{const r=[],n=o.filter(d=>!d.delete);if(n.length<=1){o=n.length===1?parseInt(n[0].id,10):"";break}const l=new Map((i||[]).map(d=>[d.id,d]));for(const d of o){const u=l.get(d.id),h={id:d.id,changes:{}};if(u){let g=!1;const y=new Set([...Object.keys(u),...Object.keys(d)]);for(const _ of y)d[_]!==u[_]&&(h.changes[_]=Object.prototype.hasOwnProperty.call(d,_)?d[_]:void 0,g=!0);if(g){r.push(h);break}}else{h.changes={...d},r.push(h);break}}o=r[0].id;break}case"dt-connection":typeof t=="string"&&(o=[{id:t}]),o={values:o.map(r=>{const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-location":const a=new Set((i||[]).map(r=>r.id));typeof t=="string"?o=[{id:t}]:o=t.filter(r=>!(a.has(r.id)&&!r.delete)),o={values:o.map(r=>{const n={value:r.id};return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-location-map":if(o=t.filter(r=>!((i||[]).includes(r)&&!r.delete)),i)for(const r of i)t.some(l=>r.id&&l.id&&r.id===l.id||r.key&&l.key&&r.key===l.key&&(!l.lat||!l.lng))||(r.delete=!0,o.push(r));o={values:o.map(r=>{const n=r;return r.delete&&(n.delete=r.delete),n}),force_values:!1};break;case"dt-multi-text":Array.isArray(t)?o=t.map(r=>{const n={...r};return delete n.tempKey,n}):typeof t=="string"&&(o=[{value:t}]);break}return o}static valueArrayDiff(e,t){const i={value1:[],value2:[]};if(Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.length>0&&typeof e[0]!="object")return i.value1=e.filter(n=>!t.includes(n)),i.value2=t.filter(n=>!e.includes(n)),i;const o=n=>JSON.stringify(n),a=new Map(e.map(n=>[o(n),n])),r=new Map(t.map(n=>[o(n),n]));for(const[n,l]of a)r.has(n)||i.value1.push(l);for(const[n,l]of r)a.has(n)||i.value2.push(l);return i}}const Ua="0.8.9",Va={s226be12a5b1a27e8:"ሰነዶቹን ያንብቡ",s33f85f24c0f5f008:"አስቀምጥ",s36cb242ac90353bc:"መስኮች",s41cb4006238ebd3b:"የጅምላ አርትዕ",s5e8250fb85d64c23:"ገጠመ",s625ad019db843f94:"ተጠቀም",sac83d7f9358b43db:m`${0} ዝርዝር`,sbf1ca928ec1deb62:"ተጨማሪ እገዛ ይፈልጋሉ?",sd1a8dc951b2b6a98:"በዝርዝሩ ውስጥ እንደ ዓምዶች የትኞቹን መስኮች እንደሚያሳዩ ይምረጡ",sf9aee319a006c9b4:"አክል",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ba=Object.freeze(Object.defineProperty({__proto__:null,templates:Va},Symbol.toStringTag,{value:"Module"})),Ha={s04ceadb276bbe149:"خيارات التحميل...",s226be12a5b1a27e8:"اقرأ الوثائق",s29e25f5e4622f847:"افتح",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"غلق",s625ad019db843f94:"استخدام",s9d51bfd93b5dbeca:"عرض المحفوظات",sac83d7f9358b43db:m`${0}قائمة الأعضاء`,sb1bd536b63e9e995:"المجال الخاص: أنا فقط أستطيع رؤية محتواه",sb59d68ed12d46377:"جار التحميل",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",scb9a1ff437efbd2a:m`حَدِّد جميع ${0} التي تريد تحديثها من القائمة ، وقم بتحديثها أدناه`,sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",seafe6ef133ede7da:m`عرض 1 of ${0}`,sf9aee319a006c9b4:"لأضف",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Ka=Object.freeze(Object.defineProperty({__proto__:null,templates:Ha},Symbol.toStringTag,{value:"Module"})),Wa={s226be12a5b1a27e8:"اقرأ الوثائق",s33f85f24c0f5f008:"حفظ",s36cb242ac90353bc:"مجالات",s41cb4006238ebd3b:"التحرير بالجملة",s5e8250fb85d64c23:"أغلق",s625ad019db843f94:"استخدام",sbf1ca928ec1deb62:"هل تريد المزيد من المساعدة؟",sd1a8dc951b2b6a98:"اختر المجالات المراد عرضها كأعمدة في القائمة",sf9aee319a006c9b4:"إضافة",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ga=Object.freeze(Object.defineProperty({__proto__:null,templates:Wa},Symbol.toStringTag,{value:"Module"})),Za={s226be12a5b1a27e8:"Прочетете документацията",s33f85f24c0f5f008:"Запазете",s36cb242ac90353bc:"Полета",s41cb4006238ebd3b:"Групово редактиране",s5e8250fb85d64c23:"Близо",s625ad019db843f94:"Използвайте",sbf1ca928ec1deb62:"Имате нужда от повече помощ?",sd1a8dc951b2b6a98:"Изберете кои полета да се показват като колони в списъка",sf9aee319a006c9b4:"Добавяне",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ja=Object.freeze(Object.defineProperty({__proto__:null,templates:Za},Symbol.toStringTag,{value:"Module"})),Qa={s226be12a5b1a27e8:"নথিপত্রাদি পাঠ করুন",s33f85f24c0f5f008:"সংরক্ষণ করুন",s36cb242ac90353bc:"ক্ষেত্র",s41cb4006238ebd3b:"বাল্ক এডিট",s5e8250fb85d64c23:"বন্ধ",s625ad019db843f94:"ব্যবহার",sbf1ca928ec1deb62:"আরও সাহায্য প্রয়োজন?",sd1a8dc951b2b6a98:"তালিকার কলাম হিসাবে কোন ক্ষেত্রগুলি প্রদর্শিত হবে তা চয়ন করুন",sf9aee319a006c9b4:"অ্যাড",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xa=Object.freeze(Object.defineProperty({__proto__:null,templates:Qa},Symbol.toStringTag,{value:"Module"})),Ya={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitajte dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate više pomoći?",scb9a1ff437efbd2a:m`Odaberite sve ${0} koje želite ažurirati sa liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Odaberite koja polja će se prikazati kao kolone na listi",seafe6ef133ede7da:m`Prikazuje se 1 od ${0}`,sf9aee319a006c9b4:"Dodati",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},er=Object.freeze(Object.defineProperty({__proto__:null,templates:Ya},Symbol.toStringTag,{value:"Module"})),tr={s226be12a5b1a27e8:"Přečtěte si dokumentaci",s33f85f24c0f5f008:"Uložit",s36cb242ac90353bc:"Pole",s41cb4006238ebd3b:"Hromadná úprava",s5e8250fb85d64c23:"Zavřít",s625ad019db843f94:"Použití",sbf1ca928ec1deb62:"Potřebujete další pomoc?",sd1a8dc951b2b6a98:"Vyberte pole, která chcete v seznamu zobrazit jako sloupce",sf9aee319a006c9b4:"Přidat",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},ir=Object.freeze(Object.defineProperty({__proto__:null,templates:tr},Symbol.toStringTag,{value:"Module"})),or={s226be12a5b1a27e8:"Lesen Sie die Dokumentation",s33f85f24c0f5f008:"Speichern",s36cb242ac90353bc:"Felder",s41cb4006238ebd3b:"Im Stapel bearbeiten",s5e8250fb85d64c23:"Schließen",s625ad019db843f94:"Verwenden",sbf1ca928ec1deb62:"Benötigen Sie weitere Hilfe?",sd1a8dc951b2b6a98:"Wählen Sie aus, welche Felder in der Liste als Spalte angezeigt werden sollen",sf9aee319a006c9b4:"Hinzufügen",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},sr=Object.freeze(Object.defineProperty({__proto__:null,templates:or},Symbol.toStringTag,{value:"Module"})),ar={s226be12a5b1a27e8:"Διαβάστε την τεκμηρίωση",s33f85f24c0f5f008:"Αποθήκευση",s36cb242ac90353bc:"Πεδία",s41cb4006238ebd3b:"Μαζική Επεξεργασία",s5e8250fb85d64c23:"Κλείσιμο",s625ad019db843f94:"Χρήση",sbf1ca928ec1deb62:"Χρειάζεστε περισσότερη βοήθεια;",sd1a8dc951b2b6a98:"Επιλέξτε ποια πεδία θα εμφανίζονται ως στήλες στη λίστα",sf9aee319a006c9b4:"Προσθήκη",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},rr=Object.freeze(Object.defineProperty({__proto__:null,templates:ar},Symbol.toStringTag,{value:"Module"})),nr={sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",sf9aee319a006c9b4:"Add",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog",s33f85f24c0f5f008:"Save",s49730f3d5751a433:"Loading...",s625ad019db843f94:"Use",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},lr=Object.freeze(Object.defineProperty({__proto__:null,templates:nr},Symbol.toStringTag,{value:"Module"})),dr={s8900c9de2dbae68b:"No hay opciones disponibles",sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sf9aee319a006c9b4:"Añadir",sd1a8dc951b2b6a98:"Choose which fields to display as columns in the list",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sb9b8c412407d5691:"This is where the bulk edit form will go.",sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s36cb242ac90353bc:"Fields",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading",sbf1ca928ec1deb62:"Need more help?",s226be12a5b1a27e8:"Read the documentation",s5e8250fb85d64c23:"Close",s29e25f5e4622f847:"Open Dialog"},cr=Object.freeze(Object.defineProperty({__proto__:null,templates:dr},Symbol.toStringTag,{value:"Module"})),ur={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Leer la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:m`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:m`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},hr=Object.freeze(Object.defineProperty({__proto__:null,templates:ur},Symbol.toStringTag,{value:"Module"})),pr={s04ceadb276bbe149:"Cargando opciones...",s226be12a5b1a27e8:"Lee la documentación",s29e25f5e4622f847:"Abrir Diálogo",s33f85f24c0f5f008:"Guardar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edición masiva",s5e8250fb85d64c23:"Cerrar",s625ad019db843f94:"Usar",s9d51bfd93b5dbeca:"Mostrar archivado",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privado: Solo yo puedo ver su contenido",sb59d68ed12d46377:"Cargando",sbf1ca928ec1deb62:"¿Necesitas más ayuda?",scb9a1ff437efbd2a:m`Selecciona todos los ${0} que quieras actualizar del listado y actualízalos debajo`,sd1a8dc951b2b6a98:"Elige qué campos mostrar como columnas en el listado",seafe6ef133ede7da:m`Mostrando 1 de ${0}`,sf9aee319a006c9b4:"Agregar",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},fr=Object.freeze(Object.defineProperty({__proto__:null,templates:pr},Symbol.toStringTag,{value:"Module"})),br={s04ceadb276bbe149:"در حال بارگیری گزینه‌ها...",s226be12a5b1a27e8:"راهنمای سایت",s29e25f5e4622f847:"جعبه محاوره ای را باز کنید",s33f85f24c0f5f008:"صرفه جویی",s36cb242ac90353bc:"حوزه‌ها",s41cb4006238ebd3b:"ویرایش انبوه",s5e8250fb85d64c23:"بستن",s625ad019db843f94:"استفاده کنید",s9d51bfd93b5dbeca:"نمایش بایگانی شده",sac83d7f9358b43db:m`لیست ${0}`,sb1bd536b63e9e995:"زمینه خصوصی: فقط من می توانم محتوای آن را داشته باشم",sb59d68ed12d46377:"بارگیری",sbf1ca928ec1deb62:"آیا به راهنمایی بیشتری نیاز دارید؟",scb9a1ff437efbd2a:m`همۀ ${0} مورد نظر برای به روزرسانی را از لیست انتخاب کنید و آن‌ها را در زیر به روز کنید`,sd1a8dc951b2b6a98:"انتخاب کنید که کدام یک از حوزه‌ها به‌عنوان ستون در لیست نمایش داده شوند",seafe6ef133ede7da:m`نمایش 1 از ${0}`,sf9aee319a006c9b4:"افزودن",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},mr=Object.freeze(Object.defineProperty({__proto__:null,templates:br},Symbol.toStringTag,{value:"Module"})),gr={s04ceadb276bbe149:"Chargement les options...",s226be12a5b1a27e8:"Lire la documentation",s29e25f5e4622f847:"Ouvrir la boîte de dialogue",s33f85f24c0f5f008:"sauver",s36cb242ac90353bc:"Champs",s41cb4006238ebd3b:"Modification groupée",s5e8250fb85d64c23:"Fermer",s625ad019db843f94:"Utiliser",s9d51bfd93b5dbeca:"Afficher Archivé",sac83d7f9358b43db:m`${0} Liste`,sb1bd536b63e9e995:"Champ privé : je suis le seul à voir son contenu",sb59d68ed12d46377:"Chargement",sbf1ca928ec1deb62:"Besoin d'aide ?",scb9a1ff437efbd2a:m`Sélectionnez tous les ${0} que vous souhaitez mettre à jour dans la liste et mettez-les à jour ci-dessous`,sd1a8dc951b2b6a98:"Choisissez les champs à afficher sous forme de colonnes dans la liste",seafe6ef133ede7da:m`Affichage de 1 sur ${0}`,sf9aee319a006c9b4:"Ajouter",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},vr=Object.freeze(Object.defineProperty({__proto__:null,templates:gr},Symbol.toStringTag,{value:"Module"})),yr={s226be12a5b1a27e8:"डॉक्यूमेंटेशन पढ़ें",s33f85f24c0f5f008:"बचाना",s36cb242ac90353bc:"खेत",s41cb4006238ebd3b:"थोक संपादित",s5e8250fb85d64c23:"बंद",s625ad019db843f94:"उपयोग",sbf1ca928ec1deb62:"क्या और मदद चाहिये?",sd1a8dc951b2b6a98:"सूची में कॉलम के रूप में प्रदर्शित करने के लिए कौन से फ़ील्ड चुनें",sf9aee319a006c9b4:"जोडें",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},_r=Object.freeze(Object.defineProperty({__proto__:null,templates:yr},Symbol.toStringTag,{value:"Module"})),wr={s04ceadb276bbe149:"Učitavanje opcija...",s226be12a5b1a27e8:"Pročitaj dokumentaciju",s29e25f5e4622f847:"Otvorite dijalog",s33f85f24c0f5f008:"Spremi",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Skupno uređivanje",s5e8250fb85d64c23:"Zatvoriti",s625ad019db843f94:"Koristi",s9d51bfd93b5dbeca:"Prikaži arhivirano",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Privatno polje: Samo ja mogu vidjeti njegov sadržaj",sb59d68ed12d46377:"Učitavanje",sbf1ca928ec1deb62:"Trebate li pomoć?",scb9a1ff437efbd2a:m`Odaberite sve${0}koje želite ažurirati s liste i ažurirajte ih ispod`,sd1a8dc951b2b6a98:"Izaberite polja koja će se prikazivati kao stupci na popisu",seafe6ef133ede7da:m`Prikazuje se 1 od${0}`,sf9aee319a006c9b4:"Dodaj",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},$r=Object.freeze(Object.defineProperty({__proto__:null,templates:wr},Symbol.toStringTag,{value:"Module"})),xr={s226be12a5b1a27e8:"Olvasd el a dokumentációt",s33f85f24c0f5f008:"Megment",s36cb242ac90353bc:"Mezők",s41cb4006238ebd3b:"Tömeges Szerkesztés",s5e8250fb85d64c23:"Bezár",s625ad019db843f94:"Használ",sbf1ca928ec1deb62:"Több segítség szükséges?",sd1a8dc951b2b6a98:"Válassza ki, melyik mezők jelenjenek meg oszlopként a listában",sf9aee319a006c9b4:"Hozzáadás",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},kr=Object.freeze(Object.defineProperty({__proto__:null,templates:xr},Symbol.toStringTag,{value:"Module"})),Sr={s226be12a5b1a27e8:"Bacalah dokumentasi",s33f85f24c0f5f008:"Simpan",s36cb242ac90353bc:"Larik",s41cb4006238ebd3b:"Edit Massal",s5e8250fb85d64c23:"Menutup",s625ad019db843f94:"Gunakan",sbf1ca928ec1deb62:"Perlukan bantuan lagi?",sd1a8dc951b2b6a98:"Pilih larik mana yang akan ditampilkan sebagai kolom dalam daftar",sf9aee319a006c9b4:"Tambah",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Er=Object.freeze(Object.defineProperty({__proto__:null,templates:Sr},Symbol.toStringTag,{value:"Module"})),Ar={s04ceadb276bbe149:"Caricando opzioni...",s226be12a5b1a27e8:"Leggi la documentazione",s29e25f5e4622f847:"Apri Dialogo",s33f85f24c0f5f008:"Salvare",s36cb242ac90353bc:"Campi",s41cb4006238ebd3b:"Modifica in blocco",s5e8250fb85d64c23:"Chiudi",s625ad019db843f94:"Uso",s9d51bfd93b5dbeca:"Visualizza Archiviati",sac83d7f9358b43db:m`${0} Lista`,sb1bd536b63e9e995:"Campo Privato: Solo io posso vedere i suoi contenuti",sb59d68ed12d46377:"Caricando",sbf1ca928ec1deb62:"Hai bisogno di ulteriore assistenza?",scb9a1ff437efbd2a:m`Seleziona tutti i ${0}vuoi aggiornare dalla lista e aggiornali sotto`,sd1a8dc951b2b6a98:"Scegli quali campi visualizzare come colonne nell'elenco",seafe6ef133ede7da:m`Visualizzando 1 di ${0}`,sf9aee319a006c9b4:"Inserisci",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},Or=Object.freeze(Object.defineProperty({__proto__:null,templates:Ar},Symbol.toStringTag,{value:"Module"})),Tr={s226be12a5b1a27e8:"ドキュメントを読む",s33f85f24c0f5f008:"セーブ",s36cb242ac90353bc:"田畑",s41cb4006238ebd3b:"一括編集",s5e8250fb85d64c23:"閉じる",s625ad019db843f94:"使用する",sbf1ca928ec1deb62:"もっと助けが必要ですか?",sd1a8dc951b2b6a98:"リストの列として表示するフィールドを選択します",sf9aee319a006c9b4:"追加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Cr=Object.freeze(Object.defineProperty({__proto__:null,templates:Tr},Symbol.toStringTag,{value:"Module"})),Lr={s226be12a5b1a27e8:"문서 읽기",s33f85f24c0f5f008:"구하다",s36cb242ac90353bc:"필드",s41cb4006238ebd3b:"대량 수정",s5e8250fb85d64c23:"닫기",s625ad019db843f94:"사용",sbf1ca928ec1deb62:"더 많은 도움이 필요하신가요?",sd1a8dc951b2b6a98:"목록에서 어떤 필드를 표시할지 고르세요",sf9aee319a006c9b4:"추가",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Ir=Object.freeze(Object.defineProperty({__proto__:null,templates:Lr},Symbol.toStringTag,{value:"Module"})),Pr={s226be12a5b1a27e8:"Прочитај ја документацијата",s33f85f24c0f5f008:"Зачувај",s36cb242ac90353bc:"Полиња",s41cb4006238ebd3b:"Уреди повеќе",s5e8250fb85d64c23:"Затвори",s625ad019db843f94:"Користи",sbf1ca928ec1deb62:"Дали ти треба повеќе помош?",sd1a8dc951b2b6a98:"Избери кои полиња да се прикажат како колони во листата",sf9aee319a006c9b4:"Додади",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Mr=Object.freeze(Object.defineProperty({__proto__:null,templates:Pr},Symbol.toStringTag,{value:"Module"})),jr={s226be12a5b1a27e8:"कागदपत्रे वाचा.",s33f85f24c0f5f008:"जतन करा",s36cb242ac90353bc:"क्षेत्रे",s41cb4006238ebd3b:"बल्क एडिट करा",s5e8250fb85d64c23:"बंद करा",s625ad019db843f94:"वापर",sbf1ca928ec1deb62:"अधिक मदत आवश्यक आहे का?",sd1a8dc951b2b6a98:"यादीत कोणती क्षेत्रे स्तंभ म्हणून दर्शवली जावीत हे निवडा",sf9aee319a006c9b4:"समाविष्ट करा",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},zr=Object.freeze(Object.defineProperty({__proto__:null,templates:jr},Symbol.toStringTag,{value:"Module"})),Fr={s226be12a5b1a27e8:"စာရွက်စာတမ်းများကိုဖတ်ပါ",s33f85f24c0f5f008:"သိမ်းဆည်းပါ",s36cb242ac90353bc:"နယ်ပယ်ဒေသများ",s5e8250fb85d64c23:"ပိတ်သည်",s625ad019db843f94:"အသုံးပြုပါ",sbf1ca928ec1deb62:"နောက်ထပ်အကူအညီလိုပါသလား။",sd1a8dc951b2b6a98:"စာရင်းရှိကော်လံများအနေဖြင့်ဖော်ပြမည့်မည်သည့်နယ်ပယ်ဒေသများကိုရွေးချယ်ပါ",sf9aee319a006c9b4:"ထည့်ပါ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s41cb4006238ebd3b:"Bulk Edit",s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Dr=Object.freeze(Object.defineProperty({__proto__:null,templates:Fr},Symbol.toStringTag,{value:"Module"})),Rr={s226be12a5b1a27e8:"कागजात पढ्नुहोस्",s33f85f24c0f5f008:"सुरक्षित गर्नुहोस",s36cb242ac90353bc:"क्षेत्रहरू",s41cb4006238ebd3b:"थोक सम्पादन",s5e8250fb85d64c23:"बन्द गर्नुहोस",s625ad019db843f94:"प्रयोग गर्नुहोस्",sbf1ca928ec1deb62:"थप मद्दत चाहिन्छ?",sd1a8dc951b2b6a98:"सूचीमा स्तम्भहरूको रूपमा कुन क्षेत्रहरू प्रदर्शन गर्ने छनौट गर्नुहोस्",sf9aee319a006c9b4:"थप",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Nr=Object.freeze(Object.defineProperty({__proto__:null,templates:Rr},Symbol.toStringTag,{value:"Module"})),qr={s04ceadb276bbe149:"aan het laden.....",s226be12a5b1a27e8:"Lees de documentatie",s29e25f5e4622f847:"Dialoogvenster openen",s33f85f24c0f5f008:"Opslaan",s36cb242ac90353bc:"Velden",s41cb4006238ebd3b:"Bulkbewerking",s5e8250fb85d64c23:"sluit",s625ad019db843f94:"Gebruiken",sac83d7f9358b43db:m`${0} Lijst`,sb1bd536b63e9e995:"Privéveld: alleen ik kan de inhoud zien",sb59d68ed12d46377:"aan het laden",sbf1ca928ec1deb62:"Meer hulp nodig?",sd1a8dc951b2b6a98:"Kies welke velden u als kolommen in de lijst wilt weergeven",seafe6ef133ede7da:m`1 van ${0} laten zien`,sf9aee319a006c9b4:"Toevoegen",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,s9d51bfd93b5dbeca:"Show Archived"},Ur=Object.freeze(Object.defineProperty({__proto__:null,templates:qr},Symbol.toStringTag,{value:"Module"})),Vr={s226be12a5b1a27e8:"ਦਸਤਾਵੇਜ਼ ਪੜ੍ਹੋ",s33f85f24c0f5f008:"ਸੇਵ",s36cb242ac90353bc:"ਖੇਤਰ",s41cb4006238ebd3b:"ਥੋਕ ਸੰਪਾਦਨ",s5e8250fb85d64c23:"ਬੰਦ ਕਰੋ",s625ad019db843f94:"ਵਰਤੋਂ",sbf1ca928ec1deb62:"ਹੋਰ ਮਦਦ ਦੀ ਲੋੜ ਹੈ?",sd1a8dc951b2b6a98:"ਸੂਚੀ ਵਿੱਚ ਕਾਲਮ ਦੇ ਰੂਪ ਵਿੱਚ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਨ ਲਈ ਕਿਹੜੇ ਖੇਤਰ ਚੁਣੋ",sf9aee319a006c9b4:"ਸ਼ਾਮਲ ਕਰੋ",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Br=Object.freeze(Object.defineProperty({__proto__:null,templates:Vr},Symbol.toStringTag,{value:"Module"})),Hr={s226be12a5b1a27e8:"Przeczytaj dokumentację",s33f85f24c0f5f008:"Zapisać",s36cb242ac90353bc:"Pola",s41cb4006238ebd3b:"Edycja zbiorcza",s5e8250fb85d64c23:"Zamknij",s625ad019db843f94:"Posługiwać się",sbf1ca928ec1deb62:"Potrzebujesz pomocy?",sd1a8dc951b2b6a98:"Wybierz, które pola mają być wyświetlane jako kolumny na liście",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Kr=Object.freeze(Object.defineProperty({__proto__:null,templates:Hr},Symbol.toStringTag,{value:"Module"})),Wr={s226be12a5b1a27e8:"Leia a documentação",s33f85f24c0f5f008:"Salvar",s36cb242ac90353bc:"Campos",s41cb4006238ebd3b:"Edição em massa",s5e8250fb85d64c23:"Fechar",s625ad019db843f94:"Usar",sbf1ca928ec1deb62:"Precisa de mais ajuda?",sd1a8dc951b2b6a98:"Escolha quais campos exibir como colunas na lista",sf9aee319a006c9b4:"Adicionar",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Gr=Object.freeze(Object.defineProperty({__proto__:null,templates:Wr},Symbol.toStringTag,{value:"Module"})),Zr={s226be12a5b1a27e8:"Citiți documentația",s33f85f24c0f5f008:"Salvați",s36cb242ac90353bc:"Câmpuri",s41cb4006238ebd3b:"Editare masivă",s5e8250fb85d64c23:"Închide",s625ad019db843f94:"Utilizare",sbf1ca928ec1deb62:"Ai nevoie de mai mult ajutor?",sd1a8dc951b2b6a98:"Alegeți câmpurile care să fie afișate în coloane în listă",sf9aee319a006c9b4:"Adăuga",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Jr=Object.freeze(Object.defineProperty({__proto__:null,templates:Zr},Symbol.toStringTag,{value:"Module"})),Qr={s226be12a5b1a27e8:"Читать документацию",s33f85f24c0f5f008:"Сохранить",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Массовое редактирование",s5e8250fb85d64c23:"Закрыть",s625ad019db843f94:"Использовать",sbf1ca928ec1deb62:"Нужна дополнительная помощь?",sd1a8dc951b2b6a98:"Выберите, какие поля отображать как столбцы в списке",sf9aee319a006c9b4:"Добавить",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},Xr=Object.freeze(Object.defineProperty({__proto__:null,templates:Qr},Symbol.toStringTag,{value:"Module"})),Yr={s226be12a5b1a27e8:"Preberite dokumentacijo",s33f85f24c0f5f008:"Shrani",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"Urejanje v velikem obsegu",s5e8250fb85d64c23:"Zapri",s625ad019db843f94:"Uporaba",sbf1ca928ec1deb62:"Potrebujete več pomoči?",sd1a8dc951b2b6a98:"Izberite, katera polja naj bodo prikazana kot stolpci na seznamu",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},en=Object.freeze(Object.defineProperty({__proto__:null,templates:Yr},Symbol.toStringTag,{value:"Module"})),tn={s226be12a5b1a27e8:"Pročitajte dokumentaciju",s33f85f24c0f5f008:"Sačuvaj",s36cb242ac90353bc:"Polja",s41cb4006238ebd3b:"masovno uređivanje",s5e8250fb85d64c23:"Zatvori",s625ad019db843f94:"Koristiti",sbf1ca928ec1deb62:"Treba vam više pomoći?",sd1a8dc951b2b6a98:"Izaberite koja polja da se prikazuju kao kolone na listi",sf9aee319a006c9b4:"Dodaj",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},on=Object.freeze(Object.defineProperty({__proto__:null,templates:tn},Symbol.toStringTag,{value:"Module"})),sn={s04ceadb276bbe149:"Inapakia chaguo...",s226be12a5b1a27e8:"Soma nyaraka",s29e25f5e4622f847:"Fungua Kidirisha",s33f85f24c0f5f008:"Hifadhi",s36cb242ac90353bc:"Mashamba",s41cb4006238ebd3b:"Hariri kwa Wingi",s5e8250fb85d64c23:"Funga",s625ad019db843f94:"Tumia",s9d51bfd93b5dbeca:"Onyesha Kumbukumbu",sac83d7f9358b43db:m`Orodha ya${0}`,sb1bd536b63e9e995:"Sehemu ya Faragha: Ni mimi pekee ninayeweza kuona maudhui yake",sb59d68ed12d46377:"Inapakia",sbf1ca928ec1deb62:"Unahitaji msaada zaidi?",scb9a1ff437efbd2a:m`Chagua ${0} zote ungependa kusasisha kutoka kwenye orodha, na uzisasishe hapa chini.`,sd1a8dc951b2b6a98:"Chagua ni sehemu zipi zitaonyeshwa kama safu wima kwenye orodha",seafe6ef133ede7da:m`Inaonyesha 1 kati ya ${0}`,sf9aee319a006c9b4:"Ongeza",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},an=Object.freeze(Object.defineProperty({__proto__:null,templates:sn},Symbol.toStringTag,{value:"Module"})),rn={s226be12a5b1a27e8:"อ่านเอกสาร",s33f85f24c0f5f008:"บันทึก",s36cb242ac90353bc:"ฟิลด์",s41cb4006238ebd3b:"แก้ไขเป็นกลุ่ม",s5e8250fb85d64c23:"ปิด",s625ad019db843f94:"ใช้",sbf1ca928ec1deb62:"ต้องการความช่วยเหลือเพิ่มเติมหรือไม่?",sd1a8dc951b2b6a98:"เลือกฟิลด์ที่จะแสดงเป็นคอลัมน์ในรายการ",sf9aee319a006c9b4:"เพิ่ม",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},nn=Object.freeze(Object.defineProperty({__proto__:null,templates:rn},Symbol.toStringTag,{value:"Module"})),ln={s226be12a5b1a27e8:"Basahin ang dokumentasyon",s33f85f24c0f5f008:"I-save",s36cb242ac90353bc:"Mga Field",s41cb4006238ebd3b:"Maramihang Pag-edit",s5e8250fb85d64c23:"Isara",s625ad019db843f94:"Gamitin",sbf1ca928ec1deb62:"Kailangan mo pa ba ng tulong?",sd1a8dc951b2b6a98:"Piliin kung aling mga field ang ipapakita bilang mga column sa listahan",sf9aee319a006c9b4:"Idagdag",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},dn=Object.freeze(Object.defineProperty({__proto__:null,templates:ln},Symbol.toStringTag,{value:"Module"})),cn={s04ceadb276bbe149:"Seçenekler Yükleniyor...",s226be12a5b1a27e8:"Belgeleri oku",s29e25f5e4622f847:"İletişim Kutusunu Aç",s33f85f24c0f5f008:"Kaydet",s36cb242ac90353bc:"Alanlar",s41cb4006238ebd3b:"Toplu Düzenleme",s5e8250fb85d64c23:"Kapat",s625ad019db843f94:"Kullan",s9d51bfd93b5dbeca:"Arşivlenmiş Göster",sac83d7f9358b43db:m`${0} Listesi`,sb1bd536b63e9e995:"Özel Alan: İçeriğini sadece ben görebilirim",sb59d68ed12d46377:"Yükleniyor",sbf1ca928ec1deb62:"Daha fazla yardıma ihtiyacınız var mı?",scb9a1ff437efbd2a:m`Listeden güncellemek istediğiniz tüm ${0} 'i seçin ve aşağıda güncelleyin`,sd1a8dc951b2b6a98:"Listede Hangi Alanların Sütun Olarak Görüntüleneceğini Seçin",seafe6ef133ede7da:m`Gösteriliyor 1 of ${0}`,sf9aee319a006c9b4:"Ekle",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},un=Object.freeze(Object.defineProperty({__proto__:null,templates:cn},Symbol.toStringTag,{value:"Module"})),hn={s226be12a5b1a27e8:"Прочитайте документацію",s33f85f24c0f5f008:"Зберегти",s36cb242ac90353bc:"Поля",s41cb4006238ebd3b:"Масове редагування",s5e8250fb85d64c23:"Закрити",s625ad019db843f94:"Використати",sbf1ca928ec1deb62:"Потрібна додаткова допомога?",sd1a8dc951b2b6a98:"Виберіть, яке поле відображати у вигляді стовпців у списку",sf9aee319a006c9b4:"Додати",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},pn=Object.freeze(Object.defineProperty({__proto__:null,templates:hn},Symbol.toStringTag,{value:"Module"})),fn={s226be12a5b1a27e8:"Đọc tài liệu",s33f85f24c0f5f008:"Lưu",s36cb242ac90353bc:"Trường",s41cb4006238ebd3b:"Chỉnh sửa Hàng loạt",s5e8250fb85d64c23:"Đóng",s625ad019db843f94:"Sử dụng",sbf1ca928ec1deb62:"Bạn cần trợ giúp thêm?",sd1a8dc951b2b6a98:"Chọn các trường để hiển thị dưới dạng cột trong danh sách",sf9aee319a006c9b4:"Bổ sung",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},bn=Object.freeze(Object.defineProperty({__proto__:null,templates:fn},Symbol.toStringTag,{value:"Module"})),mn={s226be12a5b1a27e8:"阅读文档",s33f85f24c0f5f008:"保存",s36cb242ac90353bc:"字段",s41cb4006238ebd3b:"批量编辑",s5e8250fb85d64c23:"关",s625ad019db843f94:"使用",sbf1ca928ec1deb62:"需要更多帮助吗?",sd1a8dc951b2b6a98:"选择哪些字段要在列表中显示为列",sf9aee319a006c9b4:"添加",sb1bd536b63e9e995:"Private Field: Only I can see its content",s04ceadb276bbe149:"Loading options...",sd2e180dab4fbcfb9:"No Data Available",s29e25f5e4622f847:"Open Dialog",s49730f3d5751a433:"Loading...",scb9a1ff437efbd2a:m`Select all the ${0} you want to update from the list, and update them below`,sac83d7f9358b43db:m`${0} List`,seafe6ef133ede7da:m`Showing 1 of ${0}`,s9d51bfd93b5dbeca:"Show Archived",sb59d68ed12d46377:"Loading"},gn=Object.freeze(Object.defineProperty({__proto__:null,templates:mn},Symbol.toStringTag,{value:"Module"})),vn={s04ceadb276bbe149:"正在載入選項...",s226be12a5b1a27e8:"閱讀文檔",s29e25f5e4622f847:"開啟對話視窗",s33f85f24c0f5f008:"儲存",s36cb242ac90353bc:"欄位",s41cb4006238ebd3b:"大量編輯",s5e8250fb85d64c23:"關",s625ad019db843f94:"使用",s9d51bfd93b5dbeca:"顯示已儲存",sac83d7f9358b43db:m`${0} 清單`,sb1bd536b63e9e995:"私人欄位:只有我可以看見內容",sb59d68ed12d46377:"載入中",sbf1ca928ec1deb62:"需要更多幫助嗎?",scb9a1ff437efbd2a:m`從清單中選取要更新的項目${0},並在下面進行更新`,sd1a8dc951b2b6a98:"選擇哪些欄位要顯示為列表中的直行",seafe6ef133ede7da:m`第1頁 (共${0}頁)`,sf9aee319a006c9b4:"新增",sd2e180dab4fbcfb9:"No Data Available",s49730f3d5751a433:"Loading..."},yn=Object.freeze(Object.defineProperty({__proto__:null,templates:vn},Symbol.toStringTag,{value:"Module"}));$.ApiService=vi,$.ComponentService=Le,$.DtAlert=Eo,$.DtBase=N,$.DtButton=yi,$.DtChurchHealthCircle=uo,$.DtConnection=ho,$.DtCopyText=fo,$.DtDate=jt,$.DtDatetime=bo,$.DtFileUpload=So,$.DtFormBase=M,$.DtIcon=ro,$.DtLabel=wi,$.DtLocation=mo,$.DtLocationMap=yo,$.DtMapModal=vo,$.DtModal=go,$.DtMultiSelect=Ze,$.DtMultiSelectButtonGroup=ko,$.DtMultiText=xo,$.DtNumberField=_o,$.DtSingleSelect=wo,$.DtTags=Ce,$.DtText=zt,$.DtTextArea=$o,$.DtTile=Ao,$.DtToggle=co,$.DtUsersConnection=po,$.version=Ua,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}); diff --git a/dt-assets/functions/enqueue-scripts.php b/dt-assets/functions/enqueue-scripts.php index c6a1fd2e18..70f4a7374b 100644 --- a/dt-assets/functions/enqueue-scripts.php +++ b/dt-assets/functions/enqueue-scripts.php @@ -445,12 +445,16 @@ function dt_site_scripts() { [ 'rest_url' => esc_url_raw( rest_url() ), 'accepted_file_types' => [ - 'image/png', - 'image/gif', - 'image/jpeg', - 'image/jpg', + 'image/*', + 'application/pdf', 'audio/*', - 'video/*' + 'video/*', + 'application/msword', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'application/vnd.ms-excel', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'text/plain', + 'text/markdown', ], 'translations' => [ 'modals' => [ diff --git a/dt-assets/js/modular-list.js b/dt-assets/js/modular-list.js index bef66e06ac..b8e4e92319 100644 --- a/dt-assets/js/modular-list.js +++ b/dt-assets/js/modular-list.js @@ -1321,6 +1321,17 @@ } } else if (field_settings.type === 'image') { values = [``]; + } else if (field_settings.type === 'file_upload') { + const fileCount = Array.isArray(field_value) + ? field_value.length + : Array.isArray(field_value?.values) + ? field_value.values.length + : 0; + if (fileCount > 0) { + values = [ + `${window.SHAREDFUNCTIONS.escapeHTML(String(fileCount))} ${fileCount === 1 ? 'file' : 'files'}`, + ]; + } } } else if ( !field_value && @@ -1689,6 +1700,15 @@ break; } } + } else if (type === 'file_upload') { + const selectedOption = $( + `#${field}-options .filter-by-file-upload-option:checked`, + ).val(); + if (selectedOption === 'all-with-files') { + search_query.push({ [field]: ['*'] }); + } else if (selectedOption === 'all-without-files') { + search_query.push({ [field]: [] }); + } } else { let options = []; $(`#${field}-options input:checked`).each(function () { @@ -2066,6 +2086,13 @@ }); }); + $('.filter-by-file-upload-option').on('click', function (e) { + handle_filter_by_file_upload({ + id: $(this).val(), + field: $(this).data('field'), + }); + }); + function handle_filter_by_text_comms(options) { const { id, field } = options || { id: null, field: null }; if (id && field) { @@ -2143,6 +2170,32 @@ } } + function handle_filter_by_file_upload(options) { + const { id, field } = options || { id: null, field: null }; + if (!id || !field) { + return; + } + + const without = id === 'all-without-files'; + const { newLabel, filterName } = create_label_all( + field, + without, + id, + list_settings, + ); + + // Replace existing label for this file_upload field. + new_filter_labels = new_filter_labels.filter( + (label) => label.field !== field, + ); + $(selected_filters).find(`.current-filter.${field}`).remove(); + + selected_filters.append( + `${filterName}`, + ); + new_filter_labels.push(newLabel); + } + let load_multi_select_typeaheads = async function load_multi_select_typeaheads() { for (let input of $( @@ -2617,7 +2670,11 @@ list_settings, `post_type_settings.fields.${label.field}.type`, ); - if (type === 'key_select' || type === 'boolean') { + if ( + type === 'key_select' || + type === 'boolean' || + type === 'file_upload' + ) { $( `#filter-modal #${label.field}-options input[value="${label.id}"]`, ).prop('checked', true); diff --git a/dt-assets/js/new-record.js b/dt-assets/js/new-record.js index 15adf76d2d..65fda0c228 100644 --- a/dt-assets/js/new-record.js +++ b/dt-assets/js/new-record.js @@ -16,6 +16,20 @@ jQuery(function ($) { window.post_type_fields = window.new_record_localized.post_type_settings.fields; + // New record flow: keep file uploads local until record is created. + // This prevents API upload attempts against non-existent post IDs. + const fileUploadComponents = Array.from( + document.querySelectorAll('dt-file-upload'), + ); + fileUploadComponents.forEach((component) => { + // Keep configured auto/manual UI behavior, but clear API bindings so + // uploads are deferred until after the record is created. + component.removeAttribute('post-type'); + component.removeAttribute('post-id'); + component.removeAttribute('meta-key'); + component.removeAttribute('key-prefix'); + }); + // focus first field in the form document.querySelector('.form-fields [name]').focus(); @@ -199,6 +213,7 @@ jQuery(function ($) { // build form values const form = event.target; + const pendingFileUploads = []; Array.from(form.querySelectorAll('*')).forEach((el) => { // skip fields like `field_name[query]` that are from typeaheads // and skip values not from web components @@ -210,6 +225,22 @@ jQuery(function ($) { return; } + // file_upload fields on new record are uploaded only after create succeeds + if (el.tagName === 'DT-FILE-UPLOAD') { + const files = + typeof el.getPendingFilesForUpload === 'function' + ? Array.from(el.getPendingFilesForUpload()) + : Array.from(el.stagedFiles || []); + if (files.length > 0) { + pendingFileUploads.push({ + fieldKey: el.name.trim(), + files, + component: el, + }); + } + return; + } + if (el.value) { new_post[el.name.trim()] = window.DtWebComponents.ComponentService.convertValue( @@ -254,11 +285,46 @@ jQuery(function ($) { window.componentService.api .createPost(window.new_record_localized.post_type, new_post) - .then((response) => { + .then(async (response) => { + const createdPostId = parseInt( + response?.ID || response?.id || response?.post_id, + 10, + ); + + if (pendingFileUploads.length > 0) { + if (!createdPostId) { + throw new Error( + 'Unable to determine created record ID for file uploads.', + ); + } + for (const upload of pendingFileUploads) { + const keyPrefix = `${window.new_record_localized.post_type}/${createdPostId}/${upload.fieldKey}`; + try { + await window.componentService.api.uploadFiles( + window.new_record_localized.post_type, + createdPostId, + upload.files, + upload.fieldKey, + keyPrefix, + ); + } catch (uploadError) { + upload.component.setAttribute( + 'error', + uploadError?.message || 'Upload failed', + ); + throw uploadError; + } + } + } + window.location = response.permalink; }) .catch(function (error) { - const message = error.responseJSON?.message || error.responseText; + const message = + error?.responseJSON?.message || + error?.responseText || + error?.message || + 'Unable to save record.'; $('.js-create-post-button') .removeClass('loading') .addClass('alert') diff --git a/dt-core/admin/admin-settings-endpoints.php b/dt-core/admin/admin-settings-endpoints.php index 4a9072f64f..bf7b691626 100644 --- a/dt-core/admin/admin-settings-endpoints.php +++ b/dt-core/admin/admin-settings-endpoints.php @@ -1295,6 +1295,61 @@ public static function edit_field( WP_REST_Request $request ) { $custom_field['default'] = $post_submission['visibility']['checked_by_default']; } + // Upload File Field Types: Field-specific options + if ( isset( $post_fields[$field_key]['type'] ) && $post_fields[$field_key]['type'] === 'file_upload' ) { + // Accepted file types + if ( isset( $post_submission['visibility']['accepted_file_types'] ) ) { + $raw_accepted = trim( $post_submission['visibility']['accepted_file_types'] ); + if ( $raw_accepted === '' ) { + // Clear any previously saved override so defaults are used + unset( $custom_field['accepted_file_types'] ); + } else { + $types = array_map( 'sanitize_text_field', array_map( 'trim', explode( ',', $raw_accepted ) ) ); + $custom_field['accepted_file_types'] = $types; + } + } + + // Max file size + if ( isset( $post_submission['visibility']['max_file_size'] ) && $post_submission['visibility']['max_file_size'] !== '' ) { + $custom_field['max_file_size'] = (int) $post_submission['visibility']['max_file_size']; + } else if ( isset( $custom_field['max_file_size'] ) ) { + unset( $custom_field['max_file_size'] ); + } + + // Delete enabled + if ( isset( $post_submission['visibility']['delete_enabled'] ) ) { + $custom_field['delete_enabled'] = (bool) $post_submission['visibility']['delete_enabled']; + } else { + $custom_field['delete_enabled'] = false; + } + + // Display layout + if ( isset( $post_submission['visibility']['display_layout'] ) ) { + $custom_field['display_layout'] = sanitize_text_field( wp_unslash( $post_submission['visibility']['display_layout'] ) ); + } + + // Auto upload + if ( isset( $post_submission['visibility']['auto_upload'] ) ) { + $custom_field['auto_upload'] = (bool) $post_submission['visibility']['auto_upload']; + } else { + $custom_field['auto_upload'] = false; + } + + // Download enabled + if ( isset( $post_submission['visibility']['download_enabled'] ) ) { + $custom_field['download_enabled'] = (bool) $post_submission['visibility']['download_enabled']; + } else { + $custom_field['download_enabled'] = false; + } + + // Rename enabled + if ( isset( $post_submission['visibility']['rename_enabled'] ) ) { + $custom_field['rename_enabled'] = (bool) $post_submission['visibility']['rename_enabled']; + } else { + $custom_field['rename_enabled'] = false; + } + } + $field_customizations[$post_type][$field_key] = $custom_field; update_option( 'dt_field_customizations', $field_customizations ); wp_cache_delete( $post_type . '_field_settings' ); diff --git a/dt-core/admin/css/dt-settings.css b/dt-core/admin/css/dt-settings.css index 9b152163fd..dd6bbfafda 100644 --- a/dt-core/admin/css/dt-settings.css +++ b/dt-core/admin/css/dt-settings.css @@ -81,16 +81,20 @@ width: auto; height: auto; min-width: 33%; + max-height: 90vh; background: #fefefe; border: 1px solid #cacaca; -webkit-backface-visibility: hidden; backface-visibility: hidden; + overflow: hidden; } .modal-back { transform: rotateY(180deg); } .dt-admin-modal-box-content { padding: 1rem; + max-height: calc(90vh - 2rem); + overflow-y: auto; } .tile-rundown-elements { margin-top: -1px; diff --git a/dt-core/admin/js/dt-settings.js b/dt-core/admin/js/dt-settings.js index cb6afce865..3375624d43 100644 --- a/dt-core/admin/js/dt-settings.js +++ b/dt-core/admin/js/dt-settings.js @@ -1058,6 +1058,7 @@ jQuery(document).ready(function ($) { dt_admin_modal_box.on('click', '.change-icon-button', function (e) { e.preventDefault(); + e.stopPropagation(); // Prevent the dt-options.js handler from also firing enableModalBackDiv('modal-back-icon-picker'); flip_card(); }); @@ -1283,6 +1284,7 @@ jQuery(document).ready(function ($) { +

    ${window.field_settings.field_types.key_select.description} @@ -1603,7 +1605,119 @@ jQuery(document).ready(function ($) { - ${type_visibility_html} + ${type_visibility_html}`; + + // Add file_upload field-specific options + if (field_type === 'file_upload') { + let accepted_file_types = field_settings['accepted_file_types'] || [ + 'image/*', + 'application/pdf', + 'audio/*', + 'video/*', + 'application/msword', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'application/vnd.ms-excel', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'text/plain', + 'text/markdown', + ]; + let max_file_size = field_settings['max_file_size'] || ''; + let delete_enabled = field_settings['delete_enabled'] !== false; // default true + let display_layout = field_settings['display_layout'] || 'grid'; + let auto_upload = field_settings['auto_upload'] !== false; // default true + let download_enabled = field_settings['download_enabled'] !== false; // default true + let rename_enabled = field_settings['rename_enabled'] !== false; // default true + + modal_html_content += ` + + + + + + +

    + Optional. Comma-separated list of MIME types or file extensions to override the default set (images, PDFs, audio, video, common documents). Leave empty to use the default types. + + View common MIME types. + +

    + + + + + + + + + + + + + Delete Enabled + + + + + + + + + Download Enabled + + + + + + + + + Rename Enabled + + + + + + + + + + + + + + + + + Auto Upload + + + + + + `; + } + + modal_html_content += ` ${delete_field_html_content} @@ -2305,6 +2419,19 @@ jQuery(document).ready(function ($) { ); } + // Add file_upload field-specific options to visibility object + if (field_settings['type'] && field_settings['type'] === 'file_upload') { + visibility['accepted_file_types'] = $('#accepted_file_types') + .val() + .trim(); + visibility['max_file_size'] = $('#max_file_size').val().trim(); + visibility['delete_enabled'] = $('#delete_enabled').is(':checked'); + visibility['display_layout'] = $('#display_layout').val(); + visibility['auto_upload'] = $('#auto_upload').is(':checked'); + visibility['download_enabled'] = $('#download_enabled').is(':checked'); + visibility['rename_enabled'] = $('#rename_enabled').is(':checked'); + } + if (custom_name === '') { $('#edit-field-custom-name').css('border', '2px solid #e14d43'); return false; diff --git a/dt-core/admin/menu/tabs/tab-custom-fields.php b/dt-core/admin/menu/tabs/tab-custom-fields.php index e57a1dfa4f..eddd993358 100644 --- a/dt-core/admin/menu/tabs/tab-custom-fields.php +++ b/dt-core/admin/menu/tabs/tab-custom-fields.php @@ -470,7 +470,7 @@ private function edit_field( $field_key, $post_type ){ @@ -513,7 +513,7 @@ private function edit_field( $field_key, $post_type ){

    @@ -541,6 +541,125 @@ private function edit_field( $field_key, $post_type ){ + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    + + + + +

    +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + +
    + + + + @@ -924,6 +1043,61 @@ private function process_edit_field( $post_submission ){ } } + // file_upload field options + if ( $field['type'] === 'file_upload' ) { + // Accepted file types + if ( isset( $post_submission['accepted_file_types'] ) ) { + $raw_accepted = trim( $post_submission['accepted_file_types'] ); + if ( $raw_accepted === '' ) { + // Clear any previously saved override so defaults are used + unset( $custom_field['accepted_file_types'] ); + } else { + $types = array_map( 'sanitize_text_field', array_map( 'trim', explode( ',', $raw_accepted ) ) ); + $custom_field['accepted_file_types'] = $types; + } + } + + // Max file size + if ( isset( $post_submission['max_file_size'] ) && $post_submission['max_file_size'] !== '' ) { + $custom_field['max_file_size'] = (int) $post_submission['max_file_size']; + } else if ( isset( $custom_field['max_file_size'] ) ) { + unset( $custom_field['max_file_size'] ); + } + + // Delete enabled + if ( isset( $post_submission['delete_enabled'] ) ) { + $custom_field['delete_enabled'] = true; + } else { + $custom_field['delete_enabled'] = false; + } + + // Display layout + if ( isset( $post_submission['display_layout'] ) ) { + $custom_field['display_layout'] = sanitize_text_field( wp_unslash( $post_submission['display_layout'] ) ); + } + + // Auto upload + if ( isset( $post_submission['auto_upload'] ) ) { + $custom_field['auto_upload'] = true; + } else { + $custom_field['auto_upload'] = false; + } + + // Download enabled + if ( isset( $post_submission['download_enabled'] ) ) { + $custom_field['download_enabled'] = true; + } else { + $custom_field['download_enabled'] = false; + } + + // Rename enabled + if ( isset( $post_submission['rename_enabled'] ) ) { + $custom_field['rename_enabled'] = true; + } else { + $custom_field['rename_enabled'] = false; + } + } + // key_select, multi_options & links if ( isset( $post_fields[$field_key]['default'] ) && ( $field['type'] === 'multi_select' || $field['type'] === 'key_select' || $field['type'] === 'link' ) ){ $field_options = $field['default']; @@ -1080,6 +1254,7 @@ private function add_field( $post_type ){ + @@ -1194,6 +1369,7 @@ private function add_field( $post_type ){
  • +
    • @@ -1348,6 +1524,15 @@ private function process_add_field( $post_submission ){ 'customizable' => 'all', 'private' => $field_private ]; + } elseif ( $field_type === 'file_upload' ) { + $new_field = [ + 'name' => $post_submission['new_field_name'], + 'type' => 'file_upload', + 'default' => [], + 'tile' => $field_tile, + 'customizable' => 'all', + 'private' => $field_private + ]; } elseif ( $field_type === 'connection' ){ if ( !$post_submission['connection_target'] ){ self::admin_notice( __( 'Please select a connection target', 'disciple_tools' ), 'error' ); diff --git a/dt-core/admin/menu/tabs/tab-fields.php b/dt-core/admin/menu/tabs/tab-fields.php index 643d59d934..fd4e380873 100644 --- a/dt-core/admin/menu/tabs/tab-fields.php +++ b/dt-core/admin/menu/tabs/tab-fields.php @@ -95,7 +95,7 @@ public function box_message( $post_type ) { $fields = $post_settings['fields']; /* breadcrumb: new-field-type Add field type to field explorer */ - $types = [ 'text', 'textarea', 'date', 'datetime', 'boolean', 'key_select', 'multi_select', 'array', 'connection', 'number', 'link', 'communication_channel', 'tags', 'user_select', 'task', 'location', 'location_meta' ]; + $types = [ 'text', 'textarea', 'date', 'datetime', 'boolean', 'key_select', 'multi_select', 'array', 'connection', 'number', 'link', 'communication_channel', 'tags', 'user_select', 'task', 'location', 'location_meta', 'file_upload' ]; foreach ( $types as $type ){ ?>

      Field type:

      diff --git a/dt-core/dt-storage.php b/dt-core/dt-storage.php index e8f04f20ce..2445ce0731 100644 --- a/dt-core/dt-storage.php +++ b/dt-core/dt-storage.php @@ -106,16 +106,17 @@ private static function validate_url( $url ): string { return $url; } - public static function get_file_url( string $key ): string { + public static function get_file_url( string $key, array $params = [] ): string { [ $client, $bucket ] = self::build_client_and_config(); if ( !$client ) { return ''; } + $duration = $params['duration'] ?? '+24 hours'; try { $input_class = '\\AsyncAws\\S3\\Input\\GetObjectRequest'; if ( class_exists( $input_class ) ) { $input = new $input_class( [ 'Bucket' => $bucket, 'Key' => $key ] ); - $presigned = $client->presign( $input, new \DateTimeImmutable( '+24 hours' ) ); + $presigned = $client->presign( $input, new \DateTimeImmutable( $duration ) ); return (string) $presigned; } return ''; @@ -124,12 +125,12 @@ public static function get_file_url( string $key ): string { } } - public static function get_thumbnail_url( string $key ): string { - return self::get_file_url( self::generate_thumbnail_key_name( $key ) ); + public static function get_thumbnail_url( string $key, array $params = [] ): string { + return self::get_file_url( self::generate_thumbnail_key_name( $key ), $params ); } - public static function get_large_thumbnail_url( string $key ): string { - return self::get_file_url( self::generate_large_thumbnail_key_name( $key ) ); + public static function get_large_thumbnail_url( string $key, array $params = [] ): string { + return self::get_file_url( self::generate_large_thumbnail_key_name( $key ), $params ); } public static function upload_file( string $key_prefix = '', array $upload = [], string $existing_key = '', array $args = [] ){ diff --git a/dt-core/global-functions.php b/dt-core/global-functions.php index f360f5a53b..7daa9ed746 100755 --- a/dt-core/global-functions.php +++ b/dt-core/global-functions.php @@ -601,7 +601,7 @@ function render_field_for_display( $field_key, $fields, $post, $show_extra_contr } if ( isset( $fields[$field_key]['type'] ) && !$custom_display && empty( $fields[$field_key]['hidden'] ) ) { /* breadrcrumb: new-field-type Add allowed field types */ - $allowed_types = apply_filters( 'dt_render_field_for_display_allowed_types', [ 'boolean', 'key_select', 'multi_select', 'date', 'datetime', 'text', 'textarea', 'number', 'link', 'connection', 'location', 'location_meta', 'communication_channel', 'tags', 'user_select' ] ); + $allowed_types = apply_filters( 'dt_render_field_for_display_allowed_types', [ 'boolean', 'key_select', 'multi_select', 'date', 'datetime', 'text', 'textarea', 'number', 'link', 'connection', 'location', 'location_meta', 'communication_channel', 'tags', 'user_select', 'file_upload' ] ); if ( !in_array( $field_type, $allowed_types ) ){ return; } @@ -654,6 +654,9 @@ function render_field_for_display( $field_key, $fields, $post, $show_extra_contr case 'user_select': DT_Components::render_user_select( $field_key, $fields, $post, $params ); break; + case 'file_upload': + DT_Components::render_file_upload( $field_key, $fields, $post, $params ); + break; default: $is_legacy = true; break; diff --git a/dt-core/logging/hooks/class-hook-posts.php b/dt-core/logging/hooks/class-hook-posts.php index 1e581dccce..e3dfafd2f2 100644 --- a/dt-core/logging/hooks/class-hook-posts.php +++ b/dt-core/logging/hooks/class-hook-posts.php @@ -132,7 +132,7 @@ public function hooks_updated_post_meta( $meta_id, $object_id, $meta_key, $meta_ return; } - $ignore_field_types = [ 'array', 'hash' ]; + $ignore_field_types = [ 'array', 'hash', 'file_upload' ]; $fields = DT_Posts::get_post_field_settings( $parent_post['post_type'] ); $field_type = $fields[$meta_key]['type'] ?? null; diff --git a/dt-core/utilities/dt-components.php b/dt-core/utilities/dt-components.php index 30507fdb77..8000bb4ff0 100644 --- a/dt-core/utilities/dt-components.php +++ b/dt-core/utilities/dt-components.php @@ -34,7 +34,8 @@ public static function shared_attributes( $field_key, $fields, $post, $params = 'location_meta', 'communication_channel', 'tags', - 'user_select' + 'user_select', + 'file_upload' ] ); if ( !in_array( $field_type, $allowed_types ) ){ return; @@ -44,8 +45,10 @@ public static function shared_attributes( $field_key, $fields, $post, $params = } $icon = null; - if ( isset( $fields[$field_key]['icon'] ) && !empty( $fields[$field_key]['icon'] ) ) { - $icon = 'icon=' . esc_attr( $fields[$field_key]['icon'] ); + if ( isset( $fields[$field_key]['font-icon'] ) && !empty( $fields[$field_key]['font-icon'] ) ) { + $icon = 'icon="' . esc_attr( $fields[$field_key]['font-icon'] ) . '"'; + } else if ( isset( $fields[$field_key]['icon'] ) && !empty( $fields[$field_key]['icon'] ) ) { + $icon = 'icon="' . esc_attr( $fields[$field_key]['icon'] ) . '"'; } if ( isset( $fields[$field_key]['post_type'] ) ) { $post_type = 'postType=' . esc_attr( $fields[$field_key]['post_type'] ); @@ -61,7 +64,7 @@ public static function shared_attributes( $field_key, $fields, $post, $params = name="' . esc_attr( $field_key ) . '" ' . $label_attr . ' ' . esc_html( $post_type ?? '' ) . ' - ' . esc_html( $icon ) . ' + ' . $icon . ' ' . esc_html( $required_tag ) . ' ' . esc_html( $disabled ) . ' ' . ( $is_private ? 'private' : null ) . ' @@ -321,4 +324,122 @@ public static function render_user_select( $field_key, $fields, $post, $params = $file_key, + 'name' => basename( $file_key ), + 'type' => '', + ]; + if ( DT_Storage_API::is_enabled() ) { + $file['url'] = DT_Storage_API::get_file_url( $file_key ); + } + } + + return $file; + }, $value); + + // Determine key prefix (use post type, post id and field key as prefix for better organization) + $key_prefix = $post_type . '/' . $post_id . '/' . $field_key; + + // Output icon attribute directly to avoid wp_kses_post truncating font-icon values (e.g. "mdi mdi-file-arrow-up-down") + $field_icon = $fields[ $field_key ]['font-icon'] ?? $fields[ $field_key ]['icon'] ?? ''; + ?> + + icon="" + + value="" + accepted-file-types='' + + max-file-size="" + + + delete-enabled="false" + + display-layout="" + auto-upload="" + + download-enabled="false" + + + rename-enabled="false" + + post-type="" + post-id="" + meta-key="" + key-prefix="" + > + + namespace, '/(?P\w+)/(?P\d+)/storage_delete_single', [ + 'methods' => 'POST', + 'callback' => [ $this, 'storage_delete_single' ], + 'args' => [ + 'post_type' => $arg_schemas['post_type'], + 'id' => $arg_schemas['id'] + ], + 'permission_callback' => function ( WP_REST_Request $request ) { + $params = $request->get_params(); + return DT_Posts::can_update( sanitize_text_field( wp_unslash( $params['post_type'] ) ), sanitize_text_field( wp_unslash( $params['id'] ) ) ); + } + ] + ); + + //Storage Rename Single File + register_rest_route( + $this->namespace, '/(?P\w+)/(?P\d+)/storage_rename_single', [ + 'methods' => 'POST', + 'callback' => [ $this, 'storage_rename_single' ], + 'args' => [ + 'post_type' => $arg_schemas['post_type'], + 'id' => $arg_schemas['id'] + ], + 'permission_callback' => function ( WP_REST_Request $request ) { + $params = $request->get_params(); + return DT_Posts::can_update( sanitize_text_field( wp_unslash( $params['post_type'] ) ), sanitize_text_field( wp_unslash( $params['id'] ) ) ); + } + ] + ); + + //Storage Download Single File + register_rest_route( + $this->namespace, '/(?P\w+)/(?P\d+)/storage_download', [ + 'methods' => 'POST', + 'callback' => [ $this, 'storage_download' ], + 'args' => [ + 'post_type' => $arg_schemas['post_type'], + 'id' => $arg_schemas['id'] + ], + 'permission_callback' => function ( WP_REST_Request $request ) { + $params = $request->get_params(); + return DT_Posts::can_view( sanitize_text_field( wp_unslash( $params['post_type'] ) ), sanitize_text_field( wp_unslash( $params['id'] ) ) ); + } + ] + ); + //Storage Delete register_rest_route( $this->namespace, '/(?P\w+)/(?P\d+)/storage_delete', [ @@ -857,88 +905,631 @@ public function storage_upload( WP_REST_Request $request ) { return new WP_Error( __METHOD__, 'DT_Storage_API Unavailable.' ); } - $uploaded = false; - $uploaded_key = ''; - - $post_type = $params['post_type']; - $post_id = $params['id']; - $meta_key = $params['meta_key']; - $key_prefix = $params['key_prefix'] ?? ''; + $post_type = sanitize_text_field( wp_unslash( $params['post_type'] ) ); + $post_id = absint( $params['id'] ); + $meta_key = sanitize_text_field( wp_unslash( $params['meta_key'] ) ); + $key_prefix = isset( $params['key_prefix'] ) ? sanitize_text_field( wp_unslash( $params['key_prefix'] ) ) : ''; $files = dt_recursive_sanitize_array( $_FILES['storage_upload_files'] ); //phpcs:ignore WordPress.Security.NonceVerification.Missing - // Only process the first file within the uploaded array. - $uploaded_file = [ - 'name' => $files['name'][0], - 'full_path' => $files['full_path'][0], - 'type' => $files['type'][0], - 'tmp_name' => $files['tmp_name'][0], - 'error' => $files['error'][0], - 'size' => $files['size'][0] - ]; - // Determine storage upload requester type. $upload_type = $params['upload_type'] ?? 'post'; + // Check if this is a multi-file field (file_upload type) + $is_multi_file = isset( $params['is_multi_file'] ) && $params['is_multi_file'] === 'true'; + + // Validate storage_s3_url_duration for presigned URL expiration (e.g. '+10 years', '+24 hours') + $storage_s3_url_duration = isset( $params['storage_s3_url_duration'] ) ? sanitize_text_field( wp_unslash( $params['storage_s3_url_duration'] ) ) : ''; + $url_params = []; + if ( !empty( $storage_s3_url_duration ) ) { + try { + new \DateTimeImmutable( $storage_s3_url_duration ); + $url_params = [ 'duration' => $storage_s3_url_duration ]; + } catch ( \Exception $e ) { + // Invalid duration string, fall back to default (+24 hours). + $url_params = []; + } + } + // Process accordingly by requested upload type. $meta_key_value = ''; switch ( $upload_type ) { case 'post': - // To avoid a buildup of stale object storage keys, reuse existing keys. - $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + // To avoid a buildup of stale object storage keys, reuse existing keys for single file. + // For multi-file, get existing array or initialize empty array. + if ( $is_multi_file ) { + $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + if ( !is_array( $meta_key_value ) ) { + $meta_key_value = []; + } + } else { + $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + } break; } - // Push an uploaded file to backend storage service. - $uploaded = DT_Storage_API::upload_file( $key_prefix, $uploaded_file, $meta_key_value ); + // Process all uploaded files. + $uploaded_files = []; + $uploaded_keys = []; + $file_count = is_array( $files['name'] ) ? count( $files['name'] ) : 1; + + for ( $i = 0; $i < $file_count; $i++ ) { + $uploaded_file = [ + 'name' => $files['name'][ $i ], + 'full_path' => $files['full_path'][ $i ] ?? '', + 'type' => $files['type'][ $i ], + 'tmp_name' => $files['tmp_name'][ $i ], + 'error' => $files['error'][ $i ], + 'size' => $files['size'][ $i ], + ]; + + // Normalize basic metadata for safety. + $safe_file_name = str_replace( [ "\r", "\n" ], '', (string) $uploaded_file['name'] ); + $safe_file_type = sanitize_mime_type( (string) $uploaded_file['type'] ); + if ( $safe_file_type === '' ) { + $safe_file_type = (string) $uploaded_file['type']; + } + + // For multi-file fields, don't reuse keys (always create new) + $existing_key = $is_multi_file ? '' : $meta_key_value; + + // Push an uploaded file to backend storage service. + $uploaded = DT_Storage_API::upload_file( $key_prefix, $uploaded_file, $existing_key ); + + // Handle WP_Error returns from DT_Storage_API::upload_file() + if ( is_wp_error( $uploaded ) ) { + // Continue processing other files even if one fails + $uploaded_files[] = [ + 'uploaded' => false, + 'uploaded_key' => '', + 'name' => $uploaded_file['name'], + 'uploaded_msg' => $uploaded->get_error_message() + ]; + continue; + } + + // If successful, collect uploaded file info. + if ( $uploaded['uploaded'] === true && !empty( $uploaded['uploaded_key'] ) ) { + $uploaded_key = $uploaded['uploaded_key']; + $uploaded_keys[] = $uploaded_key; + + // Build file object with metadata + $file_object = [ + 'key' => $uploaded_key, + 'name' => $safe_file_name, + 'type' => $safe_file_type, + 'size' => $uploaded_file['size'], + 'uploaded_at' => current_time( 'mysql' ), + ]; + + // Add file URL + if ( DT_Storage_API::is_enabled() ) { + $file_object['url'] = DT_Storage_API::get_file_url( $uploaded_key, $url_params ); + } + + // Add thumbnail keys and URLs if available (for images) + if ( !empty( $uploaded['uploaded_thumbnail_key'] ) ) { + $file_object['thumbnail_key'] = $uploaded['uploaded_thumbnail_key']; + if ( DT_Storage_API::is_enabled() ) { + $file_object['thumbnail_url'] = DT_Storage_API::get_file_url( $uploaded['uploaded_thumbnail_key'], $url_params ); + } + } + if ( !empty( $uploaded['uploaded_large_thumbnail_key'] ) ) { + $file_object['large_thumbnail_key'] = $uploaded['uploaded_large_thumbnail_key']; + if ( DT_Storage_API::is_enabled() ) { + $file_object['large_thumbnail_url'] = DT_Storage_API::get_file_url( $uploaded['uploaded_large_thumbnail_key'], $url_params ); + } + } + + $uploaded_files[] = [ + 'uploaded' => true, + 'uploaded_key' => $uploaded_key, + 'file' => $file_object, + 'uploaded_msg' => null, + ]; + } + } + + // If successful, persist uploaded file keys. + if ( !empty( $uploaded_keys ) ) { + switch ( $upload_type ) { + case 'post': + // Store old value for activity logging + $old_meta_value = $meta_key_value; + + if ( $is_multi_file ) { + // Append new files to existing array + $existing_files = is_array( $meta_key_value ) ? $meta_key_value : []; + foreach ( $uploaded_files as $uploaded_file_data ) { + if ( $uploaded_file_data['uploaded'] && isset( $uploaded_file_data['file'] ) ) { + $existing_files[] = $uploaded_file_data['file']; + } + } + update_post_meta( $post_id, $meta_key, $existing_files ); + + // Log activity for file upload + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $uploaded_file_names = []; + foreach ( $uploaded_files as $uploaded_file_data ) { + if ( $uploaded_file_data['uploaded'] && isset( $uploaded_file_data['file']['name'] ) ) { + $uploaded_file_names[] = $uploaded_file_data['file']['name']; + } + } + $file_count = count( $uploaded_file_names ); + if ( $file_count === 1 ) { + $object_note = sprintf( _x( 'Uploaded file: %1$s to %2$s', 'file_upload activity', 'disciple_tools' ), $uploaded_file_names[0], $field_name ); + } else { + $file_list = implode( ', ', array_slice( $uploaded_file_names, 0, 3 ) ); + if ( $file_count > 3 ) { + $file_list .= sprintf( _x( ' and %d more', 'file_upload activity', 'disciple_tools' ), $file_count - 3 ); + } + $object_note = sprintf( _x( 'Uploaded %1$d files: %2$s to %3$s', 'file_upload activity', 'disciple_tools' ), $file_count, $file_list, $field_name ); + } + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => maybe_serialize( $existing_files ), + 'old_value' => maybe_serialize( $old_meta_value ), + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + } else { + // Single file: use first uploaded key (backward compatibility) + update_post_meta( $post_id, $meta_key, $uploaded_keys[0] ); + + // Log activity for single file upload + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $file_name = ''; + if ( !empty( $uploaded_files[0]['file']['name'] ) ) { + $file_name = $uploaded_files[0]['file']['name']; + } else { + $file_name = basename( $uploaded_keys[0] ); + } + $object_note = sprintf( _x( 'Uploaded file: %1$s to %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => $uploaded_keys[0], + 'old_value' => $old_meta_value ? $old_meta_value : '', + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + } + break; + + case 'image_comment': + $comment = apply_filters( 'dt_upload_image_comment', ' ', $uploaded_file ); + // Proceed with associated comment creation (only first file for comments). + DT_Posts::add_post_comment( $post_type, $post_id, $comment, 'comment', [ + 'comment_meta' => [ + $meta_key => $uploaded_keys[0] + ] + ], true, true ); + break; + case 'audio_comment': + $uploaded_file['audio_language'] = $params['audio_language'] ?? 'en'; + + $comment = apply_filters( 'dt_upload_audio_comment', ' ', $uploaded_file ); + // Proceed with associated comment creation (only first file for comments). + DT_Posts::add_post_comment( $post_type, $post_id, $comment, 'comment', [ + 'comment_meta' => [ + $meta_key => $uploaded_keys[0] + ] + ], true, true ); + break; + } + } - // Handle WP_Error returns from DT_Storage_API::upload_file() - if ( is_wp_error( $uploaded ) ) { + // Return results + if ( $is_multi_file ) { return [ + 'uploaded' => !empty( $uploaded_keys ), + 'uploaded_keys' => $uploaded_keys, + 'uploaded_files' => $uploaded_files, + 'uploaded_msg' => null + ]; + } else { + // Backward compatibility: return single file format + $first_result = !empty( $uploaded_files ) ? $uploaded_files[0] : [ 'uploaded' => false, 'uploaded_key' => '', - 'uploaded_msg' => $uploaded->get_error_message() + 'uploaded_msg' => null + ]; + return [ + 'uploaded' => $first_result['uploaded'] ?? false, + 'uploaded_key' => $first_result['uploaded_key'] ?? '', + 'uploaded_msg' => $first_result['uploaded_msg'] ?? null ]; } + } - // If successful, persist an uploaded object file key. - if ( $uploaded['uploaded'] === true ) { - if ( !empty( $uploaded['uploaded_key'] ) ) { - $uploaded_key = $uploaded['uploaded_key']; + public function storage_delete_single( WP_REST_Request $request ) { + $params = $request->get_params(); + if ( !isset( $params['post_type'], $params['id'], $params['meta_key'], $params['file_key'] ) ) { + return new WP_Error( __METHOD__, 'Missing parameters.' ); + } + + if ( !( method_exists( 'DT_Storage_API', 'delete_file' ) && DT_Storage_API::is_enabled() ) ) { + return new WP_Error( __METHOD__, 'DT_Storage_API Delete Function Unavailable.' ); + } - switch ( $upload_type ) { - case 'post': - update_post_meta( $post_id, $meta_key, $uploaded_key ); - break; - - case 'image_comment': - $comment = apply_filters( 'dt_upload_image_comment', ' ', $uploaded_file ); - // Proceed with associated comment creation. - DT_Posts::add_post_comment( $post_type, $post_id, $comment, 'comment', [ - 'comment_meta' => [ - $meta_key => $uploaded_key - ] - ], true, true ); - break; - case 'audio_comment': - $uploaded_file['audio_language'] = $params['audio_language'] ?? 'en'; - - $comment = apply_filters( 'dt_upload_audio_comment', ' ', $uploaded_file ); - // Proceed with associated comment creation. - DT_Posts::add_post_comment( $post_type, $post_id, $comment, 'comment', [ - 'comment_meta' => [ - $meta_key => $uploaded_key - ] - ], true, true ); - break; + $post_type = sanitize_text_field( wp_unslash( $params['post_type'] ) ); + $post_id = absint( $params['id'] ); + $meta_key = sanitize_text_field( wp_unslash( $params['meta_key'] ) ); + $file_key_to_delete = sanitize_text_field( wp_unslash( $params['file_key'] ) ); + + // Fetch existing meta key value (should be an array for multi-file fields). + $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + + if ( empty( $meta_key_value ) ) { + return [ + 'deleted' => false, + 'deleted_key' => '', + 'error' => 'No files found for this field.' + ]; + } + + // Handle array of files (multi-file field). + if ( is_array( $meta_key_value ) ) { + $file_found = false; + $updated_files = []; + $deleted_file_name = ''; + + foreach ( $meta_key_value as $file_object ) { + // Handle both array format (with 'key') and string format (backward compatibility). + $file_key = is_array( $file_object ) && isset( $file_object['key'] ) + ? $file_object['key'] + : ( is_string( $file_object ) ? $file_object : '' ); + + if ( $file_key === $file_key_to_delete ) { + $file_found = true; + // Extract file name before deletion + if ( is_array( $file_object ) && isset( $file_object['name'] ) ) { + $deleted_file_name = $file_object['name']; + } else { + $deleted_file_name = basename( $file_key ); + } + // Delete file from storage. + $result = DT_Storage_API::delete_file( $file_key ); + if ( $result && isset( $result['file_deleted'] ) && $result['file_deleted'] ) { + // File deleted successfully, don't add it back to array. + continue; + } } + + // Keep file in array. + $updated_files[] = $file_object; + } + + if ( $file_found ) { + // Store old value for activity logging + $old_meta_value = $meta_key_value; + + // Update post meta with remaining files. + if ( !empty( $updated_files ) ) { + update_post_meta( $post_id, $meta_key, $updated_files ); + $new_meta_value = $updated_files; + } else { + // No files left, delete meta key. + delete_post_meta( $post_id, $meta_key ); + $new_meta_value = ''; + } + + // Log activity for file deletion + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $object_note = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $deleted_file_name, $field_name ); + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => maybe_serialize( $new_meta_value ), + 'old_value' => maybe_serialize( $old_meta_value ), + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + + return [ + 'deleted' => true, + 'deleted_key' => $file_key_to_delete + ]; + } else { + return [ + 'deleted' => false, + 'deleted_key' => '', + 'error' => 'File not found in field.' + ]; + } + } else { + // Single file format (backward compatibility). + if ( $meta_key_value === $file_key_to_delete ) { + $result = DT_Storage_API::delete_file( $file_key_to_delete ); + $deleted = $result['file_deleted'] ?? false; + + if ( $deleted ) { + // Store old value for activity logging + $old_meta_value = $meta_key_value; + delete_post_meta( $post_id, $meta_key ); + + // Log activity for file deletion + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $file_name = basename( $file_key_to_delete ); + $object_note = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => '', + 'old_value' => $old_meta_value, + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + } + + return [ + 'deleted' => $deleted, + 'deleted_key' => $file_key_to_delete + ]; + } else { + return [ + 'deleted' => false, + 'deleted_key' => '', + 'error' => 'File key does not match.' + ]; } } + } - return [ - 'uploaded' => $uploaded['uploaded'], - 'uploaded_key' => $uploaded_key, - 'uploaded_msg' => $uploaded['uploaded_msg'] ?? null - ]; + public function storage_rename_single( WP_REST_Request $request ) { + $params = $request->get_params(); + if ( !isset( $params['post_type'], $params['id'], $params['meta_key'], $params['file_key'], $params['new_name'] ) ) { + return new WP_Error( __METHOD__, 'Missing parameters.' ); + } + + $post_type = $params['post_type']; + $post_id = $params['id']; + $meta_key = sanitize_text_field( wp_unslash( $params['meta_key'] ) ); + $file_key_to_rename = sanitize_text_field( wp_unslash( $params['file_key'] ) ); + $new_name = trim( sanitize_file_name( wp_unslash( $params['new_name'] ) ) ); + + if ( empty( $new_name ) ) { + return [ + 'renamed' => false, + 'error' => 'File name cannot be empty.', + ]; + } + + $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + + if ( empty( $meta_key_value ) ) { + return [ + 'renamed' => false, + 'error' => 'No files found for this field.', + ]; + } + + if ( is_array( $meta_key_value ) ) { + $file_found = false; + $updated_files = []; + $old_file_name = ''; + + foreach ( $meta_key_value as $file_object ) { + $file_key = is_array( $file_object ) && isset( $file_object['key'] ) + ? $file_object['key'] + : ( is_string( $file_object ) ? $file_object : '' ); + + if ( $file_key === $file_key_to_rename ) { + $file_found = true; + // Extract old file name before renaming + if ( is_array( $file_object ) && isset( $file_object['name'] ) ) { + $old_file_name = $file_object['name']; + } else { + $old_file_name = basename( $file_key ); + } + + if ( is_array( $file_object ) ) { + $file_object['name'] = $new_name; + $updated_files[] = $file_object; + } else { + $updated_files[] = [ + 'key' => $file_key, + 'name' => $new_name, + ]; + } + } else { + $updated_files[] = $file_object; + } + } + + if ( $file_found ) { + // Store old value for activity logging + $old_meta_value = $meta_key_value; + update_post_meta( $post_id, $meta_key, $updated_files ); + + // Log activity for file rename + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $object_note = sprintf( _x( 'Renamed file from %1$s to %2$s in %3$s', 'file_upload activity', 'disciple_tools' ), $old_file_name, $new_name, $field_name ); + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => maybe_serialize( $updated_files ), + 'old_value' => maybe_serialize( $old_meta_value ), + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + + return [ + 'renamed' => true, + 'file_key' => $file_key_to_rename, + 'new_name' => $new_name, + ]; + } else { + return [ + 'renamed' => false, + 'error' => 'File not found in field.', + ]; + } + } else { + return [ + 'renamed' => false, + 'error' => 'Invalid file data format.', + ]; + } + } + + public function storage_download( WP_REST_Request $request ) { + $params = $request->get_params(); + if ( !isset( $params['post_type'], $params['id'], $params['meta_key'], $params['file_key'] ) ) { + return new WP_Error( __METHOD__, 'Missing parameters.' ); + } + + if ( !( method_exists( 'DT_Storage_API', 'get_file_url' ) && DT_Storage_API::is_enabled() ) ) { + return new WP_Error( __METHOD__, 'DT_Storage_API Download Function Unavailable.' ); + } + + $post_type = sanitize_text_field( wp_unslash( $params['post_type'] ) ); + $post_id = sanitize_text_field( wp_unslash( $params['id'] ) ); + $meta_key = sanitize_text_field( wp_unslash( $params['meta_key'] ) ); + $file_key = sanitize_text_field( wp_unslash( $params['file_key'] ) ); + + // Verify file exists in post meta and extract file info + $meta_key_value = get_post_meta( $post_id, $meta_key, true ); + $file_found = false; + $file_name = ''; + $file_type = ''; + + if ( is_array( $meta_key_value ) ) { + foreach ( $meta_key_value as $file_object ) { + $file_key_from_meta = is_array( $file_object ) && isset( $file_object['key'] ) + ? $file_object['key'] + : ( is_string( $file_object ) ? $file_object : '' ); + + if ( $file_key_from_meta === $file_key ) { + $file_found = true; + $file_name = is_array( $file_object ) && isset( $file_object['name'] ) + ? $file_object['name'] + : basename( $file_key ); + + // Extract type from metadata (priority 1 for content-type) + $file_type = is_array( $file_object ) && isset( $file_object['type'] ) + ? $file_object['type'] + : ''; + break; + } + } + } elseif ( $meta_key_value === $file_key ) { + $file_found = true; + $file_name = basename( $file_key ); + $file_type = ''; + } + + if ( !$file_found ) { + return new WP_Error( __METHOD__, 'File not found in post meta.' ); + } + + // Generate presigned URL + $presigned_url = DT_Storage_API::get_file_url( $file_key ); + + if ( empty( $presigned_url ) ) { + return new WP_Error( __METHOD__, 'Failed to generate download URL.' ); + } + + // Fetch file from S3 (server-side, no CORS) + // Note: Do not use 'stream' => true as it tries to use URL as filename, causing "File name too long" errors + $response = wp_remote_get( $presigned_url, [ + 'timeout' => 300, // 5 minutes for large files + 'redirection' => 5, + ] ); + + if ( is_wp_error( $response ) ) { + return new WP_Error( __METHOD__, 'Failed to fetch file from storage: ' . $response->get_error_message() ); + } + + $response_code = wp_remote_retrieve_response_code( $response ); + if ( $response_code !== 200 ) { + return new WP_Error( __METHOD__, 'Failed to fetch file from storage. Response code: ' . $response_code ); + } + + // Get file content + $file_content = wp_remote_retrieve_body( $response ); + + // Determine content type with priority: + // 1. From metadata (file_type variable) + // 2. From S3 response header + // 3. From file extension (fallback) + $content_type = 'application/octet-stream'; // Default fallback + + if ( !empty( $file_type ) ) { + // Priority 1: Use type from metadata database + $content_type = $file_type; + } else { + // Priority 2: Try S3 response header + $content_type = wp_remote_retrieve_header( $response, 'content-type' ); + + if ( empty( $content_type ) ) { + // Priority 3: Extension-based detection + $file_ext = strtolower( pathinfo( $file_name, PATHINFO_EXTENSION ) ); + $mime_types = [ + 'pdf' => 'application/pdf', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'txt' => 'text/plain', + 'csv' => 'text/csv', + 'json' => 'application/json', + 'xml' => 'application/xml', + 'html' => 'text/html', + 'htm' => 'text/html', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif', + ]; + $content_type = isset( $mime_types[ $file_ext ] ) + ? $mime_types[ $file_ext ] + : 'application/octet-stream'; + } + } + + // Sanitize Content-Type to prevent HTTP header injection (e.g. newlines from S3 or meta). + $content_type = sanitize_mime_type( $content_type ); + if ( $content_type === '' ) { + $content_type = 'application/octet-stream'; + } + + // Set headers for file download + header( 'Content-Type: ' . $content_type ); + $download_name = str_replace( [ "\r", "\n" ], '', (string) $file_name ); + header( 'Content-Disposition: attachment; filename="' . $download_name . '"' ); + header( 'Content-Length: ' . strlen( $file_content ) ); + header( 'Cache-Control: no-cache, must-revalidate' ); + header( 'Pragma: no-cache' ); + + // Output file content + echo $file_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + // Exit to prevent REST API wrapper from interfering + exit; } public function storage_delete( WP_REST_Request $request ) { @@ -951,9 +1542,6 @@ public function storage_delete( WP_REST_Request $request ) { return new WP_Error( __METHOD__, 'DT_Storage_API Delete Function Unavailable.' ); } - $deleted = false; - $deleted_key = ''; - $post_type = $params['post_type']; $post_id = $params['id']; $meta_key = $params['meta_key']; @@ -961,18 +1549,110 @@ public function storage_delete( WP_REST_Request $request ) { // Fetch existing meta key value. $meta_key_value = get_post_meta( $post_id, $meta_key, true ); - if ( !empty( $meta_key_value ) ) { + if ( empty( $meta_key_value ) ) { + return [ + 'deleted' => false, + 'deleted_key' => '', + 'error' => 'No files found for this field.' + ]; + } + + // Handle array of files (multi-file field). + if ( is_array( $meta_key_value ) ) { + $deleted_keys = []; + $deleted_count = 0; + $old_meta_value = $meta_key_value; + + foreach ( $meta_key_value as $file_object ) { + // Handle both array format (with 'key') and string format. + $file_key = is_array( $file_object ) && isset( $file_object['key'] ) + ? $file_object['key'] + : ( is_string( $file_object ) ? $file_object : '' ); + + if ( !empty( $file_key ) ) { + $result = DT_Storage_API::delete_file( $file_key ); + if ( $result && isset( $result['file_deleted'] ) && $result['file_deleted'] ) { + $deleted_keys[] = $file_key; + $deleted_count++; + } + } + } + + // Delete corresponding meta data. + delete_post_meta( $post_id, $meta_key ); + + // Log activity for deleting all files + if ( $deleted_count > 0 ) { + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + if ( $deleted_count === 1 ) { + $file_name = ''; + foreach ( $meta_key_value as $file_object ) { + if ( is_array( $file_object ) && isset( $file_object['name'] ) ) { + $file_name = $file_object['name']; + break; + } + } + if ( empty( $file_name ) && !empty( $deleted_keys[0] ) ) { + $file_name = basename( $deleted_keys[0] ); + } + $object_note = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + } else { + $object_note = sprintf( _x( 'Deleted all %1$d files from %2$s', 'file_upload activity', 'disciple_tools' ), $deleted_count, $field_name ); + } + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => '', + 'old_value' => maybe_serialize( $old_meta_value ), + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + } + + return [ + 'deleted' => $deleted_count > 0, + 'deleted_count' => $deleted_count, + 'deleted_keys' => $deleted_keys + ]; + } else { + // Single file format (backward compatibility). + $old_meta_value = $meta_key_value; $result = DT_Storage_API::delete_file( $meta_key_value ); $deleted = $result['file_deleted'] ?? false; $deleted_key = $result['file_key'] ?? ''; - } - // Finally, delete corresponding meta data. - delete_post_meta( $post_id, $meta_key ); + // Finally, delete corresponding meta data. + delete_post_meta( $post_id, $meta_key ); + + // Log activity for file deletion + if ( $deleted ) { + $post_settings = DT_Posts::get_post_settings( $post_type ); + $field_name = $post_settings['fields'][ $meta_key ]['name'] ?? $meta_key; + $file_name = basename( $old_meta_value ); + $object_note = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + + dt_activity_insert( [ + 'action' => 'field_update', + 'object_type' => $post_type, + 'object_id' => $post_id, + 'object_name' => get_the_title( $post_id ), + 'meta_key' => $meta_key, + 'meta_value' => '', + 'old_value' => $old_meta_value, + 'field_type' => 'file_upload', + 'object_note' => $object_note, + ] ); + } - return [ - 'deleted' => $deleted, - 'deleted_key' => $deleted_key - ]; + return [ + 'deleted' => $deleted, + 'deleted_key' => $deleted_key + ]; + } } } diff --git a/dt-posts/dt-posts.php b/dt-posts/dt-posts.php index 6c56e96fd0..92a2a6679b 100644 --- a/dt-posts/dt-posts.php +++ b/dt-posts/dt-posts.php @@ -1708,6 +1708,7 @@ private static function list_revert_post_activity_history( string $post_type, in 'text', 'textarea', 'number', + 'file_upload', 'connection to', 'connection from', '' @@ -3265,6 +3266,11 @@ public static function get_field_types(){ 'description' => 'Location selected with the help of a geocoder (mapbox, google)', 'user_creatable' => false, ], + 'file_upload' => [ + 'label' => 'File Upload', + 'description' => 'Field for uploading multiple files (images, documents, PDFs, etc.)', + 'user_creatable' => true, + ], 'tasks' => [ 'label' => 'Tasks', 'description' => 'Tasks assigned to a record', diff --git a/dt-posts/posts.php b/dt-posts/posts.php index c3383c607e..52838564da 100644 --- a/dt-posts/posts.php +++ b/dt-posts/posts.php @@ -408,7 +408,94 @@ public static function format_activity_message( $activity, $post_type_settings ) $fields = $post_type_settings['fields']; $message = ''; if ( $activity->action == 'field_update' ){ - if ( isset( $fields[$activity->meta_key] ) ){ + // Check if this is a file_upload field by checking field_type or field settings + $is_file_upload_field = false; + if ( isset( $activity->field_type ) && $activity->field_type === 'file_upload' ) { + $is_file_upload_field = true; + } elseif ( isset( $fields[$activity->meta_key]['type'] ) && $fields[$activity->meta_key]['type'] === 'file_upload' ) { + $is_file_upload_field = true; + } + + if ( $is_file_upload_field ) { + // Handle file_upload field formatting + if ( !empty( $activity->object_note ) ) { + $message = $activity->object_note; + } else { + // Parse meta_value to determine action + $new_value = maybe_unserialize( $activity->meta_value ); + $old_value = maybe_unserialize( $activity->old_value ); + $field_name = isset( $fields[$activity->meta_key]['name'] ) ? $fields[$activity->meta_key]['name'] : $activity->meta_key; + + if ( empty( $new_value ) || $new_value === 'value_deleted' ) { + // File(s) deleted + if ( is_array( $old_value ) ) { + $file_count = count( $old_value ); + if ( $file_count === 1 ) { + $file_name = is_array( $old_value[0] ) && isset( $old_value[0]['name'] ) + ? $old_value[0]['name'] + : basename( is_string( $old_value[0] ) ? $old_value[0] : '' ); + $message = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + } else { + $message = sprintf( _x( 'Deleted all %1$d files from %2$s', 'file_upload activity', 'disciple_tools' ), $file_count, $field_name ); + } + } else { + $file_name = basename( $old_value ); + $message = sprintf( _x( 'Deleted file: %1$s from %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + } + } else if ( empty( $old_value ) ) { + // File(s) uploaded + if ( is_array( $new_value ) ) { + $file_count = count( $new_value ); + $file_names = []; + foreach ( $new_value as $file ) { + if ( is_array( $file ) && isset( $file['name'] ) ) { + $file_names[] = $file['name']; + } elseif ( is_string( $file ) ) { + $file_names[] = basename( $file ); + } + } + if ( $file_count === 1 ) { + $message = sprintf( _x( 'Uploaded file: %1$s to %2$s', 'file_upload activity', 'disciple_tools' ), $file_names[0], $field_name ); + } else { + $file_list = implode( ', ', array_slice( $file_names, 0, 3 ) ); + if ( $file_count > 3 ) { + $file_list .= sprintf( _x( ' and %d more', 'file_upload activity', 'disciple_tools' ), $file_count - 3 ); + } + $message = sprintf( _x( 'Uploaded %1$d files: %2$s to %3$s', 'file_upload activity', 'disciple_tools' ), $file_count, $file_list, $field_name ); + } + } else { + $file_name = basename( $new_value ); + $message = sprintf( _x( 'Uploaded file: %1$s to %2$s', 'file_upload activity', 'disciple_tools' ), $file_name, $field_name ); + } + } else { + // File renamed or updated + $old_file_names = []; + $new_file_names = []; + + if ( is_array( $old_value ) ) { + foreach ( $old_value as $file ) { + if ( is_array( $file ) && isset( $file['name'] ) ) { + $old_file_names[] = $file['name']; + } + } + } + if ( is_array( $new_value ) ) { + foreach ( $new_value as $file ) { + if ( is_array( $file ) && isset( $file['name'] ) ) { + $new_file_names[] = $file['name']; + } + } + } + + // Check if it's a rename (one file, names differ) + if ( count( $old_file_names ) === 1 && count( $new_file_names ) === 1 && $old_file_names[0] !== $new_file_names[0] ) { + $message = sprintf( _x( 'Renamed file from %1$s to %2$s', 'file_upload activity', 'disciple_tools' ), $old_file_names[0], $new_file_names[0] ); + } else { + $message = $field_name . ': ' . __( 'File updated', 'disciple_tools' ); + } + } + } + } elseif ( isset( $fields[$activity->meta_key] ) ){ if ( $fields[$activity->meta_key]['type'] === 'user_select' ){ $meta_array = explode( '-', $activity->meta_value ); // Separate the type and id if ( isset( $meta_array[1] ) ) { @@ -826,6 +913,54 @@ public static function fields_to_sql( $post_type, $query_array, $operator = 'AND if ( empty( $query_value ) ){ $where_sql .= " $table_key.meta_value IS NULL "; } + } else if ( in_array( $field_type, [ 'file_upload' ] ) ) { + /** + * file_upload + * Supports: + * ['*'] => has at least one file + * [] => no files + */ + if ( !is_array( $query_value ) ) { + return new WP_Error( __FUNCTION__, "$query_key must be an array", [ 'status' => 400 ] ); + } + + $meta_table = $wpdb->postmeta; + $user_condition = ''; + if ( isset( $field_settings[$query_key]['private'] ) && $field_settings[$query_key]['private'] ) { + $meta_table = $wpdb->dt_post_user_meta; + $user_condition = ' AND pm.user_id = ' . get_current_user_id(); + } + + // Detect "has files" query (supports '*' and prefixed legacy option id) + $has_files = false; + foreach ( $query_value as $value ) { + if ( strpos( (string) $value, '-' ) !== 0 ) { + $normalized = ltrim( (string) $value, '^' ); + if ( $normalized === '*' || $normalized === 'all-with-files' ) { + $has_files = true; + } + } + } + + $has_value_sql = " + EXISTS ( + SELECT 1 + FROM $meta_table pm + WHERE pm.post_id = p.ID + AND pm.meta_key = '" . esc_sql( $query_key ) . "' + $user_condition + AND pm.meta_value <> '' + AND pm.meta_value <> 'a:0:{}' + ) + "; + + if ( empty( $query_value ) ) { + $where_sql .= " NOT $has_value_sql "; + } elseif ( $has_files ) { + $where_sql .= " $has_value_sql "; + } else { + return new WP_Error( __FUNCTION__, "Invalid file_upload filter values for $query_key", [ 'status' => 400 ] ); + } } else if ( in_array( $field_type, [ 'connection' ] ) ){ /** * connection