@ldmjs/ui 1.0.64 → 1.0.65
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/dist/index.js +57 -21
- package/dist/lib/floating.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4491,6 +4491,10 @@ var floating_js_ = __webpack_require__(9018);
|
|
|
4491
4491
|
|
|
4492
4492
|
|
|
4493
4493
|
class FloatingUI extends external_vue_class_component_.Vue {
|
|
4494
|
+
constructor() {
|
|
4495
|
+
super(...arguments);
|
|
4496
|
+
this.cleanupPosWatcher = null;
|
|
4497
|
+
}
|
|
4494
4498
|
mounted() {
|
|
4495
4499
|
this.addPosWatcher();
|
|
4496
4500
|
}
|
|
@@ -4503,29 +4507,30 @@ class FloatingUI extends external_vue_class_component_.Vue {
|
|
|
4503
4507
|
if (!dropdownEl || !referenceEl || !window.ResizeObserver) {
|
|
4504
4508
|
return;
|
|
4505
4509
|
}
|
|
4506
|
-
|
|
4507
|
-
const { y, strategy } = await (0,floating_js_.computePosition)(referenceEl, dropdownEl, {
|
|
4510
|
+
this.cleanupPosWatcher = (0,floating_js_.autoUpdate)(referenceEl, dropdownEl, async () => {
|
|
4511
|
+
const { y, strategy, middlewareData } = await (0,floating_js_.computePosition)(referenceEl, dropdownEl, {
|
|
4508
4512
|
strategy: 'fixed',
|
|
4509
4513
|
middleware: [
|
|
4510
4514
|
(0,floating_js_.autoPlacement)({
|
|
4511
4515
|
allowedPlacements: ['top', 'bottom'],
|
|
4512
4516
|
}),
|
|
4517
|
+
(0,floating_js_.hide)(),
|
|
4513
4518
|
],
|
|
4514
4519
|
});
|
|
4515
4520
|
dropdownEl.style.position = strategy;
|
|
4516
4521
|
dropdownEl.style.top = `${y}px`;
|
|
4517
4522
|
dropdownEl.style.maxWidth = `${referenceEl.clientWidth}px`;
|
|
4518
4523
|
dropdownEl.style.maxHeight = '250px';
|
|
4524
|
+
dropdownEl.style.visibility = middlewareData.hide.referenceHidden ? 'hidden' : 'visible';
|
|
4519
4525
|
});
|
|
4520
4526
|
}
|
|
4521
4527
|
removePosWatcher() {
|
|
4522
|
-
if (
|
|
4523
|
-
|
|
4528
|
+
if (this.cleanupPosWatcher) {
|
|
4529
|
+
this.cleanupPosWatcher();
|
|
4524
4530
|
}
|
|
4525
|
-
|
|
4531
|
+
this.cleanupPosWatcher = null;
|
|
4526
4532
|
}
|
|
4527
4533
|
}
|
|
4528
|
-
FloatingUI.CleanupPosWatcher = null;
|
|
4529
4534
|
|
|
4530
4535
|
// EXTERNAL MODULE: external "./utils/validators.js"
|
|
4531
4536
|
var validators_js_ = __webpack_require__(9119);
|
|
@@ -5167,6 +5172,9 @@ function ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_render(_ctx, _cac
|
|
|
5167
5172
|
* Возвращает число в формате "01", "02"
|
|
5168
5173
|
*/
|
|
5169
5174
|
function beautify(v) {
|
|
5175
|
+
if (typeof v === 'number') {
|
|
5176
|
+
v = String(v);
|
|
5177
|
+
}
|
|
5170
5178
|
return v.length === 1 ? '0' + v : v;
|
|
5171
5179
|
}
|
|
5172
5180
|
function parseDate(value, locale = 'ru') {
|
|
@@ -12578,7 +12586,8 @@ var ld_splittervue_type_script_lang_js_external_metadata = (undefined && undefin
|
|
|
12578
12586
|
};
|
|
12579
12587
|
|
|
12580
12588
|
|
|
12581
|
-
|
|
12589
|
+
|
|
12590
|
+
class SplitterComponent extends external_vue_property_decorator_.Vue {
|
|
12582
12591
|
constructor() {
|
|
12583
12592
|
super(...arguments);
|
|
12584
12593
|
this.active = false;
|
|
@@ -12671,7 +12680,7 @@ let SplitterComponent = class SplitterComponent extends external_vue_property_de
|
|
|
12671
12680
|
'min-width': `${this.rightSizeMin}${unit}`,
|
|
12672
12681
|
};
|
|
12673
12682
|
}
|
|
12674
|
-
}
|
|
12683
|
+
}
|
|
12675
12684
|
ld_splittervue_type_script_lang_js_external_decorate([
|
|
12676
12685
|
(0,external_vue_property_decorator_.Prop)({ type: Number, default: 10 }),
|
|
12677
12686
|
ld_splittervue_type_script_lang_js_external_metadata("design:type", Number)
|
|
@@ -12704,18 +12713,18 @@ ld_splittervue_type_script_lang_js_external_decorate([
|
|
|
12704
12713
|
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
12705
12714
|
ld_splittervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
12706
12715
|
], SplitterComponent.prototype, "resizeDisabled", void 0);
|
|
12716
|
+
ld_splittervue_type_script_lang_js_external_decorate([
|
|
12717
|
+
Emit('resize'),
|
|
12718
|
+
ld_splittervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
12719
|
+
ld_splittervue_type_script_lang_js_external_metadata("design:paramtypes", [Object]),
|
|
12720
|
+
ld_splittervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
12721
|
+
], SplitterComponent.prototype, "emitResize", null);
|
|
12707
12722
|
ld_splittervue_type_script_lang_js_external_decorate([
|
|
12708
12723
|
(0,external_vue_property_decorator_.Watch)('leftSizePercent', { immediate: true }),
|
|
12709
12724
|
ld_splittervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
12710
12725
|
ld_splittervue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
12711
12726
|
ld_splittervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
12712
12727
|
], SplitterComponent.prototype, "leftSizePercentChanged", null);
|
|
12713
|
-
SplitterComponent = ld_splittervue_type_script_lang_js_external_decorate([
|
|
12714
|
-
(0,external_vue_property_decorator_.Options)({
|
|
12715
|
-
emits: ['resize'],
|
|
12716
|
-
})
|
|
12717
|
-
], SplitterComponent);
|
|
12718
|
-
/* harmony default export */ const ld_splittervue_type_script_lang_js_external = (SplitterComponent);
|
|
12719
12728
|
|
|
12720
12729
|
;// ./src/ld-splitter/ld-splitter.ts?vue&type=script&lang=js&external
|
|
12721
12730
|
|
|
@@ -12727,7 +12736,7 @@ SplitterComponent = ld_splittervue_type_script_lang_js_external_decorate([
|
|
|
12727
12736
|
;
|
|
12728
12737
|
|
|
12729
12738
|
|
|
12730
|
-
const ld_splitter_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(
|
|
12739
|
+
const ld_splitter_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(SplitterComponent, [['render',ld_splittervue_type_template_id_57e95903_scoped_true_render],['__scopeId',"data-v-57e95903"]])
|
|
12731
12740
|
|
|
12732
12741
|
/* harmony default export */ const ld_splitter = (ld_splitter_exports_);
|
|
12733
12742
|
;// ./src/ld-splitter/index.ts
|
|
@@ -13187,10 +13196,6 @@ ld_tabsvue_type_script_lang_js_external_decorate([
|
|
|
13187
13196
|
(0,external_vue_property_decorator_.Prop)({ default: true }),
|
|
13188
13197
|
ld_tabsvue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
13189
13198
|
], LdTabsComponent.prototype, "vertical", void 0);
|
|
13190
|
-
ld_tabsvue_type_script_lang_js_external_decorate([
|
|
13191
|
-
(0,external_vue_property_decorator_.Prop)(),
|
|
13192
|
-
ld_tabsvue_type_script_lang_js_external_metadata("design:type", Number)
|
|
13193
|
-
], LdTabsComponent.prototype, "value", void 0);
|
|
13194
13199
|
ld_tabsvue_type_script_lang_js_external_decorate([
|
|
13195
13200
|
(0,external_vue_property_decorator_.Prop)({ default: '' }),
|
|
13196
13201
|
ld_tabsvue_type_script_lang_js_external_metadata("design:type", String)
|
|
@@ -14290,6 +14295,8 @@ class TimeComponent extends (0,external_vue_class_component_.mixins)(Validatable
|
|
|
14290
14295
|
this.m = '00';
|
|
14291
14296
|
this.inputH = null;
|
|
14292
14297
|
this.inputM = null;
|
|
14298
|
+
this.focusH = false;
|
|
14299
|
+
this.focusM = false;
|
|
14293
14300
|
this.eventKeyCode = null;
|
|
14294
14301
|
}
|
|
14295
14302
|
emitUpdateValue(value) {
|
|
@@ -14299,10 +14306,13 @@ class TimeComponent extends (0,external_vue_class_component_.mixins)(Validatable
|
|
|
14299
14306
|
return true;
|
|
14300
14307
|
}
|
|
14301
14308
|
onModelChanged(value) {
|
|
14309
|
+
if (this.focusH || this.focusM) {
|
|
14310
|
+
return;
|
|
14311
|
+
}
|
|
14302
14312
|
if (this.testTime(value)) {
|
|
14303
14313
|
const [h, m] = value.split(':').map(i => Number(i));
|
|
14304
|
-
this.h =
|
|
14305
|
-
this.m =
|
|
14314
|
+
this.h = datetime.beautify(h);
|
|
14315
|
+
this.m = datetime.beautify(m);
|
|
14306
14316
|
return;
|
|
14307
14317
|
}
|
|
14308
14318
|
this.h = '00';
|
|
@@ -14313,6 +14323,16 @@ class TimeComponent extends (0,external_vue_class_component_.mixins)(Validatable
|
|
|
14313
14323
|
this.emitUpdateValue(value);
|
|
14314
14324
|
}
|
|
14315
14325
|
}
|
|
14326
|
+
onFocusHours(value) {
|
|
14327
|
+
if (value) {
|
|
14328
|
+
this.focusM = false;
|
|
14329
|
+
}
|
|
14330
|
+
}
|
|
14331
|
+
onFocusMinutes(value) {
|
|
14332
|
+
if (value) {
|
|
14333
|
+
this.focusH = false;
|
|
14334
|
+
}
|
|
14335
|
+
}
|
|
14316
14336
|
mounted() {
|
|
14317
14337
|
this.inputH = this.$el.querySelector('#h-input-' + this.uid);
|
|
14318
14338
|
this.inputM = this.$el.querySelector('#m-input-' + this.uid);
|
|
@@ -14322,9 +14342,11 @@ class TimeComponent extends (0,external_vue_class_component_.mixins)(Validatable
|
|
|
14322
14342
|
return;
|
|
14323
14343
|
}
|
|
14324
14344
|
if (t === 'h') {
|
|
14345
|
+
this.focusH = true;
|
|
14325
14346
|
this.h = this.h === '00' ? '' : this.h;
|
|
14326
14347
|
}
|
|
14327
14348
|
if (t === 'm') {
|
|
14349
|
+
this.focusM = true;
|
|
14328
14350
|
this.m = this.m === '00' ? '' : this.m;
|
|
14329
14351
|
}
|
|
14330
14352
|
}
|
|
@@ -14333,9 +14355,11 @@ class TimeComponent extends (0,external_vue_class_component_.mixins)(Validatable
|
|
|
14333
14355
|
return;
|
|
14334
14356
|
}
|
|
14335
14357
|
if (t === 'h' && !this.h) {
|
|
14358
|
+
this.focusH = false;
|
|
14336
14359
|
this.h = '00';
|
|
14337
14360
|
}
|
|
14338
14361
|
if (t === 'm' && !this.m) {
|
|
14362
|
+
this.focusM = false;
|
|
14339
14363
|
this.m = '00';
|
|
14340
14364
|
}
|
|
14341
14365
|
}
|
|
@@ -14489,6 +14513,18 @@ ld_timevue_type_script_lang_ts_external_decorate([
|
|
|
14489
14513
|
ld_timevue_type_script_lang_ts_external_metadata("design:paramtypes", [String]),
|
|
14490
14514
|
ld_timevue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14491
14515
|
], TimeComponent.prototype, "onTimeChanged", null);
|
|
14516
|
+
ld_timevue_type_script_lang_ts_external_decorate([
|
|
14517
|
+
(0,external_vue_property_decorator_.Watch)('focusH'),
|
|
14518
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
14519
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
|
|
14520
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14521
|
+
], TimeComponent.prototype, "onFocusHours", null);
|
|
14522
|
+
ld_timevue_type_script_lang_ts_external_decorate([
|
|
14523
|
+
(0,external_vue_property_decorator_.Watch)('focusM'),
|
|
14524
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
14525
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
|
|
14526
|
+
ld_timevue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14527
|
+
], TimeComponent.prototype, "onFocusMinutes", null);
|
|
14492
14528
|
|
|
14493
14529
|
;// ./src/ld-time/ld-time.ts?vue&type=script&lang=ts&external
|
|
14494
14530
|
|
package/dist/lib/floating.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ldmui"]=t():e["ldmui"]=t()})(self,(()=>(()=>{"use strict";var e={};(()=>{e.d=(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{arrow:()=>v,autoPlacement:()=>m,autoUpdate:()=>autoUpdate,computePosition:()=>floating_ui_dom_esm_computePosition,detectOverflow:()=>detectOverflow,flip:()=>h,getOverflowAncestors:()=>getOverflowAncestors,hide:()=>y,inline:()=>x,limitShift:()=>b,offset:()=>offset,platform:()=>d,shift:()=>p,size:()=>w});const n=["top","right","bottom","left"],o=["start","end"],i=n.reduce(((e,t)=>e.concat(t,t+"-"+o[0],t+"-"+o[1])),[]),r=Math.min,l=Math.max,s=Math.round,c=Math.floor,createCoords=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function clamp(e,t,n){return l(e,r(t,n))}function evaluate(e,t){return"function"===typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const o=getAlignment(e),i=getAlignmentAxis(e),r=getAxisLength(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=getOppositePlacement(l)),[l,getOppositePlacement(l)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,(e=>f[e]))}function getSideList(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function getOppositeAxisPlacements(e,t,n,o){const i=getAlignment(e);let r=getSideList(getSide(e),"start"===n,o);return i&&(r=r.map((e=>e+"-"+i)),t&&(r=r.concat(r.map(getOppositeAlignmentPlacement)))),r}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(e=>a[e]))}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!==typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:o,floating:i}=e;const r=getSideAxis(t),l=getAlignmentAxis(t),s=getAxisLength(l),c=getSide(t),a="y"===r,f=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,u=o[s]/2-i[s]/2;let d;switch(c){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:g};break;case"left":d={x:o.x-i.width,y:g};break;default:d={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":d[l]-=u*(n&&a?-1:1);break;case"end":d[l]+=u*(n&&a?-1:1);break}return d}const computePosition=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:g}=computeCoordsFromPlacement(a,o,c),u=o,d={},m=0;for(let n=0;n<s.length;n++){const{name:r,fn:p}=s[n],{x:h,y:w,data:y,reset:v}=await p({x:f,y:g,initialPlacement:o,placement:u,strategy:i,middlewareData:d,rects:a,platform:l,elements:{reference:e,floating:t}});f=null!=h?h:f,g=null!=w?w:g,d={...d,[r]:{...d[r],...y}},v&&m<=50&&(m++,"object"===typeof v&&(v.placement&&(u=v.placement),v.rects&&(a=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):v.rects),({x:f,y:g}=computeCoordsFromPlacement(a,u,c))),n=-1)}return{x:f,y:g,placement:u,strategy:i,middlewareData:d}};async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:u=!1,padding:d=0}=evaluate(t,e),m=getPaddingObject(d),p="floating"===g?"reference":"floating",h=s[u?p:g],w=rectToClientRect(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(h)))||n?h:h.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:a,rootBoundary:f,strategy:c})),y="floating"===g?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=rectToClientRect(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-b.top+m.top)/x.y,bottom:(b.bottom-w.bottom+m.bottom)/x.y,left:(w.left-b.left+m.left)/x.x,right:(b.right-w.right+m.right)/x.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:s,elements:c,middlewareData:a}=t,{element:f,padding:g=0}=evaluate(e,t)||{};if(null==f)return{};const u=getPaddingObject(g),d={x:n,y:o},m=getAlignmentAxis(i),p=getAxisLength(m),h=await s.getDimensions(f),w="y"===m,y=w?"top":"left",v=w?"bottom":"right",x=w?"clientHeight":"clientWidth",b=l.reference[p]+l.reference[m]-d[m]-l.floating[p],A=d[m]-l.reference[m],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(f));let O=R?R[x]:0;O&&await(null==s.isElement?void 0:s.isElement(R))||(O=c.floating[x]||l.floating[p]);const S=b/2-A/2,C=O/2-h[p]/2-1,E=r(u[y],C),T=r(u[v],C),P=E,L=O-h[p]-T,N=O/2-h[p]/2+S,D=clamp(P,N,L),W=!a.arrow&&null!=getAlignment(i)&&N!==D&&l.reference[p]/2-(N<P?E:T)-h[p]/2<0,B=W?N<P?N-P:N-L:0;return{[m]:d[m]+B,data:{[m]:D,centerOffset:N-D-B,...W&&{alignmentOffset:B}},reset:W}}});function getPlacementList(e,t,n){const o=e?[...n.filter((t=>getAlignment(t)===e)),...n.filter((t=>getAlignment(t)!==e))]:n.filter((e=>getSide(e)===e));return o.filter((n=>!e||(getAlignment(n)===e||!!t&&getOppositeAlignmentPlacement(n)!==n)))}const autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:l,middlewareData:s,placement:c,platform:a,elements:f}=t,{crossAxis:g=!1,alignment:u,allowedPlacements:d=i,autoAlignment:m=!0,...p}=evaluate(e,t),h=void 0!==u||d===i?getPlacementList(u||null,m,d):d,w=await detectOverflow(t,p),y=(null==(n=s.autoPlacement)?void 0:n.index)||0,v=h[y];if(null==v)return{};const x=getAlignmentSides(v,l,await(null==a.isRTL?void 0:a.isRTL(f.floating)));if(c!==v)return{reset:{placement:h[0]}};const b=[w[getSide(v)],w[x[0]],w[x[1]]],A=[...(null==(o=s.autoPlacement)?void 0:o.overflows)||[],{placement:v,overflows:b}],R=h[y+1];if(R)return{data:{index:y+1,overflows:A},reset:{placement:R}};const O=A.map((e=>{const t=getAlignment(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),S=O.filter((e=>e[2].slice(0,getAlignment(e[0])?2:3).every((e=>e<=0)))),C=(null==(r=S[0])?void 0:r[0])||O[0][0];return C!==c?{data:{index:y+1,overflows:A},reset:{placement:C}}:{}}}},flip=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...h}=evaluate(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=getSide(i),y=getSideAxis(s),v=getSide(s)===s,x=await(null==c.isRTL?void 0:c.isRTL(a.floating)),b=u||(v||!p?[getOppositePlacement(s)]:getExpandedPlacements(s)),A="none"!==m;!u&&A&&b.push(...getOppositeAxisPlacements(s,p,m,x));const R=[s,...b],O=await detectOverflow(t,h),S=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&S.push(O[w]),g){const e=getAlignmentSides(i,l,x);S.push(O[e[0]],O[e[1]])}if(C=[...C,{placement:i,overflows:S}],!S.every((e=>e<=0))){var E,T;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(T=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(d){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(A){const t=getSideAxis(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return n.some((t=>e[t]>=0))}const hide=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=evaluate(e,t);switch(o){case"referenceHidden":{const e=await detectOverflow(t,{...i,elementContext:"reference"}),o=getSideOffsets(e,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:isAnySideFullyClipped(o)}}}case"escaped":{const e=await detectOverflow(t,{...i,altBoundary:!0}),o=getSideOffsets(e,n.floating);return{data:{escapedOffsets:o,escaped:isAnySideFullyClipped(o)}}}default:return{}}}}};function getBoundingRect(e){const t=r(...e.map((e=>e.left))),n=r(...e.map((e=>e.top))),o=l(...e.map((e=>e.right))),i=l(...e.map((e=>e.bottom)));return{x:t,y:n,width:o-t,height:i-n}}function getRectsByLine(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const i=t[e];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map((e=>rectToClientRect(getBoundingRect(e))))}const inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:s,strategy:c}=t,{padding:a=2,x:f,y:g}=evaluate(e,t),u=Array.from(await(null==s.getClientRects?void 0:s.getClientRects(o.reference))||[]),d=getRectsByLine(u),m=rectToClientRect(getBoundingRect(u)),p=getPaddingObject(a);function getBoundingClientRect(){if(2===d.length&&d[0].left>d[1].right&&null!=f&&null!=g)return d.find((e=>f>e.left-p.left&&f<e.right+p.right&&g>e.top-p.top&&g<e.bottom+p.bottom))||m;if(d.length>=2){if("y"===getSideAxis(n)){const e=d[0],t=d[d.length-1],o="top"===getSide(n),i=e.top,r=t.bottom,l=o?e.left:t.left,s=o?e.right:t.right,c=s-l,a=r-i;return{top:i,bottom:r,left:l,right:s,width:c,height:a,x:l,y:i}}const e="left"===getSide(n),t=l(...d.map((e=>e.right))),o=r(...d.map((e=>e.left))),i=d.filter((n=>e?n.left===o:n.right===t)),s=i[0].top,c=i[i.length-1].bottom,a=o,f=t,g=f-a,u=c-s;return{top:s,bottom:c,left:a,right:f,width:g,height:u,x:a,y:s}}return m}const h=await s.getElementRects({reference:{getBoundingClientRect},floating:o.floating,strategy:c});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}};async function convertValueToCoords(e,t){const{placement:n,platform:o,elements:i}=e,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=getSide(n),s=getAlignment(n),c="y"===getSideAxis(n),a=["left","top"].includes(l)?-1:1,f=r&&c?-1:1,g=evaluate(t,e);let{mainAxis:u,crossAxis:d,alignmentAxis:m}="number"===typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&"number"===typeof m&&(d="end"===s?-1*m:m),c?{x:d*f,y:u*a}:{x:u*a,y:d*f}}const offset=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,c=await convertValueToCoords(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:l}}}}},shift=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=evaluate(e,t),a={x:n,y:o},f=await detectOverflow(t,c),g=getSideAxis(getSide(i)),u=getOppositeAxis(g);let d=a[u],m=a[g];if(r){const e="y"===u?"top":"left",t="y"===u?"bottom":"right",n=d+f[e],o=d-f[t];d=clamp(n,d,o)}if(l){const e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=m+f[e],o=m-f[t];m=clamp(n,m,o)}const p=s.fn({...t,[u]:d,[g]:m});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[u]:r,[g]:l}}}}}},limitShift=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:c=!0,crossAxis:a=!0}=evaluate(e,t),f={x:n,y:o},g=getSideAxis(i),u=getOppositeAxis(g);let d=f[u],m=f[g];const p=evaluate(s,t),h="number"===typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const e="y"===u?"height":"width",t=r.reference[u]-r.floating[e]+h.mainAxis,n=r.reference[u]+r.reference[e]-h.mainAxis;d<t?d=t:d>n&&(d=n)}if(a){var w,y;const e="y"===u?"width":"height",t=["top","left"].includes(getSide(i)),n=r.reference[g]-r.floating[e]+(t&&(null==(w=l.offset)?void 0:w[g])||0)+(t?0:h.crossAxis),o=r.reference[g]+r.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[g])||0)-(t?h.crossAxis:0);m<n?m=n:m>o&&(m=o)}return{[u]:d,[g]:m}}}},size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:s,platform:c,elements:a}=t,{apply:f=()=>{},...g}=evaluate(e,t),u=await detectOverflow(t,g),d=getSide(i),m=getAlignment(i),p="y"===getSideAxis(i),{width:h,height:w}=s.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=m===(await(null==c.isRTL?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y="end"===m?"top":"bottom");const x=w-u.top-u.bottom,b=h-u.left-u.right,A=r(w-u[y],x),R=r(h-u[v],b),O=!t.middlewareData.shift;let S=A,C=R;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=x),O&&!m){const e=l(u.left,0),t=l(u.right,0),n=l(u.top,0),o=l(u.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:l(u.left,u.right)):S=w-2*(0!==n||0!==o?n+o:l(u.top,u.bottom))}await f({...t,availableWidth:C,availableHeight:S});const E=await c.getDimensions(a.floating);return h!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return"undefined"!==typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"===typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=getComputedStyle(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function getContainingBlock(e){let t=getParentNode(e);while(isHTMLElement(t)&&!isLastTraversableNode(t)){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=getNearestOverflowAncestor(e),r=i===(null==(o=e.ownerDocument)?void 0:o.body),l=getWindow(i);if(r){const e=getFrameElement(l);return t.concat(l,l.visualViewport||[],isOverflowElement(i)?i:[],e&&n?getOverflowAncestors(e):[])}return t.concat(i,getOverflowAncestors(i,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=isHTMLElement(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,c=s(n)!==r||s(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=getCssDimensions(t);let l=(r?s(n.width):n.width)/o,c=(r?s(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const g=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:g}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==getWindow(e))&&t}function getBoundingClientRect(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),r=unwrapElement(e);let l=createCoords(1);t&&(o?isElement(o)&&(l=getScale(o)):l=getScale(e));const s=shouldAddVisualOffsets(r,n,o)?getVisualOffsets(r):createCoords(0);let c=(i.left+s.x)/l.x,a=(i.top+s.y)/l.y,f=i.width/l.x,g=i.height/l.y;if(r){const e=getWindow(r),t=o&&isElement(o)?getWindow(o):o;let n=e,i=n.frameElement;while(i&&o&&t!==n){const e=getScale(i),t=i.getBoundingClientRect(),o=getComputedStyle(i),r=t.left+(i.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,a*=e.y,f*=e.x,g*=e.y,c+=r,a+=l,n=getWindow(i),i=n.frameElement}}return rectToClientRect({width:f,height:g,x:c,y:a})}const u=[":popover-open",":modal"];function floating_ui_dom_esm_isTopLayer(e){return u.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r="fixed"===i,l=getDocumentElement(o),s=!!t&&floating_ui_dom_esm_isTopLayer(t.floating);if(o===l||s&&r)return n;let c={scrollLeft:0,scrollTop:0},a=createCoords(1);const f=createCoords(0),g=isHTMLElement(o);if((g||!g&&!r)&&(("body"!==getNodeName(o)||isOverflowElement(l))&&(c=getNodeScroll(o)),isHTMLElement(o))){const e=getBoundingClientRect(o);a=getScale(o),f.x=e.x+o.clientLeft,f.y=e.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+f.x,y:n.y*a.y-c.scrollTop*a.y+f.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getNodeScroll(e).scrollLeft}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),o=e.ownerDocument.body,i=l(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=l(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+getWindowScrollBarX(e);const c=-n.scrollTop;return"rtl"===getComputedStyle(o).direction&&(s+=l(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function getViewportRect(e,t){const n=getWindow(e),o=getDocumentElement(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,c=0;if(i){r=i.width,l=i.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:r,height:l,x:s,y:c}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=isHTMLElement(e)?getScale(e):createCoords(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,c=i*r.x,a=o*r.y;return{width:l,height:s,x:c,y:a}}function getClientRectFromClippingAncestor(e,t,n){let o;if("viewport"===t)o=getViewportRect(e,n);else if("document"===t)o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return rectToClientRect(o)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return!(n===t||!isElement(n)||isLastTraversableNode(n))&&("fixed"===getComputedStyle(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let o=getOverflowAncestors(e,[],!1).filter((e=>isElement(e)&&"body"!==getNodeName(e))),i=null;const r="fixed"===getComputedStyle(e).position;let l=r?getParentNode(e):e;while(isElement(l)&&!isLastTraversableNode(l)){const t=getComputedStyle(l),n=isContainingBlock(l);n||"fixed"!==t.position||(i=null);const s=r?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||isOverflowElement(l)&&!n&&hasFixedPositionAncestor(e,l);s?o=o.filter((e=>e!==l)):i=t,l=getParentNode(l)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s="clippingAncestors"===n?getClippingElementAncestors(t,this._c):[].concat(n),c=[...s,o],a=c[0],f=c.reduce(((e,n)=>{const o=getClientRectFromClippingAncestor(t,n,i);return e.top=l(o.top,e.top),e.right=r(o.right,e.right),e.bottom=r(o.bottom,e.bottom),e.left=l(o.left,e.left),e}),getClientRectFromClippingAncestor(t,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const o=isHTMLElement(t),i=getDocumentElement(t),r="fixed"===n,l=getBoundingClientRect(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const c=createCoords(0);if(o||!o&&!r)if(("body"!==getNodeName(t)||isOverflowElement(i))&&(s=getNodeScroll(t)),o){const e=getBoundingClientRect(t,!0,r,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=getWindowScrollBarX(i));const a=l.left+s.scrollLeft-c.x,f=l.top+s.scrollTop-c.y;return{x:a,y:f,width:l.width,height:l.height}}function getTrueOffsetParent(e,t){return isHTMLElement(e)&&"fixed"!==getComputedStyle(e).position?t?t(e):e.offsetParent:null}function getOffsetParent(e,t){const n=getWindow(e);if(!isHTMLElement(e)||floating_ui_dom_esm_isTopLayer(e))return n;let o=getTrueOffsetParent(e,t);while(o&&isTableElement(o)&&"static"===getComputedStyle(o).position)o=getTrueOffsetParent(o,t);return o&&("html"===getNodeName(o)||"body"===getNodeName(o)&&"static"===getComputedStyle(o).position&&!isContainingBlock(o))?n:o||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function isRTL(e){return"rtl"===getComputedStyle(e).direction}const d={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(e,t){let n,o=null;const i=getDocumentElement(e);function cleanup(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}function refresh(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),cleanup();const{left:f,top:g,width:u,height:d}=e.getBoundingClientRect();if(s||t(),!u||!d)return;const m=c(g),p=c(i.clientWidth-(f+u)),h=c(i.clientHeight-(g+d)),w=c(f),y=-m+"px "+-p+"px "+-h+"px "+-w+"px",v={rootMargin:y,threshold:l(0,r(1,a))||1};let x=!0;function handleObserve(e){const t=e[0].intersectionRatio;if(t!==a){if(!x)return refresh();t?refresh(!1,t):n=setTimeout((()=>{refresh(!1,1e-7)}),100)}x=!1}try{o=new IntersectionObserver(handleObserve,{...v,root:i.ownerDocument})}catch(e){o=new IntersectionObserver(handleObserve,v)}o.observe(e)}return refresh(!0),cleanup}function autoUpdate(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"===typeof ResizeObserver,layoutShift:s="function"===typeof IntersectionObserver,animationFrame:c=!1}=o,a=unwrapElement(e),f=i||r?[...a?getOverflowAncestors(a):[],...getOverflowAncestors(t)]:[];f.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)}));const g=a&&s?observeMove(a,n):null;let u,d=-1,m=null;l&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===a&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),a&&!c&&m.observe(a),m.observe(t));let p=c?getBoundingClientRect(e):null;function frameLoop(){const t=getBoundingClientRect(e);!p||t.x===p.x&&t.y===p.y&&t.width===p.width&&t.height===p.height||n(),p=t,u=requestAnimationFrame(frameLoop)}return c&&frameLoop(),n(),()=>{var e;f.forEach((e=>{i&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)})),null==g||g(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(u)}}const m=autoPlacement,p=shift,h=flip,w=size,y=hide,v=arrow,x=inline,b=limitShift,floating_ui_dom_esm_computePosition=(e,t,n)=>{const o=new Map,i={platform:d,...n},r={...i.platform,_c:o};return computePosition(e,t,{...i,platform:r})};return t})()));
|
|
1
|
+
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ldmui"]=t():e["ldmui"]=t()})(self,(()=>(()=>{"use strict";var e={};(()=>{e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{arrow:()=>x,autoPlacement:()=>p,autoUpdate:()=>autoUpdate,computePosition:()=>floating_ui_dom_esm_computePosition,detectOverflow:()=>d,flip:()=>w,getOverflowAncestors:()=>getOverflowAncestors,hide:()=>v,inline:()=>b,limitShift:()=>A,offset:()=>m,platform:()=>u,shift:()=>h,size:()=>y});const n=["top","right","bottom","left"],i=["start","end"],o=n.reduce(((e,t)=>e.concat(t,t+"-"+i[0],t+"-"+i[1])),[]),r=Math.min,l=Math.max,s=Math.round,c=Math.floor,createCoords=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function clamp(e,t,n){return l(e,r(t,n))}function evaluate(e,t){return"function"===typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const i=getAlignment(e),o=getAlignmentAxis(e),r=getAxisLength(o);let l="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=getOppositePlacement(l)),[l,getOppositePlacement(l)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,(e=>f[e]))}function getSideList(e,t,n){const i=["left","right"],o=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?r:l;default:return[]}}function getOppositeAxisPlacements(e,t,n,i){const o=getAlignment(e);let r=getSideList(getSide(e),"start"===n,i);return o&&(r=r.map((e=>e+"-"+o)),t&&(r=r.concat(r.map(getOppositeAlignmentPlacement)))),r}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(e=>a[e]))}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!==typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:o}=e;const r=getSideAxis(t),l=getAlignmentAxis(t),s=getAxisLength(l),c=getSide(t),a="y"===r,f=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,u=i[s]/2-o[s]/2;let d;switch(c){case"top":d={x:f,y:i.y-o.height};break;case"bottom":d={x:f,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:g};break;case"left":d={x:i.x-o.width,y:g};break;default:d={x:i.x,y:i.y}}switch(getAlignment(t)){case"start":d[l]-=u*(n&&a?-1:1);break;case"end":d[l]+=u*(n&&a?-1:1);break}return d}const computePosition=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:g}=computeCoordsFromPlacement(a,i,c),u=i,d={},m=0;for(let n=0;n<s.length;n++){const{name:r,fn:p}=s[n],{x:h,y:w,data:y,reset:v}=await p({x:f,y:g,initialPlacement:i,placement:u,strategy:o,middlewareData:d,rects:a,platform:l,elements:{reference:e,floating:t}});f=null!=h?h:f,g=null!=w?w:g,d={...d,[r]:{...d[r],...y}},v&&m<=50&&(m++,"object"===typeof v&&(v.placement&&(u=v.placement),v.rects&&(a=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:f,y:g}=computeCoordsFromPlacement(a,u,c))),n=-1)}return{x:f,y:g,placement:u,strategy:o,middlewareData:d}};async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:i,y:o,platform:r,rects:l,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:u=!1,padding:d=0}=evaluate(t,e),m=getPaddingObject(d),p="floating"===g?"reference":"floating",h=s[u?p:g],w=rectToClientRect(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(h)))||n?h:h.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:a,rootBoundary:f,strategy:c})),y="floating"===g?{x:i,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=rectToClientRect(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-b.top+m.top)/x.y,bottom:(b.bottom-w.bottom+m.bottom)/x.y,left:(w.left-b.left+m.left)/x.x,right:(b.right-w.right+m.right)/x.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:s,elements:c,middlewareData:a}=t,{element:f,padding:g=0}=evaluate(e,t)||{};if(null==f)return{};const u=getPaddingObject(g),d={x:n,y:i},m=getAlignmentAxis(o),p=getAxisLength(m),h=await s.getDimensions(f),w="y"===m,y=w?"top":"left",v=w?"bottom":"right",x=w?"clientHeight":"clientWidth",b=l.reference[p]+l.reference[m]-d[m]-l.floating[p],A=d[m]-l.reference[m],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(f));let O=R?R[x]:0;O&&await(null==s.isElement?void 0:s.isElement(R))||(O=c.floating[x]||l.floating[p]);const S=b/2-A/2,T=O/2-h[p]/2-1,E=r(u[y],T),L=r(u[v],T),C=E,P=O-h[p]-L,N=O/2-h[p]/2+S,D=clamp(C,N,P),B=!a.arrow&&null!=getAlignment(o)&&N!==D&&l.reference[p]/2-(N<C?E:L)-h[p]/2<0,W=B?N<C?N-C:N-P:0;return{[m]:d[m]+W,data:{[m]:D,centerOffset:N-D-W,...B&&{alignmentOffset:W}},reset:B}}});function getPlacementList(e,t,n){const i=e?[...n.filter((t=>getAlignment(t)===e)),...n.filter((t=>getAlignment(t)!==e))]:n.filter((e=>getSide(e)===e));return i.filter((n=>!e||(getAlignment(n)===e||!!t&&getOppositeAlignmentPlacement(n)!==n)))}const autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,r;const{rects:l,middlewareData:s,placement:c,platform:a,elements:f}=t,{crossAxis:g=!1,alignment:u,allowedPlacements:d=o,autoAlignment:m=!0,...p}=evaluate(e,t),h=void 0!==u||d===o?getPlacementList(u||null,m,d):d,w=await detectOverflow(t,p),y=(null==(n=s.autoPlacement)?void 0:n.index)||0,v=h[y];if(null==v)return{};const x=getAlignmentSides(v,l,await(null==a.isRTL?void 0:a.isRTL(f.floating)));if(c!==v)return{reset:{placement:h[0]}};const b=[w[getSide(v)],w[x[0]],w[x[1]]],A=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:v,overflows:b}],R=h[y+1];if(R)return{data:{index:y+1,overflows:A},reset:{placement:R}};const O=A.map((e=>{const t=getAlignment(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),S=O.filter((e=>e[2].slice(0,getAlignment(e[0])?2:3).every((e=>e<=0)))),T=(null==(r=S[0])?void 0:r[0])||O[0][0];return T!==c?{data:{index:y+1,overflows:A},reset:{placement:T}}:{}}}},flip=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:r,rects:l,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...h}=evaluate(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=getSide(o),y=getSideAxis(s),v=getSide(s)===s,x=await(null==c.isRTL?void 0:c.isRTL(a.floating)),b=u||(v||!p?[getOppositePlacement(s)]:getExpandedPlacements(s)),A="none"!==m;!u&&A&&b.push(...getOppositeAxisPlacements(s,p,m,x));const R=[s,...b],O=await detectOverflow(t,h),S=[];let T=(null==(i=r.flip)?void 0:i.overflows)||[];if(f&&S.push(O[w]),g){const e=getAlignmentSides(o,l,x);S.push(O[e[0]],O[e[1]])}if(T=[...T,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,L;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=R[e];if(t){var C;const n="alignment"===g&&y!==getSideAxis(t),i=(null==(C=T[0])?void 0:C.overflows[0])>0;if(!n||i)return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(L=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(d){case"bestFit":{var P;const e=null==(P=T.filter((e=>{if(A){const t=getSideAxis(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s;break}if(o!==n)return{reset:{placement:n}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return n.some((t=>e[t]>=0))}const hide=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=evaluate(e,t);switch(i){case"referenceHidden":{const e=await detectOverflow(t,{...o,elementContext:"reference"}),i=getSideOffsets(e,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:isAnySideFullyClipped(i)}}}case"escaped":{const e=await detectOverflow(t,{...o,altBoundary:!0}),i=getSideOffsets(e,n.floating);return{data:{escapedOffsets:i,escaped:isAnySideFullyClipped(i)}}}default:return{}}}}};function getBoundingRect(e){const t=r(...e.map((e=>e.left))),n=r(...e.map((e=>e.top))),i=l(...e.map((e=>e.right))),o=l(...e.map((e=>e.bottom)));return{x:t,y:n,width:i-t,height:o-n}}function getRectsByLine(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let i=null;for(let e=0;e<t.length;e++){const o=t[e];!i||o.y-i.y>i.height/2?n.push([o]):n[n.length-1].push(o),i=o}return n.map((e=>rectToClientRect(getBoundingRect(e))))}const inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:o,platform:s,strategy:c}=t,{padding:a=2,x:f,y:g}=evaluate(e,t),u=Array.from(await(null==s.getClientRects?void 0:s.getClientRects(i.reference))||[]),d=getRectsByLine(u),m=rectToClientRect(getBoundingRect(u)),p=getPaddingObject(a);function getBoundingClientRect(){if(2===d.length&&d[0].left>d[1].right&&null!=f&&null!=g)return d.find((e=>f>e.left-p.left&&f<e.right+p.right&&g>e.top-p.top&&g<e.bottom+p.bottom))||m;if(d.length>=2){if("y"===getSideAxis(n)){const e=d[0],t=d[d.length-1],i="top"===getSide(n),o=e.top,r=t.bottom,l=i?e.left:t.left,s=i?e.right:t.right,c=s-l,a=r-o;return{top:o,bottom:r,left:l,right:s,width:c,height:a,x:l,y:o}}const e="left"===getSide(n),t=l(...d.map((e=>e.right))),i=r(...d.map((e=>e.left))),o=d.filter((n=>e?n.left===i:n.right===t)),s=o[0].top,c=o[o.length-1].bottom,a=i,f=t,g=f-a,u=c-s;return{top:s,bottom:c,left:a,right:f,width:g,height:u,x:a,y:s}}return m}const h=await s.getElementRects({reference:{getBoundingClientRect},floating:i.floating,strategy:c});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}};async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:o}=e,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),l=getSide(n),s=getAlignment(n),c="y"===getSideAxis(n),a=["left","top"].includes(l)?-1:1,f=r&&c?-1:1,g=evaluate(t,e);let{mainAxis:u,crossAxis:d,alignmentAxis:m}="number"===typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&"number"===typeof m&&(d="end"===s?-1*m:m),c?{x:d*f,y:u*a}:{x:u*a,y:d*f}}const offset=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:r,placement:l,middlewareData:s}=t,c=await convertValueToCoords(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:o+c.x,y:r+c.y,data:{...c,placement:l}}}}},shift=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=evaluate(e,t),a={x:n,y:i},f=await detectOverflow(t,c),g=getSideAxis(getSide(o)),u=getOppositeAxis(g);let d=a[u],m=a[g];if(r){const e="y"===u?"top":"left",t="y"===u?"bottom":"right",n=d+f[e],i=d-f[t];d=clamp(n,d,i)}if(l){const e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=m+f[e],i=m-f[t];m=clamp(n,m,i)}const p=s.fn({...t,[u]:d,[g]:m});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[u]:r,[g]:l}}}}}},limitShift=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:c=!0,crossAxis:a=!0}=evaluate(e,t),f={x:n,y:i},g=getSideAxis(o),u=getOppositeAxis(g);let d=f[u],m=f[g];const p=evaluate(s,t),h="number"===typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const e="y"===u?"height":"width",t=r.reference[u]-r.floating[e]+h.mainAxis,n=r.reference[u]+r.reference[e]-h.mainAxis;d<t?d=t:d>n&&(d=n)}if(a){var w,y;const e="y"===u?"width":"height",t=["top","left"].includes(getSide(o)),n=r.reference[g]-r.floating[e]+(t&&(null==(w=l.offset)?void 0:w[g])||0)+(t?0:h.crossAxis),i=r.reference[g]+r.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[g])||0)-(t?h.crossAxis:0);m<n?m=n:m>i&&(m=i)}return{[u]:d,[g]:m}}}},size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:s,platform:c,elements:a}=t,{apply:f=()=>{},...g}=evaluate(e,t),u=await detectOverflow(t,g),d=getSide(o),m=getAlignment(o),p="y"===getSideAxis(o),{width:h,height:w}=s.floating;let y,v;"top"===d||"bottom"===d?(y=d,v=m===(await(null==c.isRTL?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y="end"===m?"top":"bottom");const x=w-u.top-u.bottom,b=h-u.left-u.right,A=r(w-u[y],x),R=r(h-u[v],b),O=!t.middlewareData.shift;let S=A,T=R;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=b),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(S=x),O&&!m){const e=l(u.left,0),t=l(u.right,0),n=l(u.top,0),i=l(u.bottom,0);p?T=h-2*(0!==e||0!==t?e+t:l(u.left,u.right)):S=w-2*(0!==n||0!==i?n+i:l(u.top,u.bottom))}await f({...t,availableWidth:T,availableHeight:S});const E=await c.getDimensions(a.floating);return h!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return"undefined"!==typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"===typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=getComputedStyle(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function getContainingBlock(e){let t=getParentNode(e);while(isHTMLElement(t)&&!isLastTraversableNode(t)){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=getNearestOverflowAncestor(e),r=o===(null==(i=e.ownerDocument)?void 0:i.body),l=getWindow(o);if(r){const e=getFrameElement(l);return t.concat(l,l.visualViewport||[],isOverflowElement(o)?o:[],e&&n?getOverflowAncestors(e):[])}return t.concat(o,getOverflowAncestors(o,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=isHTMLElement(e),r=o?e.offsetWidth:n,l=o?e.offsetHeight:i,c=s(n)!==r||s(i)!==l;return c&&(n=r,i=l),{width:n,height:i,$:c}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:r}=getCssDimensions(t);let l=(r?s(n.width):n.width)/i,c=(r?s(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const g=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:g}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==getWindow(e))&&t}function getBoundingClientRect(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),r=unwrapElement(e);let l=createCoords(1);t&&(i?isElement(i)&&(l=getScale(i)):l=getScale(e));const s=shouldAddVisualOffsets(r,n,i)?getVisualOffsets(r):createCoords(0);let c=(o.left+s.x)/l.x,a=(o.top+s.y)/l.y,f=o.width/l.x,g=o.height/l.y;if(r){const e=getWindow(r),t=i&&isElement(i)?getWindow(i):i;let n=e,o=getFrameElement(n);while(o&&i&&t!==n){const e=getScale(o),t=o.getBoundingClientRect(),i=getComputedStyle(o),r=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;c*=e.x,a*=e.y,f*=e.x,g*=e.y,c+=r,a+=l,n=getWindow(o),o=getFrameElement(n)}}return rectToClientRect({width:f,height:g,x:c,y:a})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,i)),r=i.top+t.scrollTop;return{x:o,y:r}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const r="fixed"===o,l=getDocumentElement(i),s=!!t&&isTopLayer(t.floating);if(i===l||s&&r)return n;let c={scrollLeft:0,scrollTop:0},a=createCoords(1);const f=createCoords(0),g=isHTMLElement(i);if((g||!g&&!r)&&(("body"!==getNodeName(i)||isOverflowElement(l))&&(c=getNodeScroll(i)),isHTMLElement(i))){const e=getBoundingClientRect(i);a=getScale(i),f.x=e.x+i.clientLeft,f.y=e.y+i.clientTop}const u=!l||g||r?createCoords(0):getHTMLOffset(l,c,!0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+f.x+u.x,y:n.y*a.y-c.scrollTop*a.y+f.y+u.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=l(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+getWindowScrollBarX(e);const c=-n.scrollTop;return"rtl"===getComputedStyle(i).direction&&(s+=l(t.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport;let r=i.clientWidth,l=i.clientHeight,s=0,c=0;if(o){r=o.width,l=o.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:r,height:l,x:s,y:c}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),i=n.top+e.clientTop,o=n.left+e.clientLeft,r=isHTMLElement(e)?getScale(e):createCoords(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,c=o*r.x,a=i*r.y;return{width:l,height:s,x:c,y:a}}function getClientRectFromClippingAncestor(e,t,n){let i;if("viewport"===t)i=getViewportRect(e,n);else if("document"===t)i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return!(n===t||!isElement(n)||isLastTraversableNode(n))&&("fixed"===getComputedStyle(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter((e=>isElement(e)&&"body"!==getNodeName(e))),o=null;const r="fixed"===getComputedStyle(e).position;let l=r?getParentNode(e):e;while(isElement(l)&&!isLastTraversableNode(l)){const t=getComputedStyle(l),n=isContainingBlock(l);n||"fixed"!==t.position||(o=null);const s=r?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(l)&&!n&&hasFixedPositionAncestor(e,l);s?i=i.filter((e=>e!==l)):o=t,l=getParentNode(l)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const s="clippingAncestors"===n?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),c=[...s,i],a=c[0],f=c.reduce(((e,n)=>{const i=getClientRectFromClippingAncestor(t,n,o);return e.top=l(i.top,e.top),e.right=r(i.right,e.right),e.bottom=r(i.bottom,e.bottom),e.left=l(i.left,e.left),e}),getClientRectFromClippingAncestor(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement(t),o=getDocumentElement(t),r="fixed"===n,l=getBoundingClientRect(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const c=createCoords(0);function setLeftRTLScrollbarOffset(){c.x=getWindowScrollBarX(o)}if(i||!i&&!r)if(("body"!==getNodeName(t)||isOverflowElement(o))&&(s=getNodeScroll(t)),i){const e=getBoundingClientRect(t,!0,r,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&setLeftRTLScrollbarOffset();r&&!i&&o&&setLeftRTLScrollbarOffset();const a=!o||i||r?createCoords(0):getHTMLOffset(o,s),f=l.left+s.scrollLeft-c.x-a.x,g=l.top+s.scrollTop-c.y-a.y;return{x:f,y:g,width:l.width,height:l.height}}function isStaticPositioned(e){return"static"===getComputedStyle(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle(e).position)return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement(e)){let t=getParentNode(e);while(t&&!isLastTraversableNode(t)){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return n}let i=getTrueOffsetParent(e,t);while(i&&isTableElement(i)&&isStaticPositioned(i))i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return"rtl"===getComputedStyle(e).direction}const u={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n,i=null;const o=getDocumentElement(e);function cleanup(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}function refresh(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),cleanup();const f=e.getBoundingClientRect(),{left:g,top:u,width:d,height:m}=f;if(s||t(),!d||!m)return;const p=c(u),h=c(o.clientWidth-(g+d)),w=c(o.clientHeight-(u+m)),y=c(g),v=-p+"px "+-h+"px "+-w+"px "+-y+"px",x={rootMargin:v,threshold:l(0,r(1,a))||1};let b=!0;function handleObserve(t){const i=t[0].intersectionRatio;if(i!==a){if(!b)return refresh();i?refresh(!1,i):n=setTimeout((()=>{refresh(!1,1e-7)}),1e3)}1!==i||rectsAreEqual(f,e.getBoundingClientRect())||refresh(),b=!1}try{i=new IntersectionObserver(handleObserve,{...x,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(handleObserve,x)}i.observe(e)}return refresh(!0),cleanup}function autoUpdate(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:l="function"===typeof ResizeObserver,layoutShift:s="function"===typeof IntersectionObserver,animationFrame:c=!1}=i,a=unwrapElement(e),f=o||r?[...a?getOverflowAncestors(a):[],...getOverflowAncestors(t)]:[];f.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)}));const g=a&&s?observeMove(a,n):null;let u,d=-1,m=null;l&&(m=new ResizeObserver((e=>{let[i]=e;i&&i.target===a&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),a&&!c&&m.observe(a),m.observe(t));let p=c?getBoundingClientRect(e):null;function frameLoop(){const t=getBoundingClientRect(e);p&&!rectsAreEqual(p,t)&&n(),p=t,u=requestAnimationFrame(frameLoop)}return c&&frameLoop(),n(),()=>{var e;f.forEach((e=>{o&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)})),null==g||g(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(u)}}const d=detectOverflow,m=offset,p=autoPlacement,h=shift,w=flip,y=size,v=hide,x=arrow,b=inline,A=limitShift,floating_ui_dom_esm_computePosition=(e,t,n)=>{const i=new Map,o={platform:u,...n},r={...o.platform,_c:i};return computePosition(e,t,{...o,platform:r})};return t})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldmjs/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "ldm ui",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@babel/plugin-transform-typescript": "7.23.6",
|
|
42
42
|
"@babel/preset-env": "7.23.6",
|
|
43
43
|
"@babel/preset-typescript": "7.23.3",
|
|
44
|
-
"@floating-ui/dom": "1.
|
|
44
|
+
"@floating-ui/dom": "1.7.0",
|
|
45
45
|
"@ldmjs/datatable": "1.0.9",
|
|
46
46
|
"@ldmjs/editor": "1.0.1",
|
|
47
47
|
"@ldmjs/treeview": "1.0.1",
|