zhihao-ui 1.3.62 → 1.3.63
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/es/{DiyDataTable-Bt-ZrRFy.js → DiyDataTable-BzNrVInw.js} +114 -114
- package/dist/es/index.js +2 -2
- package/dist/index.css +1 -1
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +1 -1
- package/dist/types/components/DiyDataTable/index.d.ts +3 -3
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -70,7 +70,7 @@ be.version="2.30.1",QV(Pt),be.fn=he,be.min=z6,be.max=W6,be.now=Y6,be.utc=yi,be.u
|
|
|
70
70
|
<clipPath id="clip0_94_5585">
|
|
71
71
|
<rect width="64" height="64" fill="white"/>
|
|
72
72
|
</clipPath>
|
|
73
|
-
</defs>`,Mz=()=>{let t=i.reactive({});return{gridItemData:t,registerGridItem:(o,s)=>{var l;if(!s)return;t[o]||(t[o]={labels:[],maxLength:0,maxWidth:0}),(l=t[o])==null||l.labels.push(s),t[o].maxLength=Math.max(s.length,t[o].maxLength);const a=Math.ceil(ws(s,14));t[o].maxWidth=Math.max(a||0,t[o].maxWidth)},getColumnData:o=>t[o]||{},clearGridItemData:()=>{t=i.reactive({})}}},Rz={class:"multi-grid"},Dz=i.defineComponent({name:"MultiGrid",__name:"MultiGrid",setup(t){const{getColumnData:e,registerGridItem:n,clearGridItemData:r,gridItemData:o}=Mz();return i.provide("registerGridItem",n),i.provide("getColumnData",e),i.provide("clearGridItemData",r),i.provide("gridItemData",o),i.provide("isMultiGrid",i.ref(!0)),(s,a)=>(i.openBlock(),i.createElementBlock("div",Rz,[i.renderSlot(s.$slots,"default")]))}}),aE=Mt(iE),Lm=Mt(Cz),lE=Mt(Dz),Pz={class:"info-pair"},Iz={class:"info-pair--title"},Nz={key:0,class:"info-pair--title--tip"},cE=Mt($t(i.defineComponent({name:"zh-info-pair",__name:"InfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",Pz,[i.createElementVNode("div",Iz,[i.createTextVNode(i.toDisplayString(e.title)+" ",1),n.tip?(i.openBlock(),i.createElementBlock("div",Nz,i.toDisplayString(n.tip),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",{class:i.normalizeClass(["info-pair--value",{ellipsis:n.ellipsis}])},[i.renderSlot(n.$slots,"value",{},()=>[i.createTextVNode(i.toDisplayString(e.value||i.unref(Ut)),1)],!0)],2)]))}}),[["__scopeId","data-v-5a1b0655"]])),dE=Mt($t(i.defineComponent({name:"zh-input",__name:"Input",props:i.mergeModels({style:{},class:{default:"zh-default-input"},size:{default:"default"},className:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=i.useAttrs(),n=t,r=i.useModel(t,"modelValue"),o=()=>{(e.max||Number(e.max)===0)&&Number(r.value)>=e.max&&(r.value=e.max.toString()),(e.min||Number(e.min)===0)&&Number(r.value)<=e.min&&(r.value=e.min.toString())};return(s,a)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(n.class)},[i.createVNode(i.unref(Pn),i.mergeProps(s.$attrs,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),size:s.size,onBlur:o}),i.createSlots({_:2},[i.renderList(s.$slots,(l,c)=>({name:l,fn:i.withCtx(d=>[i.renderSlot(s.$slots,l,i.normalizeProps(i.guardReactiveProps(d)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),[["__scopeId","data-v-ce1df798"]])),uE=$t(i.defineComponent({name:"zh-input-number",__name:"InputNumber",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,r=e,o=i.useAttrs(),s=(u,f=0,h=0,g=0)=>{let p=(u==null?void 0:u.toString())??"",y,m,b;return h===0?(p=p.replace(/[^\d]/g,""),p=p.replace(/^0\d+/g,"0"),f!==0&&(p=p.slice(0,f))):(p=p.replace(/[^\-\d.]/g,""),p=p.replace(/^[^\-\d]/g,""),p=p.replace(/\.{2}/g,"."),p=p.replace(/^0(\d+)/g,"$1"),y=p.split(".")||[],y.length>1?(f===0?m=y[0]:m=y[0].slice(0,f),b=y[1].slice(0,h),p=m+"."+b):f!==0&&(p=p.slice(0,f))),g!==0&&(p=p.slice(0,g)),p},a=()=>{n.modelValue===""||n.modelValue===void 0||(o.max&&Number(n.modelValue)>o.max&&r("update:modelValue",o.max.toString()),o.min&&Number(n.modelValue)<o.min&&r("update:modelValue",o.min.toString()))},l=u=>u?s(u,o.integer,o.precision,o.maxLength):"",c=u=>{/^\d+\.0*$/.test((u==null?void 0:u.toString())||"")||u===""?r("update:modelValue",l(u)):r("update:modelValue",Number(l(u)))},d=u=>{r("change",l(u))};return(u,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["input-number",n.class]),style:i.normalizeStyle(n.style)},[i.createVNode(i.unref(Pn),i.mergeProps(u.$attrs,{"model-value":n.modelValue,"onUpdate:modelValue":c,onBlur:a,style:{width:"100%"},formatter:l,onChange:d}),i.createSlots({_:2},[i.renderList(Object.keys(u.$slots),h=>({name:h,fn:i.withCtx(g=>[i.renderSlot(u.$slots,h,i.normalizeProps(i.guardReactiveProps(g)),void 0,!0)])}))]),1040,["model-value"])],6))}}),[["__scopeId","data-v-17c3b6e2"]]),fE=Mt(uE),Oz={class:"loading-box"},hE=Mt($t(i.defineComponent({name:"zh-loading",__name:"Loading",setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",Oz,n[0]||(n[0]=[i.createElementVNode("div",{class:"loading-wrap"},[i.createElementVNode("span",{class:"dot dot-spin"},[i.createElementVNode("i"),i.createElementVNode("i"),i.createElementVNode("i"),i.createElementVNode("i")])],-1)])))}}),[["__scopeId","data-v-d30f17c3"]])),Am={type:"",showCancelButton:!0,showConfirmButton:!0,cancelButtonText:"取消",confirmButtonText:"确定",closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!0,draggable:!1,center:!1,roundButton:!1},vu={confirm(t,e,n={}){return Qp.confirm(t,e,{...Am,customClass:"zh-message-box zh-message-confirm",...n})},alert(t,e,n={}){return Qp.alert(t,e,{...Am,...n,showCancelButton:!1,customClass:"zh-message-box zh-message-alert"})},prompt(t,e,n={}){return Qp.prompt(t,e,{...Am,...n,customClass:"zh-message-box zh-message-prompt"})}},pE=vu.confirm,mE=vu.alert,gE=vu.prompt,yE=Mt(vu),_E=Mt($t(i.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:i.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=i.useModel(t,"modelValue"),r=i.computed(()=>{if(n.value)return nz(n.value)&&Number(n.value)>=1e3?rz(Number(n.value)):""}),o=i.ref(!1);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(sr),{effect:"dark",content:r.value,placement:"top",visible:s.showTooltip&&o.value&&!!r.value},{default:i.withCtx(()=>[i.createVNode(uE,i.mergeProps(s.$attrs,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),style:e.style,class:e.class,onFocus:a[1]||(a[1]=()=>o.value=!0),onBlur:a[2]||(a[2]=()=>o.value=!1)}),i.createSlots({_:2},[i.renderList(Object.keys(s.$slots),l=>({name:l,fn:i.withCtx(c=>[i.renderSlot(s.$slots,l,i.normalizeProps(i.guardReactiveProps(c)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),[["__scopeId","data-v-cfd94d9e"]])),Lz={class:"page-head"},Az={class:"left-wrap"},Fz={class:"page-name"},Bz={class:"value"},Vz={class:"other-inform"},$z={class:"label"},zz={class:"value mg-r-24"},Wz={class:"status"},Yz=Mt($t(i.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(t){const e=t,{name:n,no:r,status:o,extendLabel:s,extendValue:a}=i.toRefs(e.dataSource);return(l,c)=>(i.openBlock(),i.createElementBlock("div",Lz,[i.createElementVNode("div",Az,[i.createElementVNode("span",Fz,i.toDisplayString(i.unref(n)),1),i.createElementVNode("div",null,[c[0]||(c[0]=i.createElementVNode("span",{class:"label mg-l-16"},"编号",-1)),i.createElementVNode("span",Bz,i.toDisplayString(i.unref(r)),1)])]),i.createElementVNode("div",Vz,[i.renderSlot(l.$slots,"extend",{},()=>[i.createElementVNode("span",$z,i.toDisplayString(i.unref(s)),1),i.createElementVNode("span",zz,i.toDisplayString(i.unref(a)),1)],!0),i.createElementVNode("span",Wz,i.toDisplayString(i.unref(o)),1)])]))}}),[["__scopeId","data-v-9f56969d"]])),bE=Mt($t(i.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{default:"top"},content:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(sr),{class:"box-item",effect:"dark",content:e.content,placement:e.placement},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},()=>[r[0]||(r[0]=i.createElementVNode("i",{class:"iconfont icon-Frame2"},null,-1))],!0)]),_:3},8,["content","placement"]))}}),[["__scopeId","data-v-e5a0ae09"]])),wE=Mt(i.defineComponent({name:"ZhBaseInfo",__name:"BaseInfo",props:{contentWidth:{default:void 0},labelWidth:{default:"70px"},infoDirection:{default:"horizontal"},cols:{default:4},gap:{default:16}},setup(t){const e=t,n=i.ref(),r=i.ref(),o=i.ref();i.provide("infoLabelWidth",n),i.provide("infoContentWidth",r),i.provide("infoDirection",o);function s(){n.value=e.labelWidth}function a(){r.value=e.contentWidth}function l(){o.value=e.infoDirection}return i.watch(()=>e.contentWidth,()=>a(),{immediate:!0}),i.watch(()=>e.labelWidth,()=>s(),{immediate:!0}),i.watch(()=>e.infoDirection,()=>l(),{immediate:!0}),(c,d)=>(i.openBlock(),i.createBlock(iE,{cols:c.cols,gap:c.gap},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default")]),_:3},8,["cols","gap"]))}})),Gz={class:"common-card"},jz={class:"detail-header"},Hz={class:"detail-header--left"},Uz={class:"title common-title"},Kz={class:"info-pair--label"},Xz={class:"info-pair--value"},Zz={key:1,class:"detail-header--right"},qz={class:"info-pair--label"},Jz={class:"info-pair--value"},CE=Mt($t(i.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{},stateDesc:{}},setup(t){const e=i.useSlots(),n=t;return(r,o)=>{var s,a;return i.openBlock(),i.createElementBlock("div",Gz,[i.createElementVNode("div",null,[i.renderSlot(r.$slots,"menu",{},void 0,!0)]),i.createElementVNode("div",jz,[i.createElementVNode("div",Hz,[i.createElementVNode("div",Uz,i.toDisplayString(n.title),1),i.renderSlot(r.$slots,"extra-info",{},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.leftInfos,l=>(i.openBlock(),i.createElementBlock("div",{class:"info-pair",key:l.value},[i.createElementVNode("div",Kz,i.toDisplayString(l.label),1),i.createElementVNode("div",Xz,i.toDisplayString(l.value??i.unref(Ut)),1)]))),128))]),i.renderSlot(r.$slots,"default",{},void 0,!0),i.unref(e)["right-infos"]?i.renderSlot(r.$slots,"right-infos",{key:0},void 0,!0):(i.openBlock(),i.createElementBlock("div",Zz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.rightInfos,l=>(i.openBlock(),i.createElementBlock("div",{class:"info-pair",key:l.value},[i.createElementVNode("div",qz,i.toDisplayString(l.label),1),i.createElementVNode("div",Jz,i.toDisplayString(l.value??i.unref(Ut)),1)]))),128)),r.stateDesc||r.stateMeta?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["state common-title",(s=r.stateMeta)==null?void 0:s.state])},i.toDisplayString(r.stateDesc||((a=r.stateMeta)==null?void 0:a.intro)),3)):i.createCommentVNode("",!0)]))])])}}}),[["__scopeId","data-v-8b185816"]]));var Ci=(t=>(t.AUTOCOMPLETE="autocomplete",t.FORMAT="format",t.TEXT="text",t.INDEX="index",t))(Ci||{});const Qz={key:0},e9={key:1,class:"col-edit-header"},t9=["onClick"],n9={key:0},r9={class:"header-operation-container"},i9={class:"operation-container"},o9=["onClick"],EE="$ZH_DIV$",SE=Mt($t(i.defineComponent({name:"zh-diy-data-table",__name:"DiyDataTable",props:i.mergeModels({isEdit:{type:Boolean,default:!1},maxRowLength:{default:50},maxColLength:{default:10},defaultMinWidth:{default:120},beforeAddRow:{},addRowText:{default:"增行"},addColumnText:{default:"增列"},customAddRow:{type:Boolean,default:!0},customAddColumn:{type:Boolean,default:!0},operationOption:{},canOnlyEditNewlyColumnHeader:{type:Boolean,default:!1}},{rawData:{required:!0},rawDataModifiers:{}}),emits:["update:rawData"],setup(t,{expose:e}){const n=t,r=i.useModel(t,"rawData"),o=i.ref([]),s=i.ref({isShow:!0,width:150,customAddRow:!0,addRowText:"增行",customAddColumn:!0,addColumnText:"增列"}),a=i.computed(()=>n.operationOption?{...s.value,...n.operationOption||{}}:{...s.value,customAddRow:n.customAddRow!==void 0?n.customAddRow:s.value.customAddRow,addRowText:n.addRowText!==void 0?n.addRowText:s.value.addRowText,customAddColumn:n.customAddColumn!==void 0?n.customAddColumn:s.value.customAddColumn,addColumnText:n.addColumnText!==void 0?n.addColumnText:s.value.addColumnText}),l=()=>{if(r.value.length===n.maxRowLength){nu({message:`最多添加${n.maxRowLength}行`,type:"warning"});return}let b={};n.beforeAddRow&&(b=n.beforeAddRow(r.value)),r.value.push(b)},c=()=>{if(o.value.filter(w=>w.isAdd).length>=n.maxColLength){nu({message:`最多添加${n.maxColLength}列`,type:"warning"});return}const E=String(Date.now());o.value.push({prop:E,label:"",isEditHeader:!0,isAdd:!0,maxlength:15,minWidth:150,headerMaxlength:15,isNewlyColumn:!0})},d=(b,E)=>{o.value.splice(b,1),r.value.forEach(w=>{delete w[E.prop]})},u=b=>{b===0&&o.value.forEach(E=>{E.isSameData&&(r.value[1][E.prop]=r.value[0][E.prop])}),r.value.splice(b,1)},f=(b,E,w)=>{E(w.completeList.filter(_=>_.includes(b)).map(_=>({value:_})))},h=b=>[{validator:(E,w,_)=>{if(!o.value[b].label){_(new Error("请输入表头"));return}_()},message:"请输入表头",trigger:["blur","change"]}],g=(b,E,w)=>{const _=[];return b.required&&_.push({required:!0,message:b.requiredMessage||b.label+"不能为空",trigger:b.slot?void 0:"blur"}),b.varidate&&_.push({validator:(C,S,k)=>{const v=b.varidate(S,E,w);v!==!0?k(new Error(v)):k()}}),_},p=(b,E)=>{let w=b;return E.isSameData&&(w=r.value[0]||Ut),E.formatter?E.showFormatter?E.type===Ci.FORMAT?E.showFormatter(E.formatter(w)):E.showFormatter(w[E.prop]):E.formatter(w[E.prop]):w[E.prop]||Ut},y=i.ref(),m=i.ref({width:132,type:Ci.INDEX,prop:"index",label:"序号",fixed:"left",isShow:!0});return e({initData:(b,E)=>{const w=(E||[]).find(_=>_.type===Ci.INDEX)||null;w&&(m.value={...w,isShow:w.isShow!==!1}),b=Mn(b)||[],b.length===0&&b.push({}),E=[...E.filter(_=>_.type!==Ci.INDEX)],console.log("initData",b,E);for(const _ in b[0])if(!E.some(C=>C.prop===_)){const C=Date.now()+_,S=_.split(EE);if(S.length!==2){console.log("keySplit 失败",_);continue}const k=Number(S[1]);E[k]={prop:_,isEditHeader:!0,label:S[0],key:C,isAdd:!0,maxlength:15,headerMaxlength:15,isNewlyColumn:!1}}r.value=b,o.value=E.filter(_=>_)},getData:async()=>{await y.value.validate();for(const E in o.value){const w=o.value[E];for(const _ of o.value)if(w.prop!==_.prop&&w.label===_.label){nu({message:"所有列的表头不可重复",type:"warning"});return}}const b=Mn(r.value);for(const E in b){const w=b[E];for(const _ in o.value){const C=o.value[_];if(C.isSameData&&E!=="0"&&(w[C.prop]=b[0][C.prop]),C.varidate&&!C.varidate(w[C.prop],w,E))return;if(C.isAdd){const S=w[C.prop];delete w[C.prop];const k=C.label+EE+_;w[k]=S}C.formatter&&C.type===Ci.FORMAT&&(w[C.prop]=C.formatter(w))}}return{data:b,columns:o.value}},updateColumn:(b,E)=>{const w=o.value[b].prop;if(o.value[b]=E,w!==E.prop)for(const _ of r.value)_[E.prop]=_[w],delete _[w]},resetColumns:b=>{const w=o.value.filter(C=>!C.isAdd).reduce((C,S)=>(b.some(k=>k.prop===S.prop)||C.push(S.prop),C),[]);r.value.forEach(C=>{w.forEach(S=>{delete C[S]})});const _=b.filter(C=>C.isAdd);o.value=[...b,..._]},onAddRow:l,onAddColumn:c,formRef:y,getColumns:()=>o.value}),(b,E)=>(i.openBlock(),i.createBlock(i.unref(Wb),{class:"diy-data-table",model:t.rawData,ref_key:"formRef",ref:y},{default:i.withCtx(()=>[i.createVNode(i.unref(Jp),i.mergeProps({data:r.value},b.$attrs),{default:i.withCtx(()=>[m.value.isShow?(i.openBlock(),i.createBlock(i.unref(Io),{key:0,type:m.value.type,label:m.value.label,width:m.value.width,minWidth:m.value.minWidth,fixed:m.value.fixed},null,8,["type","label","width","minWidth","fixed"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(w,_)=>(i.openBlock(),i.createBlock(i.unref(Io),{key:w.key||_,prop:w.prop,label:w.label,width:w.width,"min-width":w.minWidth||b.defaultMinWidth,fixed:w.fixed},{header:i.withCtx(()=>[b.isEdit?w.isEditHeader&&b.canOnlyEditNewlyColumnHeader&&w.isNewlyColumn||w.isEditHeader&&!b.canOnlyEditNewlyColumnHeader?(i.openBlock(),i.createElementBlock("div",e9,[i.createVNode(i.unref(qh),{prop:`columns.${_}`,rules:h(_)},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{modelValue:w.label,"onUpdate:modelValue":C=>w.label=C,maxlength:w.headerMaxlength||20,placeholder:"请输入表头"},null,8,["modelValue","onUpdate:modelValue","maxlength"])]),_:2},1032,["prop","rules"]),w.isAdd?(i.openBlock(),i.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:C=>d(_,w)},null,8,t9)):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass({"is-required-label":w.required})},i.toDisplayString(w.label),3)):(i.openBlock(),i.createElementBlock("div",Qz,i.toDisplayString(w.label),1))]),default:i.withCtx(C=>[n.isEdit&&(!w.isSameData||C.$index===0)&&w.type!==i.unref(Ci).TEXT&&!C.row.disabled?(i.openBlock(),i.createBlock(i.unref(qh),{key:0,prop:`${C.$index}.${w.prop}`,rules:g(w,C.row,C.$index),class:i.normalizeClass(["col-edit-container",{"close-padding":w.isAdd}])},{default:i.withCtx(()=>[w.type===i.unref(Ci).FORMAT&&w.formatter?(i.openBlock(),i.createElementBlock("div",n9,i.toDisplayString(w.showFormatter?w.showFormatter(w.formatter(C.row)):w.formatter(C.row)),1)):w.type===i.unref(Ci).AUTOCOMPLETE?(i.openBlock(),i.createBlock(i.unref(kL),{key:1,modelValue:C.row[w.prop],"onUpdate:modelValue":S=>C.row[w.prop]=S,placeholder:w.placeholder||"请输入","fetch-suggestions":(S,k)=>f(S,k,w),maxlength:w.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","fetch-suggestions","maxlength"])):w.slot?i.renderSlot(b.$slots,w.slot,{key:2,row:C.row,$index:C.$index},void 0,!0):(i.openBlock(),i.createBlock(i.unref(Pn),{key:3,modelValue:C.row[w.prop],"onUpdate:modelValue":S=>C.row[w.prop]=S,placeholder:w.placeholder||"请输入",formatter:w.formatter,parser:w.parser,maxlength:w.maxlength||20,"show-word-limit":w.showWordLimit},null,8,["modelValue","onUpdate:modelValue","placeholder","formatter","parser","maxlength","show-word-limit"]))]),_:2},1032,["prop","rules","class"])):w.slot?i.renderSlot(b.$slots,w.slot,{key:1,row:C.row,$index:C.$index},void 0,!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(p(C.row,w)),1)],64))]),_:2},1032,["prop","label","width","min-width","fixed"]))),128)),n.isEdit&&a.value.isShow?(i.openBlock(),i.createBlock(i.unref(Io),{key:1,width:a.value.width,fixed:"right"},{header:i.withCtx(()=>[i.createElementVNode("div",r9,[a.value.customAddRow?(i.openBlock(),i.createBlock(i.unref(lr),{key:0,type:"primary",link:"",onClick:l},{default:i.withCtx(()=>[E[0]||(E[0]=i.createElementVNode("i",{class:"iconfont icon-Frame1"},null,-1)),i.createTextVNode(i.toDisplayString(a.value.addRowText),1)]),_:1})):i.createCommentVNode("",!0),a.value.customAddColumn?(i.openBlock(),i.createBlock(i.unref(lr),{key:1,type:"primary",link:"",onClick:c},{default:i.withCtx(()=>[E[1]||(E[1]=i.createElementVNode("i",{class:"iconfont icon-Frame-11"},null,-1)),i.createTextVNode(i.toDisplayString(a.value.addColumnText),1)]),_:1})):i.createCommentVNode("",!0)])]),default:i.withCtx(({$index:w,row:_})=>[i.createElementVNode("div",i9,[b.$slots.operation?i.renderSlot(b.$slots,"operation",{key:0,row:r.value[w],$index:w},void 0,!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.value.length>1&&!_.disabled?(i.openBlock(),i.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:C=>u(w)},null,8,o9)):i.createCommentVNode("",!0)],64))])]),_:3},8,["width"])):i.createCommentVNode("",!0)]),_:3},16,["data"])]),_:3},8,["model"]))}}),[["__scopeId","data-v-de69ead8"]])),xu="ol-hidden",s9="ol-selectable",ic="ol-unselectable",Fm="ol-control",kE="ol-collapsed",a9=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),vE=["style","variant","weight","size","lineHeight","family"],xE=function(t){const e=t.match(a9);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let r=0,o=vE.length;r<o;++r){const s=e[r+1];s!==void 0&&(n[vE[r]]=s)}return n.families=n.family.split(/,\s?/),n};function TE(...t){console.warn(...t)}const un={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Bm(t){const e=Tr();for(let n=0,r=t.length;n<r;++n)sc(e,t[n]);return e}function l9(t,e,n){const r=Math.min.apply(null,t),o=Math.min.apply(null,e),s=Math.max.apply(null,t),a=Math.max.apply(null,e);return Ei(r,o,s,a,n)}function Tu(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function ME(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Cs(t,e,n){let r,o;return e<t[0]?r=t[0]-e:t[2]<e?r=e-t[2]:r=0,n<t[1]?o=t[1]-n:t[3]<n?o=n-t[3]:o=0,r*r+o*o}function Es(t,e){return Vm(t,e[0],e[1])}function Ss(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Vm(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function $m(t,e){const n=t[0],r=t[1],o=t[2],s=t[3],a=e[0],l=e[1];let c=un.UNKNOWN;return a<n?c=c|un.LEFT:a>o&&(c=c|un.RIGHT),l<r?c=c|un.BELOW:l>s&&(c=c|un.ABOVE),c===un.UNKNOWN&&(c=un.INTERSECTING),c}function Tr(){return[1/0,1/0,-1/0,-1/0]}function Ei(t,e,n,r,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=r,o):[t,e,n,r]}function Ea(t){return Ei(1/0,1/0,-1/0,-1/0,t)}function RE(t,e){const n=t[0],r=t[1];return Ei(n,r,n,r,e)}function zm(t,e,n,r,o){const s=Ea(o);return PE(s,t,e,n,r)}function oc(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function DE(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function sc(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function PE(t,e,n,r,o){for(;n<r;n+=o)c9(t,e[n],e[n+1]);return t}function c9(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function Wm(t,e){let n;return n=e(Mu(t)),n||(n=e(Ru(t)),n)||(n=e(Du(t)),n)||(n=e(ks(t)),n)?n:!1}function Ym(t){let e=0;return vs(t)||(e=mt(t)*fn(t)),e}function Mu(t){return[t[0],t[1]]}function Ru(t){return[t[2],t[1]]}function Qi(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function d9(t,e){let n;if(e==="bottom-left")n=Mu(t);else if(e==="bottom-right")n=Ru(t);else if(e==="top-left")n=ks(t);else if(e==="top-right")n=Du(t);else throw new Error("Invalid corner");return n}function Gm(t,e,n,r,o){const[s,a,l,c,d,u,f,h]=IE(t,e,n,r);return Ei(Math.min(s,l,d,f),Math.min(a,c,u,h),Math.max(s,l,d,f),Math.max(a,c,u,h),o)}function IE(t,e,n,r){const o=e*r[0]/2,s=e*r[1]/2,a=Math.cos(n),l=Math.sin(n),c=o*a,d=o*l,u=s*a,f=s*l,h=t[0],g=t[1];return[h-c+f,g-d-u,h-c-f,g-d+u,h+c-f,g+d+u,h+c+f,g+d-u,h-c+f,g-d-u]}function fn(t){return t[3]-t[1]}function Fo(t,e,n){const r=n||Tr();return Sn(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):Ea(r),r}function ks(t){return[t[0],t[3]]}function Du(t){return[t[2],t[3]]}function mt(t){return t[2]-t[0]}function Sn(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function vs(t){return t[2]<t[0]||t[3]<t[1]}function u9(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function f9(t,e){const n=(t[2]-t[0])/2*(e-1),r=(t[3]-t[1])/2*(e-1);t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r}function h9(t,e,n){let r=!1;const o=$m(t,e),s=$m(t,n);if(o===un.INTERSECTING||s===un.INTERSECTING)r=!0;else{const a=t[0],l=t[1],c=t[2],d=t[3],u=e[0],f=e[1],h=n[0],g=n[1],p=(g-f)/(h-u);let y,m;s&un.ABOVE&&!(o&un.ABOVE)&&(y=h-(g-d)/p,r=y>=a&&y<=c),!r&&s&un.RIGHT&&!(o&un.RIGHT)&&(m=g-(h-c)*p,r=m>=l&&m<=d),!r&&s&un.BELOW&&!(o&un.BELOW)&&(y=h-(g-l)/p,r=y>=a&&y<=c),!r&&s&un.LEFT&&!(o&un.LEFT)&&(m=g-(h-a)*p,r=m>=l&&m<=d)}return r}function p9(t,e,n,r){if(vs(t))return Ea(n);let o=[];o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]],e(o,o,2);const s=[],a=[];for(let l=0,c=o.length;l<c;l+=2)s.push(o[l]),a.push(o[l+1]);return l9(s,a,n)}function NE(t,e){const n=e.getExtent(),r=Qi(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){const o=mt(n),a=Math.floor((r[0]-n[0])/o)*o;t[0]-=a,t[2]-=a}return t}function OE(t,e,n){if(e.canWrapX()){const r=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[r[0],t[1],r[2],t[3]]];NE(t,e);const o=mt(r);if(mt(t)>o&&!n)return[[r[0],t[1],r[2],t[3]]];if(t[0]<r[0])return[[t[0]+o,t[1],r[2],t[3]],[r[0],t[1],t[2],t[3]]];if(t[2]>r[2])return[[t[0],t[1],r[2],t[3]],[r[0],t[1],t[2]-o,t[3]]]}return[t]}function Ot(t,e,n){return Math.min(Math.max(t,e),n)}function m9(t,e,n,r,o,s){const a=o-n,l=s-r;if(a!==0||l!==0){const c=((t-n)*a+(e-r)*l)/(a*a+l*l);c>1?(n=o,r=s):c>0&&(n+=a*c,r+=l*c)}return eo(t,e,n,r)}function eo(t,e,n,r){const o=n-t,s=r-e;return o*o+s*s}function g9(t){const e=t.length;for(let r=0;r<e;r++){let o=r,s=Math.abs(t[r][r]);for(let l=r+1;l<e;l++){const c=Math.abs(t[l][r]);c>s&&(s=c,o=l)}if(s===0)return null;const a=t[o];t[o]=t[r],t[r]=a;for(let l=r+1;l<e;l++){const c=-t[l][r]/t[r][r];for(let d=r;d<e+1;d++)r==d?t[l][d]=0:t[l][d]+=c*t[r][d]}}const n=new Array(e);for(let r=e-1;r>=0;r--){n[r]=t[r][e]/t[r][r];for(let o=r-1;o>=0;o--)t[o][e]-=t[o][r]*n[r]}return n}function LE(t){return t*180/Math.PI}function ei(t){return t*Math.PI/180}function xs(t,e){const n=t%e;return n*e<0?n+e:n}function dr(t,e,n){return t+n*(e-t)}function ac(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Pu(t,e){return Math.floor(ac(t,e))}function Iu(t,e){return Math.ceil(ac(t,e))}function jm(t,e,n){if(t>=e&&t<n)return t;const r=n-e;return((t-e)%r+r)%r+e}function y9(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nu(t,e){let n=!0;for(let r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function Hm(t,e){const n=Math.cos(e),r=Math.sin(e),o=t[0]*n-t[1]*r,s=t[1]*n+t[0]*r;return t[0]=o,t[1]=s,t}function _9(t,e){return t[0]*=e,t[1]*=e,t}function AE(t,e){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function FE(t,e){return Math.sqrt(AE(t,e))}function BE(t,e){if(e.canWrapX()){const n=mt(e.getExtent()),r=b9(t,e,n);r&&(t[0]-=r*n)}return t}function b9(t,e,n){const r=e.getExtent();let o=0;return e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])&&(n=n||mt(r),o=Math.floor((t[0]-r[0])/n)),o}const Sa={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Um{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Sa[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const lc=6378137,ka=Math.PI*lc,w9=[-ka,-ka,ka,ka],C9=[-180,-85,180,85],Ou=lc*Math.log(Math.tan(Math.PI/2));class va extends Um{constructor(e){super({code:e,units:"m",extent:w9,global:!0,worldExtent:C9,getPointResolution:function(n,r){return n/Math.cosh(r[1]/lc)}})}}const VE=[new va("EPSG:3857"),new va("EPSG:102100"),new va("EPSG:102113"),new va("EPSG:900913"),new va("http://www.opengis.net/def/crs/EPSG/0/3857"),new va("http://www.opengis.net/gml/srs/epsg.xml#3857")];function E9(t,e,n,r){const o=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(o));for(let s=0;s<o;s+=r){e[s]=ka*t[s]/180;let a=lc*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Ou?a=Ou:a<-Ou&&(a=-Ou),e[s+1]=a}return e}function S9(t,e,n,r){const o=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(o));for(let s=0;s<o;s+=r)e[s]=180*t[s]/ka,e[s+1]=360*Math.atan(Math.exp(t[s+1]/lc))/Math.PI-90;return e}const k9=6378137,$E=[-180,-90,180,90],v9=Math.PI*k9/180;class Ts extends Um{constructor(e,n){super({code:e,units:"degrees",extent:$E,axisOrientation:n,global:!0,metersPerUnit:v9,worldExtent:$E})}}const zE=[new Ts("CRS:84"),new Ts("EPSG:4326","neu"),new Ts("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ts("urn:ogc:def:crs:OGC:2:84"),new Ts("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ts("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ts("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Km={};function x9(t){return Km[t]||Km[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function T9(t,e){Km[t]=e}function cc(t){for(const e in t)delete t[e]}function xa(t){let e;for(e in t)return!1;return!e}let Ta={};function dc(t,e,n){const r=t.getCode(),o=e.getCode();r in Ta||(Ta[r]={}),Ta[r][o]=n}function Xm(t,e){return t in Ta&&e in Ta[t]?Ta[t][e]:null}const Lu=.9996,Mr=.00669438,Au=Mr*Mr,Fu=Au*Mr,Ms=Mr/(1-Mr),WE=Math.sqrt(1-Mr),Ma=(1-WE)/(1+WE),YE=Ma*Ma,Zm=YE*Ma,qm=Zm*Ma,GE=qm*Ma,jE=1-Mr/4-3*Au/64-5*Fu/256,M9=3*Mr/8+3*Au/32+45*Fu/1024,R9=15*Au/256+45*Fu/1024,D9=35*Fu/3072,P9=3/2*Ma-27/32*Zm+269/512*GE,I9=21/16*YE-55/32*qm,N9=151/96*Zm-417/128*GE,O9=1097/512*qm,Bu=6378137;function L9(t,e,n){const r=t-5e5,a=(n.north?e:e-1e7)/Lu/(Bu*jE),l=a+P9*Math.sin(2*a)+I9*Math.sin(4*a)+N9*Math.sin(6*a)+O9*Math.sin(8*a),c=Math.sin(l),d=c*c,u=Math.cos(l),f=c/u,h=f*f,g=h*h,p=1-Mr*d,y=Math.sqrt(1-Mr*d),m=Bu/y,b=(1-Mr)/p,E=Ms*u**2,w=E*E,_=r/(m*Lu),C=_*_,S=C*_,k=S*_,v=k*_,x=v*_,M=l-f/b*(C/2-k/24*(5+3*h+10*E-4*w-9*Ms))+x/720*(61+90*h+298*E+45*g-252*Ms-3*w);let P=(_-S/6*(1+2*h+E)+v/120*(5-2*E+28*h-3*w+8*Ms+24*g))/u;return P=jm(P+ei(KE(n.number)),-Math.PI,Math.PI),[LE(P),LE(M)]}const HE=-80,UE=84,A9=-180,F9=180;function B9(t,e,n){t=jm(t,A9,F9),e<HE?e=HE:e>UE&&(e=UE);const r=ei(e),o=Math.sin(r),s=Math.cos(r),a=o/s,l=a*a,c=l*l,d=ei(t),u=KE(n.number),f=ei(u),h=Bu/Math.sqrt(1-Mr*o**2),g=Ms*s**2,p=s*jm(d-f,-Math.PI,Math.PI),y=p*p,m=y*p,b=m*p,E=b*p,w=E*p,_=Bu*(jE*r-M9*Math.sin(2*r)+R9*Math.sin(4*r)-D9*Math.sin(6*r)),C=Lu*h*(p+m/6*(1-l+g)+E/120*(5-18*l+c+72*g-58*Ms))+5e5;let S=Lu*(_+h*a*(y/2+b/24*(5-l+9*g+4*g**2)+w/720*(61-58*l+c+600*g-330*Ms)));return n.north||(S+=1e7),[C,S]}function KE(t){return(t-1)*6-180+3}const V9=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function XE(t){let e=0;for(const o of V9){const s=t.match(o);if(s){e=parseInt(s[1]);break}}if(!e)return null;let n=0,r=!1;return e>32700&&e<32761?n=e-32700:e>32600&&e<32661&&(r=!0,n=e-32600),n?{number:n,north:r}:null}function ZE(t,e){return function(n,r,o,s){const a=n.length;o=o>1?o:2,s=s??o,r||(o>2?r=n.slice():r=new Array(a));for(let l=0;l<a;l+=s){const c=n[l],d=n[l+1],u=t(c,d,e);r[l]=u[0],r[l+1]=u[1]}return r}}function $9(t){return XE(t)?new Um({code:t,units:"m"}):null}function z9(t){const e=XE(t.getCode());return e?{forward:ZE(B9,e),inverse:ZE(L9,e)}:null}const Jm=63710088e-1;function Qm(t,e,n){n=n||Jm;const r=ei(t[1]),o=ei(e[1]),s=(o-r)/2,a=ei(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function eg(t,e){let n=0;for(let r=0,o=t.length;r<o-1;++r)n+=Qm(t[r],t[r+1],e);return n}function Vu(t,e){e=e||{};const n=e.radius||Jm,r=e.projection||"EPSG:3857",o=t.getType();o!=="GeometryCollection"&&(t=t.clone().transform(r,"EPSG:4326"));let s=0,a,l,c,d,u,f;switch(o){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{a=t.getCoordinates(),s=eg(a,n);break}case"MultiLineString":case"Polygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)s+=eg(a[c],n);break}case"MultiPolygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)for(l=a[c],u=0,f=l.length;u<f;++u)s+=eg(l[u],n);break}case"GeometryCollection":{const h=t.getGeometries();for(c=0,d=h.length;c<d;++c)s+=Vu(h[c],e);break}default:throw new Error("Unsupported geometry type: "+o)}return s}function $u(t,e){let n=0;const r=t.length;let o=t[r-1][0],s=t[r-1][1];for(let a=0;a<r;a++){const l=t[a][0],c=t[a][1];n+=ei(l-o)*(2+Math.sin(ei(s))+Math.sin(ei(c))),o=l,s=c}return n*e*e/2}function qE(t,e){e=e||{};const n=e.radius||Jm,r=e.projection||"EPSG:3857",o=t.getType();o!=="GeometryCollection"&&(t=t.clone().transform(r,"EPSG:4326"));let s=0,a,l,c,d,u,f;switch(o){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(a=t.getCoordinates(),s=Math.abs($u(a[0],n)),c=1,d=a.length;c<d;++c)s-=Math.abs($u(a[c],n));break}case"MultiPolygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)for(l=a[c],s+=Math.abs($u(l[0],n)),u=1,f=l.length;u<f;++u)s-=Math.abs($u(l[u],n));break}case"GeometryCollection":{const h=t.getGeometries();for(c=0,d=h.length;c<d;++c)s+=qE(h[c],e);break}default:throw new Error("Unsupported geometry type: "+o)}return s}const W9=[z9],Y9=[$9];let tg=!0;function JE(t){tg=!1}function ng(t,e){if(e!==void 0){for(let n=0,r=t.length;n<r;++n)e[n]=t[n];e=e}else e=t.slice();return e}function rg(t){T9(t.getCode(),t),dc(t,t,ng)}function G9(t){t.forEach(rg)}function nn(t){if(typeof t!="string")return t;const e=x9(t);if(e)return e;for(const n of Y9){const r=n(t);if(r)return r}return null}function zu(t,e,n,r){t=nn(t);let o;const s=t.getPointResolutionFunc();if(s){if(o=s(e,n),r&&r!==t.getUnits()){const a=t.getMetersPerUnit();a&&(o=o*a/Sa[r])}}else{const a=t.getUnits();if(a=="degrees"&&!r||r=="degrees")o=e;else{const l=og(t,nn("EPSG:4326"));if(!l&&a!=="degrees")o=e*t.getMetersPerUnit();else{let d=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];d=l(d,d,2);const u=Qm(d.slice(0,2),d.slice(2,4)),f=Qm(d.slice(4,6),d.slice(6,8));o=(u+f)/2}const c=r?Sa[r]:t.getMetersPerUnit();c!==void 0&&(o/=c)}}return o}function QE(t){G9(t),t.forEach(function(e){t.forEach(function(n){e!==n&&dc(e,n,ng)})})}function j9(t,e,n,r){t.forEach(function(o){e.forEach(function(s){dc(o,s,n),dc(s,o,r)})})}function ig(t,e){return t?typeof t=="string"?nn(t):t:nn(e)}function H9(t){return function(e,n,r,o){const s=e.length;r=r!==void 0?r:2,o=o??r,n=n!==void 0?n:new Array(s);for(let a=0;a<s;a+=o){const l=t(e.slice(a,a+r)),c=l.length;for(let d=0,u=o;d<u;++d)n[a+d]=d>=c?e[a+d]:l[d]}return n}}function Rr(t,e){return JE(),to(t,"EPSG:4326","EPSG:3857")}function U9(t,e){const n=to(t,"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=xs(r+180,360)-180),n}function Wu(t,e){if(t===e)return!0;const n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||og(t,e)===ng)&&n}function og(t,e){const n=t.getCode(),r=e.getCode();let o=Xm(n,r);if(o)return o;let s=null,a=null;for(const c of W9)s||(s=c(t)),a||(a=c(e));if(!s&&!a)return null;const l="EPSG:4326";if(a)if(s)o=sg(s.inverse,a.forward);else{const c=Xm(n,l);c&&(o=sg(c,a.forward))}else{const c=Xm(l,r);c&&(o=sg(s.inverse,c))}return o&&(rg(t),rg(e),dc(t,e,o)),o}function sg(t,e){return function(n,r,o,s){return r=t(n,r,o,s),e(r,r,o,s)}}function Ra(t,e){const n=nn(t),r=nn(e);return og(n,r)}function to(t,e,n){const r=Ra(e,n);if(!r){const o=nn(e).getCode(),s=nn(n).getCode();throw new Error(`No transform available between ${o} and ${s}`)}return r(t,void 0,t.length)}function K9(t,e,n,r){const o=Ra(e,n);return p9(t,o,void 0)}function ag(t,e){return t}function ti(t,e){return tg&&!Nu(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(tg=!1,TE("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function eS(t,e){return t}function Si(t,e){return t}function X9(){QE(VE),QE(zE),j9(zE,VE,E9,S9)}X9();const no={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Da={PROPERTYCHANGE:"propertychange"},je={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class Yu{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Z9(t,e,n){let r,o;n=n||ro;let s=0,a=t.length,l=!1;for(;s<a;)r=s+(a-s>>1),o=+n(t[r],e),o<0?s=r+1:(a=r,l=!o);return l?s:~s}function ro(t,e){return t>e?1:t<e?-1:0}function q9(t,e){return t<e?1:t>e?-1:0}function lg(t,e,n){if(t[0]<=e)return 0;const r=t.length;if(e<=t[r-1])return r-1;if(typeof n=="function"){for(let o=1;o<r;++o){const s=t[o];if(s===e)return o;if(s<e)return n(e,t[o-1],s)>0?o-1:o}return r-1}if(n>0){for(let o=1;o<r;++o)if(t[o]<e)return o-1;return r-1}if(n<0){for(let o=1;o<r;++o)if(t[o]<=e)return o;return r-1}for(let o=1;o<r;++o){if(t[o]==e)return o;if(t[o]<e)return t[o-1]-e<e-t[o]?o-1:o}return r-1}function J9(t,e,n){for(;e<n;){const r=t[e];t[e]=t[n],t[n]=r,++e,--n}}function ki(t,e){const n=Array.isArray(e)?e:[e],r=n.length;for(let o=0;o<r;o++)t[t.length]=n[o]}function Bo(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Q9(t,e,n){const r=e||ro;return t.every(function(o,s){if(s===0)return!0;const a=r(t[s-1],o);return!(a>0||a===0)})}function Pa(){return!0}function Ia(){return!1}function uc(){}function tS(t){let e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!n||this!==r||!Bo(o,n))&&(r=this,n=o,e=t.apply(this,arguments)),e}}function nS(t){function e(){let n;try{n=t()}catch(r){return Promise.reject(r)}return n instanceof Promise?n:Promise.resolve(n)}return e()}class vi{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class fc extends Yu{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const r=this.listeners_||(this.listeners_={}),o=r[e]||(r[e]=[]);o.includes(n)||o.push(n)}dispatchEvent(e){const n=typeof e=="string",r=n?e:e.type,o=this.listeners_&&this.listeners_[r];if(!o)return;const s=n?new vi(e):e;s.target||(s.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});r in a||(a[r]=0,l[r]=0),++a[r];let c;for(let d=0,u=o.length;d<u;++d)if("handleEvent"in o[d]?c=o[d].handleEvent(s):c=o[d].call(this,s),c===!1||s.propagationStopped){c=!1;break}if(--a[r]===0){let d=l[r];for(delete l[r];d--;)this.removeEventListener(r,uc);delete a[r]}return c}disposeInternal(){this.listeners_&&cc(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,n){if(!this.listeners_)return;const r=this.listeners_[e];if(!r)return;const o=r.indexOf(n);o!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(r[o]=uc,++this.pendingRemovals_[e]):(r.splice(o,1),r.length===0&&delete this.listeners_[e]))}}function ct(t,e,n,r,o){if(o){const a=n;n=function(l){return t.removeEventListener(e,n),a.call(r??this,l)}}else r&&r!==t&&(n=n.bind(r));const s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function Gu(t,e,n,r){return ct(t,e,n,r,!0)}function xt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),cc(t))}class hc extends fc{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(je.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const r=e.length,o=new Array(r);for(let s=0;s<r;++s)o[s]=ct(this,e[s],n);return o}return ct(this,e,n)}onceInternal(e,n){let r;if(Array.isArray(e)){const o=e.length;r=new Array(o);for(let s=0;s<o;++s)r[s]=Gu(this,e[s],n)}else r=Gu(this,e,n);return n.ol_key=r,r}unInternal(e,n){const r=n.ol_key;if(r)ju(r);else if(Array.isArray(e))for(let o=0,s=e.length;o<s;++o)this.removeEventListener(e[o],n);else this.removeEventListener(e,n)}}hc.prototype.on,hc.prototype.once,hc.prototype.un;function ju(t){if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)xt(t[e]);else xt(t)}function He(){throw new Error("Unimplemented abstract method.")}let eW=0;function dt(t){return t.ol_uid||(t.ol_uid=String(++eW))}class rS extends vi{constructor(e,n,r){super(e),this.key=n,this.oldValue=r}}class ni extends hc{constructor(e){super(),this.on,this.once,this.un,dt(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let n;return this.values_&&this.values_.hasOwnProperty(e)&&(n=this.values_[e]),n}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,n){let r;r=`change:${e}`,this.hasListener(r)&&this.dispatchEvent(new rS(r,e,n)),r=Da.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new rS(r,e,n))}addChangeListener(e,n){this.addEventListener(`change:${e}`,n)}removeChangeListener(e,n){this.removeEventListener(`change:${e}`,n)}set(e,n,r){const o=this.values_||(this.values_={});if(r)o[e]=n;else{const s=o[e];o[e]=n,s!==n&&this.notify(e,s)}}setProperties(e,n){for(const r in e)this.set(r,e[r],n)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,n){if(this.values_&&e in this.values_){const r=this.values_[e];delete this.values_[e],xa(this.values_)&&(this.values_=null),n||this.notify(e,r)}}}class Hu extends ni{constructor(e){super();const n=e.element;n&&!e.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),this.element=n||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){var e;(e=this.element)==null||e.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){var n;this.map_&&((n=this.element)==null||n.remove());for(let r=0,o=this.listenerKeys.length;r<o;++r)xt(this.listenerKeys[r]);if(this.listenerKeys.length=0,this.map_=e,e){const r=this.target_??e.getOverlayContainerStopEvent();this.element&&r.appendChild(this.element),this.render!==uc&&this.listenerKeys.push(ct(e,no.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}const cg="units",tW=[1,2,5],pc=25.4/.28;let nW=class extends Hu{constructor(e){e=e||{};const n=document.createElement("div");n.style.pointerEvents="none",super({element:n,render:e.render,target:e.target}),this.on,this.once,this.un;const r=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=r+"-inner",this.element.className=r+" "+ic,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(cg,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get(cg)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set(cg,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=e.center,r=e.projection,o=this.getUnits(),s=o=="degrees"?"degrees":"m";let a=zu(r,e.resolution,n,s);const l=this.minWidth_*(this.dpi_||pc)/pc,c=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||pc)/pc:void 0;let d=l*a,u="";if(o=="degrees"){const w=Sa.degrees;d*=w,d<w/60?(u="″",a*=3600):d<w?(u="′",a*=60):u="°"}else if(o=="imperial")d<.9144?(u="in",a/=.0254):d<1609.344?(u="ft",a/=.3048):(u="mi",a/=1609.344);else if(o=="nautical")a/=1852,u="NM";else if(o=="metric")d<1e-6?(u="nm",a*=1e9):d<.001?(u="μm",a*=1e6):d<1?(u="mm",a*=1e3):d<1e3?u="m":(u="km",a/=1e3);else if(o=="us")d<.9144?(u="in",a*=39.37):d<1609.344?(u="ft",a/=.30480061):(u="mi",a/=1609.3472);else throw new Error("Invalid units");let f=3*Math.floor(Math.log(l*a)/Math.log(10)),h,g,p,y=0,m,b;for(;;){p=Math.floor(f/3);const w=Math.pow(10,p);if(h=tW[(f%3+3)%3]*w,g=Math.round(h/a),isNaN(g)){this.element.style.display="none",this.renderedVisible_=!1;return}if(c!==void 0&&g>=c){h=y,g=m,p=b;break}else if(g>=l)break;y=h,m=g,b=p,++f}const E=this.scaleBar_?this.createScaleBar(g,h,u):h.toFixed(p<0?-p:0)+" "+u;this.renderedHTML_!=E&&(this.innerElement_.innerHTML=E,this.renderedHTML_=E),this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,n,r){const o=this.getScaleForResolution(),s=o<1?Math.round(1/o).toLocaleString()+" : 1":"1 : "+Math.round(o).toLocaleString(),a=this.scaleBarSteps_,l=e/a,c=[this.createMarker("absolute")];for(let u=0;u<a;++u){const f=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";c.push(`<div><div class="ol-scale-singlebar ${f}" style="width: ${l}px;"></div>`+this.createMarker("relative")+(u%2===0||a===2?this.createStepText(u,e,!1,n,r):"")+"</div>")}return c.push(this.createStepText(a,e,!0,n,r)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${e}px;">`+s+"</div>":"")+c.join("")}createMarker(e){return`<div class="ol-scale-step-marker" style="position: ${e}; top: ${e==="absolute"?3:-10}px;"></div>`}createStepText(e,n,r,o,s){const l=(e===0?0:Math.round(o/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+s),c=e===0?-3:n/this.scaleBarSteps_*-1,d=e===0?0:n/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${c}px;text-align: ${e===0?"left":"center"};min-width: ${d}px;left: ${r?n+"px":"unset"};">`+l+"</div>"}getScaleForResolution(){const e=zu(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),n=this.dpi_||pc,r=1e3/25.4;return e*r*n}render(e){const n=e.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()}};const Kn={ADD:"add",REMOVE:"remove"},iS={LENGTH:"length"};class Uu extends vi{constructor(e,n,r){super(e),this.element=n,this.index=r}}class xi extends ni{constructor(e,n){if(super(),this.on,this.once,this.un,n=n||{},this.unique_=!!n.unique,this.array_=e||[],this.unique_)for(let r=0,o=this.array_.length;r<o;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let n=0,r=e.length;n<r;++n)this.push(e[n]);return this}forEach(e){const n=this.array_;for(let r=0,o=n.length;r<o;++r)e(n[r],r,n)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(iS.LENGTH)}insertAt(e,n){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Uu(Kn.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let r=0,o=n.length;r<o;++r)if(n[r]===e)return this.removeAt(r)}removeAt(e){if(e<0||e>=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Uu(Kn.REMOVE,n,e)),n}setAt(e,n){const r=this.getLength();if(e>=r){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const o=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Uu(Kn.REMOVE,o,e)),this.dispatchEvent(new Uu(Kn.ADD,n,e))}updateLength_(){this.set(iS.LENGTH,this.array_.length)}assertUnique_(e,n){for(let r=0,o=this.array_.length;r<o;++r)if(this.array_[r]===e&&r!==n)throw new Error("Duplicate item added to a unique collection")}}function bt(t,e){if(!t)throw new Error(e)}class Kt extends ni{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new Kt(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const r=this.getStyle();return r&&e.setStyle(r),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(xt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ct(e,je.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?rW(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function rW(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(bt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}new Array(6);function Dr(){return[1,0,0,1,0,0]}function iW(t,e){const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=e[0],d=e[1],u=e[2],f=e[3],h=e[4],g=e[5];return t[0]=n*c+o*d,t[1]=r*c+s*d,t[2]=n*u+o*f,t[3]=r*u+s*f,t[4]=n*h+o*g+a,t[5]=r*h+s*g+l,t}function oW(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Wt(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function ri(t,e,n,r,o,s,a,l){const c=Math.sin(s),d=Math.cos(s);return t[0]=r*d,t[1]=o*c,t[2]=-r*c,t[3]=o*d,t[4]=a*r*d-l*r*c+e,t[5]=a*o*c+l*o*d+n,t}function oS(t,e){const n=sW(e);bt(n!==0,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*c-a*l)/n,t[5]=-(r*c-o*l)/n,t}function sW(t){return t[0]*t[3]-t[1]*t[2]}const aW=[1e5,1e5,1e5,1e5,2,2];function lW(t){return"matrix("+t.join(", ")+")"}function sS(t){return t.substring(7,t.length-1).split(",").map(parseFloat)}function cW(t,e){const n=sS(t),r=sS(e);for(let o=0;o<6;++o)if(Math.round((n[o]-r[o])*aW[o])!==0)return!1;return!0}function Vo(t,e,n,r,o,s,a){s=s||[],a=a||2;let l=0;for(let c=e;c<n;c+=r){const d=t[c],u=t[c+1];s[l++]=o[0]*d+o[2]*u+o[4],s[l++]=o[1]*d+o[3]*u+o[5];for(let f=2;f<a;f++)s[l++]=t[c+f]}return s&&s.length!=l&&(s.length=l),s}function dg(t,e,n,r,o,s,a){a=a||[];const l=Math.cos(o),c=Math.sin(o),d=s[0],u=s[1];let f=0;for(let h=e;h<n;h+=r){const g=t[h]-d,p=t[h+1]-u;a[f++]=d+g*l-p*c,a[f++]=u+g*c+p*l;for(let y=h+2;y<h+r;++y)a[f++]=t[y]}return a&&a.length!=f&&(a.length=f),a}function dW(t,e,n,r,o,s,a,l){l=l||[];const c=a[0],d=a[1];let u=0;for(let f=e;f<n;f+=r){const h=t[f]-c,g=t[f+1]-d;l[u++]=c+o*h,l[u++]=d+s*g;for(let p=f+2;p<f+r;++p)l[u++]=t[p]}return l&&l.length!=u&&(l.length=u),l}function uW(t,e,n,r,o,s,a){a=a||[];let l=0;for(let c=e;c<n;c+=r){a[l++]=t[c]+o,a[l++]=t[c+1]+s;for(let d=c+2;d<c+r;++d)a[l++]=t[d]}return a&&a.length!=l&&(a.length=l),a}const aS=Dr(),fW=[NaN,NaN];class lS extends ni{constructor(){super(),this.extent_=Tr(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=tS((e,n,r)=>{if(!r)return this.getSimplifiedGeometry(n);const o=this.clone();return o.applyTransform(r),o.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return He()}closestPointXY(e,n,r,o){return He()}containsXY(e,n){return this.closestPointXY(e,n,fW,Number.MIN_VALUE)===0}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return He()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Ea(n),this.extentRevision_=this.getRevision()}return u9(this.extent_,e)}rotate(e,n){He()}scale(e,n,r){He()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return He()}getType(){return He()}applyTransform(e){He()}intersectsExtent(e){return He()}translate(e,n){He()}transform(e,n){const r=nn(e),o=r.getUnits()=="tile-pixels"?function(s,a,l){const c=r.getExtent(),d=r.getWorldExtent(),u=fn(d)/fn(c);ri(aS,d[0],d[3],u,-u,0,0,0);const f=Vo(s,0,s.length,l,aS,a),h=Ra(r,n);return h?h(f,f,l):f}:Ra(r,n);return this.applyTransform(o),this}}class $o extends lS{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return zm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return He()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,n){this.stride=mc(e),this.layout=e,this.flatCoordinates=n}setCoordinates(e,n){He()}setLayout(e,n,r){let o;if(e)o=mc(e);else{for(let s=0;s<r;++s){if(n.length===0){this.layout="XY",this.stride=2;return}n=n[0]}o=n.length,e=hW(o)}this.layout=e,this.stride=o}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,n){const r=this.getFlatCoordinates();if(r){const o=this.getStride();dg(r,0,r.length,o,e,n,r),this.changed()}}scale(e,n,r){n===void 0&&(n=e),r||(r=Qi(this.getExtent()));const o=this.getFlatCoordinates();if(o){const s=this.getStride();dW(o,0,o.length,s,e,n,r,o),this.changed()}}translate(e,n){const r=this.getFlatCoordinates();if(r){const o=this.getStride();uW(r,0,r.length,o,e,n,r),this.changed()}}}function hW(t){let e;return t==2?e="XY":t==3?e="XYZ":t==4&&(e="XYZM"),e}function mc(t){let e;return t=="XY"?e=2:t=="XYZ"||t=="XYM"?e=3:t=="XYZM"&&(e=4),e}function pW(t,e,n){const r=t.getFlatCoordinates();if(!r)return null;const o=t.getStride();return Vo(r,0,r.length,o,e,n)}function cS(t,e,n,r){let o=0;const s=t[n-r],a=t[n-r+1];let l=0,c=0;for(;e<n;e+=r){const d=t[e]-s,u=t[e+1]-a;o+=c*d-l*u,l=d,c=u}return o/2}function dS(t,e,n,r){let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s];o+=cS(t,e,l,r),e=l}return o}function mW(t,e,n,r){let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s];o+=dS(t,e,l,r),e=l[l.length-1]}return o}function uS(t,e,n,r,o,s,a){const l=t[e],c=t[e+1],d=t[n]-l,u=t[n+1]-c;let f;if(d===0&&u===0)f=e;else{const h=((o-l)*d+(s-c)*u)/(d*d+u*u);if(h>1)f=n;else if(h>0){for(let g=0;g<r;++g)a[g]=dr(t[e+g],t[n+g],h);a.length=r;return}else f=e}for(let h=0;h<r;++h)a[h]=t[f+h];a.length=r}function ug(t,e,n,r,o){let s=t[e],a=t[e+1];for(e+=r;e<n;e+=r){const l=t[e],c=t[e+1],d=eo(s,a,l,c);d>o&&(o=d),s=l,a=c}return o}function fg(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];o=ug(t,e,l,r,o),e=l}return o}function gW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];o=fg(t,e,l,r,o),e=l[l.length-1]}return o}function hg(t,e,n,r,o,s,a,l,c,d,u){if(e==n)return d;let f,h;if(o===0){if(h=eo(a,l,t[e],t[e+1]),h<d){for(f=0;f<r;++f)c[f]=t[e+f];return c.length=r,h}return d}u=u||[NaN,NaN];let g=e+r;for(;g<n;)if(uS(t,g-r,g,r,a,l,u),h=eo(a,l,u[0],u[1]),h<d){for(d=h,f=0;f<r;++f)c[f]=u[f];c.length=r,g+=r}else g+=r*Math.max((Math.sqrt(h)-Math.sqrt(d))/o|0,1);if(s&&(uS(t,n-r,e,r,a,l,u),h=eo(a,l,u[0],u[1]),h<d)){for(d=h,f=0;f<r;++f)c[f]=u[f];c.length=r}return d}function pg(t,e,n,r,o,s,a,l,c,d,u){u=u||[NaN,NaN];for(let f=0,h=n.length;f<h;++f){const g=n[f];d=hg(t,e,g,r,o,s,a,l,c,d,u),e=g}return d}function yW(t,e,n,r,o,s,a,l,c,d,u){u=u||[NaN,NaN];for(let f=0,h=n.length;f<h;++f){const g=n[f];d=pg(t,e,g,r,o,s,a,l,c,d,u),e=g[g.length-1]}return d}function fS(t,e,n,r){for(let o=0,s=n.length;o<s;++o)t[e++]=n[o];return e}function Ku(t,e,n,r){for(let o=0,s=n.length;o<s;++o){const a=n[o];for(let l=0;l<r;++l)t[e++]=a[l]}return e}function mg(t,e,n,r,o){o=o||[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=Ku(t,e,n[a],r);o[s++]=c,e=c}return o.length=s,o}function _W(t,e,n,r,o){o=o||[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=mg(t,e,n[a],r,o[s]);c.length===0&&(c[0]=e),o[s++]=c,e=c[c.length-1]}return o.length=s,o}function io(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=e;a<n;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function gc(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=n[a];o[s++]=io(t,e,c,r,o[s]),e=c}return o.length=s,o}function gg(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=n[a];o[s++]=c.length===1&&c[0]===e?[]:gc(t,e,c,r,o[s]),e=c[c.length-1]}return o.length=s,o}function Xu(t,e,n,r,o,s,a){const l=(n-e)/r;if(l<3){for(;e<n;e+=r)s[a++]=t[e],s[a++]=t[e+1];return a}const c=new Array(l);c[0]=1,c[l-1]=1;const d=[e,n-r];let u=0;for(;d.length>0;){const f=d.pop(),h=d.pop();let g=0;const p=t[h],y=t[h+1],m=t[f],b=t[f+1];for(let E=h+r;E<f;E+=r){const w=t[E],_=t[E+1],C=m9(w,_,p,y,m,b);C>g&&(u=E,g=C)}g>o&&(c[(u-e)/r]=1,h+r<u&&d.push(h,u),u+r<f&&d.push(u,f))}for(let f=0;f<l;++f)c[f]&&(s[a++]=t[e+f*r],s[a++]=t[e+f*r+1]);return a}function hS(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c];a=Xu(t,e,u,r,o,s,a),l.push(a),e=u}return a}function Rs(t,e){return e*Math.round(t/e)}function bW(t,e,n,r,o,s,a){if(e==n)return a;let l=Rs(t[e],o),c=Rs(t[e+1],o);e+=r,s[a++]=l,s[a++]=c;let d,u;do if(d=Rs(t[e],o),u=Rs(t[e+1],o),e+=r,e==n)return s[a++]=d,s[a++]=u,a;while(d==l&&u==c);for(;e<n;){const f=Rs(t[e],o),h=Rs(t[e+1],o);if(e+=r,f==d&&h==u)continue;const g=d-l,p=u-c,y=f-l,m=h-c;if(g*m==p*y&&(g<0&&y<g||g==y||g>0&&y>g)&&(p<0&&m<p||p==m||p>0&&m>p)){d=f,u=h;continue}s[a++]=d,s[a++]=u,l=d,c=u,d=f,u=h}return s[a++]=d,s[a++]=u,a}function yg(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c];a=bW(t,e,u,r,o,s,a),l.push(a),e=u}return a}function wW(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c],f=[];a=yg(t,e,u,r,o,s,a,f),l.push(f),e=u[u.length-1]}return a}class yc extends $o{constructor(e,n){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}clone(){return new yc(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ug(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,n,r,o))}getArea(){return cS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const n=[];return n.length=Xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new yc(n,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ku(this.flatCoordinates,0,e,this.stride),this.changed()}}class Xt extends $o{constructor(e,n){super(),this.setCoordinates(e,n)}clone(){const e=new Xt(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,o){const s=this.flatCoordinates,a=eo(e,n,s[0],s[1]);if(a<o){const l=this.stride;for(let c=0;c<l;++c)r[c]=s[c];return r.length=l,a}return o}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return RE(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Vm(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,n){this.setLayout(n,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=fS(this.flatCoordinates,0,e,this.stride),this.changed()}}function CW(t,e,n,r,o){return!Wm(o,function(a){return!Ds(t,e,n,r,a[0],a[1])})}function Ds(t,e,n,r,o,s){let a=0,l=t[n-r],c=t[n-r+1];for(;e<n;e+=r){const d=t[e],u=t[e+1];c<=s?u>s&&(d-l)*(s-c)-(o-l)*(u-c)>0&&a++:u<=s&&(d-l)*(s-c)-(o-l)*(u-c)<0&&a--,l=d,c=u}return a!==0}function _g(t,e,n,r,o,s){if(n.length===0||!Ds(t,e,n[0],r,o,s))return!1;for(let a=1,l=n.length;a<l;++a)if(Ds(t,n[a-1],n[a],r,o,s))return!1;return!0}function EW(t,e,n,r,o,s){if(n.length===0)return!1;for(let a=0,l=n.length;a<l;++a){const c=n[a];if(_g(t,e,c,r,o,s))return!0;e=c[c.length-1]}return!1}function bg(t,e,n,r,o,s,a){let l,c,d,u,f,h,g;const p=o[s+1],y=[];for(let E=0,w=n.length;E<w;++E){const _=n[E];for(u=t[_-r],h=t[_-r+1],l=e;l<_;l+=r)f=t[l],g=t[l+1],(p<=h&&g<=p||h<=p&&p<=g)&&(d=(p-h)/(g-h)*(f-u)+u,y.push(d)),u=f,h=g}let m=NaN,b=-1/0;for(y.sort(ro),u=y[0],l=1,c=y.length;l<c;++l){f=y[l];const E=Math.abs(f-u);E>b&&(d=(u+f)/2,_g(t,e,n,r,d,p)&&(m=d,b=E)),u=f}return isNaN(m)&&(m=o[s]),a?(a.push(m,p,b),a):[m,p,b]}function pS(t,e,n,r,o){let s=[];for(let a=0,l=n.length;a<l;++a){const c=n[a];s=bg(t,e,c,r,o,2*a,s),e=c[c.length-1]}return s}function mS(t,e,n,r,o){let s;for(e+=r;e<n;e+=r)if(s=o(t.slice(e-r,e),t.slice(e,e+r)),s)return s;return!1}function Zu(t,e,n,r,o,s){return s=s??PE(Tr(),t,e,n,r),Sn(o,s)?s[0]>=o[0]&&s[2]<=o[2]||s[1]>=o[1]&&s[3]<=o[3]?!0:mS(t,e,n,r,function(a,l){return h9(o,a,l)}):!1}function SW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){if(Zu(t,e,n[s],r,o))return!0;e=n[s]}return!1}function gS(t,e,n,r,o){return!!(Zu(t,e,n,r,o)||Ds(t,e,n,r,o[0],o[1])||Ds(t,e,n,r,o[0],o[3])||Ds(t,e,n,r,o[2],o[1])||Ds(t,e,n,r,o[2],o[3]))}function yS(t,e,n,r,o){if(!gS(t,e,n[0],r,o))return!1;if(n.length===1)return!0;for(let s=1,a=n.length;s<a;++s)if(CW(t,n[s-1],n[s],r,o)&&!Zu(t,n[s-1],n[s],r,o))return!1;return!0}function kW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];if(yS(t,e,l,r,o))return!0;e=l[l.length-1]}return!1}function vW(t,e,n,r){for(;e<n-r;){for(let o=0;o<r;++o){const s=t[e+o];t[e+o]=t[n-r+o],t[n-r+o]=s}e+=r,n-=r}}function wg(t,e,n,r){let o=0,s=t[n-r],a=t[n-r+1];for(;e<n;e+=r){const l=t[e],c=t[e+1];o+=(l-s)*(c+a),s=l,a=c}return o===0?void 0:o>0}function _S(t,e,n,r,o){o=o!==void 0?o:!1;for(let s=0,a=n.length;s<a;++s){const l=n[s],c=wg(t,e,l,r);if(s===0){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;e=l}return!0}function xW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];if(!_S(t,e,l,r,o))return!1;l.length&&(e=l[l.length-1])}return!0}function Cg(t,e,n,r,o){o=o!==void 0?o:!1;for(let s=0,a=n.length;s<a;++s){const l=n[s],c=wg(t,e,l,r);(s===0?o&&c||!o&&!c:o&&!c||!o&&c)&&vW(t,e,l,r),e=l}return e}function bS(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s)e=Cg(t,e,n[s],r,o);return e}function TW(t,e){const n=[];let r=0,o=0,s;for(let a=0,l=e.length;a<l;++a){const c=e[a],d=wg(t,r,c,2);if(s===void 0&&(s=d),d===s)n.push(e.slice(o,a+1));else{if(n.length===0)continue;n[n.length-1].push(e[o])}o=a+1,r=c}return n}class oo extends $o{constructor(e,n,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,n!==void 0&&r?(this.setFlatCoordinates(n,e),this.ends_=r):this.setCoordinates(e,n)}appendLinearRing(e){this.flatCoordinates?ki(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new oo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(fg(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),pg(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,n,r,o))}containsXY(e,n){return _g(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,n)}getArea(){return dS(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),Cg(n,0,this.ends_,this.stride,e)):n=this.flatCoordinates,gc(n,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=Qi(this.getExtent());this.flatInteriorPoint_=bg(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Xt(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new yc(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,n=this.flatCoordinates,r=this.ends_,o=[];let s=0;for(let a=0,l=r.length;a<l;++a){const c=r[a],d=new yc(n.slice(s,c),e);o.push(d),s=c}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;_S(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Cg(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const n=[],r=[];return n.length=yg(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),n,0,r),new oo(n,"XY",r)}getType(){return"Polygon"}intersectsExtent(e){return yS(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=mg(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}function wS(t){if(vs(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],n=t[1],r=t[2],o=t[3],s=[e,n,e,o,r,o,r,n,e,n];return new oo(s,"XY",[s.length])}function qu(t,e,n,r,o,s,a){let l,c;const d=(n-e)/r;if(d===1)l=e;else if(d===2)l=e,c=o;else if(d!==0){let u=t[e],f=t[e+1],h=0;const g=[0];for(let m=e+r;m<n;m+=r){const b=t[m],E=t[m+1];h+=Math.sqrt((b-u)*(b-u)+(E-f)*(E-f)),g.push(h),u=b,f=E}const p=o*h,y=Z9(g,p);y<0?(c=(p-g[-y-2])/(g[-y-1]-g[-y-2]),l=e+(-y-2)*r):l=e+y*r}a=a>1?a:2,s=s||new Array(a);for(let u=0;u<a;++u)s[u]=l===void 0?NaN:c===void 0?t[l+u]:dr(t[l+u],t[l+r+u],c);return s}function Eg(t,e,n,r,o,s){if(n==e)return null;let a;if(o<t[e+r-1])return s?(a=t.slice(e,e+r),a[r-1]=o,a):null;if(t[n-1]<o)return s?(a=t.slice(n-r,n),a[r-1]=o,a):null;if(o==t[e+r-1])return t.slice(e,e+r);let l=e/r,c=n/r;for(;l<c;){const h=l+c>>1;o<t[(h+1)*r-1]?c=h:l=h+1}const d=t[l*r-1];if(o==d)return t.slice((l-1)*r,(l-1)*r+r);const u=t[(l+1)*r-1],f=(o-d)/(u-d);a=[];for(let h=0;h<r-1;++h)a.push(dr(t[(l-1)*r+h],t[l*r+h],f));return a.push(o),a}function MW(t,e,n,r,o,s,a){if(a)return Eg(t,e,n[n.length-1],r,o,s);let l;if(o<t[r-1])return s?(l=t.slice(0,r),l[r-1]=o,l):null;if(t[t.length-1]<o)return s?(l=t.slice(t.length-r),l[r-1]=o,l):null;for(let c=0,d=n.length;c<d;++c){const u=n[c];if(e!=u){if(o<t[e+r-1])return null;if(o<=t[u-1])return Eg(t,e,u,r,o,!1);e=u}}return null}function Sg(t,e,n,r){let o=t[e],s=t[e+1],a=0;for(let l=e+r;l<n;l+=r){const c=t[l],d=t[l+1];a+=Math.sqrt((c-o)*(c-o)+(d-s)*(d-s)),o=c,s=d}return a}class Nn extends $o{constructor(e,n){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}appendCoordinate(e){ki(this.flatCoordinates,e),this.changed()}clone(){const e=new Nn(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ug(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,n,r,o))}forEachSegment(e){return mS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,n){return this.layout!="XYM"&&this.layout!="XYZM"?null:(n=n!==void 0?n:!1,Eg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n))}getCoordinates(){return io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,n){return qu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,this.stride)}getLength(){return Sg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const n=[];return n.length=Xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new Nn(n,"XY")}getType(){return"LineString"}intersectsExtent(e){return Zu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,this.getExtent())}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ku(this.flatCoordinates,0,e,this.stride),this.changed()}}const Pr={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Ps=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"";Ps.includes("safari")&&!Ps.includes("chrom")&&(Ps.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Ps));const RW=Ps.includes("webkit")&&!Ps.includes("edge"),CS=Ps.includes("macintosh"),DW=typeof devicePixelRatio<"u"?devicePixelRatio:1,ES=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,SS=typeof Image<"u"&&Image.prototype.decode,PW=typeof createImageBitmap=="function",kS=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}(),Ne={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function rn(t,e,n,r){let o;return n&&n.length?o=n.shift():ES?o=new OffscreenCanvas(t||300,e||300):o=document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",r)}let kg;function Ju(){return kg||(kg=rn(1,1)),kg}function Qu(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function IW(t){let e=t.offsetWidth;const n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),e}function NW(t){let e=t.offsetHeight;const n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10),e}function vS(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function xS(t){for(;t.lastChild;)t.lastChild.remove()}function OW(t,e){const n=t.childNodes;for(let r=0;;++r){const o=n[r],s=e[r];if(!o&&!s)break;if(o!==s){if(!o){t.appendChild(s);continue}if(!s){t.removeChild(o),--r;continue}t.insertBefore(s,o)}}}const vg=[NaN,NaN,NaN,0];let xg;function LW(){return xg||(xg=rn(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),xg}const AW=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,FW=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,BW=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,VW=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function ef(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function _c(t){throw new Error('failed to parse "'+t+'" as color')}function TS(t){if(t.toLowerCase().startsWith("rgb")){const s=t.match(FW)||t.match(AW)||t.match(BW);if(s){const a=s[4],l=100/255;return[Ot(ef(s[1],l)+.5|0,0,255),Ot(ef(s[2],l)+.5|0,0,255),Ot(ef(s[3],l)+.5|0,0,255),a!==void 0?Ot(ef(a,100),0,1):1]}_c(t)}if(t.startsWith("#")){if(VW.test(t)){const s=t.substring(1),a=s.length<=4?1:2,l=[0,0,0,255];for(let c=0,d=s.length;c<d;c+=a){let u=parseInt(s.substring(c,c+a),16);a===1&&(u+=u<<4),l[c/a]=u}return l[3]=l[3]/255,l}_c(t)}const e=LW();e.fillStyle="#abcdef";let n=e.fillStyle;e.fillStyle=t,e.fillStyle===n&&(e.fillStyle="#fedcba",n=e.fillStyle,e.fillStyle=t,e.fillStyle===n&&_c(t));const r=e.fillStyle;if(r.startsWith("#")||r.startsWith("rgba"))return TS(r);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const o=Array.from(e.getImageData(0,0,1,1).data);return o[3]=ac(o[3]/255,3),o}function $W(t){return typeof t=="string"?t:Ng(t)}const zW=1024,bc={};let Tg=0;function WW(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function Mg(t){return t>.0031308?Math.pow(t,1/2.4)*269.025-14.025:t*3294.6}function Rg(t){return t>.2068965?Math.pow(t,3):(t-4/29)*(108/841)}function Dg(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function Pg(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function MS(t){const e=Dg(t[0]),n=Dg(t[1]),r=Dg(t[2]),o=Pg(e*.222488403+n*.716873169+r*.06060791),s=500*(Pg(e*.452247074+n*.399439023+r*.148375274)-o),a=200*(o-Pg(e*.016863605+n*.117638439+r*.865350722)),l=Math.atan2(a,s)*(180/Math.PI);return[116*o-16,Math.sqrt(s*s+a*a),l<0?l+360:l,t[3]]}function YW(t){const e=(t[0]+16)/116,n=t[1],r=t[2]*Math.PI/180,o=Rg(e),s=Rg(e+n/500*Math.cos(r)),a=Rg(e-n/200*Math.sin(r)),l=Mg(s*3.021973625-o*1.617392459-a*.404875592),c=Mg(s*-.943766287+o*1.916279586+a*.027607165),d=Mg(s*.069407491-o*.22898585+a*1.159737864);return[Ot(l+.5|0,0,255),Ot(c+.5|0,0,255),Ot(d+.5|0,0,255),t[3]]}function Ig(t){if(t==="none")return vg;if(bc.hasOwnProperty(t))return bc[t];if(Tg>=zW){let n=0;for(const r in bc)n++&3||(delete bc[r],--Tg)}const e=TS(t);e.length!==4&&_c(t);for(const n of e)isNaN(n)&&_c(t);return bc[t]=e,++Tg,e}function Na(t){return Array.isArray(t)?t:Ig(t)}function Ng(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let r=t[2];r!=(r|0)&&(r=r+.5|0);const o=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+r+","+o+")"}class GW extends fc{constructor(e,n,r,o){super(),this.extent=e,this.pixelRatio_=r,this.resolution=n,this.state=typeof o=="function"?Ne.IDLE:o,this.image_=null,this.loader=typeof o=="function"?o:null}changed(){this.dispatchEvent(je.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==Ne.IDLE&&this.loader){this.state=Ne.LOADING,this.changed();const e=this.getResolution(),n=Array.isArray(e)?e[0]:e;nS(()=>this.loader(this.getExtent(),n,this.getPixelRatio())).then(r=>{"image"in r&&(this.image_=r.image),"extent"in r&&(this.extent=r.extent),"resolution"in r&&(this.resolution=r.resolution),"pixelRatio"in r&&(this.pixelRatio_=r.pixelRatio),(r instanceof HTMLImageElement||PW&&r instanceof ImageBitmap||r instanceof HTMLCanvasElement||r instanceof HTMLVideoElement)&&(this.image_=r),this.state=Ne.LOADED}).catch(r=>{this.state=Ne.ERROR,console.error(r)}).finally(()=>this.changed())}}setImage(e){this.image_=e}setResolution(e){this.resolution=e}}function jW(t,e,n){const r=t;let o=!0,s=!1,a=!1;const l=[Gu(r,je.LOAD,function(){a=!0,s||e()})];return r.src&&SS?(s=!0,r.decode().then(function(){o&&e()}).catch(function(c){o&&(a?e():n())})):l.push(Gu(r,je.ERROR,n)),function(){o=!1,l.forEach(xt)}}function HW(t,e){return new Promise((n,r)=>{function o(){a(),n(t)}function s(){a(),r(new Error("Image load error"))}function a(){t.removeEventListener("load",o),t.removeEventListener("error",s)}t.addEventListener("load",o),t.addEventListener("error",s)})}function UW(t,e){return e&&(t.src=e),t.src&&SS?new Promise((n,r)=>t.decode().then(()=>n(t)).catch(o=>t.complete&&t.width?n(t):r(o))):HW(t)}class KW{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const r=this.cache_[n];!(e++&3)&&!r.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,r){const o=Og(e,n,r);return o in this.cache_?this.cache_[o]:null}getPattern(e,n,r){const o=Og(e,n,r);return o in this.patternCache_?this.patternCache_[o]:null}set(e,n,r,o,s){const a=Og(e,n,r),l=a in this.cache_;this.cache_[a]=o,s&&(o.getImageState()===Ne.IDLE&&o.load(),o.getImageState()===Ne.LOADING?o.ready().then(()=>{this.patternCache_[a]=Ju().createPattern(o.getImage(1),"repeat")}):this.patternCache_[a]=Ju().createPattern(o.getImage(1),"repeat")),l||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function Og(t,e,n){const r=n?Na(n):"null";return e+":"+t+":"+r}const Ir=new KW;let wc=null;class RS extends fc{constructor(e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.imageState_=o===void 0?Ne.IDLE:o,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Ne.LOADED){wc||(wc=rn(1,1,void 0,{willReadFrequently:!0})),wc.drawImage(this.image_,0,0);try{wc.getImageData(0,0,1,1),this.tainted_=!1}catch{wc=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(je.CHANGE)}handleImageError_(){this.imageState_=Ne.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Ne.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],r=rn(e,n);r.fillRect(0,0,e,n),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Ne.IDLE){this.image_||this.initializeImage_(),this.imageState_=Ne.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&UW(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==Ne.LOADED)return;const n=this.image_,r=rn(Math.ceil(n.width*e),Math.ceil(n.height*e)),o=r.canvas;r.scale(e,e),r.drawImage(n,0,0),r.globalCompositeOperation="multiply",r.fillStyle=$W(this.color_),r.fillRect(0,0,o.width/e,o.height/e),r.globalCompositeOperation="destination-in",r.drawImage(n,0,0),this.canvas_[e]=o}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===Ne.LOADED||this.imageState_===Ne.ERROR)e();else{const n=()=>{(this.imageState_===Ne.LOADED||this.imageState_===Ne.ERROR)&&(this.removeEventListener(je.CHANGE,n),e())};this.addEventListener(je.CHANGE,n)}})),this.ready_}}function Lg(t,e,n,r,o,s){let a=e===void 0?void 0:Ir.get(e,n,o);return a||(a=new RS(t,t&&"src"in t?t.src||void 0:e,n,r,o),Ir.set(e,n,o,a,s)),s&&a&&!Ir.getPattern(e,n,o)&&Ir.set(e,n,o,a,s),a}function Ti(t){return t?Array.isArray(t)?Ng(t):typeof t=="object"&&"src"in t?XW(t):t:null}function XW(t){if(!t.offset||!t.size)return Ir.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Ir.getPattern(e,void 0,t.color);if(n)return n;const r=Ir.get(t.src,"anonymous",null);if(r.getImageState()!==Ne.LOADED)return null;const o=rn(t.size[0],t.size[1]);return o.drawImage(r.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Lg(o.canvas,e,void 0,Ne.LOADED,t.color,!0),Ir.getPattern(e,void 0,t.color)}class DS{drawCustom(e,n,r,o,s){}drawGeometry(e){}setStyle(e){}drawCircle(e,n,r){}drawFeature(e,n,r){}drawGeometryCollection(e,n,r){}drawLineString(e,n,r){}drawMultiLineString(e,n,r){}drawMultiPoint(e,n,r){}drawMultiPolygon(e,n,r){}drawPoint(e,n,r){}drawPolygon(e,n,r){}drawText(e,n,r){}setFillStrokeStyle(e,n){}setImageStyle(e,n){}setTextStyle(e,n){}}const PS="10px sans-serif",Xn="#000",Oa="round",so=[],ao=0,La="round",Cc=10,Ec="#000",Sc="center",tf="middle",Is=[0,0,0,0],kc=1,lo=new ni;let Aa=null,Ag;const Fg={},ZW=function(){const e="32px ",n=["monospace","serif"],r=n.length,o="wmytzilWMYTZIL@#/&?$%10";let s,a;function l(d,u,f){let h=!0;for(let g=0;g<r;++g){const p=n[g];if(a=nf(d+" "+u+" "+e+p,o),f!=p){const y=nf(d+" "+u+" "+e+f+","+p,o);h=h&&y!=a}}return!!h}function c(){let d=!0;const u=lo.getKeys();for(let f=0,h=u.length;f<h;++f){const g=u[f];if(lo.get(g)<100){const[p,y,m]=g.split(`
|
|
73
|
+
</defs>`,Mz=()=>{let t=i.reactive({});return{gridItemData:t,registerGridItem:(o,s)=>{var l;if(!s)return;t[o]||(t[o]={labels:[],maxLength:0,maxWidth:0}),(l=t[o])==null||l.labels.push(s),t[o].maxLength=Math.max(s.length,t[o].maxLength);const a=Math.ceil(ws(s,14));t[o].maxWidth=Math.max(a||0,t[o].maxWidth)},getColumnData:o=>t[o]||{},clearGridItemData:()=>{t=i.reactive({})}}},Rz={class:"multi-grid"},Dz=i.defineComponent({name:"MultiGrid",__name:"MultiGrid",setup(t){const{getColumnData:e,registerGridItem:n,clearGridItemData:r,gridItemData:o}=Mz();return i.provide("registerGridItem",n),i.provide("getColumnData",e),i.provide("clearGridItemData",r),i.provide("gridItemData",o),i.provide("isMultiGrid",i.ref(!0)),(s,a)=>(i.openBlock(),i.createElementBlock("div",Rz,[i.renderSlot(s.$slots,"default")]))}}),aE=Mt(iE),Lm=Mt(Cz),lE=Mt(Dz),Pz={class:"info-pair"},Iz={class:"info-pair--title"},Nz={key:0,class:"info-pair--title--tip"},cE=Mt($t(i.defineComponent({name:"zh-info-pair",__name:"InfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",Pz,[i.createElementVNode("div",Iz,[i.createTextVNode(i.toDisplayString(e.title)+" ",1),n.tip?(i.openBlock(),i.createElementBlock("div",Nz,i.toDisplayString(n.tip),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",{class:i.normalizeClass(["info-pair--value",{ellipsis:n.ellipsis}])},[i.renderSlot(n.$slots,"value",{},()=>[i.createTextVNode(i.toDisplayString(e.value||i.unref(Ut)),1)],!0)],2)]))}}),[["__scopeId","data-v-5a1b0655"]])),dE=Mt($t(i.defineComponent({name:"zh-input",__name:"Input",props:i.mergeModels({style:{},class:{default:"zh-default-input"},size:{default:"default"},className:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=i.useAttrs(),n=t,r=i.useModel(t,"modelValue"),o=()=>{(e.max||Number(e.max)===0)&&Number(r.value)>=e.max&&(r.value=e.max.toString()),(e.min||Number(e.min)===0)&&Number(r.value)<=e.min&&(r.value=e.min.toString())};return(s,a)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(n.class)},[i.createVNode(i.unref(Pn),i.mergeProps(s.$attrs,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),size:s.size,onBlur:o}),i.createSlots({_:2},[i.renderList(s.$slots,(l,c)=>({name:l,fn:i.withCtx(d=>[i.renderSlot(s.$slots,l,i.normalizeProps(i.guardReactiveProps(d)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),[["__scopeId","data-v-ce1df798"]])),uE=$t(i.defineComponent({name:"zh-input-number",__name:"InputNumber",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,r=e,o=i.useAttrs(),s=(u,f=0,h=0,g=0)=>{let p=(u==null?void 0:u.toString())??"",y,m,b;return h===0?(p=p.replace(/[^\d]/g,""),p=p.replace(/^0\d+/g,"0"),f!==0&&(p=p.slice(0,f))):(p=p.replace(/[^\-\d.]/g,""),p=p.replace(/^[^\-\d]/g,""),p=p.replace(/\.{2}/g,"."),p=p.replace(/^0(\d+)/g,"$1"),y=p.split(".")||[],y.length>1?(f===0?m=y[0]:m=y[0].slice(0,f),b=y[1].slice(0,h),p=m+"."+b):f!==0&&(p=p.slice(0,f))),g!==0&&(p=p.slice(0,g)),p},a=()=>{n.modelValue===""||n.modelValue===void 0||(o.max&&Number(n.modelValue)>o.max&&r("update:modelValue",o.max.toString()),o.min&&Number(n.modelValue)<o.min&&r("update:modelValue",o.min.toString()))},l=u=>u?s(u,o.integer,o.precision,o.maxLength):"",c=u=>{/^\d+\.0*$/.test((u==null?void 0:u.toString())||"")||u===""?r("update:modelValue",l(u)):r("update:modelValue",Number(l(u)))},d=u=>{r("change",l(u))};return(u,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["input-number",n.class]),style:i.normalizeStyle(n.style)},[i.createVNode(i.unref(Pn),i.mergeProps(u.$attrs,{"model-value":n.modelValue,"onUpdate:modelValue":c,onBlur:a,style:{width:"100%"},formatter:l,onChange:d}),i.createSlots({_:2},[i.renderList(Object.keys(u.$slots),h=>({name:h,fn:i.withCtx(g=>[i.renderSlot(u.$slots,h,i.normalizeProps(i.guardReactiveProps(g)),void 0,!0)])}))]),1040,["model-value"])],6))}}),[["__scopeId","data-v-17c3b6e2"]]),fE=Mt(uE),Oz={class:"loading-box"},hE=Mt($t(i.defineComponent({name:"zh-loading",__name:"Loading",setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",Oz,n[0]||(n[0]=[i.createElementVNode("div",{class:"loading-wrap"},[i.createElementVNode("span",{class:"dot dot-spin"},[i.createElementVNode("i"),i.createElementVNode("i"),i.createElementVNode("i"),i.createElementVNode("i")])],-1)])))}}),[["__scopeId","data-v-d30f17c3"]])),Am={type:"",showCancelButton:!0,showConfirmButton:!0,cancelButtonText:"取消",confirmButtonText:"确定",closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!0,draggable:!1,center:!1,roundButton:!1},vu={confirm(t,e,n={}){return Qp.confirm(t,e,{...Am,customClass:"zh-message-box zh-message-confirm",...n})},alert(t,e,n={}){return Qp.alert(t,e,{...Am,...n,showCancelButton:!1,customClass:"zh-message-box zh-message-alert"})},prompt(t,e,n={}){return Qp.prompt(t,e,{...Am,...n,customClass:"zh-message-box zh-message-prompt"})}},pE=vu.confirm,mE=vu.alert,gE=vu.prompt,yE=Mt(vu),_E=Mt($t(i.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:i.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=i.useModel(t,"modelValue"),r=i.computed(()=>{if(n.value)return nz(n.value)&&Number(n.value)>=1e3?rz(Number(n.value)):""}),o=i.ref(!1);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(sr),{effect:"dark",content:r.value,placement:"top",visible:s.showTooltip&&o.value&&!!r.value},{default:i.withCtx(()=>[i.createVNode(uE,i.mergeProps(s.$attrs,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),style:e.style,class:e.class,onFocus:a[1]||(a[1]=()=>o.value=!0),onBlur:a[2]||(a[2]=()=>o.value=!1)}),i.createSlots({_:2},[i.renderList(Object.keys(s.$slots),l=>({name:l,fn:i.withCtx(c=>[i.renderSlot(s.$slots,l,i.normalizeProps(i.guardReactiveProps(c)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),[["__scopeId","data-v-cfd94d9e"]])),Lz={class:"page-head"},Az={class:"left-wrap"},Fz={class:"page-name"},Bz={class:"value"},Vz={class:"other-inform"},$z={class:"label"},zz={class:"value mg-r-24"},Wz={class:"status"},Yz=Mt($t(i.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(t){const e=t,{name:n,no:r,status:o,extendLabel:s,extendValue:a}=i.toRefs(e.dataSource);return(l,c)=>(i.openBlock(),i.createElementBlock("div",Lz,[i.createElementVNode("div",Az,[i.createElementVNode("span",Fz,i.toDisplayString(i.unref(n)),1),i.createElementVNode("div",null,[c[0]||(c[0]=i.createElementVNode("span",{class:"label mg-l-16"},"编号",-1)),i.createElementVNode("span",Bz,i.toDisplayString(i.unref(r)),1)])]),i.createElementVNode("div",Vz,[i.renderSlot(l.$slots,"extend",{},()=>[i.createElementVNode("span",$z,i.toDisplayString(i.unref(s)),1),i.createElementVNode("span",zz,i.toDisplayString(i.unref(a)),1)],!0),i.createElementVNode("span",Wz,i.toDisplayString(i.unref(o)),1)])]))}}),[["__scopeId","data-v-9f56969d"]])),bE=Mt($t(i.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{default:"top"},content:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(sr),{class:"box-item",effect:"dark",content:e.content,placement:e.placement},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},()=>[r[0]||(r[0]=i.createElementVNode("i",{class:"iconfont icon-Frame2"},null,-1))],!0)]),_:3},8,["content","placement"]))}}),[["__scopeId","data-v-e5a0ae09"]])),wE=Mt(i.defineComponent({name:"ZhBaseInfo",__name:"BaseInfo",props:{contentWidth:{default:void 0},labelWidth:{default:"70px"},infoDirection:{default:"horizontal"},cols:{default:4},gap:{default:16}},setup(t){const e=t,n=i.ref(),r=i.ref(),o=i.ref();i.provide("infoLabelWidth",n),i.provide("infoContentWidth",r),i.provide("infoDirection",o);function s(){n.value=e.labelWidth}function a(){r.value=e.contentWidth}function l(){o.value=e.infoDirection}return i.watch(()=>e.contentWidth,()=>a(),{immediate:!0}),i.watch(()=>e.labelWidth,()=>s(),{immediate:!0}),i.watch(()=>e.infoDirection,()=>l(),{immediate:!0}),(c,d)=>(i.openBlock(),i.createBlock(iE,{cols:c.cols,gap:c.gap},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default")]),_:3},8,["cols","gap"]))}})),Gz={class:"common-card"},jz={class:"detail-header"},Hz={class:"detail-header--left"},Uz={class:"title common-title"},Kz={class:"info-pair--label"},Xz={class:"info-pair--value"},Zz={key:1,class:"detail-header--right"},qz={class:"info-pair--label"},Jz={class:"info-pair--value"},CE=Mt($t(i.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{},stateDesc:{}},setup(t){const e=i.useSlots(),n=t;return(r,o)=>{var s,a;return i.openBlock(),i.createElementBlock("div",Gz,[i.createElementVNode("div",null,[i.renderSlot(r.$slots,"menu",{},void 0,!0)]),i.createElementVNode("div",jz,[i.createElementVNode("div",Hz,[i.createElementVNode("div",Uz,i.toDisplayString(n.title),1),i.renderSlot(r.$slots,"extra-info",{},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.leftInfos,l=>(i.openBlock(),i.createElementBlock("div",{class:"info-pair",key:l.value},[i.createElementVNode("div",Kz,i.toDisplayString(l.label),1),i.createElementVNode("div",Xz,i.toDisplayString(l.value??i.unref(Ut)),1)]))),128))]),i.renderSlot(r.$slots,"default",{},void 0,!0),i.unref(e)["right-infos"]?i.renderSlot(r.$slots,"right-infos",{key:0},void 0,!0):(i.openBlock(),i.createElementBlock("div",Zz,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.rightInfos,l=>(i.openBlock(),i.createElementBlock("div",{class:"info-pair",key:l.value},[i.createElementVNode("div",qz,i.toDisplayString(l.label),1),i.createElementVNode("div",Jz,i.toDisplayString(l.value??i.unref(Ut)),1)]))),128)),r.stateDesc||r.stateMeta?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["state common-title",(s=r.stateMeta)==null?void 0:s.state])},i.toDisplayString(r.stateDesc||((a=r.stateMeta)==null?void 0:a.intro)),3)):i.createCommentVNode("",!0)]))])])}}}),[["__scopeId","data-v-8b185816"]]));var Ci=(t=>(t.AUTOCOMPLETE="autocomplete",t.FORMAT="format",t.TEXT="text",t.INDEX="index",t))(Ci||{});const Qz={key:0},e9={key:1,class:"col-edit-header"},t9=["onClick"],n9={key:0},r9={class:"header-operation-container"},i9={class:"operation-container"},o9=["onClick"],EE="$ZH_DIV$",SE=Mt($t(i.defineComponent({name:"zh-diy-data-table",__name:"DiyDataTable",props:i.mergeModels({isEdit:{type:Boolean,default:!1},maxRowLength:{default:50},maxColLength:{default:10},defaultMinWidth:{default:120},beforeAddRow:{},addRowText:{default:"增行"},addColumnText:{default:"增列"},customAddRow:{type:Boolean,default:!0},customAddColumn:{type:Boolean,default:!0},operationOption:{},canOnlyEditNewlyColumnHeader:{type:Boolean,default:!1}},{rawData:{required:!0},rawDataModifiers:{}}),emits:["update:rawData"],setup(t,{expose:e}){const n=t,r=i.useModel(t,"rawData"),o=i.ref([]),s=i.ref({isShow:!0,width:150,customAddRow:!0,addRowText:"增行",customAddColumn:!0,addColumnText:"增列"}),a=i.computed(()=>n.operationOption?{...s.value,...n.operationOption||{}}:{...s.value,customAddRow:n.customAddRow!==void 0?n.customAddRow:s.value.customAddRow,addRowText:n.addRowText!==void 0?n.addRowText:s.value.addRowText,customAddColumn:n.customAddColumn!==void 0?n.customAddColumn:s.value.customAddColumn,addColumnText:n.addColumnText!==void 0?n.addColumnText:s.value.addColumnText}),l=()=>{if(r.value.length===n.maxRowLength){nu({message:`最多添加${n.maxRowLength}行`,type:"warning"});return}let b={};n.beforeAddRow&&(b=n.beforeAddRow(r.value)),r.value.push(b)},c=()=>{if(o.value.filter(w=>w.isAdd).length>=n.maxColLength){nu({message:`最多添加${n.maxColLength}列`,type:"warning"});return}const E=String(Date.now());o.value.push({prop:E,label:"",isEditHeader:!0,isAdd:!0,maxlength:15,minWidth:150,headerMaxlength:15,isNewlyColumn:!0})},d=(b,E)=>{o.value.splice(b,1),r.value.forEach(w=>{delete w[E.prop]})},u=b=>{b===0&&o.value.forEach(E=>{E.isSameData&&(r.value[1][E.prop]=r.value[0][E.prop])}),r.value.splice(b,1)},f=(b,E,w)=>{E(w.completeList.filter(_=>_.includes(b)).map(_=>({value:_})))},h=b=>[{validator:(E,w,_)=>{if(!o.value[b].label){_(new Error("请输入表头"));return}_()},message:"请输入表头",trigger:["blur","change"]}],g=(b,E,w)=>{const _=[];return b.required&&_.push({required:!0,message:b.requiredMessage||b.label+"不能为空",trigger:b.slot?void 0:"blur"}),b.varidate&&_.push({validator:(C,S,k)=>{const v=b.varidate(S,E,w);v!==!0?k(new Error(v)):k()}}),_},p=(b,E)=>{let w=b;return E.isSameData&&(w=r.value[0]||Ut),E.formatter?E.showFormatter?E.type===Ci.FORMAT?E.showFormatter(E.formatter(w)):E.showFormatter(w[E.prop]):E.formatter(w[E.prop]):w[E.prop]||Ut},y=i.ref(),m=i.ref({width:132,type:Ci.INDEX,prop:"index",label:"序号",fixed:"left",isShow:!0});return e({initData:(b,E)=>{const w=(E||[]).find(_=>_.type===Ci.INDEX)||null;w&&(m.value={...w,isShow:w.isShow!==!1}),b=Mn(b)||[],b.length===0&&b.push({}),E=[...E.filter(_=>_.type!==Ci.INDEX)],console.log("initData",b,E);for(const _ in b[0])if(!E.some(C=>C.prop===_)){const C=Date.now()+_,S=_.split(EE);if(S.length!==2){console.log("keySplit 失败",_);continue}const k=Number(S[1]);E[k]={prop:_,isEditHeader:!0,label:S[0],key:C,isAdd:!0,maxlength:15,headerMaxlength:15,isNewlyColumn:!1}}r.value=b,o.value=E.filter(_=>_)},getData:async()=>{await y.value.validate();for(const E in o.value){const w=o.value[E];for(const _ of o.value)if(w.prop!==_.prop&&w.label===_.label){nu({message:"所有列的表头不可重复",type:"warning"});return}}const b=Mn(r.value);for(const E in b){const w=b[E];for(const _ in o.value){const C=o.value[_];if(C.isSameData&&E!=="0"&&(w[C.prop]=b[0][C.prop]),C.varidate&&!C.varidate(w[C.prop],w,E))return;if(C.isAdd){const S=w[C.prop];delete w[C.prop];const k=C.label+EE+_;w[k]=S}C.formatter&&C.type===Ci.FORMAT&&(w[C.prop]=C.formatter(w))}}return{data:b,columns:o.value}},updateColumn:(b,E)=>{const w=o.value[b].prop;if(o.value[b]=E,w!==E.prop)for(const _ of r.value)_[E.prop]=_[w],delete _[w]},resetColumns:(b,E=!1)=>{const _=o.value.filter(S=>!S.isAdd).reduce((S,k)=>(b.some(v=>v.prop===k.prop)||S.push(k.prop),S),[]);r.value.forEach(S=>{_.forEach(k=>{delete S[k]})});const C=o.value.filter(S=>S.isAdd);E?o.value=[...b]:o.value=[...b,...C]},onAddRow:l,onAddColumn:c,formRef:y,getColumns:()=>o.value}),(b,E)=>(i.openBlock(),i.createBlock(i.unref(Wb),{class:"diy-data-table",model:t.rawData,ref_key:"formRef",ref:y},{default:i.withCtx(()=>[i.createVNode(i.unref(Jp),i.mergeProps({data:r.value},b.$attrs),{default:i.withCtx(()=>[m.value.isShow?(i.openBlock(),i.createBlock(i.unref(Io),{key:0,type:m.value.type,label:m.value.label,width:m.value.width,minWidth:m.value.minWidth,fixed:m.value.fixed},null,8,["type","label","width","minWidth","fixed"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(w,_)=>(i.openBlock(),i.createBlock(i.unref(Io),{key:w.key||_,prop:w.prop,label:w.label,width:w.width,"min-width":w.minWidth||b.defaultMinWidth,fixed:w.fixed},{header:i.withCtx(()=>[b.isEdit?w.isEditHeader&&b.canOnlyEditNewlyColumnHeader&&w.isNewlyColumn||w.isEditHeader&&!b.canOnlyEditNewlyColumnHeader?(i.openBlock(),i.createElementBlock("div",e9,[i.createVNode(i.unref(qh),{prop:`columns.${_}`,rules:h(_)},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{modelValue:w.label,"onUpdate:modelValue":C=>w.label=C,maxlength:w.headerMaxlength||20,placeholder:"请输入表头"},null,8,["modelValue","onUpdate:modelValue","maxlength"])]),_:2},1032,["prop","rules"]),w.isAdd?(i.openBlock(),i.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:C=>d(_,w)},null,8,t9)):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass({"is-required-label":w.required})},i.toDisplayString(w.label),3)):(i.openBlock(),i.createElementBlock("div",Qz,i.toDisplayString(w.label),1))]),default:i.withCtx(C=>[n.isEdit&&(!w.isSameData||C.$index===0)&&w.type!==i.unref(Ci).TEXT&&!C.row.disabled?(i.openBlock(),i.createBlock(i.unref(qh),{key:0,prop:`${C.$index}.${w.prop}`,rules:g(w,C.row,C.$index),class:i.normalizeClass(["col-edit-container",{"close-padding":w.isAdd}])},{default:i.withCtx(()=>[w.type===i.unref(Ci).FORMAT&&w.formatter?(i.openBlock(),i.createElementBlock("div",n9,i.toDisplayString(w.showFormatter?w.showFormatter(w.formatter(C.row)):w.formatter(C.row)),1)):w.type===i.unref(Ci).AUTOCOMPLETE?(i.openBlock(),i.createBlock(i.unref(kL),{key:1,modelValue:C.row[w.prop],"onUpdate:modelValue":S=>C.row[w.prop]=S,placeholder:w.placeholder||"请输入","fetch-suggestions":(S,k)=>f(S,k,w),maxlength:w.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","fetch-suggestions","maxlength"])):w.slot?i.renderSlot(b.$slots,w.slot,{key:2,row:C.row,$index:C.$index},void 0,!0):(i.openBlock(),i.createBlock(i.unref(Pn),{key:3,modelValue:C.row[w.prop],"onUpdate:modelValue":S=>C.row[w.prop]=S,placeholder:w.placeholder||"请输入",formatter:w.formatter,parser:w.parser,maxlength:w.maxlength||20,"show-word-limit":w.showWordLimit},null,8,["modelValue","onUpdate:modelValue","placeholder","formatter","parser","maxlength","show-word-limit"]))]),_:2},1032,["prop","rules","class"])):w.slot?i.renderSlot(b.$slots,w.slot,{key:1,row:C.row,$index:C.$index},void 0,!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(p(C.row,w)),1)],64))]),_:2},1032,["prop","label","width","min-width","fixed"]))),128)),n.isEdit&&a.value.isShow?(i.openBlock(),i.createBlock(i.unref(Io),{key:1,width:a.value.width,fixed:"right"},{header:i.withCtx(()=>[i.createElementVNode("div",r9,[a.value.customAddRow?(i.openBlock(),i.createBlock(i.unref(lr),{key:0,type:"primary",link:"",onClick:l},{default:i.withCtx(()=>[E[0]||(E[0]=i.createElementVNode("i",{class:"iconfont icon-Frame1"},null,-1)),i.createTextVNode(i.toDisplayString(a.value.addRowText),1)]),_:1})):i.createCommentVNode("",!0),a.value.customAddColumn?(i.openBlock(),i.createBlock(i.unref(lr),{key:1,type:"primary",link:"",onClick:c},{default:i.withCtx(()=>[E[1]||(E[1]=i.createElementVNode("i",{class:"iconfont icon-Frame-11"},null,-1)),i.createTextVNode(i.toDisplayString(a.value.addColumnText),1)]),_:1})):i.createCommentVNode("",!0)])]),default:i.withCtx(({$index:w,row:_})=>[i.createElementVNode("div",i9,[b.$slots.operation?i.renderSlot(b.$slots,"operation",{key:0,row:r.value[w],$index:w},void 0,!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.value.length>1&&!_.disabled?(i.openBlock(),i.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:C=>u(w)},null,8,o9)):i.createCommentVNode("",!0)],64))])]),_:3},8,["width"])):i.createCommentVNode("",!0)]),_:3},16,["data"])]),_:3},8,["model"]))}}),[["__scopeId","data-v-7618ed5a"]])),xu="ol-hidden",s9="ol-selectable",ic="ol-unselectable",Fm="ol-control",kE="ol-collapsed",a9=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),vE=["style","variant","weight","size","lineHeight","family"],xE=function(t){const e=t.match(a9);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let r=0,o=vE.length;r<o;++r){const s=e[r+1];s!==void 0&&(n[vE[r]]=s)}return n.families=n.family.split(/,\s?/),n};function TE(...t){console.warn(...t)}const un={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Bm(t){const e=Tr();for(let n=0,r=t.length;n<r;++n)sc(e,t[n]);return e}function l9(t,e,n){const r=Math.min.apply(null,t),o=Math.min.apply(null,e),s=Math.max.apply(null,t),a=Math.max.apply(null,e);return Ei(r,o,s,a,n)}function Tu(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function ME(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Cs(t,e,n){let r,o;return e<t[0]?r=t[0]-e:t[2]<e?r=e-t[2]:r=0,n<t[1]?o=t[1]-n:t[3]<n?o=n-t[3]:o=0,r*r+o*o}function Es(t,e){return Vm(t,e[0],e[1])}function Ss(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Vm(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function $m(t,e){const n=t[0],r=t[1],o=t[2],s=t[3],a=e[0],l=e[1];let c=un.UNKNOWN;return a<n?c=c|un.LEFT:a>o&&(c=c|un.RIGHT),l<r?c=c|un.BELOW:l>s&&(c=c|un.ABOVE),c===un.UNKNOWN&&(c=un.INTERSECTING),c}function Tr(){return[1/0,1/0,-1/0,-1/0]}function Ei(t,e,n,r,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=r,o):[t,e,n,r]}function Ea(t){return Ei(1/0,1/0,-1/0,-1/0,t)}function RE(t,e){const n=t[0],r=t[1];return Ei(n,r,n,r,e)}function zm(t,e,n,r,o){const s=Ea(o);return PE(s,t,e,n,r)}function oc(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function DE(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function sc(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function PE(t,e,n,r,o){for(;n<r;n+=o)c9(t,e[n],e[n+1]);return t}function c9(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function Wm(t,e){let n;return n=e(Mu(t)),n||(n=e(Ru(t)),n)||(n=e(Du(t)),n)||(n=e(ks(t)),n)?n:!1}function Ym(t){let e=0;return vs(t)||(e=mt(t)*fn(t)),e}function Mu(t){return[t[0],t[1]]}function Ru(t){return[t[2],t[1]]}function Qi(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function d9(t,e){let n;if(e==="bottom-left")n=Mu(t);else if(e==="bottom-right")n=Ru(t);else if(e==="top-left")n=ks(t);else if(e==="top-right")n=Du(t);else throw new Error("Invalid corner");return n}function Gm(t,e,n,r,o){const[s,a,l,c,d,u,f,h]=IE(t,e,n,r);return Ei(Math.min(s,l,d,f),Math.min(a,c,u,h),Math.max(s,l,d,f),Math.max(a,c,u,h),o)}function IE(t,e,n,r){const o=e*r[0]/2,s=e*r[1]/2,a=Math.cos(n),l=Math.sin(n),c=o*a,d=o*l,u=s*a,f=s*l,h=t[0],g=t[1];return[h-c+f,g-d-u,h-c-f,g-d+u,h+c-f,g+d+u,h+c+f,g+d-u,h-c+f,g-d-u]}function fn(t){return t[3]-t[1]}function Fo(t,e,n){const r=n||Tr();return Sn(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):Ea(r),r}function ks(t){return[t[0],t[3]]}function Du(t){return[t[2],t[3]]}function mt(t){return t[2]-t[0]}function Sn(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function vs(t){return t[2]<t[0]||t[3]<t[1]}function u9(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function f9(t,e){const n=(t[2]-t[0])/2*(e-1),r=(t[3]-t[1])/2*(e-1);t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r}function h9(t,e,n){let r=!1;const o=$m(t,e),s=$m(t,n);if(o===un.INTERSECTING||s===un.INTERSECTING)r=!0;else{const a=t[0],l=t[1],c=t[2],d=t[3],u=e[0],f=e[1],h=n[0],g=n[1],p=(g-f)/(h-u);let y,m;s&un.ABOVE&&!(o&un.ABOVE)&&(y=h-(g-d)/p,r=y>=a&&y<=c),!r&&s&un.RIGHT&&!(o&un.RIGHT)&&(m=g-(h-c)*p,r=m>=l&&m<=d),!r&&s&un.BELOW&&!(o&un.BELOW)&&(y=h-(g-l)/p,r=y>=a&&y<=c),!r&&s&un.LEFT&&!(o&un.LEFT)&&(m=g-(h-a)*p,r=m>=l&&m<=d)}return r}function p9(t,e,n,r){if(vs(t))return Ea(n);let o=[];o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]],e(o,o,2);const s=[],a=[];for(let l=0,c=o.length;l<c;l+=2)s.push(o[l]),a.push(o[l+1]);return l9(s,a,n)}function NE(t,e){const n=e.getExtent(),r=Qi(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){const o=mt(n),a=Math.floor((r[0]-n[0])/o)*o;t[0]-=a,t[2]-=a}return t}function OE(t,e,n){if(e.canWrapX()){const r=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[r[0],t[1],r[2],t[3]]];NE(t,e);const o=mt(r);if(mt(t)>o&&!n)return[[r[0],t[1],r[2],t[3]]];if(t[0]<r[0])return[[t[0]+o,t[1],r[2],t[3]],[r[0],t[1],t[2],t[3]]];if(t[2]>r[2])return[[t[0],t[1],r[2],t[3]],[r[0],t[1],t[2]-o,t[3]]]}return[t]}function Ot(t,e,n){return Math.min(Math.max(t,e),n)}function m9(t,e,n,r,o,s){const a=o-n,l=s-r;if(a!==0||l!==0){const c=((t-n)*a+(e-r)*l)/(a*a+l*l);c>1?(n=o,r=s):c>0&&(n+=a*c,r+=l*c)}return eo(t,e,n,r)}function eo(t,e,n,r){const o=n-t,s=r-e;return o*o+s*s}function g9(t){const e=t.length;for(let r=0;r<e;r++){let o=r,s=Math.abs(t[r][r]);for(let l=r+1;l<e;l++){const c=Math.abs(t[l][r]);c>s&&(s=c,o=l)}if(s===0)return null;const a=t[o];t[o]=t[r],t[r]=a;for(let l=r+1;l<e;l++){const c=-t[l][r]/t[r][r];for(let d=r;d<e+1;d++)r==d?t[l][d]=0:t[l][d]+=c*t[r][d]}}const n=new Array(e);for(let r=e-1;r>=0;r--){n[r]=t[r][e]/t[r][r];for(let o=r-1;o>=0;o--)t[o][e]-=t[o][r]*n[r]}return n}function LE(t){return t*180/Math.PI}function ei(t){return t*Math.PI/180}function xs(t,e){const n=t%e;return n*e<0?n+e:n}function dr(t,e,n){return t+n*(e-t)}function ac(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Pu(t,e){return Math.floor(ac(t,e))}function Iu(t,e){return Math.ceil(ac(t,e))}function jm(t,e,n){if(t>=e&&t<n)return t;const r=n-e;return((t-e)%r+r)%r+e}function y9(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nu(t,e){let n=!0;for(let r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function Hm(t,e){const n=Math.cos(e),r=Math.sin(e),o=t[0]*n-t[1]*r,s=t[1]*n+t[0]*r;return t[0]=o,t[1]=s,t}function _9(t,e){return t[0]*=e,t[1]*=e,t}function AE(t,e){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function FE(t,e){return Math.sqrt(AE(t,e))}function BE(t,e){if(e.canWrapX()){const n=mt(e.getExtent()),r=b9(t,e,n);r&&(t[0]-=r*n)}return t}function b9(t,e,n){const r=e.getExtent();let o=0;return e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])&&(n=n||mt(r),o=Math.floor((t[0]-r[0])/n)),o}const Sa={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Um{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Sa[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const lc=6378137,ka=Math.PI*lc,w9=[-ka,-ka,ka,ka],C9=[-180,-85,180,85],Ou=lc*Math.log(Math.tan(Math.PI/2));class va extends Um{constructor(e){super({code:e,units:"m",extent:w9,global:!0,worldExtent:C9,getPointResolution:function(n,r){return n/Math.cosh(r[1]/lc)}})}}const VE=[new va("EPSG:3857"),new va("EPSG:102100"),new va("EPSG:102113"),new va("EPSG:900913"),new va("http://www.opengis.net/def/crs/EPSG/0/3857"),new va("http://www.opengis.net/gml/srs/epsg.xml#3857")];function E9(t,e,n,r){const o=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(o));for(let s=0;s<o;s+=r){e[s]=ka*t[s]/180;let a=lc*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Ou?a=Ou:a<-Ou&&(a=-Ou),e[s+1]=a}return e}function S9(t,e,n,r){const o=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(o));for(let s=0;s<o;s+=r)e[s]=180*t[s]/ka,e[s+1]=360*Math.atan(Math.exp(t[s+1]/lc))/Math.PI-90;return e}const k9=6378137,$E=[-180,-90,180,90],v9=Math.PI*k9/180;class Ts extends Um{constructor(e,n){super({code:e,units:"degrees",extent:$E,axisOrientation:n,global:!0,metersPerUnit:v9,worldExtent:$E})}}const zE=[new Ts("CRS:84"),new Ts("EPSG:4326","neu"),new Ts("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ts("urn:ogc:def:crs:OGC:2:84"),new Ts("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ts("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ts("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Km={};function x9(t){return Km[t]||Km[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function T9(t,e){Km[t]=e}function cc(t){for(const e in t)delete t[e]}function xa(t){let e;for(e in t)return!1;return!e}let Ta={};function dc(t,e,n){const r=t.getCode(),o=e.getCode();r in Ta||(Ta[r]={}),Ta[r][o]=n}function Xm(t,e){return t in Ta&&e in Ta[t]?Ta[t][e]:null}const Lu=.9996,Mr=.00669438,Au=Mr*Mr,Fu=Au*Mr,Ms=Mr/(1-Mr),WE=Math.sqrt(1-Mr),Ma=(1-WE)/(1+WE),YE=Ma*Ma,Zm=YE*Ma,qm=Zm*Ma,GE=qm*Ma,jE=1-Mr/4-3*Au/64-5*Fu/256,M9=3*Mr/8+3*Au/32+45*Fu/1024,R9=15*Au/256+45*Fu/1024,D9=35*Fu/3072,P9=3/2*Ma-27/32*Zm+269/512*GE,I9=21/16*YE-55/32*qm,N9=151/96*Zm-417/128*GE,O9=1097/512*qm,Bu=6378137;function L9(t,e,n){const r=t-5e5,a=(n.north?e:e-1e7)/Lu/(Bu*jE),l=a+P9*Math.sin(2*a)+I9*Math.sin(4*a)+N9*Math.sin(6*a)+O9*Math.sin(8*a),c=Math.sin(l),d=c*c,u=Math.cos(l),f=c/u,h=f*f,g=h*h,p=1-Mr*d,y=Math.sqrt(1-Mr*d),m=Bu/y,b=(1-Mr)/p,E=Ms*u**2,w=E*E,_=r/(m*Lu),C=_*_,S=C*_,k=S*_,v=k*_,x=v*_,M=l-f/b*(C/2-k/24*(5+3*h+10*E-4*w-9*Ms))+x/720*(61+90*h+298*E+45*g-252*Ms-3*w);let P=(_-S/6*(1+2*h+E)+v/120*(5-2*E+28*h-3*w+8*Ms+24*g))/u;return P=jm(P+ei(KE(n.number)),-Math.PI,Math.PI),[LE(P),LE(M)]}const HE=-80,UE=84,A9=-180,F9=180;function B9(t,e,n){t=jm(t,A9,F9),e<HE?e=HE:e>UE&&(e=UE);const r=ei(e),o=Math.sin(r),s=Math.cos(r),a=o/s,l=a*a,c=l*l,d=ei(t),u=KE(n.number),f=ei(u),h=Bu/Math.sqrt(1-Mr*o**2),g=Ms*s**2,p=s*jm(d-f,-Math.PI,Math.PI),y=p*p,m=y*p,b=m*p,E=b*p,w=E*p,_=Bu*(jE*r-M9*Math.sin(2*r)+R9*Math.sin(4*r)-D9*Math.sin(6*r)),C=Lu*h*(p+m/6*(1-l+g)+E/120*(5-18*l+c+72*g-58*Ms))+5e5;let S=Lu*(_+h*a*(y/2+b/24*(5-l+9*g+4*g**2)+w/720*(61-58*l+c+600*g-330*Ms)));return n.north||(S+=1e7),[C,S]}function KE(t){return(t-1)*6-180+3}const V9=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function XE(t){let e=0;for(const o of V9){const s=t.match(o);if(s){e=parseInt(s[1]);break}}if(!e)return null;let n=0,r=!1;return e>32700&&e<32761?n=e-32700:e>32600&&e<32661&&(r=!0,n=e-32600),n?{number:n,north:r}:null}function ZE(t,e){return function(n,r,o,s){const a=n.length;o=o>1?o:2,s=s??o,r||(o>2?r=n.slice():r=new Array(a));for(let l=0;l<a;l+=s){const c=n[l],d=n[l+1],u=t(c,d,e);r[l]=u[0],r[l+1]=u[1]}return r}}function $9(t){return XE(t)?new Um({code:t,units:"m"}):null}function z9(t){const e=XE(t.getCode());return e?{forward:ZE(B9,e),inverse:ZE(L9,e)}:null}const Jm=63710088e-1;function Qm(t,e,n){n=n||Jm;const r=ei(t[1]),o=ei(e[1]),s=(o-r)/2,a=ei(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function eg(t,e){let n=0;for(let r=0,o=t.length;r<o-1;++r)n+=Qm(t[r],t[r+1],e);return n}function Vu(t,e){e=e||{};const n=e.radius||Jm,r=e.projection||"EPSG:3857",o=t.getType();o!=="GeometryCollection"&&(t=t.clone().transform(r,"EPSG:4326"));let s=0,a,l,c,d,u,f;switch(o){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{a=t.getCoordinates(),s=eg(a,n);break}case"MultiLineString":case"Polygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)s+=eg(a[c],n);break}case"MultiPolygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)for(l=a[c],u=0,f=l.length;u<f;++u)s+=eg(l[u],n);break}case"GeometryCollection":{const h=t.getGeometries();for(c=0,d=h.length;c<d;++c)s+=Vu(h[c],e);break}default:throw new Error("Unsupported geometry type: "+o)}return s}function $u(t,e){let n=0;const r=t.length;let o=t[r-1][0],s=t[r-1][1];for(let a=0;a<r;a++){const l=t[a][0],c=t[a][1];n+=ei(l-o)*(2+Math.sin(ei(s))+Math.sin(ei(c))),o=l,s=c}return n*e*e/2}function qE(t,e){e=e||{};const n=e.radius||Jm,r=e.projection||"EPSG:3857",o=t.getType();o!=="GeometryCollection"&&(t=t.clone().transform(r,"EPSG:4326"));let s=0,a,l,c,d,u,f;switch(o){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(a=t.getCoordinates(),s=Math.abs($u(a[0],n)),c=1,d=a.length;c<d;++c)s-=Math.abs($u(a[c],n));break}case"MultiPolygon":{for(a=t.getCoordinates(),c=0,d=a.length;c<d;++c)for(l=a[c],s+=Math.abs($u(l[0],n)),u=1,f=l.length;u<f;++u)s-=Math.abs($u(l[u],n));break}case"GeometryCollection":{const h=t.getGeometries();for(c=0,d=h.length;c<d;++c)s+=qE(h[c],e);break}default:throw new Error("Unsupported geometry type: "+o)}return s}const W9=[z9],Y9=[$9];let tg=!0;function JE(t){tg=!1}function ng(t,e){if(e!==void 0){for(let n=0,r=t.length;n<r;++n)e[n]=t[n];e=e}else e=t.slice();return e}function rg(t){T9(t.getCode(),t),dc(t,t,ng)}function G9(t){t.forEach(rg)}function nn(t){if(typeof t!="string")return t;const e=x9(t);if(e)return e;for(const n of Y9){const r=n(t);if(r)return r}return null}function zu(t,e,n,r){t=nn(t);let o;const s=t.getPointResolutionFunc();if(s){if(o=s(e,n),r&&r!==t.getUnits()){const a=t.getMetersPerUnit();a&&(o=o*a/Sa[r])}}else{const a=t.getUnits();if(a=="degrees"&&!r||r=="degrees")o=e;else{const l=og(t,nn("EPSG:4326"));if(!l&&a!=="degrees")o=e*t.getMetersPerUnit();else{let d=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];d=l(d,d,2);const u=Qm(d.slice(0,2),d.slice(2,4)),f=Qm(d.slice(4,6),d.slice(6,8));o=(u+f)/2}const c=r?Sa[r]:t.getMetersPerUnit();c!==void 0&&(o/=c)}}return o}function QE(t){G9(t),t.forEach(function(e){t.forEach(function(n){e!==n&&dc(e,n,ng)})})}function j9(t,e,n,r){t.forEach(function(o){e.forEach(function(s){dc(o,s,n),dc(s,o,r)})})}function ig(t,e){return t?typeof t=="string"?nn(t):t:nn(e)}function H9(t){return function(e,n,r,o){const s=e.length;r=r!==void 0?r:2,o=o??r,n=n!==void 0?n:new Array(s);for(let a=0;a<s;a+=o){const l=t(e.slice(a,a+r)),c=l.length;for(let d=0,u=o;d<u;++d)n[a+d]=d>=c?e[a+d]:l[d]}return n}}function Rr(t,e){return JE(),to(t,"EPSG:4326","EPSG:3857")}function U9(t,e){const n=to(t,"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=xs(r+180,360)-180),n}function Wu(t,e){if(t===e)return!0;const n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||og(t,e)===ng)&&n}function og(t,e){const n=t.getCode(),r=e.getCode();let o=Xm(n,r);if(o)return o;let s=null,a=null;for(const c of W9)s||(s=c(t)),a||(a=c(e));if(!s&&!a)return null;const l="EPSG:4326";if(a)if(s)o=sg(s.inverse,a.forward);else{const c=Xm(n,l);c&&(o=sg(c,a.forward))}else{const c=Xm(l,r);c&&(o=sg(s.inverse,c))}return o&&(rg(t),rg(e),dc(t,e,o)),o}function sg(t,e){return function(n,r,o,s){return r=t(n,r,o,s),e(r,r,o,s)}}function Ra(t,e){const n=nn(t),r=nn(e);return og(n,r)}function to(t,e,n){const r=Ra(e,n);if(!r){const o=nn(e).getCode(),s=nn(n).getCode();throw new Error(`No transform available between ${o} and ${s}`)}return r(t,void 0,t.length)}function K9(t,e,n,r){const o=Ra(e,n);return p9(t,o,void 0)}function ag(t,e){return t}function ti(t,e){return tg&&!Nu(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(tg=!1,TE("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function eS(t,e){return t}function Si(t,e){return t}function X9(){QE(VE),QE(zE),j9(zE,VE,E9,S9)}X9();const no={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Da={PROPERTYCHANGE:"propertychange"},je={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class Yu{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Z9(t,e,n){let r,o;n=n||ro;let s=0,a=t.length,l=!1;for(;s<a;)r=s+(a-s>>1),o=+n(t[r],e),o<0?s=r+1:(a=r,l=!o);return l?s:~s}function ro(t,e){return t>e?1:t<e?-1:0}function q9(t,e){return t<e?1:t>e?-1:0}function lg(t,e,n){if(t[0]<=e)return 0;const r=t.length;if(e<=t[r-1])return r-1;if(typeof n=="function"){for(let o=1;o<r;++o){const s=t[o];if(s===e)return o;if(s<e)return n(e,t[o-1],s)>0?o-1:o}return r-1}if(n>0){for(let o=1;o<r;++o)if(t[o]<e)return o-1;return r-1}if(n<0){for(let o=1;o<r;++o)if(t[o]<=e)return o;return r-1}for(let o=1;o<r;++o){if(t[o]==e)return o;if(t[o]<e)return t[o-1]-e<e-t[o]?o-1:o}return r-1}function J9(t,e,n){for(;e<n;){const r=t[e];t[e]=t[n],t[n]=r,++e,--n}}function ki(t,e){const n=Array.isArray(e)?e:[e],r=n.length;for(let o=0;o<r;o++)t[t.length]=n[o]}function Bo(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Q9(t,e,n){const r=e||ro;return t.every(function(o,s){if(s===0)return!0;const a=r(t[s-1],o);return!(a>0||a===0)})}function Pa(){return!0}function Ia(){return!1}function uc(){}function tS(t){let e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!n||this!==r||!Bo(o,n))&&(r=this,n=o,e=t.apply(this,arguments)),e}}function nS(t){function e(){let n;try{n=t()}catch(r){return Promise.reject(r)}return n instanceof Promise?n:Promise.resolve(n)}return e()}class vi{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class fc extends Yu{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const r=this.listeners_||(this.listeners_={}),o=r[e]||(r[e]=[]);o.includes(n)||o.push(n)}dispatchEvent(e){const n=typeof e=="string",r=n?e:e.type,o=this.listeners_&&this.listeners_[r];if(!o)return;const s=n?new vi(e):e;s.target||(s.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});r in a||(a[r]=0,l[r]=0),++a[r];let c;for(let d=0,u=o.length;d<u;++d)if("handleEvent"in o[d]?c=o[d].handleEvent(s):c=o[d].call(this,s),c===!1||s.propagationStopped){c=!1;break}if(--a[r]===0){let d=l[r];for(delete l[r];d--;)this.removeEventListener(r,uc);delete a[r]}return c}disposeInternal(){this.listeners_&&cc(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,n){if(!this.listeners_)return;const r=this.listeners_[e];if(!r)return;const o=r.indexOf(n);o!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(r[o]=uc,++this.pendingRemovals_[e]):(r.splice(o,1),r.length===0&&delete this.listeners_[e]))}}function ct(t,e,n,r,o){if(o){const a=n;n=function(l){return t.removeEventListener(e,n),a.call(r??this,l)}}else r&&r!==t&&(n=n.bind(r));const s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function Gu(t,e,n,r){return ct(t,e,n,r,!0)}function xt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),cc(t))}class hc extends fc{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(je.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const r=e.length,o=new Array(r);for(let s=0;s<r;++s)o[s]=ct(this,e[s],n);return o}return ct(this,e,n)}onceInternal(e,n){let r;if(Array.isArray(e)){const o=e.length;r=new Array(o);for(let s=0;s<o;++s)r[s]=Gu(this,e[s],n)}else r=Gu(this,e,n);return n.ol_key=r,r}unInternal(e,n){const r=n.ol_key;if(r)ju(r);else if(Array.isArray(e))for(let o=0,s=e.length;o<s;++o)this.removeEventListener(e[o],n);else this.removeEventListener(e,n)}}hc.prototype.on,hc.prototype.once,hc.prototype.un;function ju(t){if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)xt(t[e]);else xt(t)}function He(){throw new Error("Unimplemented abstract method.")}let eW=0;function dt(t){return t.ol_uid||(t.ol_uid=String(++eW))}class rS extends vi{constructor(e,n,r){super(e),this.key=n,this.oldValue=r}}class ni extends hc{constructor(e){super(),this.on,this.once,this.un,dt(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let n;return this.values_&&this.values_.hasOwnProperty(e)&&(n=this.values_[e]),n}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,n){let r;r=`change:${e}`,this.hasListener(r)&&this.dispatchEvent(new rS(r,e,n)),r=Da.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new rS(r,e,n))}addChangeListener(e,n){this.addEventListener(`change:${e}`,n)}removeChangeListener(e,n){this.removeEventListener(`change:${e}`,n)}set(e,n,r){const o=this.values_||(this.values_={});if(r)o[e]=n;else{const s=o[e];o[e]=n,s!==n&&this.notify(e,s)}}setProperties(e,n){for(const r in e)this.set(r,e[r],n)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,n){if(this.values_&&e in this.values_){const r=this.values_[e];delete this.values_[e],xa(this.values_)&&(this.values_=null),n||this.notify(e,r)}}}class Hu extends ni{constructor(e){super();const n=e.element;n&&!e.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),this.element=n||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){var e;(e=this.element)==null||e.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){var n;this.map_&&((n=this.element)==null||n.remove());for(let r=0,o=this.listenerKeys.length;r<o;++r)xt(this.listenerKeys[r]);if(this.listenerKeys.length=0,this.map_=e,e){const r=this.target_??e.getOverlayContainerStopEvent();this.element&&r.appendChild(this.element),this.render!==uc&&this.listenerKeys.push(ct(e,no.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}const cg="units",tW=[1,2,5],pc=25.4/.28;let nW=class extends Hu{constructor(e){e=e||{};const n=document.createElement("div");n.style.pointerEvents="none",super({element:n,render:e.render,target:e.target}),this.on,this.once,this.un;const r=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=r+"-inner",this.element.className=r+" "+ic,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(cg,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get(cg)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set(cg,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=e.center,r=e.projection,o=this.getUnits(),s=o=="degrees"?"degrees":"m";let a=zu(r,e.resolution,n,s);const l=this.minWidth_*(this.dpi_||pc)/pc,c=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||pc)/pc:void 0;let d=l*a,u="";if(o=="degrees"){const w=Sa.degrees;d*=w,d<w/60?(u="″",a*=3600):d<w?(u="′",a*=60):u="°"}else if(o=="imperial")d<.9144?(u="in",a/=.0254):d<1609.344?(u="ft",a/=.3048):(u="mi",a/=1609.344);else if(o=="nautical")a/=1852,u="NM";else if(o=="metric")d<1e-6?(u="nm",a*=1e9):d<.001?(u="μm",a*=1e6):d<1?(u="mm",a*=1e3):d<1e3?u="m":(u="km",a/=1e3);else if(o=="us")d<.9144?(u="in",a*=39.37):d<1609.344?(u="ft",a/=.30480061):(u="mi",a/=1609.3472);else throw new Error("Invalid units");let f=3*Math.floor(Math.log(l*a)/Math.log(10)),h,g,p,y=0,m,b;for(;;){p=Math.floor(f/3);const w=Math.pow(10,p);if(h=tW[(f%3+3)%3]*w,g=Math.round(h/a),isNaN(g)){this.element.style.display="none",this.renderedVisible_=!1;return}if(c!==void 0&&g>=c){h=y,g=m,p=b;break}else if(g>=l)break;y=h,m=g,b=p,++f}const E=this.scaleBar_?this.createScaleBar(g,h,u):h.toFixed(p<0?-p:0)+" "+u;this.renderedHTML_!=E&&(this.innerElement_.innerHTML=E,this.renderedHTML_=E),this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,n,r){const o=this.getScaleForResolution(),s=o<1?Math.round(1/o).toLocaleString()+" : 1":"1 : "+Math.round(o).toLocaleString(),a=this.scaleBarSteps_,l=e/a,c=[this.createMarker("absolute")];for(let u=0;u<a;++u){const f=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";c.push(`<div><div class="ol-scale-singlebar ${f}" style="width: ${l}px;"></div>`+this.createMarker("relative")+(u%2===0||a===2?this.createStepText(u,e,!1,n,r):"")+"</div>")}return c.push(this.createStepText(a,e,!0,n,r)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${e}px;">`+s+"</div>":"")+c.join("")}createMarker(e){return`<div class="ol-scale-step-marker" style="position: ${e}; top: ${e==="absolute"?3:-10}px;"></div>`}createStepText(e,n,r,o,s){const l=(e===0?0:Math.round(o/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+s),c=e===0?-3:n/this.scaleBarSteps_*-1,d=e===0?0:n/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${c}px;text-align: ${e===0?"left":"center"};min-width: ${d}px;left: ${r?n+"px":"unset"};">`+l+"</div>"}getScaleForResolution(){const e=zu(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),n=this.dpi_||pc,r=1e3/25.4;return e*r*n}render(e){const n=e.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()}};const Kn={ADD:"add",REMOVE:"remove"},iS={LENGTH:"length"};class Uu extends vi{constructor(e,n,r){super(e),this.element=n,this.index=r}}class xi extends ni{constructor(e,n){if(super(),this.on,this.once,this.un,n=n||{},this.unique_=!!n.unique,this.array_=e||[],this.unique_)for(let r=0,o=this.array_.length;r<o;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let n=0,r=e.length;n<r;++n)this.push(e[n]);return this}forEach(e){const n=this.array_;for(let r=0,o=n.length;r<o;++r)e(n[r],r,n)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(iS.LENGTH)}insertAt(e,n){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Uu(Kn.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let r=0,o=n.length;r<o;++r)if(n[r]===e)return this.removeAt(r)}removeAt(e){if(e<0||e>=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Uu(Kn.REMOVE,n,e)),n}setAt(e,n){const r=this.getLength();if(e>=r){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const o=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Uu(Kn.REMOVE,o,e)),this.dispatchEvent(new Uu(Kn.ADD,n,e))}updateLength_(){this.set(iS.LENGTH,this.array_.length)}assertUnique_(e,n){for(let r=0,o=this.array_.length;r<o;++r)if(this.array_[r]===e&&r!==n)throw new Error("Duplicate item added to a unique collection")}}function bt(t,e){if(!t)throw new Error(e)}class Kt extends ni{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new Kt(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const r=this.getStyle();return r&&e.setStyle(r),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(xt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ct(e,je.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?rW(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function rW(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(bt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}new Array(6);function Dr(){return[1,0,0,1,0,0]}function iW(t,e){const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=e[0],d=e[1],u=e[2],f=e[3],h=e[4],g=e[5];return t[0]=n*c+o*d,t[1]=r*c+s*d,t[2]=n*u+o*f,t[3]=r*u+s*f,t[4]=n*h+o*g+a,t[5]=r*h+s*g+l,t}function oW(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Wt(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function ri(t,e,n,r,o,s,a,l){const c=Math.sin(s),d=Math.cos(s);return t[0]=r*d,t[1]=o*c,t[2]=-r*c,t[3]=o*d,t[4]=a*r*d-l*r*c+e,t[5]=a*o*c+l*o*d+n,t}function oS(t,e){const n=sW(e);bt(n!==0,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*c-a*l)/n,t[5]=-(r*c-o*l)/n,t}function sW(t){return t[0]*t[3]-t[1]*t[2]}const aW=[1e5,1e5,1e5,1e5,2,2];function lW(t){return"matrix("+t.join(", ")+")"}function sS(t){return t.substring(7,t.length-1).split(",").map(parseFloat)}function cW(t,e){const n=sS(t),r=sS(e);for(let o=0;o<6;++o)if(Math.round((n[o]-r[o])*aW[o])!==0)return!1;return!0}function Vo(t,e,n,r,o,s,a){s=s||[],a=a||2;let l=0;for(let c=e;c<n;c+=r){const d=t[c],u=t[c+1];s[l++]=o[0]*d+o[2]*u+o[4],s[l++]=o[1]*d+o[3]*u+o[5];for(let f=2;f<a;f++)s[l++]=t[c+f]}return s&&s.length!=l&&(s.length=l),s}function dg(t,e,n,r,o,s,a){a=a||[];const l=Math.cos(o),c=Math.sin(o),d=s[0],u=s[1];let f=0;for(let h=e;h<n;h+=r){const g=t[h]-d,p=t[h+1]-u;a[f++]=d+g*l-p*c,a[f++]=u+g*c+p*l;for(let y=h+2;y<h+r;++y)a[f++]=t[y]}return a&&a.length!=f&&(a.length=f),a}function dW(t,e,n,r,o,s,a,l){l=l||[];const c=a[0],d=a[1];let u=0;for(let f=e;f<n;f+=r){const h=t[f]-c,g=t[f+1]-d;l[u++]=c+o*h,l[u++]=d+s*g;for(let p=f+2;p<f+r;++p)l[u++]=t[p]}return l&&l.length!=u&&(l.length=u),l}function uW(t,e,n,r,o,s,a){a=a||[];let l=0;for(let c=e;c<n;c+=r){a[l++]=t[c]+o,a[l++]=t[c+1]+s;for(let d=c+2;d<c+r;++d)a[l++]=t[d]}return a&&a.length!=l&&(a.length=l),a}const aS=Dr(),fW=[NaN,NaN];class lS extends ni{constructor(){super(),this.extent_=Tr(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=tS((e,n,r)=>{if(!r)return this.getSimplifiedGeometry(n);const o=this.clone();return o.applyTransform(r),o.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return He()}closestPointXY(e,n,r,o){return He()}containsXY(e,n){return this.closestPointXY(e,n,fW,Number.MIN_VALUE)===0}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return He()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Ea(n),this.extentRevision_=this.getRevision()}return u9(this.extent_,e)}rotate(e,n){He()}scale(e,n,r){He()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return He()}getType(){return He()}applyTransform(e){He()}intersectsExtent(e){return He()}translate(e,n){He()}transform(e,n){const r=nn(e),o=r.getUnits()=="tile-pixels"?function(s,a,l){const c=r.getExtent(),d=r.getWorldExtent(),u=fn(d)/fn(c);ri(aS,d[0],d[3],u,-u,0,0,0);const f=Vo(s,0,s.length,l,aS,a),h=Ra(r,n);return h?h(f,f,l):f}:Ra(r,n);return this.applyTransform(o),this}}class $o extends lS{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return zm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return He()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,n){this.stride=mc(e),this.layout=e,this.flatCoordinates=n}setCoordinates(e,n){He()}setLayout(e,n,r){let o;if(e)o=mc(e);else{for(let s=0;s<r;++s){if(n.length===0){this.layout="XY",this.stride=2;return}n=n[0]}o=n.length,e=hW(o)}this.layout=e,this.stride=o}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,n){const r=this.getFlatCoordinates();if(r){const o=this.getStride();dg(r,0,r.length,o,e,n,r),this.changed()}}scale(e,n,r){n===void 0&&(n=e),r||(r=Qi(this.getExtent()));const o=this.getFlatCoordinates();if(o){const s=this.getStride();dW(o,0,o.length,s,e,n,r,o),this.changed()}}translate(e,n){const r=this.getFlatCoordinates();if(r){const o=this.getStride();uW(r,0,r.length,o,e,n,r),this.changed()}}}function hW(t){let e;return t==2?e="XY":t==3?e="XYZ":t==4&&(e="XYZM"),e}function mc(t){let e;return t=="XY"?e=2:t=="XYZ"||t=="XYM"?e=3:t=="XYZM"&&(e=4),e}function pW(t,e,n){const r=t.getFlatCoordinates();if(!r)return null;const o=t.getStride();return Vo(r,0,r.length,o,e,n)}function cS(t,e,n,r){let o=0;const s=t[n-r],a=t[n-r+1];let l=0,c=0;for(;e<n;e+=r){const d=t[e]-s,u=t[e+1]-a;o+=c*d-l*u,l=d,c=u}return o/2}function dS(t,e,n,r){let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s];o+=cS(t,e,l,r),e=l}return o}function mW(t,e,n,r){let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s];o+=dS(t,e,l,r),e=l[l.length-1]}return o}function uS(t,e,n,r,o,s,a){const l=t[e],c=t[e+1],d=t[n]-l,u=t[n+1]-c;let f;if(d===0&&u===0)f=e;else{const h=((o-l)*d+(s-c)*u)/(d*d+u*u);if(h>1)f=n;else if(h>0){for(let g=0;g<r;++g)a[g]=dr(t[e+g],t[n+g],h);a.length=r;return}else f=e}for(let h=0;h<r;++h)a[h]=t[f+h];a.length=r}function ug(t,e,n,r,o){let s=t[e],a=t[e+1];for(e+=r;e<n;e+=r){const l=t[e],c=t[e+1],d=eo(s,a,l,c);d>o&&(o=d),s=l,a=c}return o}function fg(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];o=ug(t,e,l,r,o),e=l}return o}function gW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];o=fg(t,e,l,r,o),e=l[l.length-1]}return o}function hg(t,e,n,r,o,s,a,l,c,d,u){if(e==n)return d;let f,h;if(o===0){if(h=eo(a,l,t[e],t[e+1]),h<d){for(f=0;f<r;++f)c[f]=t[e+f];return c.length=r,h}return d}u=u||[NaN,NaN];let g=e+r;for(;g<n;)if(uS(t,g-r,g,r,a,l,u),h=eo(a,l,u[0],u[1]),h<d){for(d=h,f=0;f<r;++f)c[f]=u[f];c.length=r,g+=r}else g+=r*Math.max((Math.sqrt(h)-Math.sqrt(d))/o|0,1);if(s&&(uS(t,n-r,e,r,a,l,u),h=eo(a,l,u[0],u[1]),h<d)){for(d=h,f=0;f<r;++f)c[f]=u[f];c.length=r}return d}function pg(t,e,n,r,o,s,a,l,c,d,u){u=u||[NaN,NaN];for(let f=0,h=n.length;f<h;++f){const g=n[f];d=hg(t,e,g,r,o,s,a,l,c,d,u),e=g}return d}function yW(t,e,n,r,o,s,a,l,c,d,u){u=u||[NaN,NaN];for(let f=0,h=n.length;f<h;++f){const g=n[f];d=pg(t,e,g,r,o,s,a,l,c,d,u),e=g[g.length-1]}return d}function fS(t,e,n,r){for(let o=0,s=n.length;o<s;++o)t[e++]=n[o];return e}function Ku(t,e,n,r){for(let o=0,s=n.length;o<s;++o){const a=n[o];for(let l=0;l<r;++l)t[e++]=a[l]}return e}function mg(t,e,n,r,o){o=o||[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=Ku(t,e,n[a],r);o[s++]=c,e=c}return o.length=s,o}function _W(t,e,n,r,o){o=o||[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=mg(t,e,n[a],r,o[s]);c.length===0&&(c[0]=e),o[s++]=c,e=c[c.length-1]}return o.length=s,o}function io(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=e;a<n;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function gc(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=n[a];o[s++]=io(t,e,c,r,o[s]),e=c}return o.length=s,o}function gg(t,e,n,r,o){o=o!==void 0?o:[];let s=0;for(let a=0,l=n.length;a<l;++a){const c=n[a];o[s++]=c.length===1&&c[0]===e?[]:gc(t,e,c,r,o[s]),e=c[c.length-1]}return o.length=s,o}function Xu(t,e,n,r,o,s,a){const l=(n-e)/r;if(l<3){for(;e<n;e+=r)s[a++]=t[e],s[a++]=t[e+1];return a}const c=new Array(l);c[0]=1,c[l-1]=1;const d=[e,n-r];let u=0;for(;d.length>0;){const f=d.pop(),h=d.pop();let g=0;const p=t[h],y=t[h+1],m=t[f],b=t[f+1];for(let E=h+r;E<f;E+=r){const w=t[E],_=t[E+1],C=m9(w,_,p,y,m,b);C>g&&(u=E,g=C)}g>o&&(c[(u-e)/r]=1,h+r<u&&d.push(h,u),u+r<f&&d.push(u,f))}for(let f=0;f<l;++f)c[f]&&(s[a++]=t[e+f*r],s[a++]=t[e+f*r+1]);return a}function hS(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c];a=Xu(t,e,u,r,o,s,a),l.push(a),e=u}return a}function Rs(t,e){return e*Math.round(t/e)}function bW(t,e,n,r,o,s,a){if(e==n)return a;let l=Rs(t[e],o),c=Rs(t[e+1],o);e+=r,s[a++]=l,s[a++]=c;let d,u;do if(d=Rs(t[e],o),u=Rs(t[e+1],o),e+=r,e==n)return s[a++]=d,s[a++]=u,a;while(d==l&&u==c);for(;e<n;){const f=Rs(t[e],o),h=Rs(t[e+1],o);if(e+=r,f==d&&h==u)continue;const g=d-l,p=u-c,y=f-l,m=h-c;if(g*m==p*y&&(g<0&&y<g||g==y||g>0&&y>g)&&(p<0&&m<p||p==m||p>0&&m>p)){d=f,u=h;continue}s[a++]=d,s[a++]=u,l=d,c=u,d=f,u=h}return s[a++]=d,s[a++]=u,a}function yg(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c];a=bW(t,e,u,r,o,s,a),l.push(a),e=u}return a}function wW(t,e,n,r,o,s,a,l){for(let c=0,d=n.length;c<d;++c){const u=n[c],f=[];a=yg(t,e,u,r,o,s,a,f),l.push(f),e=u[u.length-1]}return a}class yc extends $o{constructor(e,n){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}clone(){return new yc(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ug(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,n,r,o))}getArea(){return cS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const n=[];return n.length=Xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new yc(n,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ku(this.flatCoordinates,0,e,this.stride),this.changed()}}class Xt extends $o{constructor(e,n){super(),this.setCoordinates(e,n)}clone(){const e=new Xt(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,o){const s=this.flatCoordinates,a=eo(e,n,s[0],s[1]);if(a<o){const l=this.stride;for(let c=0;c<l;++c)r[c]=s[c];return r.length=l,a}return o}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return RE(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Vm(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,n){this.setLayout(n,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=fS(this.flatCoordinates,0,e,this.stride),this.changed()}}function CW(t,e,n,r,o){return!Wm(o,function(a){return!Ds(t,e,n,r,a[0],a[1])})}function Ds(t,e,n,r,o,s){let a=0,l=t[n-r],c=t[n-r+1];for(;e<n;e+=r){const d=t[e],u=t[e+1];c<=s?u>s&&(d-l)*(s-c)-(o-l)*(u-c)>0&&a++:u<=s&&(d-l)*(s-c)-(o-l)*(u-c)<0&&a--,l=d,c=u}return a!==0}function _g(t,e,n,r,o,s){if(n.length===0||!Ds(t,e,n[0],r,o,s))return!1;for(let a=1,l=n.length;a<l;++a)if(Ds(t,n[a-1],n[a],r,o,s))return!1;return!0}function EW(t,e,n,r,o,s){if(n.length===0)return!1;for(let a=0,l=n.length;a<l;++a){const c=n[a];if(_g(t,e,c,r,o,s))return!0;e=c[c.length-1]}return!1}function bg(t,e,n,r,o,s,a){let l,c,d,u,f,h,g;const p=o[s+1],y=[];for(let E=0,w=n.length;E<w;++E){const _=n[E];for(u=t[_-r],h=t[_-r+1],l=e;l<_;l+=r)f=t[l],g=t[l+1],(p<=h&&g<=p||h<=p&&p<=g)&&(d=(p-h)/(g-h)*(f-u)+u,y.push(d)),u=f,h=g}let m=NaN,b=-1/0;for(y.sort(ro),u=y[0],l=1,c=y.length;l<c;++l){f=y[l];const E=Math.abs(f-u);E>b&&(d=(u+f)/2,_g(t,e,n,r,d,p)&&(m=d,b=E)),u=f}return isNaN(m)&&(m=o[s]),a?(a.push(m,p,b),a):[m,p,b]}function pS(t,e,n,r,o){let s=[];for(let a=0,l=n.length;a<l;++a){const c=n[a];s=bg(t,e,c,r,o,2*a,s),e=c[c.length-1]}return s}function mS(t,e,n,r,o){let s;for(e+=r;e<n;e+=r)if(s=o(t.slice(e-r,e),t.slice(e,e+r)),s)return s;return!1}function Zu(t,e,n,r,o,s){return s=s??PE(Tr(),t,e,n,r),Sn(o,s)?s[0]>=o[0]&&s[2]<=o[2]||s[1]>=o[1]&&s[3]<=o[3]?!0:mS(t,e,n,r,function(a,l){return h9(o,a,l)}):!1}function SW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){if(Zu(t,e,n[s],r,o))return!0;e=n[s]}return!1}function gS(t,e,n,r,o){return!!(Zu(t,e,n,r,o)||Ds(t,e,n,r,o[0],o[1])||Ds(t,e,n,r,o[0],o[3])||Ds(t,e,n,r,o[2],o[1])||Ds(t,e,n,r,o[2],o[3]))}function yS(t,e,n,r,o){if(!gS(t,e,n[0],r,o))return!1;if(n.length===1)return!0;for(let s=1,a=n.length;s<a;++s)if(CW(t,n[s-1],n[s],r,o)&&!Zu(t,n[s-1],n[s],r,o))return!1;return!0}function kW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];if(yS(t,e,l,r,o))return!0;e=l[l.length-1]}return!1}function vW(t,e,n,r){for(;e<n-r;){for(let o=0;o<r;++o){const s=t[e+o];t[e+o]=t[n-r+o],t[n-r+o]=s}e+=r,n-=r}}function wg(t,e,n,r){let o=0,s=t[n-r],a=t[n-r+1];for(;e<n;e+=r){const l=t[e],c=t[e+1];o+=(l-s)*(c+a),s=l,a=c}return o===0?void 0:o>0}function _S(t,e,n,r,o){o=o!==void 0?o:!1;for(let s=0,a=n.length;s<a;++s){const l=n[s],c=wg(t,e,l,r);if(s===0){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;e=l}return!0}function xW(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s];if(!_S(t,e,l,r,o))return!1;l.length&&(e=l[l.length-1])}return!0}function Cg(t,e,n,r,o){o=o!==void 0?o:!1;for(let s=0,a=n.length;s<a;++s){const l=n[s],c=wg(t,e,l,r);(s===0?o&&c||!o&&!c:o&&!c||!o&&c)&&vW(t,e,l,r),e=l}return e}function bS(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s)e=Cg(t,e,n[s],r,o);return e}function TW(t,e){const n=[];let r=0,o=0,s;for(let a=0,l=e.length;a<l;++a){const c=e[a],d=wg(t,r,c,2);if(s===void 0&&(s=d),d===s)n.push(e.slice(o,a+1));else{if(n.length===0)continue;n[n.length-1].push(e[o])}o=a+1,r=c}return n}class oo extends $o{constructor(e,n,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,n!==void 0&&r?(this.setFlatCoordinates(n,e),this.ends_=r):this.setCoordinates(e,n)}appendLinearRing(e){this.flatCoordinates?ki(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new oo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(fg(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),pg(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,n,r,o))}containsXY(e,n){return _g(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,n)}getArea(){return dS(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),Cg(n,0,this.ends_,this.stride,e)):n=this.flatCoordinates,gc(n,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=Qi(this.getExtent());this.flatInteriorPoint_=bg(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Xt(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new yc(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,n=this.flatCoordinates,r=this.ends_,o=[];let s=0;for(let a=0,l=r.length;a<l;++a){const c=r[a],d=new yc(n.slice(s,c),e);o.push(d),s=c}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;_S(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Cg(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const n=[],r=[];return n.length=yg(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),n,0,r),new oo(n,"XY",r)}getType(){return"Polygon"}intersectsExtent(e){return yS(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=mg(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}function wS(t){if(vs(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],n=t[1],r=t[2],o=t[3],s=[e,n,e,o,r,o,r,n,e,n];return new oo(s,"XY",[s.length])}function qu(t,e,n,r,o,s,a){let l,c;const d=(n-e)/r;if(d===1)l=e;else if(d===2)l=e,c=o;else if(d!==0){let u=t[e],f=t[e+1],h=0;const g=[0];for(let m=e+r;m<n;m+=r){const b=t[m],E=t[m+1];h+=Math.sqrt((b-u)*(b-u)+(E-f)*(E-f)),g.push(h),u=b,f=E}const p=o*h,y=Z9(g,p);y<0?(c=(p-g[-y-2])/(g[-y-1]-g[-y-2]),l=e+(-y-2)*r):l=e+y*r}a=a>1?a:2,s=s||new Array(a);for(let u=0;u<a;++u)s[u]=l===void 0?NaN:c===void 0?t[l+u]:dr(t[l+u],t[l+r+u],c);return s}function Eg(t,e,n,r,o,s){if(n==e)return null;let a;if(o<t[e+r-1])return s?(a=t.slice(e,e+r),a[r-1]=o,a):null;if(t[n-1]<o)return s?(a=t.slice(n-r,n),a[r-1]=o,a):null;if(o==t[e+r-1])return t.slice(e,e+r);let l=e/r,c=n/r;for(;l<c;){const h=l+c>>1;o<t[(h+1)*r-1]?c=h:l=h+1}const d=t[l*r-1];if(o==d)return t.slice((l-1)*r,(l-1)*r+r);const u=t[(l+1)*r-1],f=(o-d)/(u-d);a=[];for(let h=0;h<r-1;++h)a.push(dr(t[(l-1)*r+h],t[l*r+h],f));return a.push(o),a}function MW(t,e,n,r,o,s,a){if(a)return Eg(t,e,n[n.length-1],r,o,s);let l;if(o<t[r-1])return s?(l=t.slice(0,r),l[r-1]=o,l):null;if(t[t.length-1]<o)return s?(l=t.slice(t.length-r),l[r-1]=o,l):null;for(let c=0,d=n.length;c<d;++c){const u=n[c];if(e!=u){if(o<t[e+r-1])return null;if(o<=t[u-1])return Eg(t,e,u,r,o,!1);e=u}}return null}function Sg(t,e,n,r){let o=t[e],s=t[e+1],a=0;for(let l=e+r;l<n;l+=r){const c=t[l],d=t[l+1];a+=Math.sqrt((c-o)*(c-o)+(d-s)*(d-s)),o=c,s=d}return a}class Nn extends $o{constructor(e,n){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}appendCoordinate(e){ki(this.flatCoordinates,e),this.changed()}clone(){const e=new Nn(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,o){return o<Cs(this.getExtent(),e,n)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ug(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,n,r,o))}forEachSegment(e){return mS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,n){return this.layout!="XYM"&&this.layout!="XYZM"?null:(n=n!==void 0?n:!1,Eg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n))}getCoordinates(){return io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,n){return qu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,this.stride)}getLength(){return Sg(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const n=[];return n.length=Xu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new Nn(n,"XY")}getType(){return"LineString"}intersectsExtent(e){return Zu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,this.getExtent())}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ku(this.flatCoordinates,0,e,this.stride),this.changed()}}const Pr={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Ps=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"";Ps.includes("safari")&&!Ps.includes("chrom")&&(Ps.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Ps));const RW=Ps.includes("webkit")&&!Ps.includes("edge"),CS=Ps.includes("macintosh"),DW=typeof devicePixelRatio<"u"?devicePixelRatio:1,ES=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,SS=typeof Image<"u"&&Image.prototype.decode,PW=typeof createImageBitmap=="function",kS=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}(),Ne={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function rn(t,e,n,r){let o;return n&&n.length?o=n.shift():ES?o=new OffscreenCanvas(t||300,e||300):o=document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",r)}let kg;function Ju(){return kg||(kg=rn(1,1)),kg}function Qu(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function IW(t){let e=t.offsetWidth;const n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),e}function NW(t){let e=t.offsetHeight;const n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10),e}function vS(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function xS(t){for(;t.lastChild;)t.lastChild.remove()}function OW(t,e){const n=t.childNodes;for(let r=0;;++r){const o=n[r],s=e[r];if(!o&&!s)break;if(o!==s){if(!o){t.appendChild(s);continue}if(!s){t.removeChild(o),--r;continue}t.insertBefore(s,o)}}}const vg=[NaN,NaN,NaN,0];let xg;function LW(){return xg||(xg=rn(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),xg}const AW=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,FW=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,BW=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,VW=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function ef(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function _c(t){throw new Error('failed to parse "'+t+'" as color')}function TS(t){if(t.toLowerCase().startsWith("rgb")){const s=t.match(FW)||t.match(AW)||t.match(BW);if(s){const a=s[4],l=100/255;return[Ot(ef(s[1],l)+.5|0,0,255),Ot(ef(s[2],l)+.5|0,0,255),Ot(ef(s[3],l)+.5|0,0,255),a!==void 0?Ot(ef(a,100),0,1):1]}_c(t)}if(t.startsWith("#")){if(VW.test(t)){const s=t.substring(1),a=s.length<=4?1:2,l=[0,0,0,255];for(let c=0,d=s.length;c<d;c+=a){let u=parseInt(s.substring(c,c+a),16);a===1&&(u+=u<<4),l[c/a]=u}return l[3]=l[3]/255,l}_c(t)}const e=LW();e.fillStyle="#abcdef";let n=e.fillStyle;e.fillStyle=t,e.fillStyle===n&&(e.fillStyle="#fedcba",n=e.fillStyle,e.fillStyle=t,e.fillStyle===n&&_c(t));const r=e.fillStyle;if(r.startsWith("#")||r.startsWith("rgba"))return TS(r);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const o=Array.from(e.getImageData(0,0,1,1).data);return o[3]=ac(o[3]/255,3),o}function $W(t){return typeof t=="string"?t:Ng(t)}const zW=1024,bc={};let Tg=0;function WW(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function Mg(t){return t>.0031308?Math.pow(t,1/2.4)*269.025-14.025:t*3294.6}function Rg(t){return t>.2068965?Math.pow(t,3):(t-4/29)*(108/841)}function Dg(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function Pg(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function MS(t){const e=Dg(t[0]),n=Dg(t[1]),r=Dg(t[2]),o=Pg(e*.222488403+n*.716873169+r*.06060791),s=500*(Pg(e*.452247074+n*.399439023+r*.148375274)-o),a=200*(o-Pg(e*.016863605+n*.117638439+r*.865350722)),l=Math.atan2(a,s)*(180/Math.PI);return[116*o-16,Math.sqrt(s*s+a*a),l<0?l+360:l,t[3]]}function YW(t){const e=(t[0]+16)/116,n=t[1],r=t[2]*Math.PI/180,o=Rg(e),s=Rg(e+n/500*Math.cos(r)),a=Rg(e-n/200*Math.sin(r)),l=Mg(s*3.021973625-o*1.617392459-a*.404875592),c=Mg(s*-.943766287+o*1.916279586+a*.027607165),d=Mg(s*.069407491-o*.22898585+a*1.159737864);return[Ot(l+.5|0,0,255),Ot(c+.5|0,0,255),Ot(d+.5|0,0,255),t[3]]}function Ig(t){if(t==="none")return vg;if(bc.hasOwnProperty(t))return bc[t];if(Tg>=zW){let n=0;for(const r in bc)n++&3||(delete bc[r],--Tg)}const e=TS(t);e.length!==4&&_c(t);for(const n of e)isNaN(n)&&_c(t);return bc[t]=e,++Tg,e}function Na(t){return Array.isArray(t)?t:Ig(t)}function Ng(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let r=t[2];r!=(r|0)&&(r=r+.5|0);const o=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+r+","+o+")"}class GW extends fc{constructor(e,n,r,o){super(),this.extent=e,this.pixelRatio_=r,this.resolution=n,this.state=typeof o=="function"?Ne.IDLE:o,this.image_=null,this.loader=typeof o=="function"?o:null}changed(){this.dispatchEvent(je.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==Ne.IDLE&&this.loader){this.state=Ne.LOADING,this.changed();const e=this.getResolution(),n=Array.isArray(e)?e[0]:e;nS(()=>this.loader(this.getExtent(),n,this.getPixelRatio())).then(r=>{"image"in r&&(this.image_=r.image),"extent"in r&&(this.extent=r.extent),"resolution"in r&&(this.resolution=r.resolution),"pixelRatio"in r&&(this.pixelRatio_=r.pixelRatio),(r instanceof HTMLImageElement||PW&&r instanceof ImageBitmap||r instanceof HTMLCanvasElement||r instanceof HTMLVideoElement)&&(this.image_=r),this.state=Ne.LOADED}).catch(r=>{this.state=Ne.ERROR,console.error(r)}).finally(()=>this.changed())}}setImage(e){this.image_=e}setResolution(e){this.resolution=e}}function jW(t,e,n){const r=t;let o=!0,s=!1,a=!1;const l=[Gu(r,je.LOAD,function(){a=!0,s||e()})];return r.src&&SS?(s=!0,r.decode().then(function(){o&&e()}).catch(function(c){o&&(a?e():n())})):l.push(Gu(r,je.ERROR,n)),function(){o=!1,l.forEach(xt)}}function HW(t,e){return new Promise((n,r)=>{function o(){a(),n(t)}function s(){a(),r(new Error("Image load error"))}function a(){t.removeEventListener("load",o),t.removeEventListener("error",s)}t.addEventListener("load",o),t.addEventListener("error",s)})}function UW(t,e){return e&&(t.src=e),t.src&&SS?new Promise((n,r)=>t.decode().then(()=>n(t)).catch(o=>t.complete&&t.width?n(t):r(o))):HW(t)}class KW{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const r=this.cache_[n];!(e++&3)&&!r.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,r){const o=Og(e,n,r);return o in this.cache_?this.cache_[o]:null}getPattern(e,n,r){const o=Og(e,n,r);return o in this.patternCache_?this.patternCache_[o]:null}set(e,n,r,o,s){const a=Og(e,n,r),l=a in this.cache_;this.cache_[a]=o,s&&(o.getImageState()===Ne.IDLE&&o.load(),o.getImageState()===Ne.LOADING?o.ready().then(()=>{this.patternCache_[a]=Ju().createPattern(o.getImage(1),"repeat")}):this.patternCache_[a]=Ju().createPattern(o.getImage(1),"repeat")),l||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function Og(t,e,n){const r=n?Na(n):"null";return e+":"+t+":"+r}const Ir=new KW;let wc=null;class RS extends fc{constructor(e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.imageState_=o===void 0?Ne.IDLE:o,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Ne.LOADED){wc||(wc=rn(1,1,void 0,{willReadFrequently:!0})),wc.drawImage(this.image_,0,0);try{wc.getImageData(0,0,1,1),this.tainted_=!1}catch{wc=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(je.CHANGE)}handleImageError_(){this.imageState_=Ne.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Ne.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],r=rn(e,n);r.fillRect(0,0,e,n),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Ne.IDLE){this.image_||this.initializeImage_(),this.imageState_=Ne.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&UW(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==Ne.LOADED)return;const n=this.image_,r=rn(Math.ceil(n.width*e),Math.ceil(n.height*e)),o=r.canvas;r.scale(e,e),r.drawImage(n,0,0),r.globalCompositeOperation="multiply",r.fillStyle=$W(this.color_),r.fillRect(0,0,o.width/e,o.height/e),r.globalCompositeOperation="destination-in",r.drawImage(n,0,0),this.canvas_[e]=o}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===Ne.LOADED||this.imageState_===Ne.ERROR)e();else{const n=()=>{(this.imageState_===Ne.LOADED||this.imageState_===Ne.ERROR)&&(this.removeEventListener(je.CHANGE,n),e())};this.addEventListener(je.CHANGE,n)}})),this.ready_}}function Lg(t,e,n,r,o,s){let a=e===void 0?void 0:Ir.get(e,n,o);return a||(a=new RS(t,t&&"src"in t?t.src||void 0:e,n,r,o),Ir.set(e,n,o,a,s)),s&&a&&!Ir.getPattern(e,n,o)&&Ir.set(e,n,o,a,s),a}function Ti(t){return t?Array.isArray(t)?Ng(t):typeof t=="object"&&"src"in t?XW(t):t:null}function XW(t){if(!t.offset||!t.size)return Ir.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Ir.getPattern(e,void 0,t.color);if(n)return n;const r=Ir.get(t.src,"anonymous",null);if(r.getImageState()!==Ne.LOADED)return null;const o=rn(t.size[0],t.size[1]);return o.drawImage(r.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Lg(o.canvas,e,void 0,Ne.LOADED,t.color,!0),Ir.getPattern(e,void 0,t.color)}class DS{drawCustom(e,n,r,o,s){}drawGeometry(e){}setStyle(e){}drawCircle(e,n,r){}drawFeature(e,n,r){}drawGeometryCollection(e,n,r){}drawLineString(e,n,r){}drawMultiLineString(e,n,r){}drawMultiPoint(e,n,r){}drawMultiPolygon(e,n,r){}drawPoint(e,n,r){}drawPolygon(e,n,r){}drawText(e,n,r){}setFillStrokeStyle(e,n){}setImageStyle(e,n){}setTextStyle(e,n){}}const PS="10px sans-serif",Xn="#000",Oa="round",so=[],ao=0,La="round",Cc=10,Ec="#000",Sc="center",tf="middle",Is=[0,0,0,0],kc=1,lo=new ni;let Aa=null,Ag;const Fg={},ZW=function(){const e="32px ",n=["monospace","serif"],r=n.length,o="wmytzilWMYTZIL@#/&?$%10";let s,a;function l(d,u,f){let h=!0;for(let g=0;g<r;++g){const p=n[g];if(a=nf(d+" "+u+" "+e+p,o),f!=p){const y=nf(d+" "+u+" "+e+f+","+p,o);h=h&&y!=a}}return!!h}function c(){let d=!0;const u=lo.getKeys();for(let f=0,h=u.length;f<h;++f){const g=u[f];if(lo.get(g)<100){const[p,y,m]=g.split(`
|
|
74
74
|
`);l(p,y,m)?(cc(Fg),Aa=null,Ag=void 0,lo.set(g,100)):(lo.set(g,lo.get(g)+1,!0),d=!1)}}d&&(clearInterval(s),s=void 0)}return function(d){const u=xE(d);if(!u)return;const f=u.families;for(let h=0,g=f.length;h<g;++h){const p=f[h],y=u.style+`
|
|
75
75
|
`+u.weight+`
|
|
76
76
|
`+p;lo.get(y)===void 0&&(lo.set(y,100,!0),l(u.style,u.weight,p)||(lo.set(y,0,!0),s===void 0&&(s=setInterval(c,32))))}}}(),qW=function(){let t;return function(e){let n=Fg[e];if(n==null){if(ES){const r=xE(e),o=IS(e,"Žg");n=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(o.actualBoundingBoxAscent+o.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),n=t.offsetHeight,document.body.removeChild(t);Fg[e]=n}return n}}();function IS(t,e){return Aa||(Aa=rn(1,1)),t!=Ag&&(Aa.font=t,Ag=Aa.font),Aa.measureText(e)}function nf(t,e){return IS(t,e).width}function NS(t,e,n){if(e in n)return n[e];const r=e.split(`
|