Files
aiot-platform-ui/apps/web-antd/dist/js/index-qltWhftP.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-03-23 17:45:01 +08:00
import{d as ve,e as X,S as ie,f as he,g as xe,P as j,_ as c,t as be,i as re,o as se,h as Q,B as Se,j as k,K as I,k as ye,l as Ce,m as we,n as Pe,r as J,p as Ie,q as Oe,s as Fe,v as Te,w as Me,x as Ee,y as $e,z as Ne,A as je,F as Be,C as Ae,E as Z,G as Le,H as Re}from"./bootstrap-DhvYQWXT.js";import{m as H,aE as De,bl as V,aW as ze,j as h,aa as B,b9 as Y,b7 as _e,bF as He,b4 as We,bs as ee,Q as Ke,n as Ve,w as Ue}from"../jse/index-index-rerQU-kO.js";function ke(e){const{selectionStart:a}=e;return e.value.slice(0,a)}function Xe(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(a)?a:[a]).reduce((t,i)=>{const p=e.lastIndexOf(i);return p>t.location?{location:p,prefix:i}:t},{location:-1,prefix:""})}function te(e){return(e||"").toLowerCase()}function Ye(e,a,n){const t=e[0];if(!t||t===n)return e;let i=e;const p=a.length;for(let r=0;r<p;r+=1)if(te(i[r])!==te(a[r])){i=i.slice(r);break}else r===p-1&&(i=i.slice(p));return i}function Ge(e,a){const{measureLocation:n,prefix:t,targetText:i,selectionStart:p,split:r}=a;let l=e.slice(0,n);l[l.length-r.length]===r&&(l=l.slice(0,l.length-r.length)),l&&(l=`${l}${r}`);let d=Ye(e.slice(p),i.slice(p-n-t.length),r);d.slice(0,r.length)===r&&(d=d.slice(r.length));const u=`${l}${t}${i}${r}`;return{text:`${u}${d}`,selectionLocation:u.length}}function qe(e,a){e.setSelectionRange(a,a),e.blur(),e.focus()}function Qe(e,a){const{split:n}=a;return!n||e.indexOf(n)===-1}function Je(e,a){let{value:n=""}=a;const t=e.toLowerCase();return n.toLowerCase().indexOf(t)!==-1}const le=Symbol("MentionsContextKey");function Ze(){}const et=H({compatConfig:{MODE:3},name:"DropdownMenu",props:{prefixCls:String,options:{type:Array,default:()=>[]}},setup(e,a){let{slots:n}=a;const{activeIndex:t,setActiveIndex:i,selectOption:p,onFocus:r=Ze,loading:l}=De(le,{activeIndex:V(),loading:V(!1)});let d;const u=b=>{clearTimeout(d),d=setTimeout(()=>{r(b)})};return ze(()=>{clearTimeout(d)}),()=>{var b;const{prefixCls:O,options:S}=e,m=S[t.value]||{};return h(ve,{prefixCls:`${O}-menu`,activeKey:m.value,onSelect:x=>{let{key:y}=x;const C=S.find(w=>{let{value:F}=w;return F===y});p(C)},onMousedown:u},{default:()=>[!l.value&&S.map((x,y)=>{var C,w;const{value:F,disabled:A,label:T=x.value,class:L,style:W}=x;return h(X,{key:F,disabled:A,onMouseenter:()=>{i(y)},class:L,style:W},{default:()=>[(w=(C=n.option)===null||C===void 0?void 0:C.call(n,x))!==null&&w!==void 0?w:typeof T=="function"?T(x):T]})}),!l.value&&S.length===0?h(X,{key:"notFoundContent",disabled:!0},{default:()=>[(b=n.notFoundContent)===null||b===void 0?void 0:b.call(n)]}):null,l.value&&h(X,{key:"loading",disabled:!0},{default:()=>[h(ie,{size:"small"},null)]})]})}}}),tt={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},nt=H({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(e,a){let{slots:n}=a;const t=()=>`${e.prefixCls}-dropdown`,i=()=>{const{options:r}=e;return h(et,{prefixCls:t(),options:r},{notFoundContent:n.notFoundContent,option:n.option})},p=B(()=>{const{placement:r,direction:l}=e;let d="topRight";return l==="rtl"?d=r==="top"?"topLeft":"bottomLeft":d=r==="top"?"topRight":"bottomRight",d});return()=>{const{visible:r,transitionName:l,getPopupContainer:d}=e;return h(he,{prefixCls:t(),popupVisible:r,popup:i(),popupClassName:e.dropdownClassName,popupPlacement:p.value,popupTransitionName:l,builtinPlacements:tt,getPopupContainer:d},{default:n.default})}}}),ot=be("top","bottom"),ue={autofocus:{type:Boolean,default:void 0},prefix:j.oneOfType([j.string,j.arrayOf(j.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitio