@openmfp/webcomponents 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mfp-wc-dashboard.js +2 -2
- package/mfp-webcomponents.js +8 -8
- package/package.json +1 -1
package/mfp-wc-dashboard.js
CHANGED
|
@@ -148,10 +148,10 @@ This component supports nesting a \`Link\` component inside.
|
|
|
148
148
|
design guidelines, please use the \`ui5-button\` component.
|
|
149
149
|
**Note:** When the slot is not present, a built-in delete button will be displayed.`,since:"1.9.0"}],this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["movable","accessibleName","type","accessibilityAttributes","navigated","tooltip","highlight","selected"];for(let o of i){let n=o.replace(/-./g,s=>s[1].toUpperCase());this[n]&&typeof this[n]=="function"&&P5(this.injector,()=>{U5(()=>{let s=this[n]();t&&(t[o]=s)})})}let r=["ui5DetailClick"];for(let o of r){let n=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(n,s=>{this[o].emit(s)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-li-custom"],["","ui5-li-custom",""]],inputs:{movable:[1,"movable"],accessibleName:[1,"accessibleName"],type:[1,"type"],accessibilityAttributes:[1,"accessibilityAttributes"],navigated:[1,"navigated"],tooltip:[1,"tooltip"],highlight:[1,"highlight"],selected:[1,"selected"]},outputs:{ui5DetailClick:"ui5DetailClick"},exportAs:["ui5ListItemCustom"],ngContentSelectors:vI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),fI="less",gI="M14.5 7c.333 0 .5.167.5.5v1c0 .333-.167.5-.5.5h-13a.503.503 0 0 1-.344-.14A.462.462 0 0 1 1 8.5v-1c0-.146.052-.266.156-.36A.503.503 0 0 1 1.5 7h13Z",AI=!1,bI="0 0 16 16",wI="SAP-icons-v4",yI="@ui5/webcomponents-icons";t1(fI,{pathData:gI,ltr:AI,viewBox:bI,collection:wI,packageName:yI});var ZI="less",CI="M14.25 7a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5h12.5Z",xI=!1,MI="0 0 16 16",BI="SAP-icons-v5",HI="@ui5/webcomponents-icons";t1(ZI,{pathData:CI,ltr:xI,viewBox:MI,collection:BI,packageName:HI});var cp=(function(e){return e.Textual="Textual",e.Graphical="Graphical",e})(cp||{}),kI=cp;function SI(){return G("div",{class:{"ui5-switch-root":!0,"ui5-switch--desktop":b0(),"ui5-switch--disabled":this.disabled,"ui5-switch--checked":this.checked,"ui5-switch--semantic":this.graphical,"ui5-switch--no-label":!(this.graphical||this.textOn||this.textOff),"ui5-switch--safari":ft()},role:"switch","aria-label":this.ariaLabelText,"aria-checked":this.checked,"aria-disabled":this.effectiveAriaDisabled,"aria-readonly":this.effectiveAriaReadonly,"aria-required":this.required,"aria-describedby":this.ariaDescribedBy,onClick:this._onclick,onKeyUp:this._onkeyup,onKeyDown:this._onkeydown,onFocusIn:this._onfocusin,tabindex:this.effectiveTabIndex,title:this.tooltip,children:[H("div",{class:"ui5-switch-inner",children:H("div",{class:"ui5-switch-track",part:"slider",children:G("div",{class:"ui5-switch-slider",children:[this.graphical?G(P1,{children:[H("span",{class:"ui5-switch-text ui5-switch-text--on",children:H(h0,{name:L9,class:"ui5-switch-icon-on"})}),H("span",{class:"ui5-switch-text ui5-switch-text--off",children:H(h0,{name:o4,class:"ui5-switch-icon-off"})})]}):H(P1,{children:this.hasNoLabel?G(P1,{children:[H("span",{class:"ui5-switch-text ui5-switch-text--on ui5-switch-no-label-icon",part:"text-on",children:H(h0,{name:this.sapNextIcon,class:"ui5-switch-no-label-icon-on"})}),H("span",{class:"ui5-switch-text ui5-switch-text--off ui5-switch-no-label-icon",part:"text-off",children:H(h0,{name:this.sapNextIcon,class:"ui5-switch-no-label-icon-off"})})]}):G(P1,{children:[H("span",{class:"ui5-switch-text ui5-switch-text--on",part:"text-on","aria-hidden":this._textAriaHidden,children:this._textOn}),H("span",{class:"ui5-switch-text ui5-switch-text--off",part:"text-off","aria-hidden":this._textAriaHidden,children:this._textOff})]})}),this.readonly&&H("span",{class:"ui5-switch-text ui5-switch-text--readonly",id:this.ariaDescribedBy,"aria-hidden":this._textAriaHidden,children:this.ariaDescribedByText}),H("span",{class:"ui5-switch-handle",part:"handle"})]})})}),H("input",{type:"checkbox",checked:this.checked,class:"ui5-switch-input","data-sap-no-tab-ref":!0})]})}P("@ui5/webcomponents-theming","sap_horizon",async()=>d1);P("@ui5/webcomponents","sap_horizon",async()=>_1,"host");var LI=`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{-webkit-tap-highlight-color:rgba(0,0,0,0)}:host{vertical-align:middle}:host(:not([hidden])){display:inline-block}.ui5-switch-root{position:relative;display:flex;align-items:center;width:var(--_ui5_switch_width);height:var(--_ui5_switch_height);min-width:var(--_ui5_switch_min_width);cursor:pointer;outline:none;border-radius:var(--_ui5-switch-root-border-radius)}.ui5-switch-root:not(.ui5-switch--no-label):not(.ui5-switch--semantic){width:var(--_ui5_switch_with_label_width);height:var(--_ui5_switch_height)}.ui5-switch-root.ui5-switch--no-label{min-width:var(--_ui5_switch_width)}.ui5-switch-inner{display:flex;align-items:center;justify-content:center;height:100%;width:100%;min-width:inherit;overflow:hidden;pointer-events:none;will-change:transform}:host([checked]) .ui5-switch-inner{border-radius:6.25rem;box-shadow:var(--_ui5-switch-root-box-shadow)}.ui5-switch-track{display:flex;align-items:center;height:var(--_ui5_switch_track_height);width:var(--_ui5_switch_track_width);border:var(--_ui5-switch-track-border);border-radius:var(--_ui5_switch_track_border_radius);box-sizing:border-box;transition:var(--_ui5_switch_track_transition)}.ui5-switch-root:not(.ui5-switch--no-label):not(.ui5-switch--semantic) .ui5-switch-track{height:var(--_ui5_switch_track_with_label_height);width:var(--_ui5_switch_track_with_label_width)}.ui5-switch-slider{position:relative;height:var(--_ui5_switch_height);width:100%;transition:transform .1s ease-in;transform-origin:top left}.ui5-switch-slider>*:not(.ui5-switch-handle){display:var(--_ui5-switch-slider-texts-display)}.ui5-switch-handle{position:absolute;display:flex;justify-content:center;align-items:center;width:var(--_ui5_switch_handle_width);height:var(--_ui5_switch_handle_height);border:var(--_ui5_switch_handle_border);border-radius:var(--_ui5_switch_handle_border_radius);box-sizing:border-box}.ui5-switch-root:not(.ui5-switch--no-label):not(.ui5-switch--semantic) .ui5-switch-handle{height:var(--_ui5_switch_handle_with_label_height);width:var(--_ui5_switch_handle_with_label_width)}.ui5-switch-text{display:flex;justify-content:center;position:absolute;z-index:var(--_ui5_switch_text_z_index);min-width:var(--_ui5_switch_text_min_width);font-size:var(--_ui5_switch_text_font_size);font-family:var(--_ui5-switch-text_font_family);text-transform:uppercase;text-align:center;white-space:nowrap;user-select:none;-webkit-user-select:none}.ui5-switch-handle,.ui5-switch-text{inset-inline-start:var(--_ui5_switch_handle_left);top:50%;transform:translateY(-50%)}.ui5-switch-root:focus-visible:after,.ui5-switch--desktop.ui5-switch-root:focus-within:after{content:"";position:absolute;inset-inline-start:var(--_ui5_switch_root_outline_left);inset-inline-end:var(--_ui5_switch_root_outline_right);top:var(--_ui5_switch_root_outline_top);bottom:var(--_ui5_switch_root_outline_bottom);border:var(--_ui5_switch_focus_outline);border-radius:var(--_ui5_switch_root_after_boreder_radius);pointer-events:none;transition:var(--_ui5_switch_track_transition);outline:var(--_ui5_switch_root_after_outline)}.ui5-switch-root .ui5-switch-input{position:absolute;inset-inline-start:0;width:0;height:0;margin:0;visibility:hidden;appearance:none;-webkit-appearance:none}.ui5-switch-root.ui5-switch--disabled{opacity:var(--_ui5_switch_disabled_opacity);cursor:default}.ui5-switch-root.ui5-switch--checked .ui5-switch-text--off,.ui5-switch-root.ui5-switch--checked .ui5-switch-text--readonly{visibility:var(--_ui5_switch_text_hidden)}.ui5-switch-root:not(.ui5-switch--checked) .ui5-switch-text--on,.ui5-switch-root:not(.ui5-switch--checked) .ui5-switch-text--readonly{visibility:var(--_ui5_switch_text_hidden)}.ui5-switch-root.ui5-switch--checked.ui5-switch--semantic .ui5-switch-text--on,.ui5-switch-root.ui5-switch--checked.ui5-switch--desktop.ui5-switch--no-label .ui5-switch-text--on{inset-inline-start:var(--_ui5_switch_text_active_left)}.ui5-switch-root:not(.ui5-switch--checked).ui5-switch--semantic .ui5-switch-text--off,.ui5-switch-root:not(.ui5-switch--checked).ui5-switch--desktop.ui5-switch--no-label .ui5-switch-text--off{inset-inline-start:var(--_ui5_switch_text_inactive_left);inset-inline-end:var(--_ui5_switch_text_inactive_right)}.ui5-switch-root.ui5-switch--checked .ui5-switch-handle{background:var(--_ui5_switch_handle_active_background_color);border-color:var(--_ui5_switch_handle_active_border_color)}.ui5-switch-root:not(.ui5-switch--checked) .ui5-switch-handle{background:var(--_ui5_switch_handle_inactive_background_color);border-color:var(--_ui5_switch_handle_inactive_border_color)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-handle{background:var(--_ui5_switch_handle_hover_active_background_color);border-color:var(--_ui5_switch_handle_hover_active_border_color)}.ui5-switch--desktop.ui5-switch-root:not(.ui5-switch--disabled):not(.ui5-switch--checked):hover .ui5-switch-handle{background:var(--_ui5_switch_handle_hover_inactive_background_color);border-color:var(--_ui5_switch_handle_hover_inactive_border_color)}.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked .ui5-switch-handle{background:var(--_ui5_switch_handle_semantic_accept_background_color);border-color:var(--_ui5_switch_handle_semantic_accept_border_color)}.ui5-switch-root.ui5-switch--semantic:not(.ui5-switch--checked) .ui5-switch-handle{background:var(--_ui5_switch_handle_semantic_reject_background_color);border-color:var(--_ui5_switch_handle_semantic_reject_border_color)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-handle{background:var(--_ui5_switch_handle_semantic_hover_accept_background_color);border-color:var(--_ui5_switch_handle_semantic_hover_accept_border_color)}.ui5-switch--desktop.ui5-switch--semantic.ui5-switch-root:not(.ui5-switch--checked):not(.ui5-switch--disabled):hover .ui5-switch-handle{background:var(--_ui5_switch_handle_semantic_hover_reject_background_color);border-color:var(--_ui5_switch_handle_semantic_hover_reject_border_color)}.ui5-switch-root.ui5-switch--checked .ui5-switch-track{background:var(--_ui5_switch_track_active_background_color);border-color:var(--_ui5_switch_track_active_border_color)}.ui5-switch-root:not(.ui5-switch--checked) .ui5-switch-track{background:var(--_ui5_switch_track_inactive_background_color);border-color:var(--_ui5_switch_track_inactive_border_color)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-track{background:var(--_ui5_switch_track_hover_active_background_color);border-color:var(--_ui5_switch_track_hover_active_border_color)}.ui5-switch--desktop.ui5-switch-root:not(.ui5-switch--checked):not(.ui5-switch--disabled):hover .ui5-switch-track{background:var(--_ui5_switch_track_hover_inactive_background_color);border-color:var(--_ui5_switch_track_hover_inactive_border_color)}.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked .ui5-switch-track{background:var(--_ui5_switch_track_semantic_accept_background_color);border-color:var(--_ui5_switch_track_semantic_accept_border_color)}.ui5-switch-root.ui5-switch--semantic:not(.ui5-switch--checked) .ui5-switch-track{background:var(--_ui5_switch_track_semantic_reject_background_color);border-color:var(--_ui5_switch_track_semantic_reject_border_color)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-track{background:var(--_ui5_switch_track_semantic_hover_accept_background_color);border-color:var(--_ui5_switch_track_semantic_hover_accept_border_color)}.ui5-switch--desktop.ui5-switch--semantic.ui5-switch-root:not(.ui5-switch--checked):not(.ui5-switch--disabled):hover .ui5-switch-track{background:var(--_ui5_switch_track_semantic_hover_reject_background_color);border-color:var(--_ui5_switch_track_semantic_hover_reject_border_color)}.ui5-switch-root.ui5-switch--checked:not(.ui5-switch--no-label):not(.ui5-switch--semantic) .ui5-switch-slider{transform:var(--_ui5_switch_transform_with_label)}.ui5-switch-root.ui5-switch--checked .ui5-switch-slider{transform:var(--_ui5_switch_transform)}.ui5-switch-text .ui5-switch-text--on .ui5-switch-no-label-icon,.ui5-switch-root.ui5-switch--semantic .ui5-switch-text,.ui5-switch-root.ui5-switch--no-label .ui5-switch-text{display:flex;justify-content:center}.ui5-switch--no-label .ui5-switch-no-label-icon-on,.ui5-switch--no-label .ui5-switch-no-label-icon-off{width:var(--_ui5_switch_icon_width);height:var(--_ui5_switch_icon_height);display:var(--_ui5_switch_track_icon_display)}.ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-on,.ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-off{width:var(--_ui5_switch_icon_width);height:var(--_ui5_switch_icon_height)}.ui5-switch-root .ui5-switch-text{font-family:var(--_ui5_switch_text_font_family);font-size:var(--_ui5_switch_text_font_size);width:var(--_ui5_switch_text_width)}.ui5-switch-root:not(.ui5-switch--no-label):not(.ui5-switch--semantic) .ui5-switch-text{font-family:var(--_ui5_switch_text_with_label_font_family);font-size:var(--_ui5_switch_text_with_label_font_size);width:var(--_ui5_switch_text_with_label_width)}:host([active]) .ui5-switch--desktop.ui5-switch-root:not(.ui5-switch--disabled) .ui5-switch-track{background:var(--_ui5-switch_track-off-active-background)}:host([active]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-track{background:var(--_ui5-switch_track-on-active-background)}.ui5-switch--desktop.ui5-switch-root:not(.ui5-switch--disabled):hover .ui5-switch-handle{box-shadow:var(--_ui5_switch_handle_off_hover_box_shadow)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-handle{box-shadow:var(--_ui5_switch_handle_on_hover_box_shadow)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic:not(.ui5-switch--disabled):hover .ui5-switch-handle{box-shadow:var(--_ui5_switch_handle_semantic_off_hover_box_shadow)}.ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked:not(.ui5-switch--disabled):hover .ui5-switch-handle{box-shadow:var(--_ui5_switch_handle_semantic_on_hover_box_shadow)}.ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-on,.ui5-switch-root.ui5-switch--semantic .ui5-switch-text--on{color:var(--_ui5_switch_text_semantic_accept_color)}.ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-off,.ui5-switch-root.ui5-switch--semantic .ui5-switch-text--off{color:var(--_ui5_switch_text_semantic_reject_color)}.ui5-switch-root .ui5-switch-text--on{color:var(--_ui5_switch_text_active_color);overflow:var(--_ui5_switch_text_overflow);text-overflow:ellipsis;inset-inline-start:var(--_ui5_switch_text_active_left_alternate)}.ui5-switch-root .ui5-switch-text--off{color:var(--_ui5_switch_text_inactive_color);overflow:var(--_ui5_switch_text_overflow);text-overflow:ellipsis;inset-inline-start:var(--_ui5_switch_text_inactive_left_alternate);inset-inline-end:var(--_ui5_switch_text_inactive_right_alternate)}.ui5-switch-root.ui5-switch--safari .ui5-switch-text--on.ui5-switch-no-label-icon,.ui5-switch-root.ui5-switch--safari .ui5-switch-text--off.ui5-switch-no-label-icon{inset-inline-start:.1875rem}.ui5-switch-root .ui5-switch-no-label-icon-on,.ui5-switch-root .ui5-switch-icon-on{color:var(--_ui5_switch_text_active_color)}.ui5-switch-root .ui5-switch-no-label-icon-off,.ui5-switch-root .ui5-switch-icon-off{color:var(--_ui5_switch_text_inactive_color)}:dir(rtl).ui5-switch-root.ui5-switch--checked:not(.ui5-switch--no-label):not(.ui5-switch--semantic) .ui5-switch-slider{transform:var(--_ui5_switch_rtl_transform_with_label)}:dir(rtl).ui5-switch-root.ui5-switch--checked .ui5-switch-slider{transform:var(--_ui5_switch_rtl_transform)}:host([readonly]) .ui5-switch-root{cursor:default}:host([readonly]) .ui5-switch-track,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-track{background:var(--sapField_ReadOnly_Background);border:.0625rem var(--_ui5_switch_readonly_track_border_style) var(--sapField_ReadOnly_BorderColor)}:host([readonly]) .ui5-switch-handle,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-handle{background:var(--sapField_ReadOnly_Background);border:.0625rem var(--_ui5_switch_readonly_handle_border_style) var(--sapField_ReadOnly_BorderColor)}:host([readonly]) .ui5-switch-text--on,:host([readonly]) .ui5-switch-text--off,:host([readonly]) .ui5-switch-no-label-icon-on,:host([readonly]) .ui5-switch-no-label-icon-off,:host([readonly]) .ui5-switch-icon-on,:host([readonly]) .ui5-switch-icon-off,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-on,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-icon-off,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-text--on,:host([readonly]) .ui5-switch-root.ui5-switch--semantic .ui5-switch-text--off{color:var(--sapButton_Handle_TextColor)}:host([readonly]) .ui5-switch--desktop.ui5-switch-root:hover .ui5-switch-handle,:host([readonly]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--checked:hover .ui5-switch-handle,:host([readonly]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic:hover .ui5-switch-handle,:host([readonly]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic.ui5-switch--checked:hover .ui5-switch-handle{box-shadow:none}:host([readonly]) .ui5-switch--desktop.ui5-switch-root:hover .ui5-switch-track,:host([readonly]) .ui5-switch--desktop.ui5-switch-root:hover .ui5-switch-handle,:host([readonly]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic:hover .ui5-switch-track,:host([readonly]) .ui5-switch--desktop.ui5-switch-root.ui5-switch--semantic:hover .ui5-switch-handle{background:var(--sapField_ReadOnly_Background);border-color:var(--sapField_ReadOnly_BorderColor)}
|
|
150
150
|
`,J0=function(e,a,t,i){var r=arguments.length,o=r<3?a:i===null?i=Object.getOwnPropertyDescriptor(a,t):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,a,t,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(a,t,o):n(a,t))||o);return r>3&&o&&Object.defineProperty(a,t,o),o},v7,M0=v7=class extends K1{constructor(){super(...arguments),this.design="Textual",this.readonly=!1,this.checked=!1,this.disabled=!1,this.required=!1,this.value="",this._cancelAction=!1,this._isSpacePressed=!1}get formValidityMessage(){return v7.i18nBundle.getText(ka)}get formValidity(){return{valueMissing:this.required&&!this.checked}}async formElementAnchor(){return this.getFocusDomRefAsync()}get formFormattedValue(){return this.checked?this.value||"on":null}get sapNextIcon(){return this.checked?"accept":"less"}_onfocusin(){this._cancelAction=!1,this._isSpacePressed=!1}_onclick(){this.readonly||this.toggle()}_onkeydown(e){D1(e)&&e.preventDefault(),!this.readonly&&(D1(e)?this._isSpacePressed=!0:(O2(e)||N2(e))&&(this._cancelAction=!0),X1(e)&&this._onclick())}_onkeyup(e){if(this.readonly)return;let a=D1(e),t=O2(e)||N2(e);if(a||yt(e)){if(this._cancelAction){this._cancelAction=!1,this._isSpacePressed=!1,e.preventDefault();return}this._isSpacePressed=!1}else t&&!this._isSpacePressed&&(this._cancelAction=!1);a&&this._onclick()}toggle(){if(!this.disabled&&!this.readonly){this.checked=!this.checked;let e=!this.fireDecoratorEvent("change"),a=!this.fireDecoratorEvent("value-changed");(e||a)&&(this.checked=!this.checked)}}get graphical(){return this.design===kI.Graphical}get hasNoLabel(){return!(this.graphical||this.textOn||this.textOff)}get _textOn(){return this.graphical?"":this.textOn}get _textOff(){return this.graphical?"":this.textOff}get _textAriaHidden(){let e=this.textOn?.toLowerCase(),a=this.textOff?.toLowerCase(),t=v7.i18nBundle.getText(_n).toLowerCase(),i=v7.i18nBundle.getText(pn).toLowerCase();return e===t&&a===i||void 0}get effectiveTabIndex(){return this.disabled?void 0:0}get effectiveAriaReadonly(){return this.readonly?"true":void 0}get effectiveAriaDisabled(){return this.disabled?"true":void 0}get ariaLabelText(){return m2(this)||$a(this)||void 0}get ariaDescribedBy(){return this.readonly?`${this._id}-readonly-desc`:void 0}get ariaDescribedByText(){return this.readonly?v7.i18nBundle.getText(wa):""}};J0([Z()],M0.prototype,"design",void 0);J0([Z({type:Boolean})],M0.prototype,"readonly",void 0);J0([Z({type:Boolean})],M0.prototype,"checked",void 0);J0([Z({type:Boolean})],M0.prototype,"disabled",void 0);J0([Z()],M0.prototype,"textOn",void 0);J0([Z()],M0.prototype,"textOff",void 0);J0([Z()],M0.prototype,"accessibleName",void 0);J0([Z()],M0.prototype,"accessibleNameRef",void 0);J0([Z()],M0.prototype,"tooltip",void 0);J0([Z({type:Boolean})],M0.prototype,"required",void 0);J0([Z()],M0.prototype,"name",void 0);J0([Z()],M0.prototype,"value",void 0);J0([Z({type:Boolean,noAttribute:!0})],M0.prototype,"_cancelAction",void 0);J0([Z({type:Boolean,noAttribute:!0})],M0.prototype,"_isSpacePressed",void 0);J0([W1("@ui5/webcomponents")],M0,"i18nBundle",void 0);M0=v7=J0([B1({tag:"ui5-switch",formAssociated:!0,languageAware:!0,styles:LI,renderer:z1,template:SI}),X("change",{bubbles:!0,cancelable:!0}),X("value-changed",{bubbles:!0,cancelable:!0})],M0);M0.define();var VI=["*"],TI=(()=>{class e{constructor(){this.design=R("Textual"),this.checked=R(!1,{transform:j1}),this.disabled=R(!1,{transform:j1}),this.textOn=R(),this.textOff=R(),this.accessibleName=R(),this.accessibleNameRef=R(),this.tooltip=R(),this.required=R(!1,{transform:j1}),this.name=R(),this.value=R(""),this.ui5Change=g1(),this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["design","checked","disabled","textOn","textOff","accessibleName","accessibleNameRef","tooltip","required","name","value"];for(let o of i){let n=o.replace(/-./g,s=>s[1].toUpperCase());this[n]&&typeof this[n]=="function"&&P5(this.injector,()=>{U5(()=>{let s=this[n]();t&&(t[o]=s)})})}let r=["ui5Change"];for(let o of r){let n=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(n,s=>{this[o].emit(s)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-switch"],["","ui5-switch",""]],inputs:{design:[1,"design"],checked:[1,"checked"],disabled:[1,"disabled"],textOn:[1,"textOn"],textOff:[1,"textOff"],accessibleName:[1,"accessibleName"],accessibleNameRef:[1,"accessibleNameRef"],tooltip:[1,"tooltip"],required:[1,"required"],name:[1,"name"],value:[1,"value"]},outputs:{ui5Change:"ui5Change"},exportAs:["ui5Switch"],features:[pk([ME])],ngContentSelectors:VI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),EI=(e,a)=>a.id;function II(e,a){if(e&1){let t=q5();u1(0,"ui5-li-custom",5)(1,"div",9)(2,"span"),p5(3),A1(),u1(4,"ui5-switch",10),_0("ui5Change",function(){let i=W0(t).$implicit,r=Z1();return $0(r.toggle(i.id))}),A1()()()}if(e&2){let t=a.$implicit,i=Z1();v0("accessibleName",t.label||t.component),w1(3),pe(t.label||t.component),w1(),v0("accessibleName",t.label||t.component)("checked",i.selectedIds().has(t.id))}}var DI=class xi{availableCards=R([]);addedCardsIds=R(new Set);open=R(!1);confirm=g1();cancelled=g1();selectedIds=g7(new Set);constructor(){U5(()=>{if(this.open()){let a=new Set(this.availableCards().filter(t=>this.addedCardsIds().has(t.id)).map(t=>t.id));this.selectedIds.set(a)}})}toggle(a){this.selectedIds.update(t=>{let i=new Set(t);return i.has(a)?i.delete(a):i.add(a),i})}confirmSave(){let a=new Set(this.availableCards().map(r=>r.id)),t=this.availableCards().filter(r=>this.selectedIds().has(r.id)&&!this.addedCardsIds().has(r.id)),i=[...this.addedCardsIds()].filter(r=>a.has(r)&&!this.selectedIds().has(r));this.confirm.emit({added:t,removed:i})}static \u0275fac=function(a){return new(a||xi)};static \u0275cmp=Y0({type:xi,selectors:[["mfp-edit-cards-dialog"]],inputs:{availableCards:[1,"availableCards"],addedCardsIds:[1,"addedCardsIds"],open:[1,"open"]},outputs:{confirm:"confirm",cancelled:"cancelled"},decls:13,vars:1,consts:[[3,"ui5BeforeClose","open"],["slot","header",1,"edit-cards-dialog__header"],["level","H5"],[1,"edit-cards-dialog"],["noDataText","No cards available.","selectionMode","None","separators","Inner"],[3,"accessibleName"],["slot","footer",1,"edit-cards-dialog__footer"],["design","Emphasized",3,"click"],["design","Transparent",3,"click"],[1,"edit-cards-dialog__list-item"],[3,"ui5Change","accessibleName","checked"]],template:function(a,t){a&1&&(u1(0,"ui5-dialog",0),_0("ui5BeforeClose",function(){return t.cancelled.emit()}),u1(1,"div",1)(2,"ui5-title",2),p5(3,"Edit Cards"),A1()(),u1(4,"div",3)(5,"ui5-list",4),E7(6,II,5,4,"ui5-li-custom",5,EI),A1()(),u1(8,"div",6)(9,"ui5-button",7),_0("click",function(){return t.confirmSave()}),p5(10,"Save"),A1(),u1(11,"ui5-button",8),_0("click",function(){return t.cancelled.emit()}),p5(12,"Cancel"),A1()()()),a&2&&(v0("open",t.open()),w1(6),I7(t.availableCards()))},dependencies:[c6,zE,pI,mI,TI,op],styles:[`:host{display:contents}.edit-cards-dialog{margin:-1rem;min-width:300px}.edit-cards-dialog__header{display:flex;align-items:flex-start;padding:.75rem 1rem}.edit-cards-dialog__list-item{display:flex;align-items:center;justify-content:space-between;width:100%}.edit-cards-dialog__footer{display:flex;justify-content:flex-end;align-items:center;width:100%;gap:.5rem}
|
|
151
|
-
`],encapsulation:3})},zI=(e,a)=>a.id;function RI(e,a){if(e&1){let t=q5();u1(0,"ui5-button",5),_0("click",function(){W0(t);let i=Z1();return $0(i.removeSection.emit())}),A1()}if(e&2){let t=Z1();v0("accessibleName","Remove section: "+(t.section().title||t.section().id))}}function NI(e,a){if(e&1&&(u1(0,"div",2)(1,"span",6),p5(2),A1()()),e&2){let t=Z1();w1(2),pe(t.section().title)}}function OI(e,a){if(e&1){let t=q5();u1(0,"mfp-dashboard-card",7),_0("removeCard",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeCard.emit(i.id))}),A1()}if(e&2){let t=a.$implicit,i=Z1();v0("card",t)("editMode",i.editMode()&&i.section().editable!==!1)}}var FI=class Mi{section=R.required();cards=R([]);columns=R(12);editMode=R(!1);removeSection=g1();removeCard=g1();static \u0275fac=function(a){return new(a||Mi)};static \u0275cmp=Y0({type:Mi,selectors:[["mfp-dashboard-section"]],hostVars:2,hostBindings:function(a,t){a&2&&ue("grid-column","span "+(t.section().w??12))},inputs:{section:[1,"section"],cards:[1,"cards"],columns:[1,"columns"],editMode:[1,"editMode"]},outputs:{removeSection:"removeSection",removeCard:"removeCard"},decls:6,vars:6,consts:[[1,"section"],["design","Default","icon","decline",1,"section__remove",3,"accessibleName"],[1,"section__header"],[1,"section__grid"],[3,"card","editMode"],["design","Default","icon","decline",1,"section__remove",3,"click","accessibleName"],[1,"section__title"],[3,"removeCard","card","editMode"]],template:function(a,t){a&1&&(u1(0,"div",0),r2(1,RI,1,1,"ui5-button",1),r2(2,NI,3,1,"div",2),u1(3,"div",3),E7(4,OI,1,2,"mfp-dashboard-card",4,zI),A1()()),a&2&&(V_("section--edit",t.editMode()&&t.section().editable!==!1),w1(),o2(t.editMode()&&t.section().editable!==!1?1:-1),w1(),o2(t.section().title?2:-1),w1(),ue("--cols",t.columns()),w1(),I7(t.cards()))},dependencies:[sp,c6],styles:['[_nghost-%COMP%]{display:block;min-width:0}.section[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;border:1px solid transparent;border-top:none;border-radius:0 0 .5rem .5rem;padding:1.25rem .75rem .75rem}.section--edit[_ngcontent-%COMP%]{border-color:var(--sapGroup_ContentBorderColor, #d9d9d9)}.section__remove[_ngcontent-%COMP%]{position:absolute;top:-.75rem;right:-.75rem;border-radius:50%!important;width:1.25rem!important;height:1.25rem!important;min-width:unset!important;padding:0!important;font-size:.625rem!important}.section__header[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;transform:translateY(-50%);display:flex;align-items:center;pointer-events:none}.section__header[_ngcontent-%COMP%]:before, .section__header[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:transparent}.section__header[_ngcontent-%COMP%]:before{max-width:.75rem;flex:0 0 .75rem}.section--edit[_ngcontent-%COMP%] .section__header[_ngcontent-%COMP%]:before, .section--edit[_ngcontent-%COMP%] .section__header[_ngcontent-%COMP%]:after{background:var(--sapGroup_ContentBorderColor, #d9d9d9)}.section__title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--sapTextColor, #fff);padding:0 .5rem;white-space:nowrap;pointer-events:all}.section__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(var(--cols, 12),1fr);grid-auto-rows:var(--row-height, 10px);gap:var(--row-gap, 0px)}@media(max-width:599px){.section__grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media(min-width:600px)and (max-width:1023px){.section__grid[_ngcontent-%COMP%]{grid-template-columns:repeat(8,1fr)}}']})},PI=["*"],UI=(()=>{class e{constructor(){this.headerText=R(),this.open=R(!1,{transform:j1}),this.placement=R("Bottom"),this.horizontalAlign=R("Start"),this.loading=R(!1,{transform:j1}),this.loadingDelay=R(1e3),this.opener=R(),this.ui5ItemClick=g1(),this.ui5BeforeOpen=g1(),this.ui5Open=g1(),this.ui5BeforeClose=g1(),this.ui5Close=g1(),this.slots=[{name:"default",description:"Defines the items of this component.\n\n**Note:** Use `ui5-menu-item` and `ui5-menu-separator` for their intended design."}],this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["headerText","open","placement","horizontalAlign","loading","loadingDelay","opener"];for(let o of i){let n=o.replace(/-./g,s=>s[1].toUpperCase());this[n]&&typeof this[n]=="function"&&P5(this.injector,()=>{U5(()=>{let s=this[n]();t&&(t[o]=s)})})}let r=["ui5ItemClick","ui5BeforeOpen","ui5Open","ui5BeforeClose","ui5Close"];for(let o of r){let n=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(n,s=>{this[o].emit(s)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-menu"],["","ui5-menu",""]],inputs:{headerText:[1,"headerText"],open:[1,"open"],placement:[1,"placement"],horizontalAlign:[1,"horizontalAlign"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"],opener:[1,"opener"]},outputs:{ui5ItemClick:"ui5ItemClick",ui5BeforeOpen:"ui5BeforeOpen",ui5Open:"ui5Open",ui5BeforeClose:"ui5BeforeClose",ui5Close:"ui5Close"},exportAs:["ui5Menu"],ngContentSelectors:PI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),qI=["*"],jI=(()=>{class e{constructor(){this.text=R(),this.additionalText=R(),this.icon=R(),this.disabled=R(!1,{transform:j1}),this.loading=R(!1,{transform:j1}),this.loadingDelay=R(1e3),this.accessibleName=R(),this.tooltip=R(),this.checked=R(!1,{transform:j1}),this.accessibilityAttributes=R({}),this.type=R("Active"),this.navigated=R(!1,{transform:j1}),this.highlight=R("None"),this.selected=R(!1,{transform:j1}),this.ui5BeforeOpen=g1(),this.ui5Open=g1(),this.ui5BeforeClose=g1(),this.ui5Close=g1(),this.ui5Check=g1(),this.ui5DetailClick=g1(),this.slots=[{name:"default",description:"Defines the items of this component.\n\n**Note:** The slot can hold menu item and menu separator items.\n\nIf there are items added to this slot, an arrow will be displayed at the end\nof the item in order to indicate that there are items added. In that case components added\nto `endContent` slot or `additionalText` content will not be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`."},{name:"endContent",description:"Defines the components that should be displayed at the end of the menu item.\n\n**Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\nor `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\nand there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\nnether `additionalText` nor components added to this slot would be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\nApplication developers are responsible for ensuring that interactive elements placed in the `endContent` slot\nhave the correct accessibility behaviour, including their enabled or disabled states.\nThe menu does not manage these aspects when the menu item state changes.",since:"2.0.0"},{name:"deleteButton",description:`Defines the delete button, displayed in "Delete" mode.
|
|
151
|
+
`],encapsulation:3})},zI=(e,a)=>a.id;function RI(e,a){if(e&1){let t=q5();u1(0,"ui5-button",5),_0("click",function(){W0(t);let i=Z1();return $0(i.removeSection.emit())}),A1()}if(e&2){let t=Z1();v0("accessibleName","Remove section: "+(t.section().title||t.section().id))}}function NI(e,a){if(e&1&&(u1(0,"div",2)(1,"span",6),p5(2),A1()()),e&2){let t=Z1();w1(2),pe(t.section().title)}}function OI(e,a){if(e&1){let t=q5();u1(0,"mfp-dashboard-card",7),_0("removeCard",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeCard.emit(i.id))}),A1()}if(e&2){let t=a.$implicit,i=Z1();v0("card",t)("editMode",i.editMode()&&i.section().editable!==!1)}}var FI=class Mi{section=R.required();cards=R([]);columns=R(12);editMode=R(!1);removeSection=g1();removeCard=g1();static \u0275fac=function(a){return new(a||Mi)};static \u0275cmp=Y0({type:Mi,selectors:[["mfp-dashboard-section"]],hostVars:2,hostBindings:function(a,t){a&2&&ue("grid-column","span "+(t.section().w??12))},inputs:{section:[1,"section"],cards:[1,"cards"],columns:[1,"columns"],editMode:[1,"editMode"]},outputs:{removeSection:"removeSection",removeCard:"removeCard"},decls:6,vars:6,consts:[[1,"section"],["design","Default","icon","decline",1,"section__remove",3,"accessibleName"],[1,"section__header"],[1,"section__grid"],[3,"card","editMode"],["design","Default","icon","decline",1,"section__remove",3,"click","accessibleName"],[1,"section__title"],[3,"removeCard","card","editMode"]],template:function(a,t){a&1&&(u1(0,"div",0),r2(1,RI,1,1,"ui5-button",1),r2(2,NI,3,1,"div",2),u1(3,"div",3),E7(4,OI,1,2,"mfp-dashboard-card",4,zI),A1()()),a&2&&(V_("section--edit",t.editMode()&&t.section().editable!==!1),w1(),o2(t.editMode()&&t.section().editable!==!1?1:-1),w1(),o2(t.section().title?2:-1),w1(),ue("--cols",t.columns()),w1(),I7(t.cards()))},dependencies:[sp,c6],styles:['[_nghost-%COMP%]{display:block;min-width:0}.section[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;border:1px solid transparent;border-top:none;border-radius:0 0 .5rem .5rem;padding:1.25rem .75rem .75rem}.section--edit[_ngcontent-%COMP%]{border-color:var(--sapGroup_ContentBorderColor, #d9d9d9)}.section__remove[_ngcontent-%COMP%]{position:absolute;top:-.75rem;right:-.75rem;z-index:10;border-radius:50%!important;width:1.25rem!important;height:1.25rem!important;min-width:unset!important;padding:0!important;font-size:.625rem!important}.section__header[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;transform:translateY(-50%);display:flex;align-items:center;pointer-events:none}.section__header[_ngcontent-%COMP%]:before, .section__header[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:transparent}.section__header[_ngcontent-%COMP%]:before{max-width:.75rem;flex:0 0 .75rem}.section--edit[_ngcontent-%COMP%] .section__header[_ngcontent-%COMP%]:before, .section--edit[_ngcontent-%COMP%] .section__header[_ngcontent-%COMP%]:after{background:var(--sapGroup_ContentBorderColor, #d9d9d9)}.section__title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--sapTextColor, #fff);padding:0 .5rem;white-space:nowrap;pointer-events:all}.section__grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(var(--cols, 12),1fr);grid-auto-rows:var(--row-height, 10px);gap:var(--row-gap, 0px)}@media(max-width:599px){.section__grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media(min-width:600px)and (max-width:1023px){.section__grid[_ngcontent-%COMP%]{grid-template-columns:repeat(8,1fr)}}']})},PI=["*"],UI=(()=>{class e{constructor(){this.headerText=R(),this.open=R(!1,{transform:j1}),this.placement=R("Bottom"),this.horizontalAlign=R("Start"),this.loading=R(!1,{transform:j1}),this.loadingDelay=R(1e3),this.opener=R(),this.ui5ItemClick=g1(),this.ui5BeforeOpen=g1(),this.ui5Open=g1(),this.ui5BeforeClose=g1(),this.ui5Close=g1(),this.slots=[{name:"default",description:"Defines the items of this component.\n\n**Note:** Use `ui5-menu-item` and `ui5-menu-separator` for their intended design."}],this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["headerText","open","placement","horizontalAlign","loading","loadingDelay","opener"];for(let o of i){let n=o.replace(/-./g,s=>s[1].toUpperCase());this[n]&&typeof this[n]=="function"&&P5(this.injector,()=>{U5(()=>{let s=this[n]();t&&(t[o]=s)})})}let r=["ui5ItemClick","ui5BeforeOpen","ui5Open","ui5BeforeClose","ui5Close"];for(let o of r){let n=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(n,s=>{this[o].emit(s)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-menu"],["","ui5-menu",""]],inputs:{headerText:[1,"headerText"],open:[1,"open"],placement:[1,"placement"],horizontalAlign:[1,"horizontalAlign"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"],opener:[1,"opener"]},outputs:{ui5ItemClick:"ui5ItemClick",ui5BeforeOpen:"ui5BeforeOpen",ui5Open:"ui5Open",ui5BeforeClose:"ui5BeforeClose",ui5Close:"ui5Close"},exportAs:["ui5Menu"],ngContentSelectors:PI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),qI=["*"],jI=(()=>{class e{constructor(){this.text=R(),this.additionalText=R(),this.icon=R(),this.disabled=R(!1,{transform:j1}),this.loading=R(!1,{transform:j1}),this.loadingDelay=R(1e3),this.accessibleName=R(),this.tooltip=R(),this.checked=R(!1,{transform:j1}),this.accessibilityAttributes=R({}),this.type=R("Active"),this.navigated=R(!1,{transform:j1}),this.highlight=R("None"),this.selected=R(!1,{transform:j1}),this.ui5BeforeOpen=g1(),this.ui5Open=g1(),this.ui5BeforeClose=g1(),this.ui5Close=g1(),this.ui5Check=g1(),this.ui5DetailClick=g1(),this.slots=[{name:"default",description:"Defines the items of this component.\n\n**Note:** The slot can hold menu item and menu separator items.\n\nIf there are items added to this slot, an arrow will be displayed at the end\nof the item in order to indicate that there are items added. In that case components added\nto `endContent` slot or `additionalText` content will not be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`."},{name:"endContent",description:"Defines the components that should be displayed at the end of the menu item.\n\n**Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\nor `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\nand there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\nnether `additionalText` nor components added to this slot would be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\nApplication developers are responsible for ensuring that interactive elements placed in the `endContent` slot\nhave the correct accessibility behaviour, including their enabled or disabled states.\nThe menu does not manage these aspects when the menu item state changes.",since:"2.0.0"},{name:"deleteButton",description:`Defines the delete button, displayed in "Delete" mode.
|
|
152
152
|
**Note:** While the slot allows custom buttons, to match
|
|
153
153
|
design guidelines, please use the \`ui5-button\` component.
|
|
154
154
|
**Note:** When the slot is not present, a built-in delete button will be displayed.`,since:"1.9.0"}],this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["text","additionalText","icon","disabled","loading","loadingDelay","accessibleName","tooltip","checked","accessibilityAttributes","type","navigated","highlight","selected"];for(let o of i){let n=o.replace(/-./g,s=>s[1].toUpperCase());this[n]&&typeof this[n]=="function"&&P5(this.injector,()=>{U5(()=>{let s=this[n]();t&&(t[o]=s)})})}let r=["ui5BeforeOpen","ui5Open","ui5BeforeClose","ui5Close","ui5Check","ui5DetailClick"];for(let o of r){let n=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(n,s=>{this[o].emit(s)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-menu-item"],["","ui5-menu-item",""]],inputs:{text:[1,"text"],additionalText:[1,"additionalText"],icon:[1,"icon"],disabled:[1,"disabled"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"],accessibleName:[1,"accessibleName"],tooltip:[1,"tooltip"],checked:[1,"checked"],accessibilityAttributes:[1,"accessibilityAttributes"],type:[1,"type"],navigated:[1,"navigated"],highlight:[1,"highlight"],selected:[1,"selected"]},outputs:{ui5BeforeOpen:"ui5BeforeOpen",ui5Open:"ui5Open",ui5BeforeClose:"ui5BeforeClose",ui5Close:"ui5Close",ui5Check:"ui5Check",ui5DetailClick:"ui5DetailClick"},exportAs:["ui5MenuItem"],ngContentSelectors:qI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),GI=["*"],WI=(()=>{class e{constructor(){this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-menu-separator"],["","ui5-menu-separator",""]],exportAs:["ui5MenuSeparator"],ngContentSelectors:GI,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),$I=["*"],XI=(()=>{class e{constructor(){this.maxLines=R(1/0),this.emptyIndicatorMode=R("Off"),this.slots=[{name:"default",description:"Defines the text of the component."}],this.elementRef=q(H0),this.injector=q(R0)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element,i=["maxLines","emptyIndicatorMode"];for(let r of i){let o=r.replace(/-./g,n=>n[1].toUpperCase());this[o]&&typeof this[o]=="function"&&P5(this.injector,()=>{U5(()=>{let n=this[o]();t&&(t[r]=n)})})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=Y0({type:e,selectors:[["ui5-text"],["","ui5-text",""]],inputs:{maxLines:[1,"maxLines"],emptyIndicatorMode:[1,"emptyIndicatorMode"]},exportAs:["ui5Text"],ngContentSelectors:$I,decls:1,vars:0,template:function(t,i){t&1&&(s5(),t5(0))},encapsulation:2,changeDetection:0})}}return e})(),KI="action-settings",YI="M0 7c0-.292.094-.531.281-.719A.973.973 0 0 1 1 6h.813a2.68 2.68 0 0 1 .171-.484c.073-.157.151-.318.235-.485l-.594-.562a1.043 1.043 0 0 1-.281-.719c0-.27.093-.5.281-.688l1.438-1.437a.935.935 0 0 1 .687-.281c.292 0 .531.093.719.281l.562.594c.167-.084.328-.162.485-.235A2.68 2.68 0 0 1 6 1.813V1c0-.292.094-.531.281-.719A.973.973 0 0 1 7 0h2c.292 0 .531.094.719.281A.973.973 0 0 1 10 1v.813c.167.062.328.125.484.187.157.063.308.135.454.219l.593-.594a.974.974 0 0 1 .719-.281c.27 0 .5.093.688.281l1.437 1.438a.935.935 0 0 1 .281.687c0 .27-.094.51-.281.719l-.594.593c.167.271.292.584.375.938H15c.292 0 .531.094.719.281A.973.973 0 0 1 16 7v2a.973.973 0 0 1-.281.719A.974.974 0 0 1 15 10h-.844a3.68 3.68 0 0 1-.375.938l.594.593c.188.209.281.448.281.719 0 .27-.094.5-.281.688l-1.438 1.437a.935.935 0 0 1-.687.281.974.974 0 0 1-.719-.281l-.594-.594a3.62 3.62 0 0 1-.453.219 22.56 22.56 0 0 1-.484.188V15a.974.974 0 0 1-.281.719A.973.973 0 0 1 9 16H7a.973.973 0 0 1-.719-.281A.974.974 0 0 1 6 15v-.813a2.683 2.683 0 0 1-.484-.171 19.641 19.641 0 0 1-.485-.235l-.562.594a.973.973 0 0 1-.719.281.94.94 0 0 1-.688-.281l-1.437-1.438a.935.935 0 0 1-.281-.687c0-.27.093-.51.281-.719l.594-.562a20.151 20.151 0 0 1-.235-.485A2.68 2.68 0 0 1 1.813 10H1a.973.973 0 0 1-.719-.281A.973.973 0 0 1 0 9V7Zm1 0v2h1.531c.063.208.12.39.172.547.052.156.11.307.172.453.063.167.14.338.234.516.094.177.204.39.329.64L2.343 12.25l1.406 1.406 1.094-1.094c.354.209.708.386 1.062.532.354.146.719.27 1.094.375V15h2v-1.563c.208-.062.39-.12.547-.171.156-.053.307-.1.453-.141.167-.083.344-.167.531-.25a8.68 8.68 0 0 0 .625-.313l1.094 1.094 1.406-1.406-1.094-1.125c.188-.354.35-.703.485-1.047s.265-.703.39-1.078H15V7h-1.563a9.505 9.505 0 0 0-.874-2.125l1.093-1.125-1.406-1.406-1.094 1.094a7.478 7.478 0 0 0-1.047-.516A9.907 9.907 0 0 0 9 2.562V1H7v1.531l-.516.172c-.156.052-.317.11-.484.172l-.563.25a5.519 5.519 0 0 0-.593.313L3.75 2.343 2.344 3.75l1.094 1.094A12.821 12.821 0 0 0 2.53 7H1Zm4.219 0 .093-.281a3.48 3.48 0 0 1 .22-.375c.083-.125.176-.24.28-.344.209-.208.396-.37.563-.484A3.49 3.49 0 0 1 7 5.187a3.55 3.55 0 0 1 1-.156c.354 0 .688.063 1 .188l.281.093.375.25c.125.084.24.178.344.282a.559.559 0 0 1 .156.156c.271.25.469.583.594 1 .125.313.188.646.188 1s-.063.688-.188 1a2.41 2.41 0 0 1-.594 1 .56.56 0 0 1-.156.156 2.25 2.25 0 0 1-.344.281l-.375.25-.281.094a2.665 2.665 0 0 1-1 .188 3.55 3.55 0 0 1-1-.156 3.454 3.454 0 0 1-.625-.329A4.164 4.164 0 0 1 5.812 10a2.249 2.249 0 0 1-.28-.344 3.496 3.496 0 0 1-.22-.375L5.22 9a2.667 2.667 0 0 1-.188-1c0-.354.063-.688.188-1Zm.812 1c0 .354.089.682.266.984A1.9 1.9 0 0 0 7 9.688c.292.187.625.28 1 .28.125 0 .292-.02.5-.062a2.42 2.42 0 0 0 .656-.328c.188-.135.354-.328.5-.578.188-.292.281-.625.281-1 0-.396-.093-.73-.28-1a1.843 1.843 0 0 0-.5-.578 2.42 2.42 0 0 0-.657-.328A2.69 2.69 0 0 0 8 6.03c-.375 0-.708.094-1 .282a1.897 1.897 0 0 0-.703.703c-.177.302-.266.63-.266.984Z",QI=!1,JI=Qa,eD="0 0 16 16",tD="SAP-icons-v4",aD="@ui5/webcomponents-icons";t1(KI,{pathData:YI,ltr:QI,viewBox:eD,accData:JI,collection:tD,packageName:aD});var iD="action-settings",rD="M8.549 0a1.757 1.757 0 0 1 1.568 1.49l.121.805a.251.251 0 0 0 .123.18l1.238.715a.252.252 0 0 0 .217.017l.755-.298a1.75 1.75 0 0 1 2.156.754v.001l.387.673a1.75 1.75 0 0 1-.423 2.244l-.617.49a.251.251 0 0 0-.094.196v1.465c0 .076.035.148.094.196l.616.49c.677.54.858 1.495.425 2.245l-.387.673h-.001a1.75 1.75 0 0 1-2.155.755l-.757-.298a.251.251 0 0 0-.217.016l-1.238.715a.251.251 0 0 0-.122.18l-.12.806A1.75 1.75 0 0 1 8.387 16H7.61a1.75 1.75 0 0 1-1.698-1.333l-.16-1.013a.25.25 0 0 0-.122-.18l-1.184-.684a.251.251 0 0 0-.216-.016l-.803.317a1.75 1.75 0 0 1-2.156-.754l-.387-.675-.001.001a1.753 1.753 0 0 1 .425-2.244l.695-.555A.25.25 0 0 0 2.1 8.67V7.33a.25.25 0 0 0-.095-.195L1.31 6.58a1.753 1.753 0 0 1-.425-2.244l.388-.674a1.75 1.75 0 0 1 2.156-.754l.802.317c.07.027.15.02.216-.017l1.185-.685a.25.25 0 0 0 .122-.18l.16-1.011A1.75 1.75 0 0 1 7.611 0h.938Zm-.982 1.504a.25.25 0 0 0-.19.164l-.14.9a1.75 1.75 0 0 1-.855 1.255l-1.185.685a1.752 1.752 0 0 1-1.516.113l-.803-.315a.25.25 0 0 0-.307.107l-.388.673a.253.253 0 0 0 .06.321l.696.555c.416.332.66.835.66 1.368v1.34a1.75 1.75 0 0 1-.66 1.368l-.695.555a.251.251 0 0 0-.061.321l.387.674a.25.25 0 0 0 .308.107l.802-.315a1.752 1.752 0 0 1 1.517.112l1.185.685c.461.266.775.729.854 1.256l.14.9a.25.25 0 0 0 .235.168h.777a.25.25 0 0 0 .246-.213l.121-.806a1.75 1.75 0 0 1 .855-1.255l1.238-.716a1.751 1.751 0 0 1 1.516-.114l.757.298c.1.04.213.01.28-.07l.415-.71a.25.25 0 0 0-.06-.321l-.617-.492a1.751 1.751 0 0 1-.66-1.369V7.267c0-.533.244-1.037.66-1.369l.616-.49a.25.25 0 0 0 .06-.321l-.387-.675a.249.249 0 0 0-.307-.106l-.758.297a1.75 1.75 0 0 1-1.515-.114L9.61 3.773a1.75 1.75 0 0 1-.855-1.255l-.121-.805a.25.25 0 0 0-.201-.21h-.866ZM8 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",oD=!1,nD=Qa,sD="0 0 16 16",cD="SAP-icons-v5",lD="@ui5/webcomponents-icons";t1(iD,{pathData:rD,ltr:oD,viewBox:sD,accData:nD,collection:cD,packageName:lD});var hD="menu2",uD="M1 4.01a.96.96 0 0 1-.703-.298A.969.969 0 0 1 0 3.005c0-.293.099-.534.297-.722A.985.985 0 0 1 1 2h14a.97.97 0 0 1 .719.283.981.981 0 0 1 .281.722.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1Zm0 4.995c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 8c0-.293.099-.534.297-.723A.985.985 0 0 1 1 6.995h14a.97.97 0 0 1 .719.282c.187.189.281.43.281.723a.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1ZM1 14c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 12.995c0-.293.099-.534.297-.723A.986.986 0 0 1 1 11.99h14c.292 0 .531.095.719.283.187.189.281.43.281.723a.996.996 0 0 1-.281.707A.945.945 0 0 1 15 14H1Z",dD=!1,_D="0 0 16 16",pD="SAP-icons-v4",vD="@ui5/webcomponents-icons";t1(hD,{pathData:uD,ltr:dD,viewBox:_D,collection:pD,packageName:vD});var mD="menu2",fD="M15.25 12.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Z",gD=!1,AD="0 0 16 16",bD="SAP-icons-v5",wD="@ui5/webcomponents-icons";t1(mD,{pathData:fD,ltr:gD,viewBox:AD,collection:bD,packageName:wD});var E=class R5{static getElements(a,t=document){if(typeof a=="string"){let i="getElementById"in t?t:void 0;if(i&&!isNaN(+a[0])){let o=i.getElementById(a);return o?[o]:[]}let r=t.querySelectorAll(a);if(!r.length&&a[0]!=="."&&a[0]!=="#"&&(r=t.querySelectorAll("."+a),r.length||(r=t.querySelectorAll("#"+a)),!r.length)){let o=t.querySelector(`[gs-id="${a}"]`);return o?[o]:[]}return Array.from(r)}return[a]}static getElement(a,t=document){if(typeof a=="string"){let i="getElementById"in t?t:void 0;if(!a.length)return null;if(i&&a[0]==="#")return i.getElementById(a.substring(1));if(a[0]==="#"||a[0]==="."||a[0]==="[")return t.querySelector(a);if(i&&!isNaN(+a[0]))return i.getElementById(a);let r=t.querySelector(a);return i&&!r&&(r=i.getElementById(a)),r||(r=t.querySelector("."+a)),r}return a}static lazyLoad(a){return a.lazyLoad||a.grid?.opts?.lazyLoad&&a.lazyLoad!==!1}static createDiv(a,t){let i=document.createElement("div");return a.forEach(r=>{r&&i.classList.add(r)}),t?.appendChild(i),i}static shouldSizeToContent(a,t=!1){return a?.grid&&(t?a.sizeToContent===!0||a.grid.opts.sizeToContent===!0&&a.sizeToContent===void 0:!!a.sizeToContent||a.grid.opts.sizeToContent&&a.sizeToContent!==!1)}static isIntercepted(a,t){return!(a.y>=t.y+t.h||a.y+a.h<=t.y||a.x+a.w<=t.x||a.x>=t.x+t.w)}static isTouching(a,t){return R5.isIntercepted(a,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(a,t){let i=a.x>t.x?a.x:t.x,r=a.x+a.w<t.x+t.w?a.x+a.w:t.x+t.w;if(r<=i)return 0;let o=a.y>t.y?a.y:t.y,n=a.y+a.h<t.y+t.h?a.y+a.h:t.y+t.h;return n<=o?0:(r-i)*(n-o)}static area(a){return a.w*a.h}static sort(a,t=1){return a.sort((i,r)=>{let o=t*((i.y??1e4)-(r.y??1e4));return o===0?t*((i.x??1e4)-(r.x??1e4)):o})}static find(a,t){return t?a.find(i=>i.id===t):void 0}static toBool(a){return typeof a=="boolean"?a:typeof a=="string"?(a=a.toLowerCase(),!(a===""||a==="no"||a==="false"||a==="0")):!!a}static toNumber(a){return a===null||a.length===0?void 0:Number(a)}static parseHeight(a){let t,i="px";if(typeof a=="string")if(a==="auto"||a==="")t=0;else{let r=a.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!r)throw new Error(`Invalid height val = ${a}`);i=r[2]||"px",t=parseFloat(r[1])}else t=a;return{h:t,unit:i}}static defaults(a,...t){return t.forEach(i=>{for(let r in i){if(!i.hasOwnProperty(r))return;a[r]===null||a[r]===void 0?a[r]=i[r]:typeof i[r]=="object"&&typeof a[r]=="object"&&R5.defaults(a[r],i[r])}}),a}static same(a,t){if(typeof a!="object")return a==t;if(typeof a!=typeof t||Object.keys(a).length!==Object.keys(t).length)return!1;for(let i in a)if(a[i]!==t[i])return!1;return!0}static copyPos(a,t,i=!1){return t.x!==void 0&&(a.x=t.x),t.y!==void 0&&(a.y=t.y),t.w!==void 0&&(a.w=t.w),t.h!==void 0&&(a.h=t.h),i&&(t.minW&&(a.minW=t.minW),t.minH&&(a.minH=t.minH),t.maxW&&(a.maxW=t.maxW),t.maxH&&(a.maxH=t.maxH)),a}static samePos(a,t){return a&&t&&a.x===t.x&&a.y===t.y&&(a.w||1)===(t.w||1)&&(a.h||1)===(t.h||1)}static sanitizeMinMax(a){a.minW||delete a.minW,a.minH||delete a.minH,a.maxW||delete a.maxW,a.maxH||delete a.maxH}static removeInternalAndSame(a,t){if(!(typeof a!="object"||typeof t!="object")&&!(Array.isArray(a)||Array.isArray(t)))for(let i in a){let r=a[i],o=t[i];i[0]==="_"||r===o?delete a[i]:r&&typeof r=="object"&&o!==void 0&&(R5.removeInternalAndSame(r,o),Object.keys(r).length||delete a[i])}}static removeInternalForSave(a,t=!0){for(let i in a)(i[0]==="_"||a[i]===null||a[i]===void 0)&&delete a[i];delete a.grid,t&&delete a.el,a.autoPosition||delete a.autoPosition,a.noResize||delete a.noResize,a.noMove||delete a.noMove,a.locked||delete a.locked,(a.w===1||a.w===a.minW)&&delete a.w,(a.h===1||a.h===a.minH)&&delete a.h}static throttle(a,t){let i=!1;return(...r)=>{i||(i=!0,setTimeout(()=>{a(...r),i=!1},t))}}static removePositioningStyles(a){let t=a.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(a){if(!a)return document.scrollingElement||document.documentElement;let t=getComputedStyle(a).overflowY;return(t==="auto"||t==="scroll")&&a.scrollHeight>a.clientHeight?a:R5.getScrollElement(a.parentElement)}static updateScrollResize(a,t,i){let r=R5.getScrollElement(t),o=r.clientHeight,n=r===R5.getScrollElement()?0:r.getBoundingClientRect().top,s=a.clientY-n,c=s<i,l=s>o-i;c?r.scrollBy({behavior:"smooth",top:s-i}):l&&r.scrollBy({behavior:"smooth",top:i-(o-s)})}static clone(a){return a==null||typeof a!="object"?a:a instanceof Array?[...a]:O({},a)}static cloneDeep(a){let t=["parentGrid","el","grid","subGrid","engine"],i=R5.clone(a);for(let r in i)i.hasOwnProperty(r)&&typeof i[r]=="object"&&r.substring(0,2)!=="__"&&!t.find(o=>o===r)&&(i[r]=R5.cloneDeep(a[r]));return i}static cloneNode(a){let t=a.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(a,t){let i;typeof t=="string"?i=R5.getElement(t):i=t,i&&i.appendChild(a)}static addElStyles(a,t){if(t instanceof Object)for(let i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach(r=>{a.style[i]=r}):a.style[i]=t[i])}static initEvent(a,t){let i={type:t.type},r={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:a.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(o=>i[o]=a[o]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(o=>i[o]=a[o]),O(O({},i),r)}static simulateMouseEvent(a,t,i){let r=a,o=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,ctrlKey:r.ctrlKey??!1,altKey:r.altKey??!1,shiftKey:r.shiftKey??!1,metaKey:r.metaKey??!1,button:0,relatedTarget:a.target});(i||a.target).dispatchEvent(o)}static getValuesFromTransformedElement(a){let t=document.createElement("div");R5.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),a.appendChild(t);let i=t.getBoundingClientRect();return a.removeChild(t),t.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}static swap(a,t,i){if(!a)return;let r=a[t];a[t]=a[i],a[i]=r}static canBeRotated(a){return!(!a||a.w===a.h||a.locked||a.noResize||a.grid?.opts.disableResize||a.minW&&a.minW===a.maxW||a.minH&&a.minH===a.maxH)}},ch=(()=>{class e{constructor(t={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=t.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=t.maxRow,this._float=t.float,this.nodes=t.nodes||[],this.onChange=t.onChange}batchUpdate(t=!0,i=!0){return!!this.batchMode===t?this:(this.batchMode=t,t?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,i&&this._packNodes(),this._notify()),this)}_useEntireRowArea(t,i){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!t._moving||t._skipDown||i.y<=t.y)}_fixCollisions(t,i=t,r,o={}){if(this.sortNodes(-1),r=r||this.collide(t,i),!r)return!1;if(t._moving&&!o.nested&&!this.float&&this.swap(t,r))return!0;let n=i;!this._loading&&this._useEntireRowArea(t,i)&&(n={x:0,w:this.column,y:i.y,h:i.h},r=this.collide(t,n,o.skip));let s=!1,c={nested:!0,pack:!1},l=0;for(;r=r||this.collide(t,n,o.skip);){if(l++>this.nodes.length*2)throw new Error("Infinite collide check");let d;if(r.locked||this._loading||t._moving&&!t._skipDown&&i.y>t.y&&!this.float&&(!this.collide(r,h1(O({},r),{y:t.y}),t)||!this.collide(r,h1(O({},r),{y:i.y-r.h}),t))){t._skipDown=t._skipDown||i.y>t.y;let u=O(h1(O({},i),{y:r.y+r.h}),c);d=this._loading&&E.samePos(t,u)?!0:this.moveNode(t,u),(r.locked||this._loading)&&d?E.copyPos(i,t):!r.locked&&d&&o.pack&&(this._packNodes(),i.y=r.y+r.h,E.copyPos(t,i)),s=s||d}else d=this.moveNode(r,O(h1(O({},r),{y:i.y+i.h,skip:t}),c));if(!d)return s;r=void 0}return s}collide(t,i=t,r){let o=t._id,n=r?._id;return this.nodes.find(s=>s._id!==o&&s._id!==n&&E.isIntercepted(s,i))}collideAll(t,i=t,r){let o=t._id,n=r?._id;return this.nodes.filter(s=>s._id!==o&&s._id!==n&&E.isIntercepted(s,i))}directionCollideCoverage(t,i,r){if(!i.rect||!t._rect)return;let o=t._rect,n=O({},i.rect);n.y>o.y?(n.h+=n.y-o.y,n.y=o.y):n.h+=o.y-n.y,n.x>o.x?(n.w+=n.x-o.x,n.x=o.x):n.w+=o.x-n.x;let s,c=.5;for(let l of r){if(l.locked||!l._rect)break;let d=l._rect,u=Number.MAX_VALUE,m=Number.MAX_VALUE;o.y<d.y?u=(n.y+n.h-d.y)/d.h:o.y+o.h>d.y+d.h&&(u=(d.y+d.h-n.y)/d.h),o.x<d.x?m=(n.x+n.w-d.x)/d.w:o.x+o.w>d.x+d.w&&(m=(d.x+d.w-n.x)/d.w);let _=Math.min(m,u);_>c&&(c=_,s=l)}return i.collide=s,s}cacheRects(t,i,r,o,n,s){return this.nodes.forEach(c=>c._rect={y:c.y*i+r,x:c.x*t+s,w:c.w*t-s-o,h:c.h*i-r-n}),this}swap(t,i){if(!i||i.locked||!t||t.locked)return!1;function r(){let n=i.x,s=i.y;return i.x=t.x,i.y=t.y,t.h!=i.h?(t.x=n,t.y=i.y+i.h):t.w!=i.w?(t.x=i.x+i.w,t.y=s):(t.x=n,t.y=s),t._dirty=i._dirty=!0,!0}let o;if(t.w===i.w&&t.h===i.h&&(t.x===i.x||t.y===i.y)&&(o=E.isTouching(t,i)))return r();if(o!==!1){if(t.w===i.w&&t.x===i.x&&(o||(o=E.isTouching(t,i)))){if(i.y<t.y){let n=t;t=i,i=n}return r()}if(o!==!1){if(t.h===i.h&&t.y===i.y&&(o||(o=E.isTouching(t,i)))){if(i.x<t.x){let n=t;t=i,i=n}return r()}return!1}}}isAreaEmpty(t,i,r,o){let n={x:t||0,y:i||0,w:r||1,h:o||1};return!this.collide(n)}compact(t="compact",i=!0){if(this.nodes.length===0)return this;i&&this.sortNodes();let r=this.batchMode;r||this.batchUpdate();let o=this._inColumnResize;o||(this._inColumnResize=!0);let n=this.nodes;return this.nodes=[],n.forEach((s,c,l)=>{let d;s.locked||(s.autoPosition=!0,t==="list"&&c&&(d=l[c-1])),this.addNode(s,!1,d)}),o||delete this._inColumnResize,r||this.batchUpdate(!1),this}set float(t){this._float!==t&&(this._float=t||!1,t||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(t=1){return this.nodes=E.sort(this.nodes,t),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(t=>{if(t._updating||t._orig===void 0||t.y===t._orig.y)return;let i=t.y;for(;i>t._orig.y;)--i,this.collide(t,{x:t.x,y:i,w:t.w,h:t.h})||(t._dirty=!0,t.y=i)}):this.nodes.forEach((t,i)=>{if(!t.locked)for(;t.y>0;){let r=i===0?0:t.y-1;if(!(i===0||!this.collide(t,{x:t.x,y:r,w:t.w,h:t.h})))break;t._dirty=t.y!==r,t.y=r}}),this)}prepareNode(t,i){t._id=t._id??e._idSeq++;let r=t.id;if(r){let n=1;for(;this.nodes.find(s=>s.id===t.id&&s!==t);)t.id=r+"_"+n++}(t.x===void 0||t.y===void 0||t.x===null||t.y===null)&&(t.autoPosition=!0);let o={x:0,y:0,w:1,h:1};return E.defaults(t,o),t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,E.sanitizeMinMax(t),typeof t.x=="string"&&(t.x=Number(t.x)),typeof t.y=="string"&&(t.y=Number(t.y)),typeof t.w=="string"&&(t.w=Number(t.w)),typeof t.h=="string"&&(t.h=Number(t.h)),isNaN(t.x)&&(t.x=o.x,t.autoPosition=!0),isNaN(t.y)&&(t.y=o.y,t.autoPosition=!0),isNaN(t.w)&&(t.w=o.w),isNaN(t.h)&&(t.h=o.h),this.nodeBoundFix(t,i),t}nodeBoundFix(t,i){let r=t._orig||E.copyPos({},t);if(t.maxW&&(t.w=Math.min(t.w||1,t.maxW)),t.maxH&&(t.h=Math.min(t.h||1,t.maxH)),t.minW&&(t.w=Math.max(t.w||1,t.minW)),t.minH&&(t.h=Math.max(t.h||1,t.minH)),(t.x||0)+(t.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&t._id!=null&&this.findCacheLayout(t,this.defaultColumn)===-1){let o=O({},t);o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return t.w>this.column?t.w=this.column:t.w<1&&(t.w=1),this.maxRow&&t.h>this.maxRow?t.h=this.maxRow:t.h<1&&(t.h=1),t.x<0&&(t.x=0),t.y<0&&(t.y=0),t.x+t.w>this.column&&(i?t.w=this.column-t.x:t.x=this.column-t.w),this.maxRow&&t.y+t.h>this.maxRow&&(i?t.h=this.maxRow-t.y:t.y=this.maxRow-t.h),E.samePos(t,r)||(t._dirty=!0),this}getDirtyNodes(t){return t?this.nodes.filter(i=>i._dirty&&!E.samePos(i,i._orig)):this.nodes.filter(i=>i._dirty)}_notify(t){if(this.batchMode||!this.onChange)return this;let i=(t||[]).concat(this.getDirtyNodes());return this.onChange(i),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(t=>{delete t._dirty,delete t._lastTried}),this)}saveInitial(){return this.nodes.forEach(t=>{t._orig=E.copyPos({},t),delete t._dirty}),this._hasLocked=this.nodes.some(t=>t.locked),this}restoreInitial(){return this.nodes.forEach(t=>{!t._orig||E.samePos(t,t._orig)||(E.copyPos(t,t._orig),t._dirty=!0)}),this._notify(),this}findEmptyPosition(t,i=this.nodes,r=this.column,o){let n=o?o.y*r+(o.x+o.w):0,s=!1;for(let c=n;!s;++c){let l=c%r,d=Math.floor(c/r);if(l+t.w>r)continue;let u={x:l,y:d,w:t.w,h:t.h};i.find(m=>E.isIntercepted(u,m))||((t.x!==l||t.y!==d)&&(t._dirty=!0),t.x=l,t.y=d,delete t.autoPosition,s=!0)}return s}addNode(t,i=!1,r){let o=this.nodes.find(s=>s._id===t._id);if(o)return o;this._inColumnResize?this.nodeBoundFix(t):this.prepareNode(t),delete t._temporaryRemoved,delete t._removeDOM;let n;return t.autoPosition&&this.findEmptyPosition(t,this.nodes,this.column,r)&&(delete t.autoPosition,n=!0),this.nodes.push(t),i&&this.addedNodes.push(t),n||this._fixCollisions(t),this.batchMode||this._packNodes()._notify(),t}removeNode(t,i=!0,r=!1){return this.nodes.find(o=>o._id===t._id)?(r&&this.removedNodes.push(t),i&&(t._removeDOM=!0),this.nodes=this.nodes.filter(o=>o._id!==t._id),t._isAboutToRemove||this._packNodes(),this._notify([t]),this):this}removeAll(t=!0,i=!0){if(delete this._layouts,!this.nodes.length)return this;t&&this.nodes.forEach(o=>o._removeDOM=!0);let r=this.nodes;return this.removedNodes=i?r:[],this.nodes=[],this._notify(r)}moveNodeCheck(t,i){if(!this.changedPosConstrain(t,i))return!1;if(i.pack=!0,!this.maxRow)return this.moveNode(t,i);let r,o=new e({column:this.column,float:this.float,nodes:this.nodes.map(s=>s._id===t._id?(r=O({},s),r):O({},s))});if(!r)return!1;let n=o.moveNode(r,i)&&o.getRow()<=Math.max(this.getRow(),this.maxRow);if(!n&&!i.resizing&&i.collide){let s=i.collide.el.gridstackNode;if(this.swap(t,s))return this._notify(),!0}return n?(o.nodes.filter(s=>s._dirty).forEach(s=>{let c=this.nodes.find(l=>l._id===s._id);c&&(E.copyPos(c,s),c._dirty=!0)}),this._notify(),!0):!1}willItFit(t){if(delete t._willFitPos,!this.maxRow)return!0;let i=new e({column:this.column,float:this.float,nodes:this.nodes.map(o=>O({},o))}),r=O({},t);return this.cleanupNode(r),delete r.el,delete r._id,delete r.content,delete r.grid,i.addNode(r),i.getRow()<=this.maxRow?(t._willFitPos=E.copyPos({},r),!0):!1}changedPosConstrain(t,i){return i.w=i.w||t.w,i.h=i.h||t.h,t.x!==i.x||t.y!==i.y?!0:(t.maxW&&(i.w=Math.min(i.w,t.maxW)),t.maxH&&(i.h=Math.min(i.h,t.maxH)),t.minW&&(i.w=Math.max(i.w,t.minW)),t.minH&&(i.h=Math.max(i.h,t.minH)),t.w!==i.w||t.h!==i.h)}moveNode(t,i){if(!t||!i)return!1;let r;i.pack===void 0&&!this.batchMode&&(r=i.pack=!0),typeof i.x!="number"&&(i.x=t.x),typeof i.y!="number"&&(i.y=t.y),typeof i.w!="number"&&(i.w=t.w),typeof i.h!="number"&&(i.h=t.h);let o=t.w!==i.w||t.h!==i.h,n=E.copyPos({},t,!0);if(E.copyPos(n,i),this.nodeBoundFix(n,o),E.copyPos(i,n),!i.forceCollide&&E.samePos(t,i))return!1;let s=E.copyPos({},t),c=this.collideAll(t,n,i.skip),l=!0;if(c.length){let d=t._moving&&!i.nested,u=d?this.directionCollideCoverage(t,i,c):c[0];if(d&&u&&t.grid?.opts?.subGridDynamic&&!t.grid._isTemp){let m=E.areaIntercept(i.rect,u._rect),_=E.area(i.rect),g=E.area(u._rect);m/(_<g?_:g)>.8&&(u.grid.makeSubGrid(u.el,void 0,t),u=void 0)}u?l=!this._fixCollisions(t,n,u,i):(l=!1,r&&delete i.pack)}return l&&!E.samePos(t,n)&&(t._dirty=!0,E.copyPos(t,n)),i.pack&&this._packNodes()._notify(),!E.samePos(t,s)}getRow(){return this.nodes.reduce((t,i)=>Math.max(t,i.y+i.h),0)}beginUpdate(t){return t._updating||(t._updating=!0,delete t._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let t=this.nodes.find(i=>i._updating);return t&&(delete t._updating,delete t._skipDown),this}save(t=!0,i,r){let o=this._layouts?.length||0,n;o&&(r?r!==this.column&&(n=this._layouts[r]):this.column!==o-1&&(n=this._layouts[o-1]));let s=[];return this.sortNodes(),this.nodes.forEach(c=>{let l=n?.find(u=>u._id===c._id),d=O(O({},c),l||{});E.removeInternalForSave(d,!t),i&&i(c,d),s.push(d)}),s}layoutsNodesChange(t){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((i,r)=>{if(!i||r===this.column)return this;if(r<this.column)this._layouts[r]=void 0;else{let o=r/this.column;t.forEach(n=>{if(!n._orig)return;let s=i.find(c=>c._id===n._id);s&&(s.y>=0&&n.y!==n._orig.y&&(s.y+=n.y-n._orig.y,s.y<0&&(s.y=0)),n.x!==n._orig.x&&(s.x=Math.round(n.x*o),s.x<0&&(s.x=0)),n.w!==n._orig.w&&(s.w=Math.round(n.w*o),s.w<1&&(s.w=1)))})}}),this)}columnChanged(t,i,r="moveScale"){if(!this.nodes.length||!i||t===i)return this;let o=r==="compact"||r==="list";o&&this.sortNodes(1),i<t&&this.cacheLayout(this.nodes,t),this.batchUpdate();let n=[],s=o?this.nodes:E.sort(this.nodes,-1);if(i>t&&this._layouts){let c=this._layouts[i]||[],l=this._layouts.length-1;!c.length&&t!==l&&this._layouts[l]?.length&&(t=l,this._layouts[l].forEach(d=>{let u=s.find(m=>m._id===d._id);u&&(!o&&!d.autoPosition&&(u.x=d.x??u.x,u.y=d.y??u.y),u.w=d.w??u.w,(d.x==null||d.y===void 0)&&(u.autoPosition=!0))})),c.forEach(d=>{let u=s.findIndex(m=>m._id===d._id);if(u!==-1){let m=s[u];if(o){m.w=d.w;return}(d.autoPosition||isNaN(d.x)||isNaN(d.y))&&this.findEmptyPosition(d,n),d.autoPosition||(m.x=d.x??m.x,m.y=d.y??m.y,m.w=d.w??m.w,n.push(m)),s.splice(u,1)}})}if(o)this.compact(r,!1);else{if(s.length)if(typeof r=="function")r(i,t,n,s);else{let c=o||r==="none"?1:i/t,l=r==="move"||r==="moveScale",d=r==="scale"||r==="moveScale";s.forEach(u=>{u.x=i===1?0:l?Math.round(u.x*c):Math.min(u.x,i-1),u.w=i===1||t===1?1:d?Math.round(u.w*c)||1:Math.min(u.w,i),n.push(u)}),s=[]}n=E.sort(n,-1),this._inColumnResize=!0,this.nodes=[],n.forEach(c=>{this.addNode(c,!1),delete c._orig})}return this.nodes.forEach(c=>delete c._orig),this.batchUpdate(!1,!o),delete this._inColumnResize,this}cacheLayout(t,i,r=!1){let o=[];return t.forEach((n,s)=>{if(n._id===void 0){let c=n.id?this.nodes.find(l=>l.id===n.id):void 0;n._id=c?._id??e._idSeq++}o[s]={x:n.x,y:n.y,w:n.w,_id:n._id}}),this._layouts=r?[]:this._layouts||[],this._layouts[i]=o,this}cacheOneLayout(t,i){t._id=t._id??e._idSeq++;let r={x:t.x,y:t.y,w:t.w,_id:t._id};(t.autoPosition||t.x===void 0)&&(delete r.x,delete r.y,t.autoPosition&&(r.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[i]=this._layouts[i]||[];let o=this.findCacheLayout(t,i);return o===-1?this._layouts[i].push(r):this._layouts[i][o]=r,this}findCacheLayout(t,i){return this._layouts?.[i]?.findIndex(r=>r._id===t._id)??-1}removeNodeFromLayoutCache(t){if(this._layouts)for(let i=0;i<this._layouts.length;i++){let r=this.findCacheLayout(t,i);r!==-1&&this._layouts[i].splice(r,1)}}cleanupNode(t){for(let i in t)i[0]==="_"&&i!=="_id"&&delete t[i];return this}}return e._idSeq=0,e})(),d5={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},$=class{},O5=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),_5=class{};function P4(e,a){e.touches.length>1||(e.cancelable&&e.preventDefault(),E.simulateMouseEvent(e.changedTouches[0],a))}function lp(e,a){e.cancelable&&e.preventDefault(),E.simulateMouseEvent(e,a)}function U4(e){_5.touchHandled||(_5.touchHandled=!0,P4(e,"mousedown"))}function q4(e){_5.touchHandled&&P4(e,"mousemove")}function j4(e){if(!_5.touchHandled)return;_5.pointerLeaveTimeout&&(window.clearTimeout(_5.pointerLeaveTimeout),delete _5.pointerLeaveTimeout);let a=!!$.dragElement;P4(e,"mouseup"),a||P4(e,"click"),_5.touchHandled=!1}function G4(e){e.pointerType!=="mouse"&&e.target.releasePointerCapture(e.pointerId)}function lh(e){$.dragElement&&e.pointerType!=="mouse"&&lp(e,"mouseenter")}function hh(e){$.dragElement&&e.pointerType!=="mouse"&&(_5.pointerLeaveTimeout=window.setTimeout(()=>{delete _5.pointerLeaveTimeout,lp(e,"mouseleave")},10))}var yD=(()=>{class e{constructor(t,i,r){this.host=t,this.dir=i,this.option=r,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(t){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",t)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${e.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),O5&&(this.el.addEventListener("touchstart",U4),this.el.addEventListener("pointerdown",G4)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),O5&&(this.el.removeEventListener("touchstart",U4),this.el.removeEventListener("pointerdown",G4)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(t){this.mouseDownEvent=t,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),O5&&(this.el.addEventListener("touchmove",q4),this.el.addEventListener("touchend",j4)),t.stopPropagation(),t.preventDefault()}_mouseMove(t){let i=this.mouseDownEvent;this.moving?this._triggerEvent("move",t):Math.abs(t.x-i.x)+Math.abs(t.y-i.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",t),document.addEventListener("keydown",this._keyEvent)),t.stopPropagation()}_mouseUp(t){this.moving&&(this._triggerEvent("stop",t),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),O5&&(this.el.removeEventListener("touchmove",q4),this.el.removeEventListener("touchend",j4)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_keyEvent(t){t.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(t,i){return this.option[t]&&this.option[t](i),this}}return e.prefix="ui-resizable-",e})(),V9=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,a){this._eventRegister[e]=a}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,a){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](a)}},ZD=(()=>{class e extends V9{constructor(t,i={}){super(),this.el=t,this.option=i,this.rectScale={x:1,y:1},this._ui=()=>{let r=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},n=this.temporalRect||o;return{position:{left:this.option.rtl?(r.right-n.right)*this.rectScale.x:(n.left-r.left)*this.rectScale.x,top:(n.top-r.top)*this.rectScale.y},size:{width:n.width*this.rectScale.x,height:n.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(t,i){super.on(t,i)}off(t){super.off(t)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(t){let i=t.handles&&t.handles!==this.option.handles,r=t.autoHide&&t.autoHide!==this.option.autoHide;return Object.keys(t).forEach(o=>this.option[o]=t[o]),i&&(this._removeHandlers(),this._setupHandlers()),r&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(t){return t?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),$.overResizeElement===this&&delete $.overResizeElement),this}_mouseOver(t){$.overResizeElement||$.dragElement||($.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){$.overResizeElement===this&&(delete $.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(t=>t.trim()).map(t=>new yD(this.el,t,{element:this.option.element,start:i=>this._resizeStart(i),stop:i=>this._resizeStop(i),move:i=>this._resizing(i,t)})),this}_resizeStart(t){this.sizeToContent=E.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=E.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();let i=E.initEvent(t,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(i,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",i),this}_resizing(t,i){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(t,i),this._applyChange();let r=E.initEvent(t,{type:"resize",target:this.el});return r.resizeDir=i,r.hasMovedX=this.option.rtl?i.includes("e"):i.includes("w"),r.hasMovedY=i.includes("n"),this.option.resize&&this.option.resize(r,this._ui()),this.triggerEvent("resize",r),this}_resizeStop(t){let i=E.initEvent(t,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(i),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",i),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=e._originStyleProp.map(r=>this.el.style[r]),this.parentOriginStylePosition=this.el.parentElement.style.position;let t=this.el.parentElement,i=E.getValuesFromTransformedElement(t);return this.rectScale={x:i.xScale,y:i.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return e._originStyleProp.forEach((t,i)=>{this.el.style[t]=this.elOriginStyleVal[i]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(t,i){let r=this.startEvent,o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},n=t.clientX-r.clientX,s=this.sizeToContent?0:t.clientY-r.clientY,c,l,d=this.option.rtl;!d&&i.indexOf("e")>-1?o.width+=n:d&&i.indexOf("w")>-1?o.width-=n:!d&&i.indexOf("w")>-1?(o.width-=n,o.left+=n,c=!0):d&&i.indexOf("e")>-1&&(o.width+=n,o.right+=n,c=!0),i.indexOf("s")>-1?o.height+=s:i.indexOf("n")>-1&&(o.height-=s,o.top+=s,l=!0);let u=this._constrainSize(o.width,o.height,c,l);return Math.round(o.width)!==Math.round(u.width)&&(!d&&i.indexOf("w")>-1?o.left+=o.width-u.width:d&&i.indexOf("e")>-1&&(o.right-=o.width-u.width),o.width=u.width),Math.round(o.height)!==Math.round(u.height)&&(i.indexOf("n")>-1&&(o.top+=o.height-u.height),o.height=u.height),o}_constrainSize(t,i,r,o){let n=this.option,s=(r?n.maxWidthMoveLeft:n.maxWidth)||Number.MAX_SAFE_INTEGER,c=n.minWidth/this.rectScale.x||t,l=(o?n.maxHeightMoveUp:n.maxHeight)||Number.MAX_SAFE_INTEGER,d=n.minHeight/this.rectScale.y||i,u=Math.min(s,Math.max(c,t)),m=Math.min(l,Math.max(d,i));return{width:u,height:m}}_applyChange(){let t={left:0,right:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let i=this.el.parentElement,{left:r,right:o,top:n}=i.getBoundingClientRect();t={left:r,right:o,top:n,width:0,height:0}}return this.temporalRect?(Object.entries(this.temporalRect).forEach(([i,r])=>{if(this.option.rtl?i==="left":i==="right")return;let o=i==="width"||i==="left"||i==="right"?this.rectScale.x:i==="height"||i==="top"?this.rectScale.y:1,n;i==="right"?n=(t.right-r)*this.rectScale.x+"px":n=(r-t[i])*o+"px",this.el.style[i]=n}),this):this}_removeHandlers(){return this.handlers.forEach(t=>t.destroy()),delete this.handlers,this}}return e._originStyleProp=["width","height","position","left","right","top","opacity","zIndex"],e})(),CD='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',xD=(()=>{class e extends V9{constructor(t,i={}){super(),this.el=t,this.option=i,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},this._autoScrollTick=()=>{let n=this.helper,s=this._autoScrollContainer;if(!n||!s){this._stopScrolling();return}let c=this._getClipping(n,s);if(c===0){this._stopScrolling();return}if(!this._autoScrollMaxSpeed){let _=window.innerHeight||document.documentElement.clientHeight;this._autoScrollMaxSpeed=Math.max(_/150,4)}let l=Math.abs(c),d=Math.min(l*.5,this._autoScrollMaxSpeed),u=c>0?d:-d,m=s.scrollTop;if(s.scrollTop+=u,s.scrollTop===m){this._stopScrolling();return}this.dragging&&this.lastDrag&&(this._dragFollow(this.lastDrag),this._callDrag(this.lastDrag)),this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick)};let r=i?.handle?.substring(1),o=t.gridstackNode;this.dragEls=!r||t.classList.contains(r)?[t]:o?.subGrid?[t.querySelector(i.handle)||t]:this.getAllHandles(),this.dragEls.length===0&&(this.dragEls=[t]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}getAllHandles(){return Array.from(this.el.querySelectorAll(this.option.handle)).filter(t=>{if(!(t instanceof HTMLElement))return!1;let i=t.closest(".grid-stack-item");return i===this.el||!i})}on(t,i){super.on(t,i)}off(t){super.off(t)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(t=>{t.addEventListener("mousedown",this._mouseDown),O5&&(t.addEventListener("touchstart",U4),t.addEventListener("pointerdown",G4))}),this.el.classList.remove("ui-draggable-disabled"))}disable(t=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(i=>{i.removeEventListener("mousedown",this._mouseDown),O5&&(i.removeEventListener("touchstart",U4),i.removeEventListener("pointerdown",G4))}),t||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(t){return Object.keys(t).forEach(i=>this.option[i]=t[i]),this}_mouseDown(t){if(_5.touchHandled&&t.isTrusted&&(_5.touchHandled=!1),!$.mouseHandled)return t.button!==0||!this.dragEls.find(i=>i===t.target)&&t.target.closest(CD)||this.option.cancel&&t.target.closest(this.option.cancel)||(this.mouseDownEvent=t,delete this.dragging,delete $.dragElement,delete $.dropElement,delete this._autoScrollMaxSpeed,delete this._autoScrollContainer,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),O5&&(t.currentTarget.addEventListener("touchmove",q4),t.currentTarget.addEventListener("touchend",j4)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),$.mouseHandled=!0),!0}_callDrag(t){if(!this.dragging)return;let i=E.initEvent(t,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(i,this.ui()),this.triggerEvent("drag",i)}_mouseMove(t){let i=this.mouseDownEvent;if(this.lastDrag=t,this.dragging)if(this._dragFollow(t),$.pauseDrag){let r=Number.isInteger($.pauseDrag)?$.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(t),r)}else this._callDrag(t);else if(Math.abs(t.x-i.x)+Math.abs(t.y-i.y)>3){this.dragging=!0,$.dragElement=this;let r=this.el.gridstackNode?.grid;r?$.dropElement=r.el.ddElement.ddDroppable:delete $.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=E.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment),this._setupHelperStyle(t);let o=E.initEvent(t,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(o,this.ui()),this.triggerEvent("dragstart",o),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(t){if(this._stopScrolling(),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),O5&&t.currentTarget&&(t.currentTarget.removeEventListener("touchmove",q4,!0),t.currentTarget.removeEventListener("touchend",j4,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),$.dropElement?.el===this.el.parentElement&&delete $.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();let i=E.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),$.dropElement&&$.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete $.dragElement,delete $.dropElement,delete $.mouseHandled,t.preventDefault()}_keyEvent(t){let i=this.el.gridstackNode,r=i?.grid||$.dropElement?.el?.gridstack;if(t.key==="Escape")i&&i._origRotate&&(i._orig=i._origRotate,delete i._origRotate),r?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(i&&r&&(t.key==="r"||t.key==="R")){if(!E.canBeRotated(i))return;i._origRotate=i._origRotate||O({},i._orig),delete i._moving,r.setAnimation(!1).rotate(i.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetX}).setAnimation(),i._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,i.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",E.swap(i._orig,"w","h"),delete i._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let t=this.el;return typeof this.option.helper=="function"?t=this.option.helper(this.el):this.option.helper==="clone"&&(t=E.cloneNode(this.el)),t.parentElement||E.appendTo(t,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=e.originStyleProp.map(i=>this.el.style[i]),t}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");let i=this.helper.style;return i.pointerEvents="none",i.width=this.dragOffset.width+"px",i.height=this.dragOffset.height+"px",i.willChange="left, right, top",i.position="fixed",this._dragFollow(t),i.transition="none",setTimeout(()=>{this.helper&&(i.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){let t=this.helper,i=this.dragElementOriginStyle.transition||null;t.style.transition=this.dragElementOriginStyle.transition="none",e.originStyleProp.forEach(r=>t.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>t.style.transition=i,50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){let i=this.helper.style,r=this.dragOffset;this.option.rtl?(i.right=(window.innerWidth-t.clientX+r.offsetX)*this.dragTransform.xScale+"px",i.left&&(i.left="")):(i.left=(t.clientX+r.offsetX)*this.dragTransform.xScale+"px",i.right&&(i.right="")),i.top=(t.clientY+r.offsetTop)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,i,r){let o=0,n=0;r&&(o=this.dragTransform.xOffset,n=this.dragTransform.yOffset);let s=i.getBoundingClientRect(),c=this.option.rtl?s.right:s.left,l=this.option.rtl?t.clientX-s.right+o:-t.clientX+s.left-o;return{x:c,top:s.top,offsetX:l,offsetTop:-t.clientY+s.top-n,width:s.width*this.dragTransform.xScale,height:s.height*this.dragTransform.yScale}}updateScrollPosition(t){this._autoScrollContainer=E.getScrollElement(t),this._getClipping(this.helper,this._autoScrollContainer)===0?this._stopScrolling():this._autoScrollAnimId||(this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick))}_getClipping(t,i){let r=t.getBoundingClientRect(),o=i.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;if(r.bottom<o.top||r.top>o.bottom)return 0;let s=r.bottom-Math.min(o.bottom,n),c=r.top-Math.max(o.top,0);return c<0?c:s>0?s:0}_stopScrolling(){this._autoScrollAnimId&&(cancelAnimationFrame(this._autoScrollAnimId),delete this._autoScrollAnimId)}ui(){let t=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect(),r=this.option.rtl?(t.right-i.right)*this.dragTransform.xScale:(i.left-t.left)*this.dragTransform.xScale;return{position:{top:(i.top-t.top)*this.dragTransform.yScale,left:r}}}}return e.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","right","top","minWidth","willChange"],e})(),MD=class extends V9{constructor(e,a={}){super(),this.el=e,this.option=a,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,a){super.on(e,a)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),O5&&(this.el.addEventListener("pointerenter",lh),this.el.addEventListener("pointerleave",hh)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),O5&&(this.el.removeEventListener("pointerenter",lh),this.el.removeEventListener("pointerleave",hh)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(a=>this.option[a]=e[a]),this._setupAccept(),this}_mouseEnter(e){if(!$.dragElement||_5.touchHandled&&e.isTrusted||!this._canDrop($.dragElement.el))return;e.preventDefault(),e.stopPropagation(),$.dragElement._stopScrolling(),$.dropElement&&$.dropElement!==this&&$.dropElement._mouseLeave(e,!0),$.dropElement=this;let a=E.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(a,this._ui($.dragElement)),this.triggerEvent("dropover",a),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,a=!1){if(!$.dragElement||$.dropElement!==this)return;e.preventDefault(),e.stopPropagation(),a&&$.dragElement._stopScrolling();let t=E.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui($.dragElement)),this.triggerEvent("dropout",t),$.dropElement===this&&(delete $.dropElement,!a)){let i,r=this.el.parentElement;for(;!i&&r;)i=r.ddElement?.ddDroppable,r=r.parentElement;i&&i._mouseEnter(e)}}drop(e){e.preventDefault();let a=E.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(a,this._ui($.dragElement)),this.triggerEvent("drop",a)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return O({draggable:e.el},e.ui())}},BD=class hp{static init(a){return a.ddElement||(a.ddElement=new hp(a)),a.ddElement}constructor(a){this.el=a}on(a,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.on(a,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.on(a,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.on(a,t),this}off(a){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.off(a):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.off(a):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.off(a),this}setupDraggable(a){return this.ddDraggable?this.ddDraggable.updateOption(a):this.ddDraggable=new xD(this.el,a),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(a){return this.ddResizable?this.ddResizable.updateOption(a):this.ddResizable=new ZD(this.el,a),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(a){return this.ddDroppable?this.ddDroppable.updateOption(a):this.ddDroppable=new MD(this.el,a),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},HD=class{resizable(e,a,t,i){return this._getDDElements(e,a).forEach(r=>{if(a==="disable"||a==="enable")r.ddResizable&&r.ddResizable[a]();else if(a==="destroy")r.ddResizable&&r.cleanResizable();else if(a==="option")r.setupResizable({[t]:i});else{let o=r.el.gridstackNode.grid,n=r.el.getAttribute("gs-resize-handles")||o.opts.resizable.handles||"e,s,se";n==="all"&&(n="n,e,s,w,se,sw,ne,nw");let s=!o.opts.alwaysShowResizeHandle;r.setupResizable(h1(O({},o.opts.resizable),{handles:n,autoHide:s,start:a.start,stop:a.stop,resize:a.resize,rtl:a.rtl}))}}),this}draggable(e,a,t,i){return this._getDDElements(e,a).forEach(r=>{if(a==="disable"||a==="enable")r.ddDraggable&&r.ddDraggable[a]();else if(a==="destroy")r.ddDraggable&&r.cleanDraggable();else if(a==="option")r.setupDraggable({[t]:i});else{let o=r.el.gridstackNode.grid;r.setupDraggable(h1(O({},o.opts.draggable),{start:a.start,stop:a.stop,drag:a.drag,rtl:a.rtl}))}}),this}dragIn(e,a){return this._getDDElements(e).forEach(t=>t.setupDraggable(a)),this}droppable(e,a,t,i){return typeof a.accept=="function"&&!a._accept&&(a._accept=a.accept,a.accept=r=>a._accept(r)),this._getDDElements(e,a).forEach(r=>{a==="disable"||a==="enable"?r.ddDroppable&&r.ddDroppable[a]():a==="destroy"?r.ddDroppable&&r.cleanDroppable():a==="option"?r.setupDroppable({[t]:i}):r.setupDroppable(a)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,a,t){return this._getDDElements(e).forEach(i=>i.on(a,r=>{t(r,$.dragElement?$.dragElement.el:r.target,$.dragElement?$.dragElement.helper:null)})),this}off(e,a){return this._getDDElements(e).forEach(t=>t.off(a)),this}_getDDElements(e,a){let t=e.gridstack||a!=="destroy"&&a!=="disable",i=E.getElements(e);return i.length?i.map(r=>r.ddElement||(t?BD.init(r):null)).filter(r=>r):[]}},e5=new HD,Ie=(()=>{class e{static init(t={},i=".grid-stack"){if(typeof document>"u")return null;let r=e.getGridElement(i);return r?(r.gridstack||(r.gridstack=new e(r,E.cloneDeep(t))),r.gridstack):(console.error(typeof i=="string"?'GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
|
|
155
155
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(t={},i=".grid-stack"){let r=[];return typeof document>"u"||(e.getGridElements(i).forEach(o=>{o.gridstack||(o.gridstack=new e(o,E.cloneDeep(t))),r.push(o.gridstack)}),r.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
|
|
156
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),r}static addGrid(t,i={}){if(!t)return null;let r=t;if(r.gridstack){let o=r.gridstack;return i&&(o.opts=O(O({},o.opts),i)),i.children!==void 0&&o.load(i.children),o}return(!t.classList.contains("grid-stack")||e.addRemoveCB)&&(e.addRemoveCB?r=e.addRemoveCB(t,i,!0,!0):r=E.createDiv(["grid-stack",i.class],t)),e.init(i,r)}static registerEngine(t){e.engineClass=t}get placeholder(){if(!this._placeholder){this._placeholder=E.createDiv([this.opts.placeholderClass,d5.itemClass,this.opts.itemClass]);let t=E.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(t.textContent=this.opts.placeholderText)}return this._placeholder}constructor(t,i={}){this.el=t,this.opts=i,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,this.opts=i=i||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),i.row&&(i.minRow=i.maxRow=i.row,delete i.row);let r=E.toNumber(t.getAttribute("gs-row"));i.column==="auto"&&delete i.column,i.alwaysShowResizeHandle!==void 0&&(i._alwaysShowResizeHandle=i.alwaysShowResizeHandle);let o=i.columnOpts;if(o){let l=o.breakpoints;!o.columnWidth&&!l?.length?delete i.columnOpts:(o.columnMax=o.columnMax||12,l?.length>1&&l.sort((d,u)=>(u.w||0)-(d.w||0)))}let n=h1(O({},E.cloneDeep(d5)),{column:E.toNumber(t.getAttribute("gs-column"))||d5.column,minRow:r||E.toNumber(t.getAttribute("gs-min-row"))||d5.minRow,maxRow:r||E.toNumber(t.getAttribute("gs-max-row"))||d5.maxRow,staticGrid:E.toBool(t.getAttribute("gs-static"))||d5.staticGrid,sizeToContent:E.toBool(t.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(i.handleClass?"."+i.handleClass:i.handle?i.handle:"")||d5.draggable.handle},removableOptions:{accept:i.itemClass||d5.removableOptions.accept,decline:d5.removableOptions.decline}});t.getAttribute("gs-animate")&&(n.animate=E.toBool(t.getAttribute("gs-animate"))),i=E.defaults(i,n),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(i),i.rtl==="auto"&&(i.rtl=t.style.direction==="rtl"),i.rtl&&this.el.classList.add("grid-stack-rtl");let s=this.el.closest("."+d5.itemClass)?.gridstackNode;if(s&&(s.subGrid=this,this.parentGridNode=s,this.el.classList.add("grid-stack-nested"),s.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=i.cellHeight==="auto",this._isAutoCellHeight||i.cellHeight==="initial")this.cellHeight(void 0);else{typeof i.cellHeight=="number"&&i.cellHeightUnit&&i.cellHeightUnit!==d5.cellHeightUnit&&(i.cellHeight=i.cellHeight+i.cellHeightUnit,delete i.cellHeightUnit);let l=i.cellHeight;delete i.cellHeight,this.cellHeight(l)}i.alwaysShowResizeHandle==="mobile"&&(i.alwaysShowResizeHandle=O5),this._setStaticClass();let c=i.engineClass||e.engineClass||ch;if(this.engine=new c({column:this.getColumn(),float:i.float,maxRow:i.maxRow,onChange:l=>{l.forEach(d=>{let u=d.el;u&&(d._removeDOM?(u&&u.remove(),delete d._removeDOM):this._writePosAttr(u,d))}),this._updateContainerHeight()}}),i.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(l=>this._prepareElement(l)),delete this.engine._loading,this.batchUpdate(!1)),i.children){let l=i.children;delete i.children,l.length&&this.load(l)}this.setAnimation(),i.subGridDynamic&&!$.pauseDrag&&($.pauseDrag=!0),i.draggable?.pause!==void 0&&($.pauseDrag=i.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(t=this.opts){this.el.classList.add("gs-"+t.column),typeof t.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/t.column}%`)}addWidget(t){if(!t)return;if(typeof t=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(t.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(t);let i,r=t;if(r.grid=this,r.el?i=r.el:e.addRemoveCB?i=e.addRemoveCB(this.el,t,!0,!1):i=this.createWidgetDivs(r),!i)return;if(r=i.gridstackNode,r&&i.parentElement===this.el&&this.engine.nodes.find(n=>n._id===r._id))return i;let o=this._readAttr(i);return E.defaults(t,o),this.engine.prepareNode(t),this.el.appendChild(i),this.makeWidget(i,t),i}createWidgetDivs(t){let i=E.createDiv(["grid-stack-item",this.opts.itemClass]),r=E.createDiv(["grid-stack-item-content"],i);return E.lazyLoad(t)?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(t.visibleObservable?.disconnect(),delete t.visibleObservable,e.renderCB(r,t),t.grid?.prepareDragDrop(t.el))}),window.setTimeout(()=>t.visibleObservable?.observe(i))):e.renderCB(r,t),i}makeSubGrid(t,i,r,o=!0){let n=t.gridstackNode;if(n||(n=this.makeWidget(t).gridstackNode),n.subGrid?.el)return n.subGrid;let s,c=this;for(;c&&!s;)s=c.opts?.subGridOpts,c=c.parentGridNode?.grid;i=E.cloneDeep(O(O(h1(O({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),s||{}),i||n.subGridOpts||{})),n.subGridOpts=i;let l;i.column==="auto"&&(l=!0,i.column=Math.max(n.w||1,r?.w||1),delete i.columnOpts);let d=n.el.querySelector(".grid-stack-item-content"),u,m;if(o&&(this._removeDD(n.el),m=h1(O({},n),{x:0,y:0}),E.removeInternalForSave(m),delete m.subGridOpts,n.content&&(m.content=n.content,delete n.content),e.addRemoveCB?u=e.addRemoveCB(this.el,m,!0,!1):(u=E.createDiv(["grid-stack-item"]),u.appendChild(d),d=E.createDiv(["grid-stack-item-content"],n.el)),this.prepareDragDrop(n.el)),r){let g=l?i.column:n.w,y=n.h+r.h,w=n.el.style;w.transition="none",this.update(n.el,{w:g,h:y}),setTimeout(()=>w.transition=null)}let _=n.subGrid=e.addGrid(d,i);return r?._moving&&(_._isTemp=!0),l&&(_._autoColumn=!0),o&&_.makeWidget(u,m),r&&(r._moving?window.setTimeout(()=>E.simulateMouseEvent(r._event,"mouseenter",_.el),0):_.makeWidget(n.el,n)),this.resizeToContentCheck(!1,n),_}removeAsSubGrid(t){let i=this.parentGridNode?.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(r=>{r.x+=this.parentGridNode.x,r.y+=this.parentGridNode.y,i.makeWidget(r.el,r)}),i.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,t&&window.setTimeout(()=>E.simulateMouseEvent(t._event,"mouseenter",i.el),0))}save(t=!0,i=!1,r=e.saveCB,o){let n=this.engine.save(t,r,o);if(n.forEach(s=>{if(t&&s.el&&!s.subGrid&&!r){let c=s.el.querySelector(".grid-stack-item-content");s.content=c?.innerHTML,s.content||delete s.content}else if(!t&&!r&&delete s.content,s.subGrid?.el){let c=s.w||s.subGrid.getColumn(),l=s.subGrid.save(t,i,r,c);s.subGridOpts=i?l:{children:l},delete s.subGrid}delete s.el}),i){let s=E.cloneDeep(this.opts);s.marginBottom===s.marginTop&&s.marginRight===s.marginLeft&&s.marginTop===s.marginRight&&(s.margin=s.marginTop,delete s.marginTop,delete s.marginRight,delete s.marginBottom,delete s.marginLeft),s.rtl===(this.el.style.direction==="rtl")&&(s.rtl="auto"),this._isAutoCellHeight&&(s.cellHeight="auto"),this._autoColumn&&(s.column="auto");let c=s._alwaysShowResizeHandle;return delete s._alwaysShowResizeHandle,c!==void 0?s.alwaysShowResizeHandle=c:delete s.alwaysShowResizeHandle,E.removeInternalAndSame(s,d5),s.children=n,s}return n}load(t,i=e.addRemoveCB||!0){t.forEach(u=>{u.w=u.w||u.minW||1,u.h=u.h||u.minH||1}),t=E.sort(t),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let r=0;t.forEach(u=>{r=Math.max(r,(u.x||0)+u.w)}),r>this.engine.defaultColumn&&(this.engine.defaultColumn=r);let o=this.getColumn();r>o&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=t,this.engine.columnChanged(r,o,this.responseLayout),t=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(t,r,!0));let n=e.addRemoveCB;typeof i=="function"&&(e.addRemoveCB=i);let s=[];this.batchUpdate();let c=!this.engine.nodes.length,l=c&&this.opts.animate;l&&this.setAnimation(!1),!c&&i&&[...this.engine.nodes].forEach(u=>{u.id&&(E.find(t,u.id)||(e.addRemoveCB&&e.addRemoveCB(this.el,u,!1,!1),s.push(u),this.removeWidget(u.el,!0,!1)))}),this.engine._loading=!0;let d=[];return this.engine.nodes=this.engine.nodes.filter(u=>E.find(t,u.id)?(d.push(u),!1):!0),t.forEach(u=>{let m=E.find(d,u.id);if(m){if(E.shouldSizeToContent(m)&&(u.h=m.h),this.engine.nodeBoundFix(u),(u.autoPosition||u.x===void 0||u.y===void 0)&&(u.w=u.w||m.w,u.h=u.h||m.h,this.engine.findEmptyPosition(u)),this.engine.nodes.push(m),E.samePos(m,u)&&this.engine.nodes.length>1&&(this.moveNode(m,h1(O({},u),{forceCollide:!0})),E.copyPos(u,m)),this.update(m.el,u),u.subGridOpts?.children){let _=m.el.querySelector(".grid-stack");_&&_.gridstack&&_.gridstack.load(u.subGridOpts.children)}}else i&&this.addWidget(u)}),delete this.engine._loading,this.engine.removedNodes=s,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,n?e.addRemoveCB=n:delete e.addRemoveCB,l&&this.setAnimation(!0,!0),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let i=this.el.querySelector("."+this.opts.itemClass);if(i){let o=E.toNumber(i.getAttribute("gs-h"))||1;return Math.round(i.offsetHeight/o)}let r=parseInt(this.el.getAttribute("gs-current-row"));return r?Math.round(this.el.getBoundingClientRect().height/r):this.opts.cellHeight}cellHeight(t){if(t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let r=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+r}let i=E.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){return t&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!t.breakpoints?.length)return!1;let i=this.getColumn(),r=i,o=this._widthOrContainer(!0);if(t.columnWidth)r=Math.min(Math.round(o/t.columnWidth)||1,t.columnMax);else{r=t.columnMax;let n=0;for(;n<t.breakpoints.length&&o<=t.breakpoints[n].w;)r=t.breakpoints[n++].c||i}if(r!==i){let n=t.breakpoints?.find(s=>s.c===r);return this.column(r,n?.layout||t.layout),!0}return!1}compact(t="compact",i=!0){return this.engine.compact(t,i),this._triggerChangeEvent(),this}column(t,i="moveScale"){if(!t||t<1||this.opts.column===t)return this;let r=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+r),this._updateColumnVar(),this.engine.columnChanged(r,t,i),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=i,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(t=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,i=!1){let r=this.el.getBoundingClientRect(),o;i?o={top:r.top+document.documentElement.scrollTop,left:r.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};let n=t.left-o.left,s=t.top-o.top,c=r.width/this.getColumn(),l=r.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(n/c),y:Math.floor(s/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(t,i,r,o){return this.engine.isAreaEmpty(t,i,r,o)}makeWidget(t,i){let r=e.getElement(t);if(!r||r.gridstackNode)return r;r.parentElement||this.el.appendChild(r),this._prepareElement(r,!0,i);let o=r.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(r,o.subGridOpts,void 0,!1);let n;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(n=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),n&&delete this._ignoreLayoutsNodeChange,r}on(t,i){return t.indexOf(" ")!==-1?(t.split(" ").forEach(r=>this.on(r,i)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=r=>i(r):this._gsEventHandler[t]=r=>{r.detail&&i(r,r.detail)},this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=i:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,i=!0,r=!0){return t?(e.getElements(t).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let n=o.gridstackNode;n||(n=this.engine.nodes.find(s=>o===s.el)),n&&(i&&e.addRemoveCB&&e.addRemoveCB(this.el,n,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(n,i,r),i&&o.parentElement&&o.remove())}),r&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(t=!0,i=!0){return this.engine.nodes.forEach(r=>{t&&e.addRemoveCB&&e.addRemoveCB(this.el,r,!1,!1),delete r.el.gridstackNode,this.opts.staticGrid||this._removeDD(r.el)}),this.engine.removeAll(t,i),i&&this._triggerRemoveEvent(),this}setAnimation(t=this.opts.animate,i){return i?setTimeout(()=>{this.opts&&this.setAnimation(t)}):t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=t,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,i=!0,r=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&r&&o.subGrid.setStatic(t,i,r)}),i&&this._setStaticClass(),this)}updateOptions(t){let i=this.opts;if(t===i)return this;if(t.acceptWidgets!==void 0&&(i.acceptWidgets=t.acceptWidgets,this._setupAcceptWidget()),t.animate!==void 0&&this.setAnimation(t.animate),t.cellHeight&&this.cellHeight(t.cellHeight),t.class!==void 0&&t.class!==i.class&&(i.class&&this.el.classList.remove(i.class),t.class&&this.el.classList.add(t.class)),t.columnOpts){let r=!!this.opts.columnOpts;this.opts.columnOpts=t.columnOpts,r!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else t.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof t.column=="number"&&this.column(t.column);return t.margin!==void 0&&this.margin(t.margin),t.staticGrid!==void 0&&this.setStatic(t.staticGrid),t.disableDrag!==void 0&&!t.staticGrid&&this.enableMove(!t.disableDrag),t.disableResize!==void 0&&!t.staticGrid&&this.enableResize(!t.disableResize),t.float!==void 0&&this.float(t.float),t.row!==void 0?(i.minRow=i.maxRow=i.row=t.row,this._updateContainerHeight()):(t.minRow!==void 0&&(i.minRow=t.minRow,this._updateContainerHeight()),t.maxRow!==void 0&&(i.maxRow=this.engine.maxRow=t.maxRow)),t.lazyLoad!==void 0&&(i.lazyLoad=t.lazyLoad),t.children?.length&&this.load(t.children),this}update(t,i){return e.getElements(t).forEach(r=>{let o=r?.gridstackNode;if(!o)return;let n=O(O({},E.copyPos({},o)),E.cloneDeep(i));this.engine.nodeBoundFix(n),delete n.autoPosition;let s=["x","y","w","h"],c;if(s.some(u=>n[u]!==void 0&&n[u]!==o[u])&&(c={},s.forEach(u=>{c[u]=n[u]!==void 0?n[u]:o[u],delete n[u]})),!c&&(n.minW||n.minH||n.maxW||n.maxH)&&(c={}),n.content!==void 0){let u=r.querySelector(".grid-stack-item-content");u&&u.textContent!==n.content&&(o.content=n.content,e.renderCB(u,n),o.subGrid?.el&&(u.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete n.content}let l=!1,d=!1;for(let u in n)u[0]!=="_"&&o[u]!==n[u]&&(o[u]=n[u],l=!0,d=d||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(E.sanitizeMinMax(o),c){let u=c.w!==void 0&&c.w!==o.w;this.moveNode(o,c),u&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(u,o),delete o._orig}(c||l)&&this._writeAttr(r,o),d&&this.prepareDragDrop(o.el),e.updateCB&&e.updateCB(o)}),this}moveNode(t,i){let r=t._updating;r||this.engine.cleanNodes().beginUpdate(t),this.engine.moveNode(t,i),this._updateContainerHeight(),r||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let i=t.gridstackNode;if(!i)return;let r=i.grid;if(!r||t.parentElement!==r.el)return;let o=r.getCellHeight(!0);if(!o)return;let n=i.h?i.h*o:t.clientHeight,s;if(i.resizeToContentParent&&(s=t.querySelector(i.resizeToContentParent)),s||(s=t.querySelector(e.resizeToContentParent)),!s)return;let c=t.clientHeight-s.clientHeight,l=i.h?i.h*o-c:s.clientHeight,d;if(i.subGrid){d=i.subGrid.getRow()*i.subGrid.getCellHeight(!0);let _=i.subGrid.el.getBoundingClientRect(),g=t.getBoundingClientRect();d+=_.top-g.top}else{if(i.subGridOpts?.children?.length)return;{let _=s.firstElementChild;if(!_){console.error(`Error: GridStack.resizeToContent() widget id:${i.id} '${e.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=_.getBoundingClientRect().height||l}}if(l===d)return;n+=d-l;let u=Math.ceil(n/o),m=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;m&&u>m&&(u=m,t.classList.add("size-to-content-max")),i.minH&&u<i.minH?u=i.minH:i.maxH&&u>i.maxH&&(u=i.maxH),u!==i.h&&(r._ignoreLayoutsNodeChange=!0,r.moveNode(i,{h:u}),delete r._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){e.resizeToContentCB?e.resizeToContentCB(t):this.resizeToContent(t)}rotate(t,i){return e.getElements(t).forEach(r=>{let o=r.gridstackNode;if(!E.canBeRotated(o))return;let n={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(i){let c=i.left>0?Math.floor(i.left/this.cellWidth()):0,l=i.top>0?Math.floor(i.top/this.opts.cellHeight):0;n.x=o.x+c-(o.h-(l+1)),n.y=o.y+l-c}Object.keys(n).forEach(c=>{n[c]===void 0&&delete n[c]});let s=o._orig;this.update(r,n),o._orig=s}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=E.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(t){return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});let t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(t,i){let r=i?new CustomEvent(t,{bubbles:!1,detail:i}):new Event(t),o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(r),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridNode,i=this.getRow()+this._extraDragRow,r=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!r)return this;if(!t&&!this.opts.minRow){let n=E.parseHeight(getComputedStyle(this.el).minHeight);if(n.h>0&&n.unit===o){let s=Math.floor(n.h/r);i<s&&(i=s)}}return this.el.setAttribute("gs-current-row",String(i)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),i&&(this.el.style[t?"minHeight":"height"]=i*r+o),t&&E.shouldSizeToContent(t)&&t.grid.resizeToContentCBCheck(t.el),this}_prepareElement(t,i=!1,r){r=r||this._readAttr(t),t.gridstackNode=r,r.el=t,r.grid=this,r=this.engine.addNode(r,i),this._writeAttr(t,r),t.classList.add(d5.itemClass,this.opts.itemClass);let o=E.shouldSizeToContent(r);return o?t.classList.add("size-to-content"):t.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,r),E.lazyLoad(r)||this.prepareDragDrop(r.el),this}_writePosAttr(t,i){if(!i._moving&&!i._resizing||this._placeholder===t){let r=this.opts.rtl?"right":"left";t.style.top=i.y?i.y===1?"var(--gs-cell-height)":`calc(${i.y} * var(--gs-cell-height))`:null,t.style[r]=i.x?i.x===1?"var(--gs-column-width)":`calc(${i.x} * var(--gs-column-width))`:null,t.style.width=i.w>1?`calc(${i.w} * var(--gs-column-width))`:null,t.style.height=i.h>1?`calc(${i.h} * var(--gs-cell-height))`:null}return t.setAttribute("gs-x",String(i.x)),t.setAttribute("gs-y",String(i.y)),i.w>1?t.setAttribute("gs-w",String(i.w)):t.removeAttribute("gs-w"),i.h>1?t.setAttribute("gs-h",String(i.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,i){if(!i)return this;this._writePosAttr(t,i);let r={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(let o in r)i[o]?t.setAttribute(r[o],String(i[o])):t.removeAttribute(r[o]);return this}_readAttr(t,i=!0){let r={};r.x=E.toNumber(t.getAttribute("gs-x")),r.y=E.toNumber(t.getAttribute("gs-y")),r.w=E.toNumber(t.getAttribute("gs-w")),r.h=E.toNumber(t.getAttribute("gs-h")),r.autoPosition=E.toBool(t.getAttribute("gs-auto-position")),r.noResize=E.toBool(t.getAttribute("gs-no-resize")),r.noMove=E.toBool(t.getAttribute("gs-no-move")),r.locked=E.toBool(t.getAttribute("gs-locked"));let o=t.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?r.sizeToContent=E.toBool(o):r.sizeToContent=parseInt(o,10)),r.id=t.getAttribute("gs-id"),r.maxW=E.toNumber(t.getAttribute("gs-max-w")),r.minW=E.toNumber(t.getAttribute("gs-min-w")),r.maxH=E.toNumber(t.getAttribute("gs-max-h")),r.minH=E.toNumber(t.getAttribute("gs-min-h")),i&&(r.w===1&&t.removeAttribute("gs-w"),r.h===1&&t.removeAttribute("gs-h"),r.maxW&&t.removeAttribute("gs-max-w"),r.minW&&t.removeAttribute("gs-min-w"),r.maxH&&t.removeAttribute("gs-max-h"),r.minH&&t.removeAttribute("gs-min-h"));for(let n in r){if(!r.hasOwnProperty(n))return;!r[n]&&r[n]!==0&&n!=="sizeToContent"&&delete r[n]}return r}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onResize(t=this.el?.clientWidth){if(!t||this.prevWidth===t)return;this.prevWidth=t,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(r=>{r.subGrid&&r.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,i=void 0){if(this.engine){if(t&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,i),this.animationDelay);if(i)E.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el);else if(this.engine.nodes.some(r=>E.shouldSizeToContent(r))){let r=[...this.engine.nodes];this.batchUpdate(),r.forEach(o=>{E.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,i?[i]:this.engine.nodes)}}_updateResizeEvent(t=!1){let i=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(r=>r.sizeToContent));return!t&&i&&!this.resizeObserver?(this._sizeThrottle=E.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!i)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return E.getElement(t)}static getElements(t=".grid-stack-item"){return E.getElements(t)}static getGridElement(t){return e.getElement(t)}static getGridElements(t){return E.getElements(t)}_initMargin(){let t,i=0,r=[];typeof this.opts.margin=="string"&&(r=this.opts.margin.split(" ")),r.length===2?(this.opts.marginTop=this.opts.marginBottom=r[0],this.opts.marginLeft=this.opts.marginRight=r[1]):r.length===4?(this.opts.marginTop=r[0],this.opts.marginRight=r[1],this.opts.marginBottom=r[2],this.opts.marginLeft=r[3]):(t=E.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,i=this.opts.margin=t.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(n=>{this.opts[n]===void 0?this.opts[n]=i:(t=E.parseHeight(this.opts[n]),this.opts[n]=t.h,delete this.opts.margin)}),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return e5}static setupDragIn(t,i,r,o=document){i?.pause!==void 0&&($.pauseDrag=i.pause),i=O({appendTo:"body",helper:"clone"},i||{}),(typeof t=="string"?E.getElements(t,o):t).forEach((n,s)=>{e5.isDraggable(n)||e5.dragIn(n,i),r?.[s]&&(n.gridstackNode=r[s])})}movable(t,i){return this.opts.staticGrid?this:(e.getElements(t).forEach(r=>{let o=r.gridstackNode;o&&(i?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(t,i){return this.opts.staticGrid?this:(e.getElements(t).forEach(r=>{let o=r.gridstackNode;o&&(i?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this}enable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this}enableMove(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&i&&r.subGrid.enableMove(t,i)}),this)}enableResize(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&i&&r.subGrid.enableResize(t,i)}),this)}cancelDrag(){let t=this._placeholder?.gridstackNode;t&&(t._isExternal?(t._isAboutToRemove=!0,this.engine.removeNode(t)):t._isAboutToRemove&&e._itemRemoving(t.el,!1),this.engine.restoreInitial())}_removeDD(t){return e5.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return e5.droppable(this.el,"destroy"),this;let t,i,r=(o,n,s)=>{s=s||n;let c=s.gridstackNode;if(!c)return;if(!c.grid?.el){s.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let _=s.getBoundingClientRect();s.style.left=_.x+(this.dragTransform.xScale-1)*(o.clientX-_.x)/this.dragTransform.xScale+"px",s.style.top=_.y+(this.dragTransform.yScale-1)*(o.clientY-_.y)/this.dragTransform.yScale+"px",s.style.transformOrigin="0px 0px"}let{top:l,left:d}=s.getBoundingClientRect(),u=this.el.getBoundingClientRect();d-=u.left,l-=u.top;let m={position:{top:l*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(c._temporaryRemoved){if(c.x=Math.max(0,Math.round(d/i)),c.y=Math.max(0,Math.round(l/t)),delete c.autoPosition,this.engine.nodeBoundFix(c),!this.engine.willItFit(c)){if(c.autoPosition=!0,!this.engine.willItFit(c)){e5.off(n,"drag");return}c._willFitPos&&(E.copyPos(c,c._willFitPos),delete c._willFitPos)}this._onStartMoving(s,o,m,c,i,t)}else this._dragOrResize(s,o,m,c,i,t)};return e5.droppable(this.el,{accept:o=>{let n=o.gridstackNode||this._readAttr(o,!1);if(n?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let s=!0;if(typeof this.opts.acceptWidgets=="function")s=this.opts.acceptWidgets(o);else{let c=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;s=o.matches(c)}if(s&&n&&this.opts.maxRow){let c={w:n.w,h:n.h,minW:n.minW,minH:n.minH};s=this.engine.willItFit(c)}return s}}).on(this.el,"dropover",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;if(c?.grid===this&&!c._temporaryRemoved)return!1;if(c?._sidebarOrig&&(c.w=c._sidebarOrig.w,c.h=c._sidebarOrig.h),c?.grid&&c.grid!==this&&!c._temporaryRemoved&&c.grid._leave(n,s),s=s||n,i=this.cellWidth(),t=this.getCellHeight(!0),!c){let u=s.getAttribute("data-gs-widget")||s.getAttribute("gridstacknode");if(u){try{c=JSON.parse(u)}catch{console.error("Gridstack dropover: Bad JSON format: ",u)}s.removeAttribute("data-gs-widget"),s.removeAttribute("gridstacknode")}c||(c=this._readAttr(s)),c._sidebarOrig={w:c.w,h:c.h}}c.grid||(c.el||(c=O({},c)),c._isExternal=!0,s.gridstackNode=c);let l=c.w||Math.round(s.offsetWidth/i)||1,d=c.h||Math.round(s.offsetHeight/t)||1;return c.grid&&c.grid!==this?(n._gridstackNodeOrig||(n._gridstackNodeOrig=c),n.gridstackNode=c=h1(O({},c),{w:l,h:d,grid:this}),delete c.x,delete c.y,this.engine.cleanupNode(c).nodeBoundFix(c),c._initDD=c._isExternal=c._temporaryRemoved=!0):(c.w=l,c.h=d,c._temporaryRemoved=!0),e._itemRemoving(c.el,!1),e5.on(n,"drag",r),r(o,n,s),!1}).on(this.el,"dropout",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;return c&&(!c.grid||c.grid===this)&&(this._leave(n,s),this._isTemp&&this.removeAsSubGrid(c)),!1}).on(this.el,"drop",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;if(c?.grid===this&&!c._isExternal)return!1;let l=!!this.placeholder.parentElement,d=n!==s;this.placeholder.remove(),delete this.placeholder.gridstackNode,l&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let u=n._gridstackNodeOrig;if(delete n._gridstackNodeOrig,l&&u?.grid&&u.grid!==this){let _=u.grid;_.engine.removeNodeFromLayoutCache(u),_.engine.removedNodes.push(u),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridNode&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!c||(l&&(this.engine.cleanupNode(c),c.grid=this),delete c.grid?._isTemp,e5.off(n,"drag"),s!==n?(s.remove(),n=s):n.remove(),this._removeDD(n),!l))return!1;let m=c.subGrid?.el?.gridstack;return E.copyPos(c,this._readAttr(this.placeholder)),E.removePositioningStyles(n),d&&(c.content||c.subGridOpts||e.addRemoveCB)?(delete c.el,n=this.addWidget(c)):(this._prepareElement(n,!0,c),this.el.appendChild(n),this.resizeToContentCheck(!1,c),m&&(m.parentGridNode=c),this._updateContainerHeight()),this.engine.addedNodes.push(c),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(h1(O({},o),{type:"dropped"}),u&&u.grid?u:void 0,c),!1}),this}static _itemRemoving(t,i){if(!t)return;let r=t?t.gridstackNode:void 0;!r?.grid||t.classList.contains(r.grid.opts.removableOptions.decline)||(i?r._isAboutToRemove=!0:delete r._isAboutToRemove,i?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!e5.isDroppable(t)&&e5.droppable(t,this.opts.removableOptions).on(t,"dropover",(i,r)=>e._itemRemoving(r,!0)).on(t,"dropout",(i,r)=>e._itemRemoving(r,!1)),this):this}prepareDragDrop(t,i=!1){let r=t?.gridstackNode;if(!r)return;let o=r.noMove||this.opts.disableDrag,n=r.noResize||this.opts.disableResize,s=this.opts.staticGrid||o&&n;if((i||s)&&(r._initDD&&(this._removeDD(t),delete r._initDD),s))return t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!r._initDD){let c,l,d=(_,g)=>{this.triggerEvent(_,_.target),c=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(t,_,g,r,c,l)},u=(_,g)=>{this._dragOrResize(t,_,g,r,c,l)},m=_=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete r._moving,delete r._resizing,delete r._event,delete r._lastTried;let g=r.w!==r._orig.w,y=_.target;if(!(!y.gridstackNode||y.gridstackNode.grid!==this)){if(r.el=y,r._isAboutToRemove){let w=t.gridstackNode.grid;w._gsEventHandler[_.type]&&w._gsEventHandler[_.type](_,y),w.engine.nodes.push(r),w.removeWidget(t,!0,!0)}else E.removePositioningStyles(y),r._temporaryRemoved?(this._writePosAttr(y,r),this.engine.addNode(r)):this._writePosAttr(y,r),this.triggerEvent(_,y);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),_.type==="resizestop"&&(Number.isInteger(r.sizeToContent)&&(r.sizeToContent=r.h),this.resizeToContentCheck(g,r))}};e5.draggable(t,{start:d,stop:m,drag:u,rtl:this.opts.rtl}).resizable(t,{start:d,stop:m,resize:u,rtl:this.opts.rtl}),r._initDD=!0}return e5.draggable(t,o?"disable":"enable").resizable(t,n?"disable":"enable"),this}_onStartMoving(t,i,r,o,n,s){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=E.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let c=this.placeholder.closest(".grid-stack");this.dragTransform=E.getValuesFromTransformedElement(c)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=r.position,o._prevYPix=r.position.top,o._moving=i.type==="dragstart",o._resizing=i.type==="resizestart",delete o._lastTried,i.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(n,s,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),i.type==="resizestart"){let c=this.getColumn()-o.x,l=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;e5.resizable(t,"option","minWidth",n*Math.min(o.minW||1,c)).resizable(t,"option","minHeight",s*Math.min(o.minH||1,l)).resizable(t,"option","maxWidth",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,c)).resizable(t,"option","maxWidthMoveLeft",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(t,"option","maxHeight",s*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,l)).resizable(t,"option","maxHeightMoveUp",s*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(t,i,r,o,n,s){let c=O({},o._orig),l,d=this.opts.marginLeft,u=this.opts.marginRight,m=this.opts.marginTop,_=this.opts.marginBottom,g=Math.round(s*.1),y=Math.round(n*.1);if(d=Math.min(d,y),u=Math.min(u,y),m=Math.min(m,g),_=Math.min(_,g),i.type==="drag"){if(o._temporaryRemoved)return;o._prevYPix=r.position.top,this.opts.draggable.scroll!==!1&&$.dragElement?.updateScrollPosition(this.el);let v=r.position.left+(r.position.left>o._lastUiPosition.left?-u:d),C=r.position.top+(r.position.top>o._lastUiPosition.top?-_:m);c.x=Math.round(v/n),c.y=Math.round(C/s);let f=this._extraDragRow;if(this.engine.collide(o,c)){let T=this.getRow(),L=Math.max(0,c.y+o.h-T);this.opts.maxRow&&T+L>this.opts.maxRow&&(L=Math.max(0,this.opts.maxRow-T)),this._extraDragRow=L}else this._extraDragRow=0;if(this._extraDragRow!==f&&this._updateContainerHeight(),o.x===c.x&&o.y===c.y)return}else if(i.type==="resize"){if(c.x<0||(E.updateScrollResize(i,t,s),c.w=Math.round((r.size.width-d)/n),c.h=Math.round((r.size.height-m)/s),o.w===c.w&&o.h===c.h)||o._lastTried&&o._lastTried.w===c.w&&o._lastTried.h===c.h)return;if(i.hasMovedX){let v=r.position.left+d;c.x=Math.round(v/n)}if(i.hasMovedY){let v=r.position.top+m;c.y=Math.round(v/s)}l=!0}o._event=i,o._lastTried=c;let w={x:r.position.left+d,y:r.position.top+m,w:(r.size?r.size.width:o.w*n)-d-u,h:(r.size?r.size.height:o.h*s)-m-_};if(this.engine.moveNodeCheck(o,h1(O({},c),{cellWidth:n,cellHeight:s,rect:w,resizing:l}))){o._lastUiPosition=r.position,this.engine.cacheRects(n,s,m,u,_,d),delete o._skipDown,l&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let v=i.target;o._sidebarOrig||this._writePosAttr(v,o),this.triggerEvent(i,v)}}triggerEvent(t,i){let r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;r._gsEventHandler[t.type]&&r._gsEventHandler[t.type](t,i)}_leave(t,i){i=i||t;let r=i.gridstackNode;if(!r||(i.style.transform=i.style.transformOrigin=null,e5.off(t,"drag"),r._temporaryRemoved))return;r._temporaryRemoved=!0,this.engine.removeNode(r),r.el=r._isExternal&&i?i:t;let o=r._sidebarOrig;r._isExternal&&this.engine.cleanupNode(r),r._sidebarOrig=o,this.opts.removable===!0&&e._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):r._isExternal&&this.engine.restoreInitial()}}return e.renderCB=(a,t)=>{a&&t?.content&&(a.textContent=t.content)},e.resizeToContentParent=".grid-stack-item-content",e.Utils=E,e.Engine=ch,e.GDRev="12.6.0",e})(),up=["container"],kD=["*"];function SD(e,a){}var LD=["*",[["","empty-content",""]]],VD=["*","[empty-content]"];function TD(e,a){e&1&&t5(0,1,["*ngIf","isEmpty"])}function ED(e,a){}var T9=(()=>{class e{constructor(t){this.elementRef=t,this.el._gridItemComp=this}set options(t){let i=this.el.gridstackNode?.grid;i?i.update(this.el,t):this._options=h1(O({},t),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(a){return new(a||e)(We(H0))},e.\u0275cmp=Y0({type:e,selectors:[["gridstack-item"]],viewQuery:function(a,t){if(a&1&&M9(up,7,he),a&2){let i;hi(i=ui())&&(t.container=i.first)}},inputs:{options:"options"},ngContentSelectors:kD,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(a,t){a&1&&(s5(),B_(0,"div",1),y_(1,SD,0,0,"ng-template",null,0,D_),t5(3),p5(4),H_()),a&2&&(w1(4),H9(" ",t.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"]}),e})(),Bi=(()=>{class e{constructor(t){this.elementRef=t,this.addedCB=new r0,this.changeCB=new r0,this.disableCB=new r0,this.dragCB=new r0,this.dragStartCB=new r0,this.dragStopCB=new r0,this.droppedCB=new r0,this.enableCB=new r0,this.removedCB=new r0,this.resizeCB=new r0,this.resizeStartCB=new r0,this.resizeStopCB=new r0,Ie.addRemoveCB||(Ie.addRemoveCB=ID),Ie.saveCB||(Ie.saveCB=DD),Ie.updateCB||(Ie.updateCB=zD),this.el._gridComp=this}set options(t){this._grid?this._grid.updateOptions(t):this._options=t}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static addComponentToSelectorType(t){t.forEach(i=>e.selectorToType[e.getSelector(i)]=i)}static getSelector(t){return P_(t).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=Ie.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let t=[];this.gridstackItems?.forEach(i=>{t.push(i.options),i.clearOptions()}),this.grid.load(t)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(t){t&&(t.parentGridNode||t.on("added",(i,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:i,nodes:r})}).on("change",(i,r)=>this.changeCB.emit({event:i,nodes:r})).on("disable",i=>this.disableCB.emit({event:i})).on("drag",(i,r)=>this.dragCB.emit({event:i,el:r})).on("dragstart",(i,r)=>this.dragStartCB.emit({event:i,el:r})).on("dragstop",(i,r)=>this.dragStopCB.emit({event:i,el:r})).on("dropped",(i,r,o)=>this.droppedCB.emit({event:i,previousNode:r,newNode:o})).on("enable",i=>this.enableCB.emit({event:i})).on("removed",(i,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:i,nodes:r})}).on("resize",(i,r)=>this.resizeCB.emit({event:i,el:r})).on("resizestart",(i,r)=>this.resizeStartCB.emit({event:i,el:r})).on("resizestop",(i,r)=>this.resizeStopCB.emit({event:i,el:r})))}unhookEvents(t){t&&(t.parentGridNode||t.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.selectorToType={},e.\u0275fac=function(a){return new(a||e)(We(H0))},e.\u0275cmp=Y0({type:e,selectors:[["gridstack"]],contentQueries:function(a,t,i){if(a&1&&S_(i,T9,4),a&2){let r;hi(r=ui())&&(t.gridstackItems=r)}},viewQuery:function(a,t){if(a&1&&M9(up,7,he),a&2){let i;hi(i=ui())&&(t.container=i.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:VD,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(a,t){a&1&&(s5(LD),w_(0,TD,1,0,"ng-content",1)(1,ED,0,0,"ng-template",null,0,D_),t5(3)),a&2&&v0("ngIf",t.isEmpty)},dependencies:[WS],styles:["[_nghost-%COMP%]{display:block}"]}),e})();function ID(e,a,t,i){if(t){if(!e)return;if(i){let r=e.parentElement?._gridItemComp;if(!r)return;let o=(r.childWidget?.container||r.container)?.createComponent(Bi),n=o?.instance;return n?(n.ref=o,n.options=a,n.el):void 0}else{let r=e._gridComp?.container?.createComponent(T9),o=r?.instance;if(!o)return;o.ref=r;let n=a.selector,s=n?Bi.selectorToType[n]:void 0;if(s){let c=()=>{let l=o.container?.createComponent(s)?.instance;l&&typeof l.serialize=="function"&&typeof l.deserialize=="function"&&(o.childWidget=l,l.deserialize(a))};a.lazyLoad||a.grid?.opts?.lazyLoad&&a.lazyLoad!==!1?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([l])=>{l.isIntersecting&&(a.visibleObservable?.disconnect(),delete a.visibleObservable,c())}),window.setTimeout(()=>a.visibleObservable?.observe(o.el))):c()}return o.el}}else if(i){let r=a.el?._gridComp;r?.ref?r.ref.destroy():r?.ngOnDestroy()}else{let r=a.el?._gridItemComp;r?.ref?r.ref.destroy():r?.ngOnDestroy()}}function DD(e,a){let t=e.el?._gridItemComp;if(t){let r=t.childWidget?.serialize();r&&(a.input=r);return}let i=e.el?._gridComp}function zD(e){let a=e,t=e.el?._gridItemComp;t?.childWidget&&a.input&&t.childWidget.deserialize(a)}var RD=["grid"],ND=["addCardBtn"],OD=[[["","slot","dashboard-subheader"]]],FD=["[slot=dashboard-subheader]"],uh=(e,a)=>a.id,dp=(e,a)=>a.action;function PD(e,a){if(e&1&&(u1(0,"ui5-title",7),p5(1),A1()),e&2){let t=Z1();w1(),pe(t.config().title)}}function UD(e,a){if(e&1&&(u1(0,"ui5-text"),p5(1),A1()),e&2){let t=Z1();w1(),pe(t.config().description)}}function qD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",17,1),_0("click",function(){W0(t);let i=Z1();return $0(i.openCardPanel())}),p5(2),A1()}if(e&2){let t=Z1();v0("accessibleName",t.addCardButton().text||t.addCardButton().tooltip||"Edit Cards")("design",t.addCardButton().design)("icon",t.addCardButton().icon)("tooltip",t.addCardButton().tooltip),w1(2),pe(t.addCardButton().text)}}function jD(e,a){if(e&1&&n6(0,"ui5-menu-item",20),e&2){let t=a.$implicit;v0("icon",t.icon??"")("text",t.text??""),x_("data-action",t.action)}}function GD(e,a){if(e&1&&n6(0,"ui5-menu-separator")(1,"ui5-menu-item",21),e&2){let t=Z1(2);w1(),v0("icon",t.editViewButton().icon)("text",t.editViewButton().text||"Edit View")}}function WD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",18,2),_0("click",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.update(r=>!r))}),A1(),u1(2,"ui5-menu",19),_0("ui5Close",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.set(!1))})("ui5ItemClick",function(i){W0(t);let r=Z1();return $0(r.onMenuItemClick(i.detail.item.dataset.action,i))})("ui5Open",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.set(!0))}),E7(3,jD,1,3,"ui5-menu-item",20,dp),r2(5,GD,2,2),A1()}if(e&2){let t=Pk(1),i=Z1();w1(2),v0("open",i.toolbarMenuOpen())("opener",t.element),w1(),I7(i.customActions()),w1(2),o2(i.config().editable?5:-1)}}function $D(e,a){if(e&1){let t=q5();u1(0,"ui5-button",24),_0("click",function(i){let r=W0(t).$implicit,o=Z1(2);return $0(o.actionButtonClick.emit({event:i,action:r}))}),p5(1),A1()}if(e&2){let t=a.$implicit;v0("accessibleName",t.text||t.tooltip||t.action)("design",t.design??"Default")("endIcon",t==null?null:t.endIcon)("icon",t.icon??"")("tooltip",t.tooltip??""),w1(),pe(t.text)}}function XD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",25),_0("click",function(){W0(t);let i=Z1(2);return $0(i.enterEditMode())}),p5(1),A1()}if(e&2){let t=Z1(2);v0("accessibleName",t.editViewButton().text||t.editViewButton().tooltip||"Edit View")("design",t.editViewButton().design)("icon",t.editViewButton().icon)("tooltip",t.editViewButton().tooltip),w1(),pe(t.editViewButton().text)}}function KD(e,a){if(e&1&&(E7(0,$D,2,6,"ui5-button",22,dp),r2(2,XD,2,5,"ui5-button",23)),e&2){let t=Z1();I7(t.customActions()),w1(2),o2(t.config().editable?2:-1)}}function YD(e,a){if(e&1){let t=q5();u1(0,"mfp-dashboard-section",26),_0("removeCard",function(i){W0(t);let r=Z1();return $0(r.removeCard(i))})("removeSection",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeSection(i.id))}),A1()}if(e&2){let t=a.$implicit,i=Z1();v0("cards",i.sectionCards()(t.id))("columns",12)("editMode",i.editMode())("section",t)}}function QD(e,a){if(e&1){let t=q5();u1(0,"gridstack-item",27)(1,"mfp-dashboard-card",28),_0("removeCard",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeCard(i.id))}),A1()()}if(e&2){let t=a.$implicit,i=Z1();ue("cursor",i.editMode()?"pointer":"auto"),v0("options",t),w1(),v0("card",t)("editMode",i.editMode())}}function JD(e,a){if(e&1){let t=q5();u1(0,"div",15)(1,"ui5-button",29),_0("click",function(){W0(t);let i=Z1();return $0(i.saveEdit())}),p5(2,"Save"),A1(),u1(3,"ui5-button",30),_0("click",function(){W0(t);let i=Z1();return $0(i.cancelEdit())}),p5(4,"Cancel"),A1()()}}document.body.classList.add("ui5-content-density-compact");var ez=class Hi{static registerAngularComponents(a){eI(a)}config=R.required();sections=Wl([]);cards=Wl([]);availableCards=R([]);saved=g1();actionButtonClick=g1();editMode=g7(!1);compactToolbar=g7(!1);toolbarMenuOpen=g7(!1);sectionsSnapshot=[];cardsSnapshot=[];gridStackItems=vi.required("grid");addCardBtn=vi("addCardBtn");resizeObserver;hostEl=q(H0);injector=q(R0);gridOptions=te(()=>({cellHeight:10,disableResize:!this.editMode(),disableDrag:!this.editMode(),columnOpts:{breakpointForWindow:!0,breakpoints:[{w:1440,c:12,layout:"none"},{w:1024,c:8,layout:"compact"},{w:600,c:1,layout:"list"}]}}));cardDialogOpen=g7(!1);customActions=te(()=>this.config().customActions??[]);addedCardsIds=te(()=>new Set(this.cards().map(a=>a.id)));editViewButton=te(()=>O({icon:"action-settings",design:"Transparent",tooltip:"Edit View",text:""},this.config().buttonsSettings?.editViewButton));addCardButton=te(()=>O({icon:"",design:"Default",tooltip:"",text:"Edit Cards"},this.config().buttonsSettings?.addCardButton));sectionCards=te(()=>{let a=this.cards();return t=>a.filter(i=>i.sectionId===t)});cardsPosition=new Map;looseCards=vS(()=>this.cards().filter(a=>!a.sectionId));newGridStackNodes=[];ngOnInit(){this.resizeObserver=new ResizeObserver(a=>{let t=a[0]?.contentRect.width??0;this.compactToolbar.set(t<726)}),this.resizeObserver.observe(this.hostEl.nativeElement)}ngOnDestroy(){this.resizeObserver?.disconnect()}onMenuItemClick(a,t){if(a==="edit-view"){this.enterEditMode();return}let i=this.customActions().find(r=>r.action===a);i&&this.actionButtonClick.emit({event:t,action:i})}enterEditMode(){let a=this.gridStackItems().gridstackItems?.toArray().map(t=>t.options);a&&this.saveCardsPosition(a),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.editMode.set(!0),nB(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}saveEdit(){this.saveCardsPosition(this.newGridStackNodes),this.saved.emit({sections:this.sections(),cards:this.cards().map(a=>{let t=this.cardsPosition.get(a.id);return h1(O({},a),{x:t?.x,y:t?.y,w:t?.w??a.w,h:t?.h??a.h})})}),this.editMode.set(!1)}cancelEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(a=>{let t=this.cardsPosition.get(a.id);return h1(O({},a),{x:t?.x,y:t?.y})})),this.cardDialogOpen.set(!1),this.editMode.set(!1)}removeSection(a){this.sections.update(t=>t.filter(i=>i.id!==a)),this.cards.update(t=>t.filter(i=>i.sectionId!==a))}removeCard(a){this.cardsPosition.delete(a),this.cards.update(t=>t.filter(i=>i.id!==a))}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(a){this.cards.update(t=>[...t.filter(i=>!a.removed.includes(i.id)),...a.added.map(i=>O({},i))]),this.closeCardPanel()}onGridChange(a){this.newGridStackNodes=a.nodes}saveCardsPosition(a){a.forEach(t=>{t.id&&this.cardsPosition.set(t.id,{x:t.x,y:t.y,w:t.w,h:t.h})})}static \u0275fac=function(a){return new(a||Hi)};static \u0275cmp=Y0({type:Hi,selectors:[["mfp-dashboard"]],viewQuery:function(a,t){a&1&&B9(t.gridStackItems,RD,5)(t.addCardBtn,ND,5),a&2&&L_(2)},hostVars:2,hostBindings:function(a,t){a&2&&ue("background-image",t.config().backgroundImageUrl?"url("+t.config().backgroundImageUrl+")":null)},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick"},ngContentSelectors:FD,decls:21,vars:8,consts:[["grid",""],["addCardBtn",""],["menuBtn",""],[1,"mfp-dashboard"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],["level","H2","size","H2","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["id","add-card-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","columns","editMode","section"],[3,"removedCB","addedCB","changeCB","options"],[3,"options","cursor"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],["id","add-card-btn",3,"click","accessibleName","design","icon","tooltip"],["accessibleName","Actions","design","Transparent","icon","menu2","tooltip","Actions",3,"click"],[3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view",3,"icon","text"],[3,"accessibleName","design","endIcon","icon","tooltip"],[3,"accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"click","accessibleName","design","icon","tooltip"],[3,"removeCard","removeSection","cards","columns","editMode","section"],[3,"options"],[3,"removeCard","card","editMode"],["design","Emphasized",3,"click"],["design","Transparent",3,"click"]],template:function(a,t){a&1&&(s5(OD),u1(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),r2(4,PD,2,1,"ui5-title",7),r2(5,UD,2,1,"ui5-text"),A1(),u1(6,"div",8),r2(7,qD,3,5,"ui5-button",9)(8,WD,6,3)(9,KD,3,1),A1()(),u1(10,"div",10),t5(11),A1()(),u1(12,"div",11),E7(13,YD,1,4,"mfp-dashboard-section",12,uh),A1(),u1(15,"gridstack",13,0),_0("removedCB",function(i){return t.onGridChange(i)})("addedCB",function(i){return t.onGridChange(i)})("changeCB",function(i){return t.onGridChange(i)}),E7(17,QD,2,5,"gridstack-item",14,uh),A1(),r2(19,JD,5,0,"div",15),A1(),u1(20,"mfp-edit-cards-dialog",16),_0("cancelled",function(){return t.closeCardPanel()})("confirm",function(i){return t.onCardsEdited(i)}),A1()),a&2&&(w1(4),o2(t.config().title?4:-1),w1(),o2(t.config().description?5:-1),w1(2),o2(t.editMode()?7:t.compactToolbar()?8:9),w1(6),I7(t.sections()),w1(2),v0("options",t.gridOptions()),w1(2),I7(t.looseCards()),w1(2),o2(t.editMode()?19:-1),w1(),v0("addedCardsIds",t.addedCardsIds())("availableCards",t.availableCards())("open",t.cardDialogOpen()))},dependencies:[Bi,T9,DI,FI,sp,c6,UI,jI,WI,op,XI],styles:[`.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}mfp-dashboard,mfp-wc-dashboard{display:block;margin:0;padding:0;min-height:100%;background:var(--sapShellColor, #354a5e);background-size:cover;background-position:center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:2rem}.mfp-sections-container{display:grid;grid-template-columns:repeat(12,1fr);grid-auto-rows:auto;align-content:start;gap:1rem}@media(max-width:726px){.mfp-sections-container{grid-template-columns:1fr}}@media(min-width:727px)and (max-width:1200px){.mfp-sections-container{grid-template-columns:repeat(8,1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:1rem}.mfp-dashboard__edit-bar{position:fixed;bottom:20px;left:16px;right:16px;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:7px 16px;background:var(--sapPageFooter_Background, white);border-radius:var(--sapElement_BorderCornerRadius, 12px);box-shadow:0 0 0 1px #2235487a,0 2px 8px #2235484d;box-sizing:border-box;overflow:hidden}
|
|
156
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),r}static addGrid(t,i={}){if(!t)return null;let r=t;if(r.gridstack){let o=r.gridstack;return i&&(o.opts=O(O({},o.opts),i)),i.children!==void 0&&o.load(i.children),o}return(!t.classList.contains("grid-stack")||e.addRemoveCB)&&(e.addRemoveCB?r=e.addRemoveCB(t,i,!0,!0):r=E.createDiv(["grid-stack",i.class],t)),e.init(i,r)}static registerEngine(t){e.engineClass=t}get placeholder(){if(!this._placeholder){this._placeholder=E.createDiv([this.opts.placeholderClass,d5.itemClass,this.opts.itemClass]);let t=E.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(t.textContent=this.opts.placeholderText)}return this._placeholder}constructor(t,i={}){this.el=t,this.opts=i,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,this.opts=i=i||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),i.row&&(i.minRow=i.maxRow=i.row,delete i.row);let r=E.toNumber(t.getAttribute("gs-row"));i.column==="auto"&&delete i.column,i.alwaysShowResizeHandle!==void 0&&(i._alwaysShowResizeHandle=i.alwaysShowResizeHandle);let o=i.columnOpts;if(o){let l=o.breakpoints;!o.columnWidth&&!l?.length?delete i.columnOpts:(o.columnMax=o.columnMax||12,l?.length>1&&l.sort((d,u)=>(u.w||0)-(d.w||0)))}let n=h1(O({},E.cloneDeep(d5)),{column:E.toNumber(t.getAttribute("gs-column"))||d5.column,minRow:r||E.toNumber(t.getAttribute("gs-min-row"))||d5.minRow,maxRow:r||E.toNumber(t.getAttribute("gs-max-row"))||d5.maxRow,staticGrid:E.toBool(t.getAttribute("gs-static"))||d5.staticGrid,sizeToContent:E.toBool(t.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(i.handleClass?"."+i.handleClass:i.handle?i.handle:"")||d5.draggable.handle},removableOptions:{accept:i.itemClass||d5.removableOptions.accept,decline:d5.removableOptions.decline}});t.getAttribute("gs-animate")&&(n.animate=E.toBool(t.getAttribute("gs-animate"))),i=E.defaults(i,n),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(i),i.rtl==="auto"&&(i.rtl=t.style.direction==="rtl"),i.rtl&&this.el.classList.add("grid-stack-rtl");let s=this.el.closest("."+d5.itemClass)?.gridstackNode;if(s&&(s.subGrid=this,this.parentGridNode=s,this.el.classList.add("grid-stack-nested"),s.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=i.cellHeight==="auto",this._isAutoCellHeight||i.cellHeight==="initial")this.cellHeight(void 0);else{typeof i.cellHeight=="number"&&i.cellHeightUnit&&i.cellHeightUnit!==d5.cellHeightUnit&&(i.cellHeight=i.cellHeight+i.cellHeightUnit,delete i.cellHeightUnit);let l=i.cellHeight;delete i.cellHeight,this.cellHeight(l)}i.alwaysShowResizeHandle==="mobile"&&(i.alwaysShowResizeHandle=O5),this._setStaticClass();let c=i.engineClass||e.engineClass||ch;if(this.engine=new c({column:this.getColumn(),float:i.float,maxRow:i.maxRow,onChange:l=>{l.forEach(d=>{let u=d.el;u&&(d._removeDOM?(u&&u.remove(),delete d._removeDOM):this._writePosAttr(u,d))}),this._updateContainerHeight()}}),i.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(l=>this._prepareElement(l)),delete this.engine._loading,this.batchUpdate(!1)),i.children){let l=i.children;delete i.children,l.length&&this.load(l)}this.setAnimation(),i.subGridDynamic&&!$.pauseDrag&&($.pauseDrag=!0),i.draggable?.pause!==void 0&&($.pauseDrag=i.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(t=this.opts){this.el.classList.add("gs-"+t.column),typeof t.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/t.column}%`)}addWidget(t){if(!t)return;if(typeof t=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(t.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(t);let i,r=t;if(r.grid=this,r.el?i=r.el:e.addRemoveCB?i=e.addRemoveCB(this.el,t,!0,!1):i=this.createWidgetDivs(r),!i)return;if(r=i.gridstackNode,r&&i.parentElement===this.el&&this.engine.nodes.find(n=>n._id===r._id))return i;let o=this._readAttr(i);return E.defaults(t,o),this.engine.prepareNode(t),this.el.appendChild(i),this.makeWidget(i,t),i}createWidgetDivs(t){let i=E.createDiv(["grid-stack-item",this.opts.itemClass]),r=E.createDiv(["grid-stack-item-content"],i);return E.lazyLoad(t)?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(t.visibleObservable?.disconnect(),delete t.visibleObservable,e.renderCB(r,t),t.grid?.prepareDragDrop(t.el))}),window.setTimeout(()=>t.visibleObservable?.observe(i))):e.renderCB(r,t),i}makeSubGrid(t,i,r,o=!0){let n=t.gridstackNode;if(n||(n=this.makeWidget(t).gridstackNode),n.subGrid?.el)return n.subGrid;let s,c=this;for(;c&&!s;)s=c.opts?.subGridOpts,c=c.parentGridNode?.grid;i=E.cloneDeep(O(O(h1(O({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),s||{}),i||n.subGridOpts||{})),n.subGridOpts=i;let l;i.column==="auto"&&(l=!0,i.column=Math.max(n.w||1,r?.w||1),delete i.columnOpts);let d=n.el.querySelector(".grid-stack-item-content"),u,m;if(o&&(this._removeDD(n.el),m=h1(O({},n),{x:0,y:0}),E.removeInternalForSave(m),delete m.subGridOpts,n.content&&(m.content=n.content,delete n.content),e.addRemoveCB?u=e.addRemoveCB(this.el,m,!0,!1):(u=E.createDiv(["grid-stack-item"]),u.appendChild(d),d=E.createDiv(["grid-stack-item-content"],n.el)),this.prepareDragDrop(n.el)),r){let g=l?i.column:n.w,y=n.h+r.h,w=n.el.style;w.transition="none",this.update(n.el,{w:g,h:y}),setTimeout(()=>w.transition=null)}let _=n.subGrid=e.addGrid(d,i);return r?._moving&&(_._isTemp=!0),l&&(_._autoColumn=!0),o&&_.makeWidget(u,m),r&&(r._moving?window.setTimeout(()=>E.simulateMouseEvent(r._event,"mouseenter",_.el),0):_.makeWidget(n.el,n)),this.resizeToContentCheck(!1,n),_}removeAsSubGrid(t){let i=this.parentGridNode?.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(r=>{r.x+=this.parentGridNode.x,r.y+=this.parentGridNode.y,i.makeWidget(r.el,r)}),i.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,t&&window.setTimeout(()=>E.simulateMouseEvent(t._event,"mouseenter",i.el),0))}save(t=!0,i=!1,r=e.saveCB,o){let n=this.engine.save(t,r,o);if(n.forEach(s=>{if(t&&s.el&&!s.subGrid&&!r){let c=s.el.querySelector(".grid-stack-item-content");s.content=c?.innerHTML,s.content||delete s.content}else if(!t&&!r&&delete s.content,s.subGrid?.el){let c=s.w||s.subGrid.getColumn(),l=s.subGrid.save(t,i,r,c);s.subGridOpts=i?l:{children:l},delete s.subGrid}delete s.el}),i){let s=E.cloneDeep(this.opts);s.marginBottom===s.marginTop&&s.marginRight===s.marginLeft&&s.marginTop===s.marginRight&&(s.margin=s.marginTop,delete s.marginTop,delete s.marginRight,delete s.marginBottom,delete s.marginLeft),s.rtl===(this.el.style.direction==="rtl")&&(s.rtl="auto"),this._isAutoCellHeight&&(s.cellHeight="auto"),this._autoColumn&&(s.column="auto");let c=s._alwaysShowResizeHandle;return delete s._alwaysShowResizeHandle,c!==void 0?s.alwaysShowResizeHandle=c:delete s.alwaysShowResizeHandle,E.removeInternalAndSame(s,d5),s.children=n,s}return n}load(t,i=e.addRemoveCB||!0){t.forEach(u=>{u.w=u.w||u.minW||1,u.h=u.h||u.minH||1}),t=E.sort(t),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let r=0;t.forEach(u=>{r=Math.max(r,(u.x||0)+u.w)}),r>this.engine.defaultColumn&&(this.engine.defaultColumn=r);let o=this.getColumn();r>o&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=t,this.engine.columnChanged(r,o,this.responseLayout),t=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(t,r,!0));let n=e.addRemoveCB;typeof i=="function"&&(e.addRemoveCB=i);let s=[];this.batchUpdate();let c=!this.engine.nodes.length,l=c&&this.opts.animate;l&&this.setAnimation(!1),!c&&i&&[...this.engine.nodes].forEach(u=>{u.id&&(E.find(t,u.id)||(e.addRemoveCB&&e.addRemoveCB(this.el,u,!1,!1),s.push(u),this.removeWidget(u.el,!0,!1)))}),this.engine._loading=!0;let d=[];return this.engine.nodes=this.engine.nodes.filter(u=>E.find(t,u.id)?(d.push(u),!1):!0),t.forEach(u=>{let m=E.find(d,u.id);if(m){if(E.shouldSizeToContent(m)&&(u.h=m.h),this.engine.nodeBoundFix(u),(u.autoPosition||u.x===void 0||u.y===void 0)&&(u.w=u.w||m.w,u.h=u.h||m.h,this.engine.findEmptyPosition(u)),this.engine.nodes.push(m),E.samePos(m,u)&&this.engine.nodes.length>1&&(this.moveNode(m,h1(O({},u),{forceCollide:!0})),E.copyPos(u,m)),this.update(m.el,u),u.subGridOpts?.children){let _=m.el.querySelector(".grid-stack");_&&_.gridstack&&_.gridstack.load(u.subGridOpts.children)}}else i&&this.addWidget(u)}),delete this.engine._loading,this.engine.removedNodes=s,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,n?e.addRemoveCB=n:delete e.addRemoveCB,l&&this.setAnimation(!0,!0),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let i=this.el.querySelector("."+this.opts.itemClass);if(i){let o=E.toNumber(i.getAttribute("gs-h"))||1;return Math.round(i.offsetHeight/o)}let r=parseInt(this.el.getAttribute("gs-current-row"));return r?Math.round(this.el.getBoundingClientRect().height/r):this.opts.cellHeight}cellHeight(t){if(t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let r=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+r}let i=E.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){return t&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!t.breakpoints?.length)return!1;let i=this.getColumn(),r=i,o=this._widthOrContainer(!0);if(t.columnWidth)r=Math.min(Math.round(o/t.columnWidth)||1,t.columnMax);else{r=t.columnMax;let n=0;for(;n<t.breakpoints.length&&o<=t.breakpoints[n].w;)r=t.breakpoints[n++].c||i}if(r!==i){let n=t.breakpoints?.find(s=>s.c===r);return this.column(r,n?.layout||t.layout),!0}return!1}compact(t="compact",i=!0){return this.engine.compact(t,i),this._triggerChangeEvent(),this}column(t,i="moveScale"){if(!t||t<1||this.opts.column===t)return this;let r=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+r),this._updateColumnVar(),this.engine.columnChanged(r,t,i),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=i,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(t=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,i=!1){let r=this.el.getBoundingClientRect(),o;i?o={top:r.top+document.documentElement.scrollTop,left:r.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};let n=t.left-o.left,s=t.top-o.top,c=r.width/this.getColumn(),l=r.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(n/c),y:Math.floor(s/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(t,i,r,o){return this.engine.isAreaEmpty(t,i,r,o)}makeWidget(t,i){let r=e.getElement(t);if(!r||r.gridstackNode)return r;r.parentElement||this.el.appendChild(r),this._prepareElement(r,!0,i);let o=r.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(r,o.subGridOpts,void 0,!1);let n;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(n=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),n&&delete this._ignoreLayoutsNodeChange,r}on(t,i){return t.indexOf(" ")!==-1?(t.split(" ").forEach(r=>this.on(r,i)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=r=>i(r):this._gsEventHandler[t]=r=>{r.detail&&i(r,r.detail)},this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=i:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,i=!0,r=!0){return t?(e.getElements(t).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let n=o.gridstackNode;n||(n=this.engine.nodes.find(s=>o===s.el)),n&&(i&&e.addRemoveCB&&e.addRemoveCB(this.el,n,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(n,i,r),i&&o.parentElement&&o.remove())}),r&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(t=!0,i=!0){return this.engine.nodes.forEach(r=>{t&&e.addRemoveCB&&e.addRemoveCB(this.el,r,!1,!1),delete r.el.gridstackNode,this.opts.staticGrid||this._removeDD(r.el)}),this.engine.removeAll(t,i),i&&this._triggerRemoveEvent(),this}setAnimation(t=this.opts.animate,i){return i?setTimeout(()=>{this.opts&&this.setAnimation(t)}):t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=t,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,i=!0,r=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&r&&o.subGrid.setStatic(t,i,r)}),i&&this._setStaticClass(),this)}updateOptions(t){let i=this.opts;if(t===i)return this;if(t.acceptWidgets!==void 0&&(i.acceptWidgets=t.acceptWidgets,this._setupAcceptWidget()),t.animate!==void 0&&this.setAnimation(t.animate),t.cellHeight&&this.cellHeight(t.cellHeight),t.class!==void 0&&t.class!==i.class&&(i.class&&this.el.classList.remove(i.class),t.class&&this.el.classList.add(t.class)),t.columnOpts){let r=!!this.opts.columnOpts;this.opts.columnOpts=t.columnOpts,r!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else t.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof t.column=="number"&&this.column(t.column);return t.margin!==void 0&&this.margin(t.margin),t.staticGrid!==void 0&&this.setStatic(t.staticGrid),t.disableDrag!==void 0&&!t.staticGrid&&this.enableMove(!t.disableDrag),t.disableResize!==void 0&&!t.staticGrid&&this.enableResize(!t.disableResize),t.float!==void 0&&this.float(t.float),t.row!==void 0?(i.minRow=i.maxRow=i.row=t.row,this._updateContainerHeight()):(t.minRow!==void 0&&(i.minRow=t.minRow,this._updateContainerHeight()),t.maxRow!==void 0&&(i.maxRow=this.engine.maxRow=t.maxRow)),t.lazyLoad!==void 0&&(i.lazyLoad=t.lazyLoad),t.children?.length&&this.load(t.children),this}update(t,i){return e.getElements(t).forEach(r=>{let o=r?.gridstackNode;if(!o)return;let n=O(O({},E.copyPos({},o)),E.cloneDeep(i));this.engine.nodeBoundFix(n),delete n.autoPosition;let s=["x","y","w","h"],c;if(s.some(u=>n[u]!==void 0&&n[u]!==o[u])&&(c={},s.forEach(u=>{c[u]=n[u]!==void 0?n[u]:o[u],delete n[u]})),!c&&(n.minW||n.minH||n.maxW||n.maxH)&&(c={}),n.content!==void 0){let u=r.querySelector(".grid-stack-item-content");u&&u.textContent!==n.content&&(o.content=n.content,e.renderCB(u,n),o.subGrid?.el&&(u.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete n.content}let l=!1,d=!1;for(let u in n)u[0]!=="_"&&o[u]!==n[u]&&(o[u]=n[u],l=!0,d=d||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(E.sanitizeMinMax(o),c){let u=c.w!==void 0&&c.w!==o.w;this.moveNode(o,c),u&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(u,o),delete o._orig}(c||l)&&this._writeAttr(r,o),d&&this.prepareDragDrop(o.el),e.updateCB&&e.updateCB(o)}),this}moveNode(t,i){let r=t._updating;r||this.engine.cleanNodes().beginUpdate(t),this.engine.moveNode(t,i),this._updateContainerHeight(),r||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let i=t.gridstackNode;if(!i)return;let r=i.grid;if(!r||t.parentElement!==r.el)return;let o=r.getCellHeight(!0);if(!o)return;let n=i.h?i.h*o:t.clientHeight,s;if(i.resizeToContentParent&&(s=t.querySelector(i.resizeToContentParent)),s||(s=t.querySelector(e.resizeToContentParent)),!s)return;let c=t.clientHeight-s.clientHeight,l=i.h?i.h*o-c:s.clientHeight,d;if(i.subGrid){d=i.subGrid.getRow()*i.subGrid.getCellHeight(!0);let _=i.subGrid.el.getBoundingClientRect(),g=t.getBoundingClientRect();d+=_.top-g.top}else{if(i.subGridOpts?.children?.length)return;{let _=s.firstElementChild;if(!_){console.error(`Error: GridStack.resizeToContent() widget id:${i.id} '${e.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=_.getBoundingClientRect().height||l}}if(l===d)return;n+=d-l;let u=Math.ceil(n/o),m=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;m&&u>m&&(u=m,t.classList.add("size-to-content-max")),i.minH&&u<i.minH?u=i.minH:i.maxH&&u>i.maxH&&(u=i.maxH),u!==i.h&&(r._ignoreLayoutsNodeChange=!0,r.moveNode(i,{h:u}),delete r._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){e.resizeToContentCB?e.resizeToContentCB(t):this.resizeToContent(t)}rotate(t,i){return e.getElements(t).forEach(r=>{let o=r.gridstackNode;if(!E.canBeRotated(o))return;let n={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(i){let c=i.left>0?Math.floor(i.left/this.cellWidth()):0,l=i.top>0?Math.floor(i.top/this.opts.cellHeight):0;n.x=o.x+c-(o.h-(l+1)),n.y=o.y+l-c}Object.keys(n).forEach(c=>{n[c]===void 0&&delete n[c]});let s=o._orig;this.update(r,n),o._orig=s}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=E.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(t){return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});let t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(t,i){let r=i?new CustomEvent(t,{bubbles:!1,detail:i}):new Event(t),o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(r),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridNode,i=this.getRow()+this._extraDragRow,r=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!r)return this;if(!t&&!this.opts.minRow){let n=E.parseHeight(getComputedStyle(this.el).minHeight);if(n.h>0&&n.unit===o){let s=Math.floor(n.h/r);i<s&&(i=s)}}return this.el.setAttribute("gs-current-row",String(i)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),i&&(this.el.style[t?"minHeight":"height"]=i*r+o),t&&E.shouldSizeToContent(t)&&t.grid.resizeToContentCBCheck(t.el),this}_prepareElement(t,i=!1,r){r=r||this._readAttr(t),t.gridstackNode=r,r.el=t,r.grid=this,r=this.engine.addNode(r,i),this._writeAttr(t,r),t.classList.add(d5.itemClass,this.opts.itemClass);let o=E.shouldSizeToContent(r);return o?t.classList.add("size-to-content"):t.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,r),E.lazyLoad(r)||this.prepareDragDrop(r.el),this}_writePosAttr(t,i){if(!i._moving&&!i._resizing||this._placeholder===t){let r=this.opts.rtl?"right":"left";t.style.top=i.y?i.y===1?"var(--gs-cell-height)":`calc(${i.y} * var(--gs-cell-height))`:null,t.style[r]=i.x?i.x===1?"var(--gs-column-width)":`calc(${i.x} * var(--gs-column-width))`:null,t.style.width=i.w>1?`calc(${i.w} * var(--gs-column-width))`:null,t.style.height=i.h>1?`calc(${i.h} * var(--gs-cell-height))`:null}return t.setAttribute("gs-x",String(i.x)),t.setAttribute("gs-y",String(i.y)),i.w>1?t.setAttribute("gs-w",String(i.w)):t.removeAttribute("gs-w"),i.h>1?t.setAttribute("gs-h",String(i.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,i){if(!i)return this;this._writePosAttr(t,i);let r={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(let o in r)i[o]?t.setAttribute(r[o],String(i[o])):t.removeAttribute(r[o]);return this}_readAttr(t,i=!0){let r={};r.x=E.toNumber(t.getAttribute("gs-x")),r.y=E.toNumber(t.getAttribute("gs-y")),r.w=E.toNumber(t.getAttribute("gs-w")),r.h=E.toNumber(t.getAttribute("gs-h")),r.autoPosition=E.toBool(t.getAttribute("gs-auto-position")),r.noResize=E.toBool(t.getAttribute("gs-no-resize")),r.noMove=E.toBool(t.getAttribute("gs-no-move")),r.locked=E.toBool(t.getAttribute("gs-locked"));let o=t.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?r.sizeToContent=E.toBool(o):r.sizeToContent=parseInt(o,10)),r.id=t.getAttribute("gs-id"),r.maxW=E.toNumber(t.getAttribute("gs-max-w")),r.minW=E.toNumber(t.getAttribute("gs-min-w")),r.maxH=E.toNumber(t.getAttribute("gs-max-h")),r.minH=E.toNumber(t.getAttribute("gs-min-h")),i&&(r.w===1&&t.removeAttribute("gs-w"),r.h===1&&t.removeAttribute("gs-h"),r.maxW&&t.removeAttribute("gs-max-w"),r.minW&&t.removeAttribute("gs-min-w"),r.maxH&&t.removeAttribute("gs-max-h"),r.minH&&t.removeAttribute("gs-min-h"));for(let n in r){if(!r.hasOwnProperty(n))return;!r[n]&&r[n]!==0&&n!=="sizeToContent"&&delete r[n]}return r}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onResize(t=this.el?.clientWidth){if(!t||this.prevWidth===t)return;this.prevWidth=t,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(r=>{r.subGrid&&r.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,i=void 0){if(this.engine){if(t&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,i),this.animationDelay);if(i)E.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el);else if(this.engine.nodes.some(r=>E.shouldSizeToContent(r))){let r=[...this.engine.nodes];this.batchUpdate(),r.forEach(o=>{E.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,i?[i]:this.engine.nodes)}}_updateResizeEvent(t=!1){let i=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(r=>r.sizeToContent));return!t&&i&&!this.resizeObserver?(this._sizeThrottle=E.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!i)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return E.getElement(t)}static getElements(t=".grid-stack-item"){return E.getElements(t)}static getGridElement(t){return e.getElement(t)}static getGridElements(t){return E.getElements(t)}_initMargin(){let t,i=0,r=[];typeof this.opts.margin=="string"&&(r=this.opts.margin.split(" ")),r.length===2?(this.opts.marginTop=this.opts.marginBottom=r[0],this.opts.marginLeft=this.opts.marginRight=r[1]):r.length===4?(this.opts.marginTop=r[0],this.opts.marginRight=r[1],this.opts.marginBottom=r[2],this.opts.marginLeft=r[3]):(t=E.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,i=this.opts.margin=t.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(n=>{this.opts[n]===void 0?this.opts[n]=i:(t=E.parseHeight(this.opts[n]),this.opts[n]=t.h,delete this.opts.margin)}),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return e5}static setupDragIn(t,i,r,o=document){i?.pause!==void 0&&($.pauseDrag=i.pause),i=O({appendTo:"body",helper:"clone"},i||{}),(typeof t=="string"?E.getElements(t,o):t).forEach((n,s)=>{e5.isDraggable(n)||e5.dragIn(n,i),r?.[s]&&(n.gridstackNode=r[s])})}movable(t,i){return this.opts.staticGrid?this:(e.getElements(t).forEach(r=>{let o=r.gridstackNode;o&&(i?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(t,i){return this.opts.staticGrid?this:(e.getElements(t).forEach(r=>{let o=r.gridstackNode;o&&(i?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this}enable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this}enableMove(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&i&&r.subGrid.enableMove(t,i)}),this)}enableResize(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&i&&r.subGrid.enableResize(t,i)}),this)}cancelDrag(){let t=this._placeholder?.gridstackNode;t&&(t._isExternal?(t._isAboutToRemove=!0,this.engine.removeNode(t)):t._isAboutToRemove&&e._itemRemoving(t.el,!1),this.engine.restoreInitial())}_removeDD(t){return e5.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return e5.droppable(this.el,"destroy"),this;let t,i,r=(o,n,s)=>{s=s||n;let c=s.gridstackNode;if(!c)return;if(!c.grid?.el){s.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let _=s.getBoundingClientRect();s.style.left=_.x+(this.dragTransform.xScale-1)*(o.clientX-_.x)/this.dragTransform.xScale+"px",s.style.top=_.y+(this.dragTransform.yScale-1)*(o.clientY-_.y)/this.dragTransform.yScale+"px",s.style.transformOrigin="0px 0px"}let{top:l,left:d}=s.getBoundingClientRect(),u=this.el.getBoundingClientRect();d-=u.left,l-=u.top;let m={position:{top:l*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(c._temporaryRemoved){if(c.x=Math.max(0,Math.round(d/i)),c.y=Math.max(0,Math.round(l/t)),delete c.autoPosition,this.engine.nodeBoundFix(c),!this.engine.willItFit(c)){if(c.autoPosition=!0,!this.engine.willItFit(c)){e5.off(n,"drag");return}c._willFitPos&&(E.copyPos(c,c._willFitPos),delete c._willFitPos)}this._onStartMoving(s,o,m,c,i,t)}else this._dragOrResize(s,o,m,c,i,t)};return e5.droppable(this.el,{accept:o=>{let n=o.gridstackNode||this._readAttr(o,!1);if(n?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let s=!0;if(typeof this.opts.acceptWidgets=="function")s=this.opts.acceptWidgets(o);else{let c=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;s=o.matches(c)}if(s&&n&&this.opts.maxRow){let c={w:n.w,h:n.h,minW:n.minW,minH:n.minH};s=this.engine.willItFit(c)}return s}}).on(this.el,"dropover",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;if(c?.grid===this&&!c._temporaryRemoved)return!1;if(c?._sidebarOrig&&(c.w=c._sidebarOrig.w,c.h=c._sidebarOrig.h),c?.grid&&c.grid!==this&&!c._temporaryRemoved&&c.grid._leave(n,s),s=s||n,i=this.cellWidth(),t=this.getCellHeight(!0),!c){let u=s.getAttribute("data-gs-widget")||s.getAttribute("gridstacknode");if(u){try{c=JSON.parse(u)}catch{console.error("Gridstack dropover: Bad JSON format: ",u)}s.removeAttribute("data-gs-widget"),s.removeAttribute("gridstacknode")}c||(c=this._readAttr(s)),c._sidebarOrig={w:c.w,h:c.h}}c.grid||(c.el||(c=O({},c)),c._isExternal=!0,s.gridstackNode=c);let l=c.w||Math.round(s.offsetWidth/i)||1,d=c.h||Math.round(s.offsetHeight/t)||1;return c.grid&&c.grid!==this?(n._gridstackNodeOrig||(n._gridstackNodeOrig=c),n.gridstackNode=c=h1(O({},c),{w:l,h:d,grid:this}),delete c.x,delete c.y,this.engine.cleanupNode(c).nodeBoundFix(c),c._initDD=c._isExternal=c._temporaryRemoved=!0):(c.w=l,c.h=d,c._temporaryRemoved=!0),e._itemRemoving(c.el,!1),e5.on(n,"drag",r),r(o,n,s),!1}).on(this.el,"dropout",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;return c&&(!c.grid||c.grid===this)&&(this._leave(n,s),this._isTemp&&this.removeAsSubGrid(c)),!1}).on(this.el,"drop",(o,n,s)=>{let c=s?.gridstackNode||n.gridstackNode;if(c?.grid===this&&!c._isExternal)return!1;let l=!!this.placeholder.parentElement,d=n!==s;this.placeholder.remove(),delete this.placeholder.gridstackNode,l&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let u=n._gridstackNodeOrig;if(delete n._gridstackNodeOrig,l&&u?.grid&&u.grid!==this){let _=u.grid;_.engine.removeNodeFromLayoutCache(u),_.engine.removedNodes.push(u),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridNode&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!c||(l&&(this.engine.cleanupNode(c),c.grid=this),delete c.grid?._isTemp,e5.off(n,"drag"),s!==n?(s.remove(),n=s):n.remove(),this._removeDD(n),!l))return!1;let m=c.subGrid?.el?.gridstack;return E.copyPos(c,this._readAttr(this.placeholder)),E.removePositioningStyles(n),d&&(c.content||c.subGridOpts||e.addRemoveCB)?(delete c.el,n=this.addWidget(c)):(this._prepareElement(n,!0,c),this.el.appendChild(n),this.resizeToContentCheck(!1,c),m&&(m.parentGridNode=c),this._updateContainerHeight()),this.engine.addedNodes.push(c),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(h1(O({},o),{type:"dropped"}),u&&u.grid?u:void 0,c),!1}),this}static _itemRemoving(t,i){if(!t)return;let r=t?t.gridstackNode:void 0;!r?.grid||t.classList.contains(r.grid.opts.removableOptions.decline)||(i?r._isAboutToRemove=!0:delete r._isAboutToRemove,i?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!e5.isDroppable(t)&&e5.droppable(t,this.opts.removableOptions).on(t,"dropover",(i,r)=>e._itemRemoving(r,!0)).on(t,"dropout",(i,r)=>e._itemRemoving(r,!1)),this):this}prepareDragDrop(t,i=!1){let r=t?.gridstackNode;if(!r)return;let o=r.noMove||this.opts.disableDrag,n=r.noResize||this.opts.disableResize,s=this.opts.staticGrid||o&&n;if((i||s)&&(r._initDD&&(this._removeDD(t),delete r._initDD),s))return t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!r._initDD){let c,l,d=(_,g)=>{this.triggerEvent(_,_.target),c=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(t,_,g,r,c,l)},u=(_,g)=>{this._dragOrResize(t,_,g,r,c,l)},m=_=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete r._moving,delete r._resizing,delete r._event,delete r._lastTried;let g=r.w!==r._orig.w,y=_.target;if(!(!y.gridstackNode||y.gridstackNode.grid!==this)){if(r.el=y,r._isAboutToRemove){let w=t.gridstackNode.grid;w._gsEventHandler[_.type]&&w._gsEventHandler[_.type](_,y),w.engine.nodes.push(r),w.removeWidget(t,!0,!0)}else E.removePositioningStyles(y),r._temporaryRemoved?(this._writePosAttr(y,r),this.engine.addNode(r)):this._writePosAttr(y,r),this.triggerEvent(_,y);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),_.type==="resizestop"&&(Number.isInteger(r.sizeToContent)&&(r.sizeToContent=r.h),this.resizeToContentCheck(g,r))}};e5.draggable(t,{start:d,stop:m,drag:u,rtl:this.opts.rtl}).resizable(t,{start:d,stop:m,resize:u,rtl:this.opts.rtl}),r._initDD=!0}return e5.draggable(t,o?"disable":"enable").resizable(t,n?"disable":"enable"),this}_onStartMoving(t,i,r,o,n,s){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=E.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let c=this.placeholder.closest(".grid-stack");this.dragTransform=E.getValuesFromTransformedElement(c)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=r.position,o._prevYPix=r.position.top,o._moving=i.type==="dragstart",o._resizing=i.type==="resizestart",delete o._lastTried,i.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(n,s,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),i.type==="resizestart"){let c=this.getColumn()-o.x,l=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;e5.resizable(t,"option","minWidth",n*Math.min(o.minW||1,c)).resizable(t,"option","minHeight",s*Math.min(o.minH||1,l)).resizable(t,"option","maxWidth",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,c)).resizable(t,"option","maxWidthMoveLeft",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(t,"option","maxHeight",s*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,l)).resizable(t,"option","maxHeightMoveUp",s*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(t,i,r,o,n,s){let c=O({},o._orig),l,d=this.opts.marginLeft,u=this.opts.marginRight,m=this.opts.marginTop,_=this.opts.marginBottom,g=Math.round(s*.1),y=Math.round(n*.1);if(d=Math.min(d,y),u=Math.min(u,y),m=Math.min(m,g),_=Math.min(_,g),i.type==="drag"){if(o._temporaryRemoved)return;o._prevYPix=r.position.top,this.opts.draggable.scroll!==!1&&$.dragElement?.updateScrollPosition(this.el);let v=r.position.left+(r.position.left>o._lastUiPosition.left?-u:d),C=r.position.top+(r.position.top>o._lastUiPosition.top?-_:m);c.x=Math.round(v/n),c.y=Math.round(C/s);let f=this._extraDragRow;if(this.engine.collide(o,c)){let T=this.getRow(),L=Math.max(0,c.y+o.h-T);this.opts.maxRow&&T+L>this.opts.maxRow&&(L=Math.max(0,this.opts.maxRow-T)),this._extraDragRow=L}else this._extraDragRow=0;if(this._extraDragRow!==f&&this._updateContainerHeight(),o.x===c.x&&o.y===c.y)return}else if(i.type==="resize"){if(c.x<0||(E.updateScrollResize(i,t,s),c.w=Math.round((r.size.width-d)/n),c.h=Math.round((r.size.height-m)/s),o.w===c.w&&o.h===c.h)||o._lastTried&&o._lastTried.w===c.w&&o._lastTried.h===c.h)return;if(i.hasMovedX){let v=r.position.left+d;c.x=Math.round(v/n)}if(i.hasMovedY){let v=r.position.top+m;c.y=Math.round(v/s)}l=!0}o._event=i,o._lastTried=c;let w={x:r.position.left+d,y:r.position.top+m,w:(r.size?r.size.width:o.w*n)-d-u,h:(r.size?r.size.height:o.h*s)-m-_};if(this.engine.moveNodeCheck(o,h1(O({},c),{cellWidth:n,cellHeight:s,rect:w,resizing:l}))){o._lastUiPosition=r.position,this.engine.cacheRects(n,s,m,u,_,d),delete o._skipDown,l&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let v=i.target;o._sidebarOrig||this._writePosAttr(v,o),this.triggerEvent(i,v)}}triggerEvent(t,i){let r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;r._gsEventHandler[t.type]&&r._gsEventHandler[t.type](t,i)}_leave(t,i){i=i||t;let r=i.gridstackNode;if(!r||(i.style.transform=i.style.transformOrigin=null,e5.off(t,"drag"),r._temporaryRemoved))return;r._temporaryRemoved=!0,this.engine.removeNode(r),r.el=r._isExternal&&i?i:t;let o=r._sidebarOrig;r._isExternal&&this.engine.cleanupNode(r),r._sidebarOrig=o,this.opts.removable===!0&&e._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):r._isExternal&&this.engine.restoreInitial()}}return e.renderCB=(a,t)=>{a&&t?.content&&(a.textContent=t.content)},e.resizeToContentParent=".grid-stack-item-content",e.Utils=E,e.Engine=ch,e.GDRev="12.6.0",e})(),up=["container"],kD=["*"];function SD(e,a){}var LD=["*",[["","empty-content",""]]],VD=["*","[empty-content]"];function TD(e,a){e&1&&t5(0,1,["*ngIf","isEmpty"])}function ED(e,a){}var T9=(()=>{class e{constructor(t){this.elementRef=t,this.el._gridItemComp=this}set options(t){let i=this.el.gridstackNode?.grid;i?i.update(this.el,t):this._options=h1(O({},t),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(a){return new(a||e)(We(H0))},e.\u0275cmp=Y0({type:e,selectors:[["gridstack-item"]],viewQuery:function(a,t){if(a&1&&M9(up,7,he),a&2){let i;hi(i=ui())&&(t.container=i.first)}},inputs:{options:"options"},ngContentSelectors:kD,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(a,t){a&1&&(s5(),B_(0,"div",1),y_(1,SD,0,0,"ng-template",null,0,D_),t5(3),p5(4),H_()),a&2&&(w1(4),H9(" ",t.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"]}),e})(),Bi=(()=>{class e{constructor(t){this.elementRef=t,this.addedCB=new r0,this.changeCB=new r0,this.disableCB=new r0,this.dragCB=new r0,this.dragStartCB=new r0,this.dragStopCB=new r0,this.droppedCB=new r0,this.enableCB=new r0,this.removedCB=new r0,this.resizeCB=new r0,this.resizeStartCB=new r0,this.resizeStopCB=new r0,Ie.addRemoveCB||(Ie.addRemoveCB=ID),Ie.saveCB||(Ie.saveCB=DD),Ie.updateCB||(Ie.updateCB=zD),this.el._gridComp=this}set options(t){this._grid?this._grid.updateOptions(t):this._options=t}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static addComponentToSelectorType(t){t.forEach(i=>e.selectorToType[e.getSelector(i)]=i)}static getSelector(t){return P_(t).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=Ie.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let t=[];this.gridstackItems?.forEach(i=>{t.push(i.options),i.clearOptions()}),this.grid.load(t)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(t){t&&(t.parentGridNode||t.on("added",(i,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:i,nodes:r})}).on("change",(i,r)=>this.changeCB.emit({event:i,nodes:r})).on("disable",i=>this.disableCB.emit({event:i})).on("drag",(i,r)=>this.dragCB.emit({event:i,el:r})).on("dragstart",(i,r)=>this.dragStartCB.emit({event:i,el:r})).on("dragstop",(i,r)=>this.dragStopCB.emit({event:i,el:r})).on("dropped",(i,r,o)=>this.droppedCB.emit({event:i,previousNode:r,newNode:o})).on("enable",i=>this.enableCB.emit({event:i})).on("removed",(i,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:i,nodes:r})}).on("resize",(i,r)=>this.resizeCB.emit({event:i,el:r})).on("resizestart",(i,r)=>this.resizeStartCB.emit({event:i,el:r})).on("resizestop",(i,r)=>this.resizeStopCB.emit({event:i,el:r})))}unhookEvents(t){t&&(t.parentGridNode||t.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.selectorToType={},e.\u0275fac=function(a){return new(a||e)(We(H0))},e.\u0275cmp=Y0({type:e,selectors:[["gridstack"]],contentQueries:function(a,t,i){if(a&1&&S_(i,T9,4),a&2){let r;hi(r=ui())&&(t.gridstackItems=r)}},viewQuery:function(a,t){if(a&1&&M9(up,7,he),a&2){let i;hi(i=ui())&&(t.container=i.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:VD,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(a,t){a&1&&(s5(LD),w_(0,TD,1,0,"ng-content",1)(1,ED,0,0,"ng-template",null,0,D_),t5(3)),a&2&&v0("ngIf",t.isEmpty)},dependencies:[WS],styles:["[_nghost-%COMP%]{display:block}"]}),e})();function ID(e,a,t,i){if(t){if(!e)return;if(i){let r=e.parentElement?._gridItemComp;if(!r)return;let o=(r.childWidget?.container||r.container)?.createComponent(Bi),n=o?.instance;return n?(n.ref=o,n.options=a,n.el):void 0}else{let r=e._gridComp?.container?.createComponent(T9),o=r?.instance;if(!o)return;o.ref=r;let n=a.selector,s=n?Bi.selectorToType[n]:void 0;if(s){let c=()=>{let l=o.container?.createComponent(s)?.instance;l&&typeof l.serialize=="function"&&typeof l.deserialize=="function"&&(o.childWidget=l,l.deserialize(a))};a.lazyLoad||a.grid?.opts?.lazyLoad&&a.lazyLoad!==!1?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([l])=>{l.isIntersecting&&(a.visibleObservable?.disconnect(),delete a.visibleObservable,c())}),window.setTimeout(()=>a.visibleObservable?.observe(o.el))):c()}return o.el}}else if(i){let r=a.el?._gridComp;r?.ref?r.ref.destroy():r?.ngOnDestroy()}else{let r=a.el?._gridItemComp;r?.ref?r.ref.destroy():r?.ngOnDestroy()}}function DD(e,a){let t=e.el?._gridItemComp;if(t){let r=t.childWidget?.serialize();r&&(a.input=r);return}let i=e.el?._gridComp}function zD(e){let a=e,t=e.el?._gridItemComp;t?.childWidget&&a.input&&t.childWidget.deserialize(a)}var RD=["grid"],ND=["addCardBtn"],OD=[[["","slot","dashboard-subheader"]]],FD=["[slot=dashboard-subheader]"],uh=(e,a)=>a.id,dp=(e,a)=>a.action;function PD(e,a){if(e&1&&(u1(0,"ui5-title",7),p5(1),A1()),e&2){let t=Z1();w1(),pe(t.config().title)}}function UD(e,a){if(e&1&&(u1(0,"ui5-text"),p5(1),A1()),e&2){let t=Z1();w1(),pe(t.config().description)}}function qD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",17,1),_0("click",function(){W0(t);let i=Z1();return $0(i.openCardPanel())}),p5(2),A1()}if(e&2){let t=Z1();v0("accessibleName",t.addCardButton().text||t.addCardButton().tooltip||"Edit Cards")("design",t.addCardButton().design)("icon",t.addCardButton().icon)("tooltip",t.addCardButton().tooltip),w1(2),pe(t.addCardButton().text)}}function jD(e,a){if(e&1&&n6(0,"ui5-menu-item",20),e&2){let t=a.$implicit;v0("icon",t.icon??"")("text",t.text??""),x_("data-action",t.action)}}function GD(e,a){if(e&1&&n6(0,"ui5-menu-separator")(1,"ui5-menu-item",21),e&2){let t=Z1(2);w1(),v0("icon",t.editViewButton().icon)("text",t.editViewButton().text||"Edit View")}}function WD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",18,2),_0("click",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.update(r=>!r))}),A1(),u1(2,"ui5-menu",19),_0("ui5Close",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.set(!1))})("ui5ItemClick",function(i){W0(t);let r=Z1();return $0(r.onMenuItemClick(i.detail.item.dataset.action,i))})("ui5Open",function(){W0(t);let i=Z1();return $0(i.toolbarMenuOpen.set(!0))}),E7(3,jD,1,3,"ui5-menu-item",20,dp),r2(5,GD,2,2),A1()}if(e&2){let t=Pk(1),i=Z1();w1(2),v0("open",i.toolbarMenuOpen())("opener",t.element),w1(),I7(i.customActions()),w1(2),o2(i.config().editable?5:-1)}}function $D(e,a){if(e&1){let t=q5();u1(0,"ui5-button",24),_0("click",function(i){let r=W0(t).$implicit,o=Z1(2);return $0(o.actionButtonClick.emit({event:i,action:r}))}),p5(1),A1()}if(e&2){let t=a.$implicit;v0("accessibleName",t.text||t.tooltip||t.action)("design",t.design??"Default")("endIcon",t==null?null:t.endIcon)("icon",t.icon??"")("tooltip",t.tooltip??""),w1(),pe(t.text)}}function XD(e,a){if(e&1){let t=q5();u1(0,"ui5-button",25),_0("click",function(){W0(t);let i=Z1(2);return $0(i.enterEditMode())}),p5(1),A1()}if(e&2){let t=Z1(2);v0("accessibleName",t.editViewButton().text||t.editViewButton().tooltip||"Edit View")("design",t.editViewButton().design)("icon",t.editViewButton().icon)("tooltip",t.editViewButton().tooltip),w1(),pe(t.editViewButton().text)}}function KD(e,a){if(e&1&&(E7(0,$D,2,6,"ui5-button",22,dp),r2(2,XD,2,5,"ui5-button",23)),e&2){let t=Z1();I7(t.customActions()),w1(2),o2(t.config().editable?2:-1)}}function YD(e,a){if(e&1){let t=q5();u1(0,"mfp-dashboard-section",26),_0("removeCard",function(i){W0(t);let r=Z1();return $0(r.removeCard(i))})("removeSection",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeSection(i.id))}),A1()}if(e&2){let t=a.$implicit,i=Z1();v0("cards",i.sectionCards()(t.id))("columns",12)("editMode",i.editMode())("section",t)}}function QD(e,a){if(e&1){let t=q5();u1(0,"gridstack-item",27)(1,"mfp-dashboard-card",28),_0("removeCard",function(){let i=W0(t).$implicit,r=Z1();return $0(r.removeCard(i.id))}),A1()()}if(e&2){let t=a.$implicit,i=Z1();ue("cursor",i.editMode()?"pointer":"auto"),v0("options",t),w1(),v0("card",t)("editMode",i.editMode())}}function JD(e,a){if(e&1){let t=q5();u1(0,"div",15)(1,"ui5-button",29),_0("click",function(){W0(t);let i=Z1();return $0(i.saveEdit())}),p5(2,"Save"),A1(),u1(3,"ui5-button",30),_0("click",function(){W0(t);let i=Z1();return $0(i.cancelEdit())}),p5(4,"Cancel"),A1()()}}document.body.classList.add("ui5-content-density-compact");var ez=class Hi{static registerAngularComponents(a){eI(a)}config=R.required();sections=Wl([]);cards=Wl([]);availableCards=R([]);saved=g1();actionButtonClick=g1();editMode=g7(!1);compactToolbar=g7(!1);toolbarMenuOpen=g7(!1);sectionsSnapshot=[];cardsSnapshot=[];gridStackItems=vi.required("grid");addCardBtn=vi("addCardBtn");resizeObserver;hostEl=q(H0);injector=q(R0);gridOptions=te(()=>({cellHeight:10,disableResize:!this.editMode(),disableDrag:!this.editMode(),columnOpts:{breakpointForWindow:!0,breakpoints:[{w:1440,c:12,layout:"none"},{w:1024,c:8,layout:"compact"},{w:600,c:1,layout:"list"}]}}));cardDialogOpen=g7(!1);customActions=te(()=>this.config().customActions??[]);addedCardsIds=te(()=>new Set(this.cards().map(a=>a.id)));editViewButton=te(()=>O({icon:"action-settings",design:"Transparent",tooltip:"Edit View",text:""},this.config().buttonsSettings?.editViewButton));addCardButton=te(()=>O({icon:"",design:"Default",tooltip:"",text:"Edit Cards"},this.config().buttonsSettings?.addCardButton));sectionCards=te(()=>{let a=this.cards();return t=>a.filter(i=>i.sectionId===t)});cardsPosition=new Map;looseCards=vS(()=>this.cards().filter(a=>!a.sectionId));newGridStackNodes=[];ngOnInit(){this.resizeObserver=new ResizeObserver(a=>{let t=a[0]?.contentRect.width??0;this.compactToolbar.set(t<726)}),this.resizeObserver.observe(this.hostEl.nativeElement)}ngOnDestroy(){this.resizeObserver?.disconnect()}onMenuItemClick(a,t){if(a==="edit-view"){this.enterEditMode();return}let i=this.customActions().find(r=>r.action===a);i&&this.actionButtonClick.emit({event:t,action:i})}enterEditMode(){let a=this.gridStackItems().gridstackItems?.toArray().map(t=>t.options);a&&this.saveCardsPosition(a),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.editMode.set(!0),nB(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}saveEdit(){this.saveCardsPosition(this.newGridStackNodes),this.saved.emit({sections:this.sections(),cards:this.cards().map(a=>{let t=this.cardsPosition.get(a.id);return h1(O({},a),{x:t?.x,y:t?.y,w:t?.w??a.w,h:t?.h??a.h})})}),this.editMode.set(!1)}cancelEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(a=>{let t=this.cardsPosition.get(a.id);return h1(O({},a),{x:t?.x,y:t?.y})})),this.cardDialogOpen.set(!1),this.editMode.set(!1)}removeSection(a){this.sections.update(t=>t.filter(i=>i.id!==a)),this.cards.update(t=>t.filter(i=>i.sectionId!==a))}removeCard(a){this.cardsPosition.delete(a),this.cards.update(t=>t.filter(i=>i.id!==a))}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(a){this.cards.update(t=>[...t.filter(i=>!a.removed.includes(i.id)),...a.added.map(i=>O({},i))]),this.closeCardPanel()}onGridChange(a){this.newGridStackNodes=a.nodes}saveCardsPosition(a){a.forEach(t=>{t.id&&this.cardsPosition.set(t.id,{x:t.x,y:t.y,w:t.w,h:t.h})})}static \u0275fac=function(a){return new(a||Hi)};static \u0275cmp=Y0({type:Hi,selectors:[["mfp-dashboard"]],viewQuery:function(a,t){a&1&&B9(t.gridStackItems,RD,5)(t.addCardBtn,ND,5),a&2&&L_(2)},hostVars:2,hostBindings:function(a,t){a&2&&ue("background-image",t.config().backgroundImageUrl?"url("+t.config().backgroundImageUrl+")":null)},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick"},ngContentSelectors:FD,decls:21,vars:8,consts:[["grid",""],["addCardBtn",""],["menuBtn",""],[1,"mfp-dashboard"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],["level","H2","size","H2","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["id","add-card-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","columns","editMode","section"],[3,"removedCB","addedCB","changeCB","options"],[3,"options","cursor"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],["id","add-card-btn",3,"click","accessibleName","design","icon","tooltip"],["accessibleName","Actions","design","Transparent","icon","menu2","tooltip","Actions",3,"click"],[3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view",3,"icon","text"],[3,"accessibleName","design","endIcon","icon","tooltip"],[3,"accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"click","accessibleName","design","icon","tooltip"],[3,"removeCard","removeSection","cards","columns","editMode","section"],[3,"options"],[3,"removeCard","card","editMode"],["design","Emphasized",3,"click"],["design","Transparent",3,"click"]],template:function(a,t){a&1&&(s5(OD),u1(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),r2(4,PD,2,1,"ui5-title",7),r2(5,UD,2,1,"ui5-text"),A1(),u1(6,"div",8),r2(7,qD,3,5,"ui5-button",9)(8,WD,6,3)(9,KD,3,1),A1()(),u1(10,"div",10),t5(11),A1()(),u1(12,"div",11),E7(13,YD,1,4,"mfp-dashboard-section",12,uh),A1(),u1(15,"gridstack",13,0),_0("removedCB",function(i){return t.onGridChange(i)})("addedCB",function(i){return t.onGridChange(i)})("changeCB",function(i){return t.onGridChange(i)}),E7(17,QD,2,5,"gridstack-item",14,uh),A1(),r2(19,JD,5,0,"div",15),A1(),u1(20,"mfp-edit-cards-dialog",16),_0("cancelled",function(){return t.closeCardPanel()})("confirm",function(i){return t.onCardsEdited(i)}),A1()),a&2&&(w1(4),o2(t.config().title?4:-1),w1(),o2(t.config().description?5:-1),w1(2),o2(t.editMode()?7:t.compactToolbar()?8:9),w1(6),I7(t.sections()),w1(2),v0("options",t.gridOptions()),w1(2),I7(t.looseCards()),w1(2),o2(t.editMode()?19:-1),w1(),v0("addedCardsIds",t.addedCardsIds())("availableCards",t.availableCards())("open",t.cardDialogOpen()))},dependencies:[Bi,T9,DI,FI,sp,c6,UI,jI,WI,op,XI],styles:[`.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}mfp-dashboard,mfp-wc-dashboard{display:block;margin:0;padding:0;min-height:100%;background:var(--sapShellColor, #354a5e);background-size:cover;background-position:center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:2rem}.mfp-sections-container{display:grid;grid-template-columns:repeat(12,1fr);grid-auto-rows:auto;align-content:start;gap:1rem}@media(max-width:726px){.mfp-sections-container{grid-template-columns:1fr}}@media(min-width:727px)and (max-width:1200px){.mfp-sections-container{grid-template-columns:repeat(8,1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:1rem}.mfp-dashboard__edit-bar{position:sticky;bottom:20px;left:16px;right:16px;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:7px 16px;background:var(--sapPageFooter_Background, white);border-radius:var(--sapElement_BorderCornerRadius, 12px);box-shadow:0 0 0 1px #2235487a,0 2px 8px #2235484d;box-sizing:border-box;overflow:hidden}
|
|
157
157
|
`],encapsulation:2})};po("mfp");(async()=>{let e=await dL(),a=qS(ez,{injector:e.injector});customElements.define("mfp-wc-dashboard",a)})();
|