@arbocollab/arbo-plugin-item-table 0.1.257 → 0.1.258
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/lib/es/index.es.js +12 -10
- package/lib/style.css +1 -1
- package/lib/umd/index.umd.js +3 -3
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -145,7 +145,7 @@ This will fail in production.`);i=hu,i._s.has(e)||(s?Eb(e,t,o,i):nI(e,o,i),J.env
|
|
|
145
145
|
z-index: ${i};
|
|
146
146
|
display: block;
|
|
147
147
|
`},u=()=>{const p=Ev(n),g=e.zIndex?e.zIndex-1:998;if(t.centered&&p){if(r.value=!0,l(p),t.showOverlay){const v=()=>{t.closeOnOverlayClick&&c()};a=vO(t.overlayOpacity,g,v)}}else if(s.value&&(s.value.show(),r.value=!0,t.showOverlay)){const v=()=>{t.closeOnOverlayClick&&c()};a=vO(t.overlayOpacity,g,v)}},c=()=>{const p=Ev(n);t.centered&&p?(r.value=!1,p.style.display="none",t.showOverlay&&(QS(a||void 0),a=null)):s.value&&(s.value.hide(),r.value=!1,t.showOverlay&&(QS(a||void 0),a=null))},d=()=>{r.value?c():u()},h=()=>{s.value&&(s.value.destroy(),s.value=null),t.showOverlay&&a&&(QS(a),a=null)},f=()=>{var v;const p=Ev(n);if(!p)return;if(p.style.display="none",t.centered){t.showOnInit&&u();return}const g={content:p,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((v=t.popperOptions)==null?void 0:v.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){r.value=!0,p.style.display="block"},onHide(){r.value=!1}};if(t.useTrigger){const y=Ev(o);if(!y)return;s.value=Qa(y,g)}else{const y=document.createElement("div");y.style.display="none",document.body.appendChild(y),s.value=Qa(y,g)}t.showOnInit&&u()};return Jt(()=>{f()}),Vn(()=>{h()}),Je(()=>t.alwaysShow,p=>{p?u():c()},{immediate:!0}),{popupRef:n,triggerRef:o,instance:s,isVisible:r,show:u,hide:c,toggle:d,destroy:h}}const eE=Xa("permissionStore",()=>{const e=$([]),t=$(),n=$({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:i=>{e.value=i},setEntityPermissions:i=>{t.value=i},setItemPermission:(i,a)=>{n.value[i]=a}}}),JZ="woohoo_getWoohooUserInterface_read",tE="media_getReviewUserInterface_read",QZ="update_getUpdateUserInterface_read",yO="Unarchive parent folder first to continue",eJ=(e,t,n,o,s,r)=>{const i=eE(),{userPermissions:a}=go(i),l=q(()=>{const x=ln.getInstance().getItem("BASE_URL"),N=ln.getInstance().getItem("BASE_REVIEW_URL"),{ws_code:B,entity_id:A,scene_id:P}=e.value;return{baseDomain:x||"",ws_code:B||"",entity_id:A||"",scene_id:P||"",reviewDomain:N||"",take_id:A||"",woohoo_id:A||"",parent_id:A||""}}),u=q(()=>{var N;const x=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:a.value.includes(tE),canCopyLink:!0,canRename:(x==null?void 0:x.has_edit_permission)??!1,canOpenTakeInReview:a.value.includes(tE),canOpenTakeInUpdate:a.value.includes(QZ),canOpenTakeInWoohoo:a.value.includes(JZ),canDeleteRendition:((N=x==null?void 0:x.media)==null?void 0:N.has_delete_rendition_permission)??!1,canDeleteThumbnail:(x==null?void 0:x.has_edit_thumbnail_permission)??!1,canArchiveScene:x==null?void 0:x.has_archive_permission,canUnarchiveScene:x==null?void 0:x.has_archive_permission,canDeleteScene:(x==null?void 0:x.has_delete_permission)??!1,canEditDescription:(x==null?void 0:x.has_edit_permission)??!1}}),c=q(()=>({project:Zo({type:"project",config:l.value}).url,take_review:Zo({type:"review_take",config:l.value}).url,review:Zo({type:"review_scene",config:l.value}).url,review_scene:Zo({type:"review_scene",config:l.value}).url,woohoo:Zo({type:"woohoo",config:l.value}).url,update:Zo({type:"update",config:l.value}).url,scene_hub:Zo({type:"scene_hub",config:l.value}).url})),d=(x,N)=>{const B=x.metaKey||x.ctrlKey,A=c.value[N]||"";if(A){if(N==="scene_hub"){if(B){window.open(A,"_blank");return}if(!o){console.error("Switch instance not found.",{openSceneHub:o,windowFunc:globalThis.window.$switchInstance});return}o(l.value.scene_id||"");return}B?window.open(A,"_blank"):window.location.href=A}},h=async(x,N)=>{var B;try{const A=await((B=e.value.axiosService.value)==null?void 0:B.deleteRendition({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""],deleteAll:!0}));(A==null?void 0:A.message)!="Done"&&console.error("Failed to delete rendition.")}catch(A){console.error("Error deleting rendition",A)}finally{s()}},f=async(x,N)=>{var B;try{await((B=e.value.axiosService.value)==null?void 0:B.deleteThumbnail({workspaceId:l.value.ws_code,itemIds:[l.value.scene_id||""]}))}catch(A){console.error("Error deleting thumbnail",A)}finally{s()}},p=async(x,N)=>{var B;try{const A=await((B=e.value.axiosService.value)==null?void 0:B.archiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(A==null?void 0:A.message)!="Done"&&console.error("Failed to archive scene."),N&&N("archived")}catch(A){console.error("Error archiving item",A)}finally{s()}},g=async(x,N)=>{var B;try{const A=await((B=e.value.axiosService.value)==null?void 0:B.deleteScene(l.value.ws_code,l.value.entity_id,l.value.scene_id));(A==null?void 0:A.message)!="Done"&&console.error("Failed to delete scene."),N&&N("deleted")}catch(A){console.error("Error deleting item",A)}finally{s()}},v=x=>{const N=c.value.scene_hub||"";N&&(E.value="Copied",navigator.clipboard.writeText(N),setTimeout(()=>{E.value="Copy link"},5e3))},y=async(x,N)=>{var B;try{const A=await((B=e.value.axiosService.value)==null?void 0:B.unarchiveScene(l.value.ws_code,l.value.entity_id,[l.value.scene_id]));(A==null?void 0:A.message)!="Done"&&console.error("Failed to unarchive scene."),N&&N("unarchived")}catch(A){console.error("Error unarchiving item",A)}finally{s()}},b=x=>p(x,t),S=x=>y(x,t),w=x=>g(x,t),E=$("Copy link"),R=x=>d(x,"review"),D=q(()=>{let x=[];if(!l.value.scene_id&&e.value.optionBlock&&x.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length)return e.value.optionBlock;const N=()=>Math.random().toString(36).substring(2,9);return[{id:N(),type:"column",groupLabel:"Download Options",options:[{id:"open_review",label:"Open Review",icon:"PenRuler",action:R,hide:!u.value.canOpenReview,disabled:!u.value.canOpenReview,description:"",type:"icon"},{id:N(),label:E.value,icon:"Link",action:v,hide:!u.value.canCopyLink,disabled:!u.value.canCopyLink,description:"",type:"icon"}]},{id:N(),type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:b,hide:u.value.canArchiveScene==0,disabled:u.value.canArchiveScene!==1,description:u.value.canArchiveScene==-1?yO:"",type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:S,hide:u.value.canUnarchiveScene==0,disabled:u.value.canUnarchiveScene!==1,description:u.value.canUnarchiveScene===-1?yO:"",type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:w,hide:!u.value.canDeleteScene,type:"icon"}]}]});return{linkMap:c,handleOpen:d,copyLink:v,deleteRendition:h,deleteThumbnail:f,archiveItem:p,deleteItem:g,unArchiveItem:y,options:D}};function xo(e){const t=$(!1),n=$(!1),o=q(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),s=()=>{t.value=!0,ft(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},r=()=>{t.value=!1},i=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return Jt(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",s),u.addEventListener("blur",r)),c&&(c.addEventListener("mouseenter",i),c.addEventListener("mouseleave",a))}),Vn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",s),u.removeEventListener("blur",r)),c&&(c.removeEventListener("mouseenter",i),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:o,handleFocus:s}}const ld=e=>{const t=$(!1),n=q(()=>t.value);return Jt(()=>{var a,l,u,c;const o=(a=e.params)==null?void 0:a.api,s=(l=e.params)==null?void 0:l.node,r=s==null?void 0:s.rowIndex,i=(c=(u=e.params)==null?void 0:u.colDef)==null?void 0:c.field;return o==null||o.addEventListener("cellEditingStarted",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!0)}),o==null||o.addEventListener("cellEditingStopped",d=>{d.rowIndex===r&&d.colDef.field===i&&(t.value=!1)}),{isEditing:n}}),Je(()=>e,()=>{e.isEditing!==void 0&&(t.value=e.isEditing)}),{isEditing:n}};var br=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(br||{});const Vf=Xa("bulkUpdate",()=>{const e=$(Ft.UNCHECK),t=Po({loaded:0,total:0}),n=c=>{t.total=c},o=c=>{t.loaded=c},s=Po({isBulkUpdating:!1});function r(c){s.isBulkUpdating=c}const i=$({}),a=c=>{i.value=c},l=(c,d)=>{i.value[c]=d},u=c=>{e.value=c};return{bulkUpdateState:s,setIsBulkUpdating:r,selectionIds:i,setSelectionIds:a,setCheckedForId:l,setSelectionStatus:u,selectionStatus:e,rowCount:t,setTotalRowCount:n,setLoadedRowCount:o,handelSelectAll:()=>{u(Ft.CHECKED)}}}),tJ={...{list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch basic information."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{error:"Deletion failed. Please try again."},delete_thumbnail:{error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{error:"Deletion failed. Please try again."},bulkArchive:{error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},me:{},workspaces:{},entityUserRoles:{},templateFlowStatuses:{},bulkMetricUpdate:{error:"Update failed. Please try again."},createNewItem:{},getAssignableAssignees:{},getAssignableStatuses:{},getFilterStatuses:{},bulkRename:{},bulkCreate:{}},offline:{error:"You are currently offline. Please check your network connection."}};function wO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function CO(e,t,n,o,s,r,i){try{var a=e[r](i),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(o,s)}function nE(e){return function(){var t=this,n=arguments;return new Promise(function(o,s){var r=e.apply(t,n);function i(l){CO(r,o,s,i,a,"next",l)}function a(l){CO(r,o,s,i,a,"throw",l)}i(void 0)})}}function oE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nJ(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,SO(o.key),o)}}function sE(e,t,n){return t&&nJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oJ(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=aJ(e))||t){n&&(e=n);var o=0,s=function(){};return{s,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
148
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){a=!0,r=l},f:function(){try{i||n.return==null||n.return()}finally{if(a)throw r}}}}function ud(e,t,n){return(t=SO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,o)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bO(Object(n),!0).forEach(function(o){ud(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bO(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function sJ(e,t){if(e==null)return{};var n,o,s=rJ(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function rJ(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function xu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function r(f,p,g,v){var y=p&&p.prototype instanceof a?p:a,b=Object.create(y.prototype);return Ws(b,"_invoke",function(S,w,E){var R,D,x,N=0,B=E||[],A=!1,P={p:0,n:0,v:e,a:k,f:k.bind(e,4),d:function(O,L){return R=O,D=0,x=e,P.n=L,i}};function k(O,L){for(D=O,x=L,t=0;!A&&N&&!H&&t<B.length;t++){var H,W=B[t],se=P.p,ie=W[2];O>3?(H=ie===L)&&(x=W[(D=W[4])?5:(D=3,3)],W[4]=W[5]=e):W[0]<=se&&((H=O<2&&se<W[1])?(D=0,P.v=L,P.n=W[1]):se<ie&&(H=O<3||W[0]>L||L>ie)&&(W[4]=O,W[5]=L,P.n=ie,D=0))}if(H||O>1)return i;throw A=!0,L}return function(O,L,H){if(N>1)throw TypeError("Generator is already running");for(A&&L===1&&k(L,H),D=L,x=H;(t=D<2?e:x)||!A;){R||(D?D<3?(D>1&&(P.n=-1),k(D,x)):P.n=x:P.v=x);try{if(N=2,R){if(D||(O="next"),t=R[O]){if(!(t=t.call(R,x)))throw TypeError("iterator result is not an object");if(!t.done)return t;x=t.value,D<2&&(D=0)}else D===1&&(t=R.return)&&t.call(R),D<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),D=1);R=e}else if((t=(A=P.n<0)?x:S.call(w,P))!==i)break}catch(W){R=e,D=1,x=W}finally{N=1}}return{value:t,done:A}}}(f,g,v),!0),b}var i={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(Ws(t={},o,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function h(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,u):(f.__proto__=u,Ws(f,s,"GeneratorFunction")),f.prototype=Object.create(d),f}return l.prototype=u,Ws(d,"constructor",u),Ws(u,"constructor",l),l.displayName="GeneratorFunction",Ws(u,s,"GeneratorFunction"),Ws(d),Ws(d,s,"Generator"),Ws(d,o,function(){return this}),Ws(d,"toString",function(){return"[object Generator]"}),(xu=function(){return{w:r,m:h}})()}function Ws(e,t,n,o){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}Ws=function(r,i,a,l){function u(c,d){Ws(r,c,function(h){return this._invoke(c,d,h)})}i?s?s(r,i,{value:a,enumerable:!l,configurable:!l,writable:!l}):r[i]=a:(u("next",0),u("throw",1),u("return",2))},Ws(e,t,n,o)}function iJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SO(e){var t=iJ(e,"string");return typeof t=="symbol"?t:t+""}function ul(e){"@babel/helpers - typeof";return ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ul(e)}function aJ(e,t){if(e){if(typeof e=="string")return wO(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wO(e,t):void 0}}var rE=function(e){return e.TOOLBOX_EXPORT_DATA="TOOLBOX_EXPORT_DATA",e.SW_APP_LOADER="SW_APP_LOADER",e}({});function EO(e){return ul(e)==="object"&&e!==null&&!Array.isArray(e)}function _O(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function lJ(e){return typeof Blob<"u"&&e instanceof Blob}var uJ=function(t){return EO(t)&&_O(t,["file","fileName"])&&lJ(t.file)&&typeof t.fileName=="string"},cJ=function(t){return EO(t)&&_O(t,["scene_id","people_id","openGS","queryParams"])&&(typeof t.scene_id=="string"||t.scene_id===null)&&(typeof t.people_id=="string"||t.people_id===null)&&(typeof t.openGS=="boolean"||t.openGS===null)&&typeof t.queryParams=="string"},dJ=Object.freeze(ud(ud({},rE.TOOLBOX_EXPORT_DATA,uJ),rE.SW_APP_LOADER,cJ));function hJ(e){return ul(e)==="object"&&e!==null&&!Array.isArray(e)}function fJ(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function pJ(e){if(!hJ(e))return{valid:!1,reason:"Message must be an object."};if(e.version!==1)return{valid:!1,reason:"Unsupported or missing message version."};if(typeof e.type!="string"||!Object.values(rE).includes(e.type))return{valid:!1,reason:"Unknown or missing message type."};if(e.id!==void 0&&typeof e.id!="string")return{valid:!1,reason:"Message id must be a string when provided."};var t=e.id===void 0?["version","type","payload"]:["version","type","payload","id"];if(!fJ(e,t))return{valid:!1,reason:"Message contains missing or unexpected fields."};var n=e.type;return dJ[n](e.payload)?{valid:!0,message:e}:{valid:!1,reason:"Payload does not match the ".concat(n," schema.")}}function gJ(e){var t=e.target,n=e.allowedOrigins,o=e.onMessage,s=e.onInvalidMessage,r=t??(typeof window>"u"?void 0:window);if(!r)throw new TypeError("A target window is required outside a browser environment.");if(!Array.isArray(n)||n.length===0)throw new TypeError("At least one allowed message origin must be configured.");if(n.some(function(a){return typeof a!="string"||a.length===0||a==="*"}))throw new TypeError("Allowed message origins must be explicit origin strings; wildcards are not allowed.");if(typeof o!="function")throw new TypeError("An onMessage callback is required.");var i=function(l){if(!n.includes(l.origin)){s==null||s(l.data,"Untrusted message origin: ".concat(l.origin),l);return}var u=pJ(l.data);if(u.valid===!1){s==null||s(l.data,u.reason,l);return}o(u.message,l)};return r.addEventListener("message",i),function(){return r.removeEventListener("message",i)}}class mJ extends Error{}class cl extends mJ{constructor(){super("Zone is an abstract class")}}class RO{get type(){throw new cl}get name(){throw new cl}get ianaName(){return this.name}get isUniversal(){throw new cl}offsetName(t,n){throw new cl}formatOffset(t,n){throw new cl}offset(t){throw new cl}equals(t){throw new cl}get isValid(){throw new cl}}const iE=new Map;function vJ(e){let t=iE.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),iE.set(e,t)),t}const yJ={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function wJ(e,t){const n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,i,a,l,u,c]=o;return[i,s,r,a,l,u,c]}function CJ(e,t){const n=e.formatToParts(t),o=[];for(let s=0;s<n.length;s++){const{type:r,value:i}=n[s],a=yJ[r];r==="era"?o[a]=i:Rv(a)||(o[a]=parseInt(i,10))}return o}const aE=new Map;class _v extends RO{static create(t){let n=aE.get(t);return n===void 0&&aE.set(t,n=new _v(t)),n}static resetCache(){aE.clear(),iE.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=_v.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:o}){return EJ(t,n,o,this.name)}formatOffset(t,n){return Dv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const o=vJ(this.name);let[s,r,i,a,l,u,c]=o.formatToParts?CJ(o,n):wJ(o,n);a==="BC"&&(s=-Math.abs(s)+1);const h=SJ({year:s,month:r,day:i,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let lE=null;class dd extends RO{static get utcInstance(){return lE===null&&(lE=new dd(0)),lE}static instance(t){return t===0?dd.utcInstance:new dd(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new dd(DO(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Dv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Dv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Dv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}function Rv(e){return typeof e>"u"}function Tv(e,t=2){const n=e<0;let o;return n?o="-"+(""+-e).padStart(t,"0"):o=(""+e).padStart(t,"0"),o}function TO(e){if(!(Rv(e)||e===null||e===""))return parseInt(e,10)}function bJ(e){if(!(Rv(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function SJ(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function EJ(e,t,n,o=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};o&&(r.timeZone=o);const i={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,i).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function DO(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const o=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-o:o;return n*60+s}function Dv(e,t){const n=Math.trunc(Math.abs(e/60)),o=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Tv(n,2)}:${Tv(o,2)}`;case"narrow":return`${s}${n}${o>0?`:${o}`:""}`;case"techie":return`${s}${Tv(n,2)}${Tv(o,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const xO=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function hd(...e){const t=e.reduce((n,o)=>n+o.source,"");return RegExp(`^${t}$`)}function fd(...e){return t=>e.reduce(([n,o,s],r)=>{const[i,a,l]=r(t,s);return[{...n,...i},a||o,l]},[{},null,1]).slice(0,2)}function AO(...e){return(t,n)=>{const o={};let s;for(s=0;s<e.length;s++)o[e[s]]=TO(t[n+s]);return[o,null,n+s]}}const IO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,_J=`(?:${IO.source}?(?:\\[(${xO.source})\\])?)?`,PO=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,kO=RegExp(`${PO.source}${_J}`),uE=RegExp(`(?:[Tt]${kO.source})?`),RJ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,TJ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,DJ=/(\d{4})-?(\d{3})/,xJ=AO("weekYear","weekNumber","weekDay"),AJ=AO("year","ordinal"),IJ=/(\d{4})-(\d\d)-(\d\d)/,FO=RegExp(`${PO.source} ?(?:${IO.source}|(${xO.source}))?`),PJ=RegExp(`(?: ${FO.source})?`);function pd(e,t,n){const o=e[t];return Rv(o)?n:TO(o)}function kJ(e,t){return[{year:pd(e,t),month:pd(e,t+1,1),day:pd(e,t+2,1)},null,t+3]}function gd(e,t){return[{hours:pd(e,t,0),minutes:pd(e,t+1,0),seconds:pd(e,t+2,0),milliseconds:bJ(e[t+3])},null,t+4]}function Bf(e,t){const n=!e[t]&&!e[t+1],o=DO(e[t+1],e[t+2]),s=n?null:dd.instance(o);return[{},s,t+3]}function $f(e,t){const n=e[t]?_v.create(e[t]):null;return[{},n,t+1]}hd(RJ,uE),hd(TJ,uE),hd(DJ,uE),hd(kO),fd(kJ,gd,Bf,$f),fd(xJ,gd,Bf,$f),fd(AJ,gd,Bf,$f),fd(gd,Bf,$f),fd(gd),hd(IJ,PJ),hd(FO),fd(gd,Bf,$f);var FJ=["accessTokenKey","refreshTokenKey","domain","path","secure","sameSite","canSetTokens","cookieParser"];function Dt(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function Hf(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).error.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function xv(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).warn.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function OJ(){var e=typeof window<"u"?sessionStorage.getItem("BASE_DOMAIN_COOKIE")||window.location.hostname:void 0;return Dt("getStandardizedCookieConfig - domain:",e,"from BASE_DOMAIN_COOKIE:",sessionStorage.getItem("BASE_DOMAIN_COOKIE")),{accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:e,path:"/",secure:!0,sameSite:"lax"}}function MJ(){return{maxRetries:5,retryDelay:500,backoffFactor:1.5}}var OO=1e3,NJ=1e4;function MO(e){if(!(typeof window>"u")){var t=window.self!==window.top;try{if(t&&window.top){Dt("Inside iframe - redirecting top window to:",e),window.top.location.replace(e);return}}catch(n){Hf("Top window redirect blocked, redirecting current window instead:",n)}try{Dt("Redirecting current window to:",e),window.location.replace(e)}catch(n){Hf("Failed to redirect:",n)}}}function Av(e){return typeof e!="string"||!e?e:e.length<=2?"*".repeat(e.length):"".concat(e[0]).concat("*".repeat(e.length-2)).concat(e[e.length-1])}function LJ(e){return cd(cd({},e),{},{access_token:Av(e.access_token),token:Av(e.token),refresh_token:Av(e.refresh_token)})}function Iv(e){if(!e)return!1;var t=e.trim();return!!t&&t!=="undefined"&&t!=="null"}function NO(e){return Iv(e.getAccessToken())||Iv(e.getRefreshToken())}function VJ(e){if(!(typeof document>"u")){var t=typeof window<"u"?window.location.hostname:"",n=e||(typeof sessionStorage<"u"?sessionStorage.getItem("BASE_DOMAIN_COOKIE"):null)||t,o=Array.from(new Set([n,t].filter(Boolean)));Dt("Clearing all cookies - domains:",o);var s=document.cookie.split(";");s.forEach(function(r){var i=r.split("=")[0].trim();i&&(document.cookie="".concat(i,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"),o.forEach(function(a){document.cookie="".concat(i,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=").concat(a)}))})}}function BJ(){typeof sessionStorage<"u"&&sessionStorage.clear()}function $J(e){return function(t){var n,o=(n=t.response)===null||n===void 0?void 0:n.status,s=NO(e);if(Dt("getStandardizedTokenExpiredDetection - status:",o,"userLoggedIn:",s),!s)return Dt("User not logged in - returning false"),!1;if(o===400){var r,i,a,l=(r=t.response)===null||r===void 0?void 0:r.data,u=(l==null?void 0:l.error)==="invalid_token"||(l==null||(i=l.error)===null||i===void 0?void 0:i.key)==="invalid_token";return Dt(" 400 error - isInvalidToken:",u,"error:",l==null?void 0:l.error,"error.key:",l==null||(a=l.error)===null||a===void 0?void 0:a.key),!1}if(o===401){var c,d,h=(c=t.response)===null||c===void 0?void 0:c.data,f=h==null||(d=h.error)===null||d===void 0?void 0:d.key,p=h==null?void 0:h.details;return Dt(" 401 error - errorKey:",f,"details:",p),f==="unauthenticated"&&(!p||Object.keys(p).length===0||p.reason==="refresh_token_expired")?(Dt(" 401 unauthenticated - triggering refresh"),!0):(Dt(" 401 error but not unauthenticated - returning false"),!1)}return o===425?(Dt(" 425 error - triggering refresh"),!0):(Dt("Status",o,"not handled - returning false"),!1)}}var HJ=function(){function e(){var t,n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oE(this,e),this.accessTokenKey=o.accessTokenKey||"access_token",this.refreshTokenKey=o.refreshTokenKey||"refresh_token",this.domain=o.domain,this.path=o.path||"/",this.secure=(t=o.secure)!==null&&t!==void 0?t:!0,this.sameSite=o.sameSite||"lax",this.canSetTokens=(n=o.canSetTokens)!==null&&n!==void 0?n:!0,this.cookieParser=o.cookieParser}return sE(e,[{key:"getCookieValue",value:function(n){if(typeof document>"u")return null;var o=document.cookie.split(";"),s=oJ(o),r;try{for(s.s();!(r=s.n()).done;){var i=r.value;if(i=i.trim(),i.startsWith(n+"=")){var a=i.substring(n.length+1);return this.cookieParser?this.cookieParser(a,n):decodeURIComponent(a)}}}catch(l){s.e(l)}finally{s.f()}return null}},{key:"getAccessToken",value:function(){return this.getCookieValue(this.accessTokenKey)}},{key:"getRefreshToken",value:function(){return this.getCookieValue(this.refreshTokenKey)}},{key:"getExpiresInRefreshToken",value:function(){return this.getCookieValue("account.expires_in_refresh_token")}},{key:"setTokens",value:function(n){if(!this.canSetTokens||typeof document>"u"){xv(" CookieTokenStorage: Token setting is disabled or running in a non-browser environment");return}Dt(" setTokens called - storing tokens with keys:",this.accessTokenKey,this.refreshTokenKey,"domain:",this.domain);var o=this.domain?"; domain=".concat(this.domain):"",s=this.secure?"; secure":"",r="; samesite=".concat(this.sameSite),i="",a="";if(n.expires_in&&typeof n.expires_in=="number"){var l=new Date;l.setTime(l.getTime()+n.expires_in*1e3),i=";expires=".concat(l.toUTCString())}var u=this.getExpiresInRefreshToken();if(Dt("setTokens - refresh token data:",LJ(n)),Dt("setTokens - refresh token expires_in value:",u),u){var c=new Date;c.setTime(c.getTime()+Number(u)*1e3),a=";expires=".concat(c.toUTCString())}if(n.access_token||n.token){var d=n.access_token||n.token,h="".concat(this.accessTokenKey,"=").concat(encodeURIComponent(d),"; path=").concat(this.path).concat(o).concat(s).concat(r).concat(i);document.cookie=h}if(n.refresh_token_expires_in&&typeof n.refresh_token_expires_in=="number"){var f=new Date;f.setTime(f.getTime()+n.refresh_token_expires_in*1e3),i=";expires=".concat(f.toUTCString())}if(n.refresh_token){Dt("setTokens - refresh token set to:",Av(n.refresh_token)),Dt("setTokens - refresh token expires_in set to:",a);var p="".concat(this.refreshTokenKey,"=").concat(encodeURIComponent(n.refresh_token),"; path=").concat(this.path).concat(o).concat(s).concat(r).concat(a);document.cookie=p}}},{key:"hasTokens",value:function(){return!!this.getAccessToken()&&!!this.getRefreshToken()}}])}(),GJ=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auth_state_channel",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auth_state_event";oE(this,e),ud(this,"channel",null),this.channelName=t,this.storageKey=n,this.initChannel()}return sE(e,[{key:"initChannel",value:function(){if(typeof BroadcastChannel<"u")try{this.channel=new BroadcastChannel(this.channelName)}catch(n){console.error("Failed to create BroadcastChannel, falling back to storage events:",n),this.channel=null}}},{key:"broadcastEvent",value:function(n){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={type:n,data:s,timestamp:Date.now()};this.channel?this.channel.postMessage(r):typeof localStorage<"u"&&(localStorage.setItem(this.storageKey,JSON.stringify(r)),setTimeout(function(){return localStorage.removeItem(o.storageKey)},100))}},{key:"onEvent",value:function(n){var o=this;return this.channel?this.channel.onmessage=function(s){n(s.data)}:typeof window<"u"&&window.addEventListener("storage",function(s){if(s.key===o.storageKey&&s.newValue)try{var r=JSON.parse(s.newValue);n(r)}catch(i){console.error("Failed to parse auth event:",i)}}),function(){o.channel?o.channel.onmessage=null:typeof window<"u"&&window.removeEventListener("storage",function(){})}}},{key:"destroy",value:function(){this.channel&&(this.channel.close(),this.channel=null)}}])}(),UJ=function(){function e(t){var n=this;if(oE(this,e),ud(this,"currentAttempt",0),ud(this,"isLoggingOut",!1),this.instanceId=Math.random().toString(36).substring(2,15),this.refreshTokenFn=t.refreshTokenFn,this.tokenStorage=t.storage,this.useStandardizedConfig=t.useStandardizedConfig===!0,Dt("RefreshTokenHandler initialized - useStandardizedConfig:",this.useStandardizedConfig),this.useStandardizedConfig){var o=MJ();this.maxRetries=o.maxRetries,this.retryDelay=o.retryDelay,this.backoffFactor=o.backoffFactor,Dt(" Using standardized retry config - maxRetries:",this.maxRetries,"retryDelay:",this.retryDelay,"backoffFactor:",this.backoffFactor)}else this.maxRetries=t.maxRetries||3,this.retryDelay=t.retryDelay||1e3,this.backoffFactor=t.backoffFactor||2,Dt(" Using custom retry config - maxRetries:",this.maxRetries,"retryDelay:",this.retryDelay,"backoffFactor:",this.backoffFactor);this.onCrossTabLogout=t.onCrossTabLogout,this.authStateManager=new GJ,this.initCrossTabListener(),this.onRefreshSuccess=t.onRefreshSuccess||function(){Dt("Token refresh successful")},this.onRefreshFailure=t.onRefreshFailure||function(s){console.error("Token refresh failed:",s)},this.onTokenInvalid=t.onTokenInvalid||function(){Dt("Token is invalid or cannot be refreshed");var s=new Error("No refresh token available");n.useStandardizedConfig?n.handleLogout("no_refresh_token",s):(n.onRefreshFailure(s),n.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:n.instanceId,reason:"no_refresh_token",error:"No refresh token available"}))}}return sE(e,[{key:"isLogoutInProgress",get:function(){return this.isLoggingOut}},{key:"handleLogout",value:function(n,o){if(this.isLoggingOut){Dt("handleLogout skipped - logout already in progress");return}Dt("handleLogout called with reason:",n),this.onRefreshFailure&&(Dt("Calling onRefreshFailure callback"),this.onRefreshFailure(o));var s=this.getLogoutTag(n,"this-tab");this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:n,tag:s,error:(o==null?void 0:o.message)||"Token refresh failed"}),this.clearStateAndRedirectToLogin(s)}},{key:"getLogoutTag",value:function(n,o){return Iv(this.tokenStorage.getRefreshToken())?(console.error("False logout detected. Refresh token not expired. Reason: ".concat(n)),console.error("Sender channel: ".concat(o)),-1):1}},{key:"clearStateAndRedirectToLogin",value:function(n){if(!this.isLoggingOut){this.isLoggingOut=!0;var o=typeof sessionStorage<"u"&&sessionStorage.getItem("BASE_URL")||"",s=typeof sessionStorage<"u"&&sessionStorage.getItem("BASE_DOMAIN_COOKIE")||void 0;if(typeof localStorage<"u"&&typeof window<"u")try{var r="".concat(window.location.pathname).concat(window.location.search);localStorage.setItem("last_url_access_after_timeout",r),localStorage.removeItem("retryCount"),Dt("localStorage updated - saved last URL:",r)}catch(a){Hf("Failed to update localStorage:",a)}Dt("Clearing sessionStorage and cookies"),BJ(),VJ(s);var i="".concat(o,"/login?timeout=").concat(n);Dt("Redirecting to login in ".concat(OO,"ms:"),i),setTimeout(function(){return MO(i)},OO)}}},{key:"initCrossTabListener",value:function(){var n=this;this.authStateManager.onEvent(function(o){if(o.type==="auth:logout")if(Dt("Received logout event:",o.data),o.data&&o.data.sourceInstanceId!==n.instanceId){if(Dt("Logout event from different tab, executing logout handlers"),n.onCrossTabLogout?(Dt("Executing onCrossTabLogout with reason: ".concat(o.data.reason||"cross_tab_logout")),n.onCrossTabLogout(o.data.reason||"cross_tab_logout")):typeof n.onLogout=="function"?(Dt("Executing legacy onLogout with reason: ".concat(o.data.reason)),n.onLogout(o.data.reason)):n.useStandardizedConfig||console.warn("No logout handler defined for cross-tab events"),n.useStandardizedConfig){var s=o.data.tag===-1||o.data.tag===1,r=s?o.data.tag:n.getLogoutTag(o.data.reason||"cross_tab_logout","cross-tab");s&&r===-1&&(console.error("False logout detected. Reason: ".concat(o.data.reason||"cross_tab_logout")),console.error("Sender channel: cross-tab")),Dt("Standardized mode - logging out this tab after cross-tab event, tag:",r),n.clearStateAndRedirectToLogin(r)}}else Dt("Ignoring self-generated logout event")})}},{key:"handleTokenRefresh",value:function(){var t=nE(xu().m(function o(){var s=this,r,i,a,l;return xu().w(function(u){for(;;)switch(u.p=u.n){case 0:if(r=this.tokenStorage.getRefreshToken(),Dt(" handleTokenRefresh started, refreshToken available:",!!r),r){u.n=1;break}return Dt(" ERROR: No refresh token available - cannot refresh"),this.onTokenInvalid(),u.a(2,!1);case 1:return this.currentAttempt=0,u.p=2,u.n=3,this.executeWithRetry(function(){return Dt("Refresh attempt ".concat(s.currentAttempt+1,"/").concat(s.maxRetries)),s.refreshTokenFn(s.tokenStorage.getRefreshToken())});case 3:if(i=u.v,!(!i||!i.access_token&&!i.token)){u.n=4;break}throw console.error("Invalid token response received"),new Error("Invalid token response");case 4:return i.token&&!i.access_token&&(i.access_token=i.token),Dt(" Token refresh successful, saving new tokens"),this.tokenStorage.setTokens(i),Dt(" Calling onRefreshSuccess callback"),this.onRefreshSuccess(i),u.a(2,!0);case 5:return u.p=5,l=u.v,console.error("Token refresh failed after all attempts:",l),l===void 0&&(l=new Error("Undefined error during token refresh")),this.useStandardizedConfig?this.handleLogout("max_retry_reached",l):(this.onRefreshFailure(l),this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:"max_retry_reached",error:((a=l)===null||a===void 0?void 0:a.message)||"Token refresh failed after maximum retries"})),u.a(2,!1)}},o,this,[[2,5]])}));function n(){return t.apply(this,arguments)}return n}()},{key:"executeWithRetry",value:function(){var t=nE(xu().m(function o(s){var r,i,a,l;return xu().w(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,s();case 1:return u.a(2,u.v);case 2:if(u.p=2,l=u.v,this.currentAttempt++,!(this.currentAttempt>=this.maxRetries)){u.n=3;break}throw Dt("Maximum retry attempts (".concat(this.maxRetries,") reached")),l;case 3:return i=(l==null||(r=l.response)===null||r===void 0?void 0:r.status)===425,a=i?this.getRetryAfterDelay(l):this.retryDelay*Math.pow(this.backoffFactor,this.currentAttempt-1),Dt("Retry in ".concat(a,"ms, attempt ").concat(this.currentAttempt,"/").concat(this.maxRetries)),u.n=4,new Promise(function(c){return setTimeout(c,a)});case 4:return u.a(2,this.executeWithRetry(s))}},o,this,[[0,2]])}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getRetryAfterDelay",value:function(n){var o;if(n!=null&&(o=n.response)!==null&&o!==void 0&&o.headers){var s=n.response.headers["retry-after"];if(s){var r=parseInt(s,10);if(!isNaN(r))return r*1e3;var i=new Date(s);if(!isNaN(i.getTime()))return i.getTime()-Date.now()}}return this.retryDelay*Math.pow(this.backoffFactor,this.currentAttempt-1)}},{key:"broadcastLogout",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"manual_logout";Dt("Broadcasting logout event with reason: ".concat(n)),this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:n,timestamp:Date.now()})}}])}();function WJ(e,t){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=(n=o.useStandardizedConfig)!==null&&n!==void 0?n:t.useStandardizedConfig;Dt("createRefreshInterceptor called - useStandardizedConfig:",s);var r=s?$J(t.tokenStorage):o.tokenExpiredDetection||function(u){var c;return((c=u.response)===null||c===void 0?void 0:c.status)===401},i=s?[401,425]:o.retryStatusCodes||[401,425],a=o.tokenHeaderFormatter||function(u){return"Bearer ".concat(u)};Dt("Interceptor config - retryStatusCodes:",i,"using standardized detection:",s);var l=null;e.interceptors.response.use(function(u){return u},function(){var u=nE(xu().m(function c(d){var h,f,p,g,v,y,b,S,w,E,R,D,x,N,B,A,P,k,O,L,H;return xu().w(function(W){for(;;)switch(W.p=W.n){case 0:if(g=d.config,v=function(ie){var Q,ne=s&&t.isLogoutInProgress;return xv(ne?"HOLD ->":"REJECT ->",((g==null?void 0:g.method)||"").toUpperCase(),g==null?void 0:g.url,"| status:",(Q=d.response)===null||Q===void 0?void 0:Q.status,"| reason:",ie,"| logoutInProgress:",t.isLogoutInProgress,"| at:",new Date().toISOString().slice(11,23)),ne?new Promise(function(Y,I){setTimeout(function(){xv("Logout redirect did not happen in time - releasing held request:",g==null?void 0:g.url),I(d)},NJ)}):Promise.reject(d)},g){W.n=1;break}return W.a(2,v("no request config"));case 1:if(!g._retry){W.n=2;break}return W.a(2,v("retried request failed again"));case 2:if(y=(h=d.response)===null||h===void 0?void 0:h.status,Dt(" Response error handler triggered - status:",y,"url:",g.url),b=r(d),Dt(" tokenExpiredDetection returned:",b),S=!1,y===400)if(R=(w=d.response)===null||w===void 0?void 0:w.data,D=(R==null?void 0:R.error)==="invalid_token"||(R==null||(E=R.error)===null||E===void 0?void 0:E.key)==="invalid_token",D)if(S=!1,s){if(Dt(" 400 invalid_token (standardized) - clearing account.token from cookies"),typeof document<"u")try{x=sessionStorage.getItem("BASE_DOMAIN_COOKIE")||window.location.hostname,Dt(" Clearing account.token - domain:",x),document.cookie="account.token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=".concat(x),document.cookie="account.token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/",Dt(" ✅ Removed account.token from cookies (prevents infinite 400 loop)")}catch(se){Hf(" Failed to clear account.token:",se)}typeof window<"u"&&(N=sessionStorage.getItem("BASE_URL")||"",B="".concat(N,"/sw?redirect=1"),Dt("Redirecting to re-auth page - URL:",B),MO(B))}else Dt(" 400 invalid_token (custom config) - user handles via callbacks");else S=!1,Dt(" 400 non-invalid_token - skip refresh");else s&&y===401&&!NO(t.tokenStorage)?(A=typeof window<"u"&&window.location.pathname.includes("/login"),P=/login|refresh-token|refreshToken/i.test(g.url||""),A||P?Dt("401 with no tokens on login page/auth request - not redirecting"):(Dt("401 with no tokens - logging out and redirecting to /login"),t.handleLogout("no_tokens",new Error("No authentication tokens available"))),S=!1):(S=b&&i.includes(y),Dt(" Status",y,"- shouldRefresh:",b,"in retryStatusCodes:",i.includes(y),"canRetry:",S));if(S){W.n=3;break}return W.a(2,v("not eligible for refresh"));case 3:if(k=((f=g.url)===null||f===void 0?void 0:f.includes("refresh-token"))||((p=g.url)===null||p===void 0?void 0:p.includes("refreshToken")),!k){W.n=4;break}return W.a(2,v("refresh endpoint itself failed"));case 4:return g._retry=!0,W.p=5,l?Dt(" Using existing refresh promise"):(Dt(" Starting new token refresh"),l=t.handleTokenRefresh()),W.n=6,l;case 6:if(O=W.v,l=null,O){W.n=7;break}return W.a(2,v("token refresh failed (waiting request)"));case 7:return L=t.tokenStorage.getAccessToken(),Dt(" Token refreshed successfully, new token available:",!!L),L?(Dt(" Injecting refreshed token into Authorization header for retry"),g.headers.Authorization=a(L)):xv(" WARNING: Token refresh succeeded but no token in storage!"),Dt(" Retrying original request with new token"),W.a(2,e(g));case 8:return W.p=8,H=W.v,Hf(" Error during refresh:",H),l=null,W.a(2,v("error thrown during refresh"))}},c,null,[[5,8]])}));return function(c){return u.apply(this,arguments)}}()),e.interceptors.request.use(function(u){var c=u.headers.Authorization;if(c){var d=String(c).replace(/^Bearer\s*/i,"").trim();if(d&&d!=="undefined"&&d!=="null")return u;Dt("Removing invalid Authorization header:",c),delete u.headers.Authorization}var h=t.tokenStorage.getAccessToken(),f=t.tokenStorage.getRefreshToken();return Dt(" Request interceptor: token exists:",!!h,"refreshToken exists:",!!f,"url:",u.url),h&&Iv(h)?(Dt(" Access token available - injecting into Authorization header"),u.headers.Authorization=a(h)):Dt(f?" Access token missing/empty but refresh token available - response interceptor will handle 401":" Both tokens missing/empty - allowing request (no token to inject)"),u},function(u){return Promise.reject(u)})}function zJ(e){var t=e.useStandardizedConfig===!0;Dt("createCookieRefreshHandler called - useStandardizedConfig:",t);var n;if(t){var o=OJ();n=cd(cd({},o),{},{canSetTokens:e.canSetTokens,cookieParser:e.cookieParser}),Dt(" Applied standardized cookie config:",n)}else{var s=e.accessTokenKey,r=e.refreshTokenKey,i=e.domain,a=e.path,l=e.secure,u=e.sameSite,c=e.canSetTokens,d=e.cookieParser;n={accessTokenKey:s,refreshTokenKey:r,domain:i,path:a,secure:l,sameSite:u,canSetTokens:c,cookieParser:d},Dt(" Applied custom cookie config:",n)}var h=new HJ(n);e.accessTokenKey,e.refreshTokenKey,e.domain,e.path,e.secure,e.sameSite,e.canSetTokens,e.cookieParser;var f=sJ(e,FJ);return new UJ(cd(cd({},f),{},{storage:h,useStandardizedConfig:t}))}var Fo=function(e){return e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}",e}(Fo||{});Fo.review,Fo.review_take,Fo.review_scene,Fo.review_rendition,Fo.review_frame,Fo.review_rendition_comment,Fo.review_comment,Fo.scene_hub,Fo.hub_rendition,Fo.hub_comment,Fo.people_insight,Fo.people_detail,Fo.project,Fo.woohoo,Fo.update,Fo.core,Fo.project_focusMode;var cE=null;function jJ(e){cE=e}function Pv(){if(!cE)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return cE}function kv(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function LO(){try{var e=sessionStorage.getItem("APP_DEBUG")?"✅":"",t=Pv();return"".concat(kv(t.t("errorMessages.fallback.unknownError"))," ").concat(e)}catch{return"An error occurred. Please try again or contact support."}}function KJ(e,t,n,o){var s=e.replace(/{field}/g,t);if(o&&ul(o)==="object")Object.keys(o).forEach(function(i){var a="{".concat(i,"}"),l=o[i];Array.isArray(l)?l=l.join(", "):i==="value"&&(o.min||o.max)&&(l="".concat(o.min||o.value," and ").concat(o.max||o.value)),s=s.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var r=n[0]||"";n.length>1?r="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(r=n[0].join(", ")),s=s.replace(/{value}/g,r)}return s}function qJ(e,t){for(var n=Object.keys(t),o=0,s=n;o<s.length;o++){var r=s[o],i=Array.isArray(t[r])?t[r].join(", "):String(t[r]);e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),i)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function VO(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function BO(e,t){if(!e||ul(e)!=="object")return null;try{var n=Pv();if(e.validation&&e.validation.fields)for(var o=e.validation.fields,s=Object.keys(o),r=0,i=s;r<i.length;r++){var a=i[r],l=o[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var y,b=t.toUpperCase();v=(y=p[g])===null||y===void 0||(y=y.errorMessages)===null||y===void 0||(y=y[b])===null||y===void 0||(y=y.validation_rules)===null||y===void 0?void 0:y[u]}if(!v){var S;v=(S=p[g])===null||S===void 0||(S=S.errorMessages)===null||S===void 0||(S=S.GEN)===null||S===void 0||(S=S.validation_rules)===null||S===void 0?void 0:S[u]}if(v&&typeof v=="string")return kv(KJ(v,a,c,d))}catch(w){console.error("Error in validation rules",w)}}}}catch(w){return console.error("Error in getValidationErrorMessage:",w),null}return null}function $O(e){var t=sessionStorage.getItem("APP_DEBUG")?"✅":"";if(!e)return LO();var n=e.code,o=e.error,s=e.details,r=e.message;if(VO(s)&&s){var i=BO(s,o==null?void 0:o.type);if(sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",i),i)return n!==""?"[".concat(n,"] ").concat(i," ").concat(t):"".concat(i);try{var a=Pv();return kv(a.t("errorMessages.GEN.validation_error"))}catch{return"Validation error occurred."}}if(o&&ul(o)==="object"&&o.type&&o.key){var l=o.type.toUpperCase();try{var u,c,d,h="errorMessages.".concat(l,".").concat(o.key),f=Pv(),p=((u=f.messages)===null||u===void 0?void 0:u.value)||f.messages,g=((c=f.locale)===null||c===void 0?void 0:c.value)||f.locale,v=(d=p[g])===null||d===void 0||(d=d.errorMessages)===null||d===void 0||(d=d[l])===null||d===void 0?void 0:d[o.key];if(v&&typeof v=="string"){var y=v;return s!=null&&s.context&&(y=qJ(y,s.context),sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",y)),y=kv(y),n!==""?"[".concat(n,"] ").concat(y," ").concat(t):"".concat(y," ").concat(t)}}catch(S){console.error("[Error Utils Debug]",S)}}if(o&&ul(o)!=="object"&&VO(s)){var b=BO(s);if(b)return n!==""?"[".concat(n,"] ").concat(b," ").concat(t):"".concat(b," ").concat(t)}return r?"".concat(r):LO()}const Ss=Xa("toast",()=>{const e=u=>$O(u),t=u=>{var c;if((u==null?void 0:u.apiCode)==="offline")r({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const d=$O((c=u==null?void 0:u.res)==null?void 0:c.data);r({id:u==null?void 0:u.apiCode,type:"error",message:d})}},n=$([]),o=(u,c)=>{const d=tJ[u];if(d){const h=d[c];if(h){r({id:u,type:c,message:h});return}}else r({id:u,type:c,message:u})},s=new Map,r=(u,c=5e3)=>{const d={...u,id:u.id??Date.now()+Math.random()};if(n.value.push(d),c>0){const h=Date.now(),f=setTimeout(()=>{i(d.id),s.delete(d.id)},c);s.set(d.id,{timeoutId:f,remainingTime:c,startTime:h})}};function i(u){n.value=n.value.filter(d=>d.id!==u);const c=s.get(u);c&&(clearTimeout(c.timeoutId),s.delete(u))}function a(u){const c=s.get(u);if(c){clearTimeout(c.timeoutId);const d=Date.now()-c.startTime;c.remainingTime=Math.max(0,c.remainingTime-d)}}function l(u){const c=s.get(u);if(c&&c.remainingTime>0){const d=setTimeout(()=>{i(u),s.delete(u)},c.remainingTime);c.timeoutId=d,c.startTime=Date.now()}}return{notifications:n,addNotification:r,removeNotification:i,showMessage:o,showErrorNetMessage:t,pauseAutoDismiss:a,resumeAutoDismiss:l,getErrorMessageFromResponse:e}}),dE=Xa("sortStore",()=>{const e=$({}),t=$(void 0),n={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},o={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}};return{sortingAPIConfiguration:q(()=>{const u=e.value;return Object.values(u).filter(d=>d.sort!=="none"&&!!d.sort).map(d=>{let h;switch(d.colId){case"dateRange":h=o[d.sort];break;default:if(d.colId.includes("metric")){const[f,p]=d.colId.split("_");h={column:f,direction:d.sort,type:p}}else h={column:n[d.colId]||d.colId,direction:d.sort};break}return h})}),sorts:e,setSort:(u,c)=>{e.value={[u]:{colId:u,sort:c}}},clearSorting:()=>{e.value={}},isSortingRunning:$(!1),defaultSortStorePreferences:t,setDefaultSort:u=>{t.value=u}}}),hE=10,fE=5,yi={number:{first:"001",step:"1"},letter:{first:"A",step:"1"}},HO={up:{first:"Start at",step:"Increase by"},down:{first:"End at",step:"Decrease by"}},YJ=/^[0-9]$/,XJ=/^[A-Za-z]$/,GO=(e,t)=>t==="first"&&e==="letter"?XJ:YJ,UO=(e,t,n)=>GO(e,t).test(n),ZJ=e=>e==="first"?hE:fE,JJ=e=>e&&e[0]===e[0].toLowerCase()?e.toLowerCase():e.toUpperCase(),WO=(e,t,n)=>{const o=GO(e,t),s=Array.from(n).filter(r=>o.test(r)).join("").slice(0,ZJ(t));return t==="first"&&e==="letter"?JJ(s):s},Fv=(e,t)=>t!==""&&(e==="first"||Number(t)>0),QJ=e=>Array.from(e.toUpperCase()).reduce((t,n)=>t*26+(n.charCodeAt(0)-64),0),eQ=e=>{let t="",n=e;for(;n>0;){const o=(n-1)%26;t=String.fromCharCode(65+o)+t,n=Math.floor((n-1)/26)}return t},pE=({type:e,direction:t,first:n,step:o,count:s})=>{const r=Number(o)||1,i=u=>(t==="up"?u:s-1-u)*r;if(e==="number"){const u=Number(n);return Array.from({length:s},(c,d)=>String(u+i(d)).padStart(n.length,"0"))}const a=QJ(n),l=n!==""&&n[0]===n[0].toLowerCase();return Array.from({length:s},(u,c)=>{const d=eQ(a+i(c));return l?d.toLowerCase():d})},tQ="Your update is queued. Reload the table later to see the changes.",gE="Update failed.",nQ=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]),oQ=(e,t,n)=>{const o=e.getRowNode(t);o&&o.setData({...o.data,...n})},sQ=(e,{currentName:t,counterValue:n})=>e.map(o=>{switch(o.type){case"text":return o.value;case"current_name":return t;case"counter":return n;default:return""}}).join(""),rQ=(e,t)=>{const n=e.find(o=>o.type==="counter");return n?pE({type:n.format,direction:n.direction==="asc"?"up":"down",first:n.value,step:n.step,count:t}):[]},zO=(e,t,n)=>Ss().addNotification({id:n,type:e,message:t}),iQ=(e,t,n={})=>{const o=Vf(),{selectionStatus:s}=go(o),{sortingAPIConfiguration:r}=go(dE()),i=q(()=>s.value===Ft.CHECKED),a=q(()=>e.selectRowData.map(ne=>ne.id)),l=q(()=>e.selectRowData.length>0),{apiServices:u}=no(!1,e),c=En("filterParams",void 0),d=q(()=>({workspaceId:String(e.workspaceId),itemIds:l.value&&i.value?[]:a.value,entityId:e.entityId,filterParams:c!=null&&c.value?c.value:void 0})),h=$(!0),f=$(!1);let p=null;const g=ne=>{var I,z;if(!ne.apiCode||!nQ.has(ne.apiCode))return;const Y=(I=ne.res)==null?void 0:I.data;p={success:ne.success,status:(z=ne.res)==null?void 0:z.status,data:typeof Y=="object"&&Y!==null?Y:void 0,error:ne.error}};Je(u,(ne,Y)=>{Y==null||Y.off("call-api",g),ne==null||ne.on("call-api",g)},{immediate:!0}),Vn(()=>{var ne;return(ne=u.value)==null?void 0:ne.off("call-api",g)}),Je(()=>e.selectRowData,()=>{h.value=!1},{deep:!0,immediate:!0});const v=()=>{p=null},y=ne=>{var xe,de;const Y=p,I=Y==null?void 0:Y.data,z=(Y==null?void 0:Y.error)??ne,ee=(I==null?void 0:I.message)??((de=(xe=z==null?void 0:z.response)==null?void 0:xe.data)==null?void 0:de.message),me=typeof ee=="string"&&ee.trim()?ee:gE;zO("error",me,"bulk-update-error")},b=(ne,Y,I,z)=>{ne.length!==0&&(ne.forEach(ee=>{const me=Y.getRowNode(ee);me&&me.setData({...me.data,...I})}),Y.refreshCells({...z.length>0?{columns:z}:{},force:!0}))},S=ne=>{const Y=e.gridApi;if(Y){if(i.value){Y.deselectAll();return}ne.forEach(I=>{var z;return(z=Y.getRowNode(I))==null?void 0:z.setSelected(!1)})}},w=({ids:ne,apply:Y,columns:I,isDelete:z=!1})=>{var oe;let ee=ne;ne.length==0&&(ee=e.selectRowData.map(ae=>ae.id)??[]),console.log("Finishing bulk action for ids:",{ids:ee,columns:I,isDelete:z,selectedRows:e.selectRowData,lastOutcome:p});const me=p;if((me==null?void 0:me.status)!==br.ACCEPTED){Y(),z&&S(ee);return}zO("white",tQ,"bulk-update-queued");const xe=(oe=me.data)==null?void 0:oe.bulk_process;let de;typeof(xe==null?void 0:xe.state)=="number"?de=xe.state:de=z?0:1;const j=e.gridApi;j&&(ee.forEach(ae=>oQ(j,ae,{isProcessing:{state:de,message:typeof(xe==null?void 0:xe.message)=="string"?xe.message:""}})),j.refreshCells({columns:[...I,"name"],force:!0})),(z||de==0)&&S(ee)},E=async({request:ne,apply:Y,columns:I,isDelete:z=!1})=>{var xe,de,j;const ee=a.value,me=e.gridApi;if(!me){console.error("Grid API is not available for bulk action.");return}v();try{const oe=ne();if(!oe)throw new Error("Bulk update service is unavailable.");await oe}catch(oe){console.error("Bulk action failed:",oe),y(oe),(xe=t.value)==null||xe.open();return}if((p==null?void 0:p.success)===!1){const oe=p.error??new Error(gE);console.error("Bulk action failed:",oe),y(oe),(de=t.value)==null||de.open();return}w({ids:ee,columns:I,isDelete:z,apply:()=>Y(ee,me)}),(j=t.value)==null||j.hide()},R=({itemIds:ne,data:Y,isUpdateAll:I})=>{let z=ne;I&&(console.log("Bulk update for all items with data:",Y),z=a.value),console.log("Handling bulk update for status with itemIds:",z,"and data:",Y);const ee=e.gridApi;if(!ee){console.error("Grid API is undefined");return}w({ids:z,columns:["status"],apply:()=>{b(z,ee,{status:Y},["status"])}})},D=({itemIds:ne,data:Y})=>{var z;const I=e.gridApi;if(!I){console.error("Grid API is undefined");return}w({ids:ne,columns:["dateRange","name"],apply:()=>{let ee=ne;console.log("Applying bulk date update for itemIds:",ne,"with data:",Y),(!ne||ne.length===0)&&(console.warn("No itemIds provided for bulk date update."),ee=e.selectRowData.map(me=>me.id)),ee.forEach(me=>{const xe=I.getRowNode(me);if(xe){const de=[...xe.data.dateRange||[null,null]];"startDate"in Y&&Y.startDate!==void 0&&(de[0]=Y.startDate?new Date(Y.startDate):null),"dueDate"in Y&&Y.dueDate!==void 0&&(de[1]=Y.dueDate?new Date(Y.dueDate):null),xe.setData({...xe.data,dateRange:de})}})}}),(z=n.onUpdated)==null||z.call(n)},x=ne=>{var ee;const Y=e.gridApi,{id:I,value:z}=ne;if(!Y){console.error("Grid API is undefined");return}b(a.value,Y,{[`metric_${I}`]:z},[`metric_${I}`]),(ee=n.onUpdated)==null||ee.call(n)},N=ne=>{const{assignees:Y,type:I}=ne,z=e.gridApi;if(!z){console.error("Grid API is not available for bulk update.");return}const ee=new Set(Y.map(xe=>xe.id)),me=xe=>{const de=z.getRowNode(xe);if(!de)return;const j=de.data.assignees||[];let oe=[];switch(I){case"add":{const ae=new Set(j.map(_=>_.id));oe=[...j,...Y.filter(_=>!ae.has(_.id))];break}case"overwrite":oe=Y;break;case"remove":oe=j.filter(ae=>!ee.has(ae.id));break;case"removeAll":oe=[];break}de.setData({...de.data,assignees:oe})};w({ids:a.value,columns:["assignees","name"],apply:()=>a.value.forEach(me)})},B=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkDeleteItems(d.value)},isDelete:!0,columns:["name"],apply:(ne,Y)=>b(ne,Y,{isDeleted:!0,disabled:!0,isProcessing:{state:0,message:""}},[])}),A=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkUnarchiveItems(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{isArchived:!1},["name"])}),P=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkArchiveItems(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{isArchived:!0},["name"])}),k=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.deleteThumbnail(d.value)},columns:["thumbnail"],apply:(ne,Y)=>b(ne,Y,{thumbnail:null},["thumbnail"])}),O=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.deleteRendition(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{},["name"])}),L=()=>{v(),h.value=!0},H=ne=>{console.trace("Bulk update response:",ne),ft(()=>{h.value=!1})},W=()=>{y(),H({})},se=(ne,Y)=>{const I=new Map(e.selectRowData.map(ee=>[ee.id,ee.name||""])),z=rQ(ne,Y.length);return Y.map((ee,me)=>{const xe=I.get(ee)??"",de=sQ(ne,{currentName:xe,counterValue:z[me]??""});return{id:ee,from:xe,to:de}})},ie=()=>{const ne=e.gridApi;return ne==null?[]:e.selectRowData.map((Y,I)=>{var z;return{id:Y.id,rowIndex:((z=ne.getRowNode(Y.id))==null?void 0:z.rowIndex)??I}}).sort((Y,I)=>Y.rowIndex-I.rowIndex).map(({id:Y})=>Y)};return{apiServices:u,selectionStatus:s,isSelectAll:i,selectedIds:a,isBulkUpdate:l,isUpdating:h,isLoading:f,handleUpdateStart:L,handleUpdatePostUpdate:H,handleUpdateFailed:W,handleUpdateBulkStatus:R,handleUpdateBulkDate:D,handleBulkUpdateMetric:x,handleUpdateNewAssignee:N,handleDelete:B,handleArchive:P,handleUnarchive:A,deleteThumbnail:k,deleteRendition:O,handleBulkUpdateName:async ne=>{var xe;if(!e.workspaceId||!e.entityId)return;const Y=ie(),I={item_ids:Y,segments:ne},z=r.value;i.value&&(delete I.item_ids,I.entity_id=e.entityId),I.sort_by=z;const ee={workspaceId:e.workspaceId,entityId:e.entityId,payload:I,filter:c!=null&&c.value?c.value:void 0},me=se(ne,Y);v(),h.value=!0,f.value=!0;try{const de=(xe=u.value)==null?void 0:xe.bulkRename(ee);if(!de)throw new Error("Bulk update service is unavailable.");if(await de,(p==null?void 0:p.success)===!1){y(p.error??new Error(gE));return}}catch(de){y(de);return}finally{h.value=!1,f.value=!1}w({ids:Y,columns:["name"],apply:()=>{var j;const de=e.gridApi;de&&(me.forEach(({id:oe,to:ae})=>{var _;return(_=de.getRowNode(oe))==null?void 0:_.setDataValue("name",ae)}),(j=n.onRefreshSelectedRow)==null||j.call(n))}})}}},jO=Et(ot({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=Vs,{triggerRef:n,popupRef:o}=vo({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),s=q(()=>{switch(r.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),r=e;return(i,a)=>(K(),he("div",{class:ce(i.$style["status-badge-wrapper"]),style:cn({"--badge-size":`${r.size}px`,"--badge-color":s.value})},[kt(i.$slots,"default"),Ue(be("div",{class:ce(i.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[lr,r.showBadge],[V(t),{isLoading:r.loading,fullwidth:!0}]]),be("div",{ref_key:"popupRef",ref:o,class:ce(i.$style["badge-tooltip"])},at(r.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),md=Xa("switchStore",()=>{const e=$(null),t=En("switchInstance");return{openSceneHub:(s,r)=>{if(s){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");r?t("scene_hub",{id:s,commentId:r},{showLoading:!1}):t("scene_hub",{id:s,tab:"home"},{showLoading:!1})}},openPeopleInsight:s=>{if(!s){console.error("No people_id provided, defaulting to empty string");return}const r=t||e.value;if(!r)console.error("Switch instance not found");else if(window.switchApploader)window.switchApploader("people_insight",{tab:"home",id:s||""},{showLoading:!1});else throw console.error("Switch instance not found and switchApploader is not available"),new Error("Switch instance not found and switchApploader is not available");r("people_insight",{tab:"home",id:s||""},{showLoading:!1})},switchInstanceFunc:e}}),aQ=ot({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:pv()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1},showPrivateUser:{type:Boolean,default:!1},switchInstance:{type:Function,default:void 0}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=qt,o=Vs,s=e,r=t,i={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=$(new Date),l=$(!0),u=$(!1),c=$(!1),d=$(null);let h=null,f=null;const p=md(),{openPeopleInsight:g}=p,v=q(()=>!s.private&&!u.value),y=q(()=>{var H,W;return((H=d.value)==null?void 0:H.display_name)??((W=s.user)==null?void 0:W.name)}),b=q(()=>{var H,W;return!v.value||!d.value?s.status:(H=d.value.private_info)!=null&&H.is_offline?"offline":(W=d.value.private_info)!=null&&W.last_active?"active":"away"}),S=q(()=>{var H;return!!((H=d.value)!=null&&H.private_info)}),w=q(()=>{const H=b.value;return H?i[H]:""}),E=q(()=>{var H,W;return((W=(H=d.value)==null?void 0:H.private_info)==null?void 0:W.timezone)??s.timezone}),R=q(()=>{if(!E.value)return"";try{return a.value.toLocaleTimeString("en-US",{timeZone:E.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",E.value),""}}),D=q(()=>{var H,W,se;return{id:s.user.id,name:y.value,initial:((H=d.value)==null?void 0:H.initial)??s.user.initial,profile_image:((W=d.value)==null?void 0:W.profile_image)??s.user.profile_image,color:((se=d.value)==null?void 0:se.color)??s.user.color,size:72,borderRadius:"8px"}}),x=q(()=>{const H=ln.getInstance().getItem("BASE_URL"),W=ln.getInstance().getItem("ws.code")||"";return Zo({type:"people_insight",config:{ws_code:W,baseDomain:H,user_id:s.user.id}}).url}),{copyToClipboard:N,tooltip:B}=gO(x.value,()=>r("copyLink",s.user.id)),A=async()=>{if(!s.apiUpdateFunction){l.value=!1;return}try{const H=await s.apiUpdateFunction(s.user.id);H?(d.value=H,r("dataUpdated",H)):(u.value=!0,c.value=!0,r("dataUpdated",null))}catch(H){u.value=!0,c.value=!0,console.error("Failed to fetch user data:",H)}finally{l.value=!1}},P=()=>{k(),s.apiUpdateFunction&&s.enableAutoRefresh&&(f=setInterval(A,s.refreshInterval))},k=()=>{f!==null&&(clearInterval(f),f=null)},O=H=>{var W;if(H.ctrlKey||H.metaKey){window.open(x.value,"_blank");return}try{g(String(s.user.id))}catch{s.switchInstance?(W=s.switchInstance)==null||W.call(s,"people_insight",{tab:"home",id:s.user.id||""},{showLoading:!1}):window.open(x.value,"_blank")}},L=H=>{O(H),r("insightClick",s.user.id)};return Je([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],P),Jt(async()=>{h=setInterval(()=>{a.value=new Date},1e4),s.apiUpdateFunction?(await A(),P()):l.value=!1}),ou(()=>{h&&clearInterval(h),k()}),(H,W)=>s.showPrivateUser&&(s.private||c.value)?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style["private-badge"]])},[...W[0]||(W[0]=[be("span",null,"Private User",-1)])],2)):(K(),he("div",{key:1,class:ce([H.$style["mini-people-card"],{[H.$style.loading]:l.value},"bg-skeleton"])},[be("div",{class:ce(H.$style["avatar-section"])},[v.value&&S.value?(K(),We(jO,{key:0,size:12,status:b.value,loading:l.value,"status-tooltip":w.value},{default:Ce(()=>[ye(wf,Kt({readOnly:!0},D.value),null,16)]),_:1},8,["status","loading","status-tooltip"])):(K(),We(wf,Kt({key:1,readOnly:!0},D.value),null,16))],2),be("div",{class:ce(H.$style["user-info"])},[be("div",{class:ce(H.$style["info-column"])},[Ue((K(),he("span",{class:ce(H.$style["user-name"])},[tt(at(y.value),1)],2)),[[V(n),{content:y.value,delay:[1e3,0]}]]),E.value&&v.value&&S.value?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style["time-row"]])},[Ue((K(),he("div",{class:ce(H.$style["time-display"])},[ye(gt,{source:"remote",src:"Globe",class:ce(H.$style["clock-icon"]),size:"10"},null,8,["class"]),be("span",{class:ce(H.$style["time-text"])},at(R.value)+" ("+at(E.value)+")",3)],2)),[[V(o),{isLoading:l.value,fullwidth:!0}]])],2)):qe("",!0)],2),!e.readOnly&&v.value?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style.actions])},[e.showInsightButton&&S.value?(K(),We(bt,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Ht(L,["prevent","stop"]),disabled:s.disabled},null,8,["disabled"])):qe("",!0),e.showCopyLinkButton&&S.value?Ue((K(),We(bt,{key:1,variant:["icon","secondary"],size:"small",onClick:Ht(V(N),["prevent","stop"]),disabled:s.disabled},{default:Ce(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[V(n),{content:V(B),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):qe("",!0)],2)):qe("",!0)],2)],2))}}),lQ=Et(aQ,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_ign8a_1",loading:"_loading_ign8a_25","avatar-section":"_avatar-section_ign8a_28","user-info":"_user-info_ign8a_33","info-column":"_info-column_ign8a_42","info-row":"_info-row_ign8a_50","time-row":"_time-row_ign8a_56","time-display":"_time-display_ign8a_62","time-text":"_time-text_ign8a_70",actions:"_actions_ign8a_79","user-name":"_user-name_ign8a_83","v-enter-active":"_v-enter-active_ign8a_103","v-leave-active":"_v-leave-active_ign8a_104","v-enter-from":"_v-enter-from_ign8a_108","v-leave-to":"_v-leave-to_ign8a_109"}}]]),uQ=Et(ot({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e,{expose:t}){const n=Do,o=qt,s=e,{isEditing:r}=ld(s),i=()=>{var h,f;const c=(h=s.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(s.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=q(()=>{var d,h;const c=(h=(d=s.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(s.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=s.params)==null?void 0:c.api)==null||d.stopEditing()},u=$();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>Ue((K(),We(bt,{class:ce(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:V(r),onClick:Ht(i,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:Ce(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[V(o),"More actions"],[V(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_137ge_1"}}]]),cQ=["src","width","height","alt"],pa=Et(ot({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=Vs,{getCachedValue:n,setCachedValue:o}=vf({dbName:"visual-cache-db",storeName:"visuals"}),s=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},r=e,i=q(()=>({minWidth:s(r.minWidth),maxWidth:s(r.maxWidth),minHeight:s(r.minHeight),maxHeight:s(r.maxHeight),aspectRatio:r.ratio,width:s(r.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await o(h,f)},u=q(()=>({name:r.src,size:Number(r.size||100),color:""})),{url:c,loading:d}=IP(u,"visual",l,a);return(h,f)=>Ue((K(),he("div",{class:ce([h.$style.visualWrapper,{[h.$style.loading]:V(d)}]),style:cn(i.value)},[be("img",{src:V(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:cn(i.value)},null,12,cQ)],6)),[[V(t),{isLoading:V(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),dQ=["tabindex"],Oo=Et(ot({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{},focusableIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n;zg();const r=rm(),i=$(null),a=$("default"),l=q(()=>{if(typeof o.size=="number")return`${o.size}px`;switch(o.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=q(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=q(()=>({[r["display-wrapper"]]:!0,[r.disabled]:o.disabled,[r.readOnly]:o.readOnly,[r.error]:o.error,[r.clickable]:o.clickable,[r.active]:o.actived,[r.hovered]:o.hovered,[r.focused]:!o.readOnly&&!o.disabled&&o.focused,[r.bordered]:o.bordered})),d=()=>{var w,E;const g=((w=i.value)==null?void 0:w.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((E=i.value)==null?void 0:E.querySelectorAll(":scope > .wrapper-suffix").length)||0,y="var(--icon-size)",S=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${y}) calc(100% - (${g} * ${y} + ${S}))`:!g&&v?`calc(100% - (${v} * ${y} + ${S})) repeat(${v}, ${y})`:g&&v?`repeat(${g}, ${y}) calc(100% - (${g} * ${y} + ${v} * ${y} + ${S})) repeat(${v}, ${y})`:"100%"},h=$("100%"),f=()=>{h.value=d()};Nh(()=>{f()}),Jt(()=>{f()});const p=g=>{a.value=g};return t({rootEl:i,updateState:p,componentState:a,focus:()=>{ft(()=>{var g;(g=i.value)==null||g.focus()})},triggerFocus:()=>{console.log("triggerFocus called"),ft(()=>{var g;(g=i.value)==null||g.focus()})},escape:()=>{s("escape")}}),(g,v)=>{const y=Ec("focusable");return Ue((K(),he("div",{ref_key:"rootEl",ref:i,class:ce([V(r)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:cn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[kt(g.$slots,"prefix",{hovered:o.hovered,focused:o.focused}),kt(g.$slots,"default",{hovered:o.hovered,focused:o.focused,updateComponentState:p,disabled:o.disabled}),kt(g.$slots,"suffix",{hovered:o.hovered,focused:o.focused})],14,dQ)),[[y,o.focusableIndex]])}}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_rxmoy_1",readOnly:"_readOnly_rxmoy_26",bordered:"_bordered_rxmoy_29",disabled:"_disabled_rxmoy_29",active:"_active_rxmoy_29",focused:"_focused_rxmoy_29",hovered:"_hovered_rxmoy_33",error:"_error_rxmoy_37",clickable:"_clickable_rxmoy_50",suffix:"_suffix_rxmoy_56",prefix:"_prefix_rxmoy_57"}}]]),hQ=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fQ=Object.prototype.toString,pQ=e=>fQ.call(e)==="[object Object]",wi=()=>{};function gQ(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return"cancel"in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function mQ(e,t={}){let n,o,s=wi,r=wi;const i=xg(!1),a=c=>{clearTimeout(c),s(),s=wi};let l;return Object.assign(c=>{const d=Ji(e),h=Ji(t.maxWait);return n&&a(n),d<=0||h!==void 0&&h<=0?(o&&(a(o),o=void 0),i.value=!1,Promise.resolve(c())):(i.value=!0,new Promise((f,p)=>{s=t.rejectOnCancel?p:f,r=f,l=c,h&&!o&&(o=setTimeout(()=>{n&&a(n),o=void 0,i.value=!1,f(l())},h)),n=setTimeout(()=>{o&&a(o),o=void 0,i.value=!1,f(c())},d)}))},{cancel:()=>{n&&(a(n),n=void 0),o&&(a(o),o=void 0),i.value=!1,r=wi},flush:()=>{if(i.value){n&&(clearTimeout(n),n=void 0),o&&(clearTimeout(o),o=void 0),i.value=!1;const c=r;s=wi,r=wi,c(l())}},isPending:Nr(i)})}function mE(e){return Array.isArray(e)?e:[e]}function vQ(e,t=200,n={}){return gQ(mQ(t,n),e)}function yQ(e,t,n){return Je(e,t,{...n,immediate:!0})}const KO=hQ?window:void 0;function Gf(e){var t;const n=Ji(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function vE(...e){const t=(o,s,r,i)=>(o.addEventListener(s,r,i),()=>o.removeEventListener(s,r,i)),n=q(()=>{const o=mE(Ji(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return yQ(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>Gf(r)))!==null&&o!==void 0?o:[KO].filter(r=>r!=null),mE(Ji(n.value?e[1]:e[0])),mE(V(n.value?e[2]:e[1])),Ji(n.value?e[3]:e[2])]},([o,s,r,i],a,l)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const u=pQ(i)?{...i}:i,c=o.flatMap(d=>s.flatMap(h=>r.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function yE(e,t,n={}){const{window:o=KO,ignore:s=[],capture:r=!0,detectIframe:i=!1,controls:a=!1}=n;if(!o)return a?{stop:wi,cancel:wi,trigger:wi}:wi;let l=!0;const u=v=>Ji(s).some(y=>{if(typeof y=="string")return Array.from(o.document.querySelectorAll(y)).some(b=>b===v.target||v.composedPath().includes(b));{const b=Gf(y);return b&&(v.target===b||v.composedPath().includes(b))}});function c(v){const y=Ji(v);return y&&y.$.subTree.shapeFlag===16}function d(v,y){const b=Ji(v),S=b.$.subTree&&b.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some(w=>w.el===y.target||y.composedPath().includes(w.el))}const h=v=>{const y=Gf(e);if(v.target!=null&&!(!(y instanceof Element)&&c(e)&&d(e,v))&&!(!y||y===v.target||v.composedPath().includes(y))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[vE(o,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:r}),vE(o,"pointerdown",v=>{const y=Gf(e);l=!u(v)&&!!(y&&!v.composedPath().includes(y))},{passive:!0}),i&&vE(o,"blur",v=>{setTimeout(()=>{const y=Gf(e);let b=o.document.activeElement;for(;b!=null&&b.shadowRoot;)b=b.shadowRoot.activeElement;(b==null?void 0:b.tagName)==="IFRAME"&&!(y!=null&&y.contains(o.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const wQ=["type","value","placeholder","max","min","disabled","readonly","aria-invalid","aria-disabled","inputmode","maxlength"],dl=Et(ot({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},showClear:{type:Boolean,default:!0},maxValue:{default:void 0},minValue:{default:0},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const o=Do,s=qt,r=e,i=n,a=$(null),l=$(r.modelValue||""),u=$(!1),c=$(!1),d=$(r.modelValue||"");Je(()=>r.modelValue,I=>{l.value=I||"",d.value=I||""});const h=q(()=>l.value.length>0),f={text:I=>I.slice(0,r.maxLength||255),number:I=>{const z=r.minValue<0;let ee=I.replace(z?/[^\d.-]/g:/[^\d.]/g,"");const me=ee.split(".");me.length>2&&(ee=me[0]+"."+me.slice(1).join("")),ee=ee.replace(/-/g,(ae,_)=>_===0?ae:"");const de=ee.startsWith("-")?"-":"",oe=ee.replace("-","").split(".");return oe[0].length>17&&(oe[0]=oe[0].substring(0,17)),r.maxDecimalChar!==void 0&&oe.length>1&&(oe[1]=oe[1].substring(0,r.maxDecimalChar)),ee=de+oe.join("."),ee},email:I=>I.replace(/\s/g,"").slice(0,r.maxLength||255),url:I=>I.replace(/\s/g,"").slice(0,r.maxLength||255),tel:I=>I.replace(/[^\d+\-() ]/g,"").slice(0,r.maxLength||20)},p=I=>{const z=f[r.type];return z?z(I):I},g=vQ(I=>{r.autoEmit&&(i("update:modelValue",I),i("input",I))},r.debounceDelay),v=I=>{const z=I;if(r.disabled||r.readOnly){z.preventDefault();return}const ee=z.target,me=ee.selectionStart??ee.value.length,xe=ee.value,de=l.value;let j=p(xe);if(r.type==="number"&&j!==""&&j!=="-"){const oe=Number(j);(r.maxValue!==void 0&&oe>r.maxValue||!Number.isNaN(oe)&&oe<r.minValue)&&(j=de)}if(ee.value!==j){const oe=Math.max(0,xe.length-j.length);ee.value=j;const ae=Math.max(0,Math.min(me-oe,j.length));ee.setSelectionRange(ae,ae)}de!==j&&(l.value=j,i("input",j),r.autoEmit&&g(j))},y=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}c.value=!0;const z=l.value;l.value="",i("update:modelValue",""),i("clear"),z!==""&&i("change",""),I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),ft(()=>{var ee;(ee=a.value)==null||ee.focus(),setTimeout(()=>{c.value=!1},100)})},b=I=>{r.disabled||r.readOnly||(i("focus",I),r.selectOnFocus&&ft(()=>{I.target.select()}))},S=I=>{if(c.value)return;const ee=I.target.value;r.autoEmit||i("update:modelValue",ee),d.value!==ee&&(i("change",ee),d.value=ee),i("blur",ee,I)},w=I=>{const z=I.target.value;i("enter",z,I),i("enterValue",z),r.submitOnEnter&&(I.preventDefault(),r.autoEmit||i("update:modelValue",z),d.value!==z&&(i("change",z),d.value=z))},E=I=>{const z=I.target,ee=z.value;if(i("escape",ee,I),I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),r.autoEmit){i("cancel"),r.blurOnEscape&&z.blur();return}l.value=r.modelValue||"",a.value&&(a.value.value=l.value),i("cancel"),r.blurOnEscape&&z.blur()},R=I=>{const ee=I.target.value;i("tab",ee,I),r.autoEmit||(i("update:modelValue",ee),d.value!==ee&&(i("change",ee),d.value=ee))},D=(I,z,ee)=>new RegExp(`^-?\\d{0,${z}}(\\.\\d{0,${ee}})?$`).test(I)?ee>0||!I.includes("."):!1,x=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"]),N=I=>{if(i("keydown",I),I.key===" "&&I.stopPropagation(),r.type==="number"){if(I.key==="e"||I.key==="E"){I.preventDefault();return}if(I.key.length===1&&!I.ctrlKey&&!I.metaKey&&!I.altKey&&!x.has(I.key)){if(!(r.minValue<0?/[\d.-]/:/[\d.]/).test(I.key)){I.preventDefault();return}const ee=I.target,me=l.value,xe=ee.selectionStart??me.length,de=ee.selectionEnd??xe,j=me.slice(0,xe)+I.key+me.slice(de);if(!D(j,17,r.maxDecimalChar??2)){I.preventDefault();return}const oe=Number(j);if(r.maxValue!==void 0&&oe>r.maxValue||j!=="-"&&!Number.isNaN(oe)&&oe<r.minValue){I.preventDefault();return}}}I.key==="Escape"?E(I):I.key==="Enter"?w(I):I.key==="Tab"?R(I):(I.key==="ArrowUp"||I.key==="ArrowDown")&&r.type==="number"&&I.preventDefault()},B=I=>{i("keyup",I)},A=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}i("paste",I)},P=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}i("cut",I)},k=I=>{i("select",I)},O=`input-text-${Math.random().toString(36).slice(2,11)}`,L=q(()=>{switch(r.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});Je(l,I=>{i("onValidation",I),u.value=r.validatorFnc?!!I&&!r.validatorFnc(I):!1});const H=$(null),W=q(()=>({disabled:r.disabled,readOnly:r.readOnly,error:u.value,inputRef:a,clickable:!r.disabled&&!r.readOnly,focused:r.focused,wrapperRef:H,bordered:!0})),{argsMain:se,isHover:ie,isFocus:Q}=xo(W);t({triggerFocus:()=>{ft(()=>{var I;(I=a.value)==null||I.focus()})},focus:()=>{ne()},blur:()=>{ft(()=>{var I;(I=a.value)==null||I.blur()})},select:()=>{ft(()=>{var I;(I=a.value)==null||I.select()})},setSelectionRange:(I,z)=>{ft(()=>{var ee;(ee=a.value)==null||ee.setSelectionRange(I,z)})},getValue:()=>l.value,setValue:I=>{l.value=p(I),a.value&&(a.value.value=l.value)},reset:()=>{l.value=r.modelValue||"",a.value&&(a.value.value=l.value)}});const ne=()=>{!r.disabled&&!r.readOnly&&ft(()=>{var I;(I=a.value)==null||I.focus()})},Y=q(()=>Q.value&&h.value);return(I,z)=>(K(),he("div",{class:ce([I.$style["input-wrapper"],"input-editor"]),onClick:ne},[Ue((K(),We(Oo,Kt(V(se),{ref_key:"wrapperRef",ref:H,class:[I.$style["input-box"],{[I.$style["is-hovered"]]:V(ie),[I.$style["is-focused"]]:V(Q),[I.$style["has-input"]]:h.value,[I.$style["is-editting"]]:Y.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:r.bordered}),{prefix:Ce(()=>[kt(I.$slots,"prefix")]),suffix:Ce(()=>[h.value&&!r.disabled&&!r.readOnly&&r.showClear?kt(I.$slots,"clear",{},()=>[Ue((K(),We(bt,{variant:["icon","tertiary"],"aria-label":"Clear",onMousedown:Ht(y,["prevent","stop"]),size:18,rounded:!0,class:ce(["wrapper-suffix",I.$style["clear-button"]])},{default:Ce(()=>[ye(gt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[V(s),{content:"Clear",contentClass:"extra-padding"}]])],void 0,0):kt(I.$slots,"suffix",{},void 0,void 0,1)]),default:Ce(()=>[be("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:r.type,value:l.value,placeholder:e.placeholder,class:ce([I.$style["column-config__input"]]),max:r.maxValue,min:r.minValue,id:O,disabled:e.disabled,readonly:e.readOnly,"aria-invalid":u.value||void 0,"aria-disabled":e.disabled||void 0,inputmode:L.value,maxlength:r.maxLength,onInput:v,onFocus:b,onBlur:S,onKeydown:N,onKeyup:B,onPaste:A,onCut:P,onSelect:k},null,42,wQ)]),_:3},16,["class","bordered"])),[[V(o),r.focusIndex]]),u.value?kt(I.$slots,"error",{},void 0,void 0,0):qe("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_83ot4_1","is-disabled":"_is-disabled_83ot4_16","is-readonly":"_is-readonly_83ot4_16","is-hovered":"_is-hovered_83ot4_16","is-focused":"_is-focused_83ot4_20","column-config__input":"_column-config__input_83ot4_44","clear-button":"_clear-button_83ot4_59"}}]]),CQ={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},wE=ot({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null),i=vr(u=>{s("update:modelValue",u),s("search",u)},vi),a=()=>{s("update:modelValue",""),s("clear"),ft(()=>{var u;(u=r.value)==null||u.focus()})},l=$(o.modelValue);return t({focus:()=>{var u;(u=r.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(K(),We(dl,{focusIndex:o.focusIndex,ref_key:"searchInput",ref:r,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:V(i),onClear:a,onCancel:c[1]||(c[1]=d=>s("cancel")),"auto-emit":!0},{prefix:Ce(()=>[be("div",CQ,[ye(gt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),hl=Et(ot({name:"ListItem",directives:{tooltip:qt,focusable:Do},__name:"ListItem",props:{itemWidth:{default:"250px"},label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const o=Do,s=e,r=n,i=$(!1),a=$(!1);function l(E){if(!E||typeof E!="object")return!1;const R=E;return typeof R.name=="string"&&typeof R.id=="string"&&typeof R.initial=="string"}const u=q(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!w.prefix),c=q(()=>!!w.suffix||s.danger&&i.value),d=q(()=>{var E;return s.type==="status"&&typeof((E=s.data)==null?void 0:E.color)=="string"?{backgroundColor:s.data.color,border:Qb(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),h=rm(),f=q(()=>({[h.active]:s.selected??!1,[h.disabled]:s.disabled??!1,[h.hover]:s.hover??!1,[h.clickable]:(s.clickable??!0)&&!s.disabled,[h.danger]:s.danger??!1,[h["has-prefix"]]:u.value,[h["has-suffix"]]:c.value,[h.readOnly]:s.readOnly}));q(()=>({content:"Cancel",...S})),q(()=>({content:"Confirm",theme:"warning",...S}));function p(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function g(){i.value=!1}function v(E){E?r("click",E):(s.clickable??!0)&&(r("update:selected",!s.selected),r("select",!s.selected))}function y(E){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||v(E);r("handleClick",E)}}const b=()=>{i.value?g():r("escape")},S=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),w=zg();return Je(()=>s.show,E=>{E===!1&&(i.value=!1)}),t({select:()=>{y(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(E,R)=>{const D=Ec("tooltip");return Ue((K(),We(bt,{variant:["menu-item",e.danger?"danger":"menu-item"],class:ce([E.$style["list-item"],f.value]),onHandleClick:y,onMouseenter:R[0]||(R[0]=x=>a.value=!0),onMouseleave:R[1]||(R[1]=x=>a.value=!1),onEscape:b,style:cn({width:s.itemWidth})},{default:Ce(()=>[u.value?(K(),he("div",{key:0,class:ce(E.$style["list-item__prefix"])},[kt(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),We(gt,{key:0,src:e.icon,source:"remote",class:ce(E.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(K(),he("div",{key:1,class:ce(E.$style["status-indicator"]),style:cn(d.value)},null,6)):e.type==="assignee"&&l(e.data)?(K(),We(wf,Kt({key:2},p(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):qe("",!0)])],2)):qe("",!0),be("div",{class:ce(E.$style["list-item__label"])},[kt(E.$slots,"label",{selected:e.selected},()=>[tt(at(e.label),1)])],2),c.value?(K(),he("div",{key:1,class:ce(E.$style["list-item__suffix"])},[kt(E.$slots,"suffix",{item:E.$props,hovered:a.value},()=>[e.danger&&i.value?(K(),he("div",{key:0,class:ce(E.$style["confirm-action"])},[Ue((K(),We(bt,{variant:["tertiary","icon","danger"],size:"small",onClick:Ht(g,["stop","prevent"])},{default:Ce(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.0`],[D,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ue((K(),We(bt,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"])},{default:Ce(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.1`],[D,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):qe("",!0)])],2)):qe("",!0)]),_:3},8,["variant","class","style"])),[[V(o),s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_iekfz_1",disabled:"_disabled_iekfz_17",danger:"_danger_iekfz_24","has-prefix":"_has-prefix_iekfz_27","has-suffix":"_has-suffix_iekfz_27",clickable:"_clickable_iekfz_41",readOnly:"_readOnly_iekfz_44",hover:"_hover_iekfz_48",active:"_active_iekfz_54","list-item__prefix":"_list-item__prefix_iekfz_79","list-item__label":"_list-item__label_iekfz_87","list-item__suffix":"_list-item__suffix_iekfz_101","status-indicator":"_status-indicator_iekfz_108","item-icon":"_item-icon_iekfz_114","arbo-icon-state":"_arbo-icon-state_iekfz_119","item-avatar":"_item-avatar_iekfz_122","confirm-action":"_confirm-action_iekfz_131"}}]]),bQ=["aria-activedescendant"],SQ=["innerHTML"],EQ=10,ga=Et(ot({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},itemWidth:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const o=qt,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},r=e,i=n,a=$(""),l=$(-1),u=$(null),c=$(null),d=$(new Map),h=q(()=>YS(a.value)),f=()=>{const Y=h.value;if(!Y||Y.length<r.minQueryLength)return r.options;if(d.value.has(Y))return d.value.get(Y);const I=r.options.map(z=>({item:z,score:BZ(` ${z.label} `,Y)})).filter(({score:z})=>z>0).sort((z,ee)=>ee.score-z.score).map(({item:z})=>z);return d.value.set(Y,I),I},p=$([]);Je(()=>r.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=q(()=>r.hasMore&&!r.loading&&!r.loadingMore),v=vr(Y=>{a.value=Y,l.value=-1,i("search",Y)},vi),y=async Y=>{Q.value=0,await v(Y||""),Q.value=1},b=Y=>a.value?$Z(Y,a.value):Y,S=Y=>{const z={[s.ARROW_DOWN]:()=>w(Y),[s.ARROW_UP]:()=>E(Y),[s.ENTER]:()=>x(Y),[s.ESCAPE]:()=>N(Y),[s.TAB]:()=>B(Y)}[Y.key];z&&z()},w=Y=>{Y.preventDefault(),R(1)},E=Y=>{Y.preventDefault(),R(-1)},R=Y=>{const I=p.value.length;if(I===0)return;let z;Y>0?z=(l.value+1)%I:l.value>0?z=l.value-1:z=I-1,l.value=z,D()},D=()=>{ft(()=>{var I;const Y=(I=c.value)==null?void 0:I.querySelectorAll('[role="menuitem"]')[l.value];Y==null||Y.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},x=Y=>{if(Y.preventDefault(),l.value>=0&&l.value<p.value.length){const z=p.value[l.value];A(z,Y)}},N=Y=>{Y.preventDefault(),k()},B=Y=>{i("tab",Y)},A=(Y,I)=>{!Y||Y.disabled||(i("select",Y,I),l.value=-1,k())},P=Y=>{Y>=0&&Y<p.value.length&&(l.value=Y)},k=()=>{i("close")},O=()=>{if(!g.value||!c.value)return;const{scrollTop:Y,clientHeight:I,scrollHeight:z}=c.value;z-(Y+I)<=EQ&&i("loadMore")},L=()=>{var Y,I,z;(Y=c.value)==null||Y.addEventListener("scroll",O),(z=(I=se.value)==null?void 0:I.$el)==null||z.addEventListener("keydown",S)},H=()=>{var Y,I,z;(Y=c.value)==null||Y.removeEventListener("scroll",O),(z=(I=se.value)==null?void 0:I.$el)==null||z.removeEventListener("keydown",S)};Jt(()=>{L()}),Vn(()=>{H()}),Je(()=>r.loading,Y=>{!Y&&p.value.length>0&&(l.value=-1)});const W=Y=>Y?Array.isArray(r.selectedId)?r.selectedId.includes(String(Y.id)):r.selectedId==Y.id:!1,se=$(null);Je(l,()=>{D()});const ie=()=>{ft(()=>{var Y;(Y=se.value)==null||Y.focus()})};t({focus:()=>{ft(()=>{var Y;(Y=se.value)==null||Y.focus()})},reset:()=>{var Y;(Y=se.value)==null||Y.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:Y=>{c.value&&(c.value.scrollTop=Y)},selectIndex:Y=>{Y>=0&&Y<p.value.length&&(l.value=Y,D())}});const Q=$(0);Je([()=>r.loading,()=>a.value,()=>r.options,()=>r.loadingMore],()=>{const Y=r.options.length>0&&p.value.length>0,I=!Y&&a.value.length>0,z=!Y&&a.value.length===0;r.loading?Q.value=0:Y?Q.value=1:I?Q.value=2:z&&(Q.value=3)},{immediate:!0,deep:!0});const ne=()=>{i("cancel")};return(Y,I)=>(K(),he("datalist",{ref_key:"searchListRef",ref:u,class:ce([Y.$style["search-list"],Q.value===3||Q.value===2?Y.$style.empty:"",p.value.length>8?Y.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:cn({width:e.itemWidth||e.width})},[ye(wE,{ref_key:"searchBoxRef",ref:se,modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=z=>a.value=z),class:ce(Y.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:I[1]||(I[1]=z=>y("")),onCancel:ne},null,8,["modelValue","class","disabled"]),be("div",{ref_key:"popupRef",ref:c,class:ce(Y.$style["list-container"])},[kt(Y.$slots,"extra-item",{query:a.value,isEmpty:Q.value===3||Q.value===2,isLoading:r.loading}),(K(!0),he(Pt,null,Dn(p.value,(z,ee)=>Ue((K(),he("div",{key:`${z.id}-${ee}`,role:"menuitem"},[kt(Y.$slots,"item",{item:z,index:ee,selectedIndex:l.value,isSelected:W,handleSelect:A,handleItemHover:P,getHighlightedLabel:b,query:a.value,idx:ee,focused:l.value==ee,focus:ie},()=>[z.hide?qe("",!0):(K(),We(hl,Kt({key:0,ref_for:!0},z,{hover:ee===l.value,selected:W(z),type:z.type,id:`item-${ee}`,"aria-selected":ee===l.value,onClick:me=>A(z,me),onMouseover:me=>P(ee),onEscape:k,itemWidth:e.itemWidth||e.width}),{prefix:Ce(()=>[kt(Y.$slots,"prefix-item",{item:z})]),label:Ce(()=>[a.value?Ue((K(),he("span",{key:0,class:ce(Y.$style.match),innerHTML:b(z.label)},null,10,SQ)),[[V(o),{content:z.label,delay:[1e3,0]}]]):Ue((K(),he("span",{key:1,class:ce(Y.$style["item-label"])},[tt(at(z.label),1)],2)),[[V(o),{content:z.label,delay:[1e3,0]}]])]),suffix:Ce(({hovered:me})=>[kt(Y.$slots,"action",{item:z,isHovered:ee===l.value,hovered:me,selected:l.value==ee})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover","itemWidth"]))])])),[[lr,Q.value===1]])),128)),Q.value===0?kt(Y.$slots,"loading-more",{},()=>[(K(),he(Pt,null,Dn(8,z=>be("div",{class:ce(Y.$style["loading-more"]),key:z},[be("div",{class:ce(Y.$style["loading-skeleton"])},null,2),be("div",{class:ce(Y.$style["loading-skeleton"])},null,2)],2)),64))],void 0,0):qe("",!0),Q.value===2?(K(),he("div",{key:1,class:ce(Y.$style["no-results"])},[kt(Y.$slots,"empty",{query:a.value},()=>[be("div",{class:ce(Y.$style["no-results-content"])},[...I[2]||(I[2]=[be("div",null,[tt(" No results. "),be("br"),tt(" Try another search. ")],-1)])],2)])],2)):qe("",!0),Q.value===3?(K(),he("div",{key:2,class:ce(Y.$style["no-results"])},[kt(Y.$slots,"empty-list",{},()=>[be("div",{class:ce(Y.$style["no-results-content"])},[...I[3]||(I[3]=[be("div",null,"No items available.",-1)])],2)])],2)):qe("",!0),kt(Y.$slots,"footer")],2)],14,bQ))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Au=ot({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=E8,n=e,o=$(n.appendTo||void 0),s=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:o.value}),r=$(s());Je(()=>n,()=>{setTimeout(()=>{ft(()=>{o.value=n.appendTo||void 0,r.value=s()})},50)},{immediate:!0,deep:!0});const i=q(()=>ln.getInstance().getItem("user.ws_user_role_id")),a=q(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial,isMe:n.user.id===i.value}));return(l,u)=>Ue((K(),We(wf,KG(v1(a.value)),null,16)),[[V(t),r.value]])}}),_Q={class:"avatar-wrapper"},RQ={class:"assignee-label"},TQ=Et(ot({__name:"AssigneeItem",props:{user:{},hovered:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=qt,o=e,s=q(()=>({name:o.user.name,id:o.user.id,profile_image:o.user.profile_image,color:{bgColor:o.user.color.bgColor,textColor:o.user.color.textColor},initial:o.user.initial})),r=zg(),i=q(()=>{if(!a.value&&!o.hover&&!o.focused||!r.actions)return 0;let l=0;const u=c=>{c.forEach(d=>{d.type===Pt&&Array.isArray(d.children)?u(d.children):d.type!==to&&d.type!==Wa&&l++})};return u(r.actions()),l}),a=$(!1);return(l,u)=>(K(),he("div",{class:ce(["assignee-selector-item",{hovered:a.value||o.hovered,disabled:o.disabled,selected:o.selected,single:i.value==0,focused:o.focused}]),style:cn({"--actions-count":i.value}),onMouseenter:u[0]||(u[0]=c=>a.value=!0),onMouseleave:u[1]||(u[1]=c=>a.value=!1)},[be("div",_Q,[ye(Au,{user:s.value,"show-profile":!0,"append-to":o.appendTo,"api-update-function":o.apiUpdateFunction},null,8,["user","append-to","api-update-function"]),o.multipleSelect?(K(),he("div",{key:0,class:ce(["avatar-indicator",[o.selected?"remove":"add"]])},[o.selected?(K(),We(gt,{key:0,src:"CircleXMark"})):(K(),We(gt,{key:1,src:"CirclePlus"}))],2)):qe("",!0)]),Ue((K(),he("div",RQ,[kt(l.$slots,"name",{},()=>[tt(at(o.user.name),1)],!0)])),[[V(n),{content:o.user.name,delay:[1e3,0]}]]),a.value||o.hovered||o.focused?kt(l.$slots,"actions",{},void 0,!0,0):qe("",!0)],38))}}),[["__scopeId","data-v-4de522be"]]),DQ={class:"unassign-icon"},CE=Et(ot({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,o=()=>{n("click")};return(s,r)=>(K(),We(V(bt),{variant:"menu-item",onClick:o,actived:e.actived,style:cn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:Ce(()=>[be("div",DQ,[kt(s.$slots,"icon",{},()=>[r[0]||(r[0]=be("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[be("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:Ce(()=>[kt(s.$slots,"label",{},()=>[tt(at(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),xQ=["innerHTML"],qO=20,YO=Et(ot({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const o=qt,s=e,{id:r}=Ag(s),i=n,a=z=>{var me,xe;const ee=(xe=(me=s.params)==null?void 0:me.api)==null?void 0:xe.getRowNode(String(r.value));ee==null||ee.setDataValue("assignees",Xm(z.assignees)),I("updated",z)},l=$(!1),u=$(!1),c=$(null),d=$(1),h=$(!0),f=$(0),p=$(""),g=En("bulkUpdate",$(!1)),v=En("isSelectAll",$(!1)),y=q(()=>{var z;return g.value&&v.value?[]:(z=s.ids)!=null&&z.length?s.ids:[String(r.value)]}),{unAssignAll:b,replaceAssignees:S,handleSelect:w,assigneeList:E,mergedOptions:R,selectedUserIds:D}=Sv({...s,entityId:s.entityId,updateRowData:a,value:s.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{I("update-failed")}},y),{apiServices:x}=no(!g.value,s),N=En("workspaceId"),B=async(z=1,ee="",me=!1)=>{var de,j,oe,ae,_,M;if(!x.value)throw console.error("API service or item identifiers are undefined",x.value),new Error("API service or item identifiers are undefined");if(me?u.value=!0:l.value=!0,c.value=null,!((de=x.value)!=null&&de.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");const xe=(s.ids??(s.id?[s.id]:[])).map(String);try{let re;xe.length==0?re=await((j=x.value)==null?void 0:j.getEntityUserRoles({workspaceId:String(N),page:z,per_page:qO,display_name_like:ee.trim(),entity_ids:String(s.entityId)})):re=await((oe=x.value)==null?void 0:oe.multipleAssignableUser({workspaceId:String(N),itemIds:xe,page:z,perPage:qO,q:ee.trim(),entityId:String(s.entityId)}));const pe=((ae=ad(re.data))==null?void 0:ae.map(bv))??[];E.value=me?Kc(E.value,pe,"id"):pe,f.value=re.meta.total,h.value=(((_=re==null?void 0:re.meta)==null?void 0:_.current_page)||0)<(((M=re==null?void 0:re.meta)==null?void 0:M.last_page)||0),d.value=z}catch(re){console.error("Error fetching assignable users:",re),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},A=()=>{!u.value&&h.value&&B(d.value+1,p.value,!0)},P=vr(async z=>{p.value=z,await B(1,z,!1)},vi),k=()=>B(1,p.value,!1);Jt(()=>{var z;(z=L.value)==null||z.focus()}),t({getValue:()=>{var z;return(z=R.value.find(ee=>ee.selected))==null?void 0:z.value},refresh:k,clearInternal:()=>{D.value=[]},focus:()=>{var z;(z=L.value)==null||z.focus()}});const O=()=>{const z=ln.getInstance().getItem("BASE_URL"),ee=Zo({type:"access_setting",config:{baseDomain:z,ws_code:s.workspaceId,entity_id:N}}).url;window.open(ee,"_blank")},L=$(null);Jt(()=>{ft(()=>{var z;(z=L.value)==null||z.focus()})}),Je([()=>s.id,()=>s.workspaceId],()=>{B()},{deep:!0,immediate:!0});const H=z=>{var me;const ee=ln.getInstance().getItem("ws.code");return((me=x.value)==null?void 0:me.getUserInformation(ee,z))||Promise.resolve(null)},W=async(z,ee,me)=>{ee.preventDefault(),ee.stopPropagation(),ee.stopImmediatePropagation(),I("update-start");try{const xe=await w(z);if(xe)I("update-completed",xe);else throw new Error("Failed to update assignees")}catch(xe){I("update-failed"),console.error("Error updating assignees:",xe)}},se=async()=>{try{I("update-start");const z=await b();if(z)I("update-completed",z);else throw new Error("Failed to unassign all assignees")}catch(z){I("update-failed"),console.error("Error unassigning all assignees:",z)}finally{}},ie=async z=>{try{I("update-start");const ee=await S(z);if(ee)I("update-completed",ee);else throw new Error("Failed to replace assignees")}catch(ee){I("update-failed"),console.error("Error replacing assignees:",ee)}finally{}},Q=()=>{var z,ee;i("cancel"),(ee=(z=s.params)==null?void 0:z.api)==null||ee.stopEditing()};ri("popupAttachRef",L);const ne=$(),Y=$(!1),I=(z,ee)=>{switch(z){case"updated":i("updated",ee);break;case"update-start":i("update-start");break;case"update-failed":i("update-failed");break;case"update-completed":i("update-completed",ee);break}};return Jt(()=>{ft(()=>{setTimeout(()=>{Y.value=!0},50)})}),(z,ee)=>(K(),he("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:ne},[ye(ga,Kt({"selected-id":V(D)},{...s},{options:V(R),loading:l.value,ref_key:"popupRef",ref:L,"loading-more":u.value,"has-more":h.value,onSelect:ee[0]||(ee[0]=(me,xe)=>{W(me,xe)}),"data-wrapper":"true",onSearch:V(P),onLoadMore:A,onCancel:Q,onClose:Q}),Lh({"extra-item":Ce(({isEmpty:me,isLoading:xe})=>[!me&&!xe?(K(),We(CE,{key:0,onClick:se,actived:!1,label:"Unassign"},{icon:Ce(()=>[ye(gt,{src:"UserXMark",source:"remote"})]),_:1})):qe("",!0)]),item:Ce(({item:me,selectedIndex:xe,isSelected:de,handleItemHover:j,getHighlightedLabel:oe,query:ae,idx:_,focused:M})=>[ye(TQ,{user:me.data,"multiple-select":!0,"append-to":ne.value,isMe:!1,hover:_===xe,selected:de(me),focused:M,onClick:Ht(re=>W(me,re,"click"),["stop","prevent"]),onMouseover:re=>j(_),"api-update-function":H},{name:Ce(()=>[ae?Ue((K(),he("span",{key:0,class:ce([z.$style["item-label"],z.$style.match]),style:{flex:"1"},innerHTML:oe(me.label)},null,10,xQ)),[[V(o),{content:me.label}]]):Ue((K(),he("span",{key:1,class:ce(z.$style["item-label"]),style:{flex:"1"}},[tt(at(me.label),1)],2)),[[V(o),{content:me.label}]])]),actions:Ce(()=>[Ue((K(),We(bt,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Ht(re=>{var pe;return ie((pe=me.data)==null?void 0:pe.id)},["stop"])},{default:Ce(()=>[ye(gt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[V(o),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":Ce(()=>[be("div",{class:ce(z.$style["empty-state"])},[ee[3]||(ee[3]=tt(" No assignee available. ",-1)),ee[4]||(ee[4]=be("br",null,null,-1)),ye(bt,{onClick:O,variant:["tertiary"],size:"small"},{default:Ce(()=>[...ee[2]||(ee[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:Ce(()=>[be("div",{class:ce(z.$style["error-message"])},[tt(at(c.value)+" ",1),ye(bt,{onClick:k,size:"small"},{default:Ce(()=>[...ee[1]||(ee[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),AQ={key:0,class:"inner"},Uf=Et(ot({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const o=e,s=$(null),{triggerRef:r,popupRef:i,isVisible:a,hide:l,toggle:u,show:c}=vo({toggleOnClick:!0,zIndex:2,disabled:o.disabled,placement:"top",appendTo:s.value||void 0}),d=$(null),h=v=>{v.key==="Escape"&&i.value&&l()},f=Po({isShow:!1,isRender:!1});Jt(()=>{var y;const v=d.value instanceof HTMLElement?d.value:(y=d.value)==null?void 0:y.$el;v&&v.addEventListener("keydown",h)}),Vn(()=>{var y;const v=d.value instanceof HTMLElement?d.value:(y=d.value)==null?void 0:y.$el;v&&v.removeEventListener("keydown",h)});const p=n,g=(v,y)=>{f.isShow=v,f.isRender=y};return Je(()=>a.value,(v,y)=>{v?ft(()=>{a.value&&g(!0,!0)}):f.isShow=!1,p("onVisibleChange",v,y)}),t({hide:()=>{console.log(" "),l(),g(!1,!0)},isVisible:a,open:()=>{c(),g(!0,!0)},destroy(){l(),g(!1,!1)}}),(v,y)=>(K(),he("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:s},[be("div",{class:"trigger-slot",ref_key:"triggerRef",ref:r},[kt(v.$slots,"trigger",{isVisible:V(a),hide:V(l),disabled:o.isUpdating||o.disabled,popupRef:V(i),triggerRef:V(r),toggle:V(u)},void 0,!0)],512),be("div",{class:"popup-slot",ref_key:"popupRef",ref:i},[f.isRender?Ue((K(),he("div",AQ,[kt(v.$slots,"popup",{isVisible:V(a),hide:V(l),popupRef:V(i),triggerRef:V(r),toggle:V(u),open:V(c)},void 0,!0)],512)),[[lr,f.isShow]]):qe("",!0)],512)],512))}}),[["__scopeId","data-v-af84b00b"]]),IQ=ot({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},variant:{},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;ri("bulkUpdate",!0);const o=$(!1),s=t,r=$(null),i=()=>{var d;o.value=!0,s("update-start"),(d=l.value)==null||d.hide()},a=(d,h)=>{var f,p;o.value=!1,d?(s("update-completed",h),(f=l.value)==null||f.destroy()):(s("update-failed"),(p=l.value)==null||p.open())},l=$(null),u=d=>{var h;s("update",d),(h=r.value)==null||h.clearInternal()},c=(d,h)=>{ft(()=>{var f,p;d?(f=r.value)==null||f.focus():(p=r.value)==null||p.clearInternal()})};return(d,h)=>(K(),We(Uf,{ref_key:"wrapperRef",ref:l,isUpdating:o.value,disabled:n.disabled||o.value,onOnVisibleChange:c},{trigger:Ce(({hide:f,disabled:p})=>[ye(bt,{variant:n.variant,loading:o.value,disabled:p,onEscape:f},{default:Ce(()=>[ye(gt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:Ce(({hide:f})=>[ye(YO,Kt({ref_key:"assigneeGroupEditorRef",ref:r},n,{ids:e.ids,onUpdated:u,onUpdateStart:i,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0,p)),onCancel:f}),null,16,["ids","onCancel"])]),default:Ce(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Wf=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],PQ=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),fl=(e,t)=>{const n=o=>{var s,r;if(o.key==="Tab"){const i=o.shiftKey||o.metaKey;o.preventDefault(),o.stopImmediatePropagation(),o.stopPropagation();const a=document.activeElement,l=(s=a==null?void 0:a.dataset)==null?void 0:s.index;if(l){let u=Wf.indexOf(l);const c=i?-1:1;for(const d of Wf){u=(u+c+Wf.length)%Wf.length;const h=Wf[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(o.key==="Enter")(r=o.target)==null||r.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(o.key==="Escape"){o.stopPropagation(),o.stopImmediatePropagation();const i=document.querySelector('[data-index="calendar-wrapper"]');i==null||i.focus()}};if(PQ.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},kQ=["aria-label"],FQ=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],OQ={style:{flex:"1"}},MQ=Et(ot({__name:"MainCalendar",props:$D({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1},hasWarning:{type:Boolean,default:!0},disabledTooltip:{default:"This date is disabled"},parentConfig:{}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:$D(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const o=qt,s=$(null),r=e,i=q(()=>r.startDate&&r.endDate),a=IW(e,"tracingCase"),l=n,u=$(r.year),c=$(r.month),d=q(()=>{var xe,de,j;const I=oe=>oe==null?void 0:oe.toFormat("yyyy-MM-dd"),z=(xe=r.parentConfig)==null?void 0:xe.parentName,ee=(de=r.parentConfig)==null?void 0:de.parentStartDate,me=(j=r.parentConfig)==null?void 0:j.parentDueDate;return{smaller:`Before the ${z} start date (${I(ee)})`,larger:`After the ${z} due date (${I(me)})`,none:""}});Je(()=>[r.year,r.month],([I,z])=>{u.value=I,c.value=z});const h=q(()=>ut.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}).setLocale(r.locale||"en-US").toFormat("LLLL yyyy")),f=q(()=>ut.now().setZone(r.timezone)),p=q(()=>r.startDate?ut.fromJSDate(r.startDate,{zone:r.timezone}):null),g=q(()=>r.endDate?ut.fromJSDate(r.endDate,{zone:r.timezone}):null),v=$(p.value),y=$(g.value),b=$(p.value),S=$(g.value);Je([p,g],()=>{r.requireConfirm||(v.value=p.value,y.value=g.value,b.value=p.value,S.value=g.value)},{immediate:!0});const w=q(()=>r.requireConfirm?v.value:p.value),E=q(()=>r.requireConfirm?y.value:g.value);Je(()=>r.activeField,I=>{const z=I==="start"?w.value:E.value;z&&(u.value=z.year,c.value=z.month)}),Je(()=>{var I,z;return[(I=w.value)==null?void 0:I.toISODate(),(z=E.value)==null?void 0:z.toISODate(),r.activeField]},()=>{const I=r.activeField==="start"?w.value:E.value;I&&(I.year!==u.value||I.month!==c.value)&&(u.value=I.year,c.value=I.month)});function R(I){return I.setZone("utc")}const D=$("");function x(I){D.value=I.toISODate()||"",ft(()=>{const z=document.querySelector(`.arbo-calendar-day[data-date="${D.value}"]`);z==null||z.focus()})}Je(()=>{var I,z;return[u.value,c.value,r.activeField,(I=w.value)==null?void 0:I.toISODate(),(z=E.value)==null?void 0:z.toISODate()]},()=>{const I=r.activeField==="start"?w.value:E.value;let z;I&&I.year===u.value&&I.month===c.value?z=I:w.value&&w.value.year===u.value&&w.value.month===c.value?z=w.value:z=f.value,x(z)});function N(I){return I.toFormat("d")}const B=q(()=>{var M,re,pe,_e,we,X,U,te;const I=ut.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}),z=I.weekday,ee=r.weekStart===1?(z+6)%7:z%7;let me=I.minus({days:ee});const xe=[],de=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"}),j=rm(),oe=(re=(M=r.parentConfig)==null?void 0:M.parentStartDate)==null?void 0:re.startOf("day").toMillis(),ae=(_e=(pe=r.parentConfig)==null?void 0:pe.parentDueDate)==null?void 0:_e.endOf("day").toMillis();console.log("calculating classes for cursor:",{cursor:me.toISODate(),parentStartMs:oe,parentDueMs:ae,parentConfig:r.parentConfig});for(let le=0;le<42;le++){const Ye=[];me.month!==c.value&&Ye.push(j["is-outside"]),me.hasSame(f.value,"day")&&Ye.push(j["is-today"]),w.value&&me.hasSame(w.value,"day")&&Ye.push(j["is-selected-start"]),E.value&&me.hasSame(E.value,"day")&&Ye.push(j["is-selected-end"]),w.value&&E.value&&me>w.value&&me<E.value&&Ye.push(j["is-in-range"]);const Be=N(me),ze=de[me.weekday-1]||"";let Oe="none";const nt=me.startOf("day").toMillis();oe!==void 0&&nt<oe?Oe="smaller":ae!==void 0&&nt>ae&&(Oe="larger"),console.log("dayMs:",me.startOf("day").toFormat("yyyy-MM-dd"),"parentStartMs:",(X=(we=r.parentConfig)==null?void 0:we.parentStartDate)==null?void 0:X.toFormat("yyyy-MM-dd"),"parentDueMs:",(te=(U=r.parentConfig)==null?void 0:U.parentDueDate)==null?void 0:te.toFormat("yyyy-MM-dd"),"resulting warning:",Oe),xe.push({dt:me,iso:me.toISODate()||"",label:me.toFormat("d"),displayLabel:Be,weekdayLabel:ze,aria:me.setLocale(r.locale||"en-US").toFormat("cccc, d LLLL yyyy"),warning:Oe,classes:Ye}),me=me.plus({days:1})}const _=[];for(let le=0;le<6;le++)_.push(xe.slice(le*7,le*7+7));return console.log("cells:",_),_}),A=q(()=>{const I=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"});return r.weekStart===1?I:[I[6],...I.slice(0,6)]});function P(I,z,ee){const me=I==="start"?z.startOf("day"):z.endOf("day"),xe=R(me),de={year:me.year,month:me.month,day:me.day,utc:xe.toISO()||""};I==="start"?(l("select-start",de,ee??!0),l("select-start-utc",de.utc)):(l("select-end",de),l("select-end-utc",de.utc))}function k(I){let z=u.value,ee=c.value+I;for(;ee<1;)ee+=12,z-=1;for(;ee>12;)ee-=12,z+=1;u.value=z,c.value=ee,l("update:year",z),l("update:month",ee)}function O(I){const ee=(D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value).plus({days:I});ee.month===c.value&&ee.year===u.value&&x(ee)}function L(I=!1){const ee=(D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value).weekday%7,me=I?6-ee:-ee;O(me)}const H=I=>{W(I)};function W(I){switch(I.preventDefault(),I.stopPropagation(),I.key){case"ArrowLeft":I.preventDefault(),O(-1);break;case"ArrowRight":I.preventDefault(),O(1);break;case"ArrowUp":I.preventDefault(),O(-7);break;case"ArrowDown":I.preventDefault(),O(7);break;case"Home":I.preventDefault(),L(!1);break;case"End":I.preventDefault(),L(!0);break;case"PageUp":I.preventDefault(),k(I.shiftKey?-12:-1);break;case"PageDown":I.preventDefault(),k(I.shiftKey?12:1);break;case"Enter":case" ":{I.preventDefault();const z=D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value,ee=B.value.flat().find(me=>me.iso===z.toISODate());ee&&ie(ee);break}}}const se=I=>{const z=ut.now().setZone(r.timezone);u.value=z.year,c.value=z.month,l("update:year",z.year),l("update:month",z.month),x(z),l("gotoToday")};function ie(I){var _e,we;const z=!!p.value,ee=!!g.value,me=r.activeField,xe=((_e=p.value)==null?void 0:_e.toISODate())||"null",de=((we=g.value)==null?void 0:we.toISODate())||"null",j=I.dt.toISODate()||"",oe=(X,U)=>{a.value={case:X,behavior:U}},ae=()=>`Selected start ${j} > existing end ${de} -> reset both to ${j}`,_=()=>`Selected end ${j} < existing start ${xe} -> reset both to ${j}`,M=()=>{P("start",I.dt,!0),P("end",I.dt),l("update:activeField","end")},re=(X=!1)=>{P("start",I.dt,X),X&&l("update:activeField","end")},pe=(X=!1)=>{P("end",I.dt),X&&l("close")};if(z&&ee){me==="start"?g.value&&I.dt>g.value?(M(),oe("INVERT_RANGE_FROM_START",ae())):(re(!1),oe("UPDATE_START_IN_RANGE",`Updated start from ${xe} to ${j}; end remains ${de}`)):p.value&&I.dt<p.value?(M(),oe("INVERT_RANGE_FROM_END",_())):(pe(!1),oe("UPDATE_END_IN_RANGE",`Updated end from ${de} to ${j}; start remains ${xe}`));return}if(!z&&ee&&me==="start"&&g.value&&I.dt>g.value){M(),oe("CREATE_RANGE_FROM_LATE_START",ae());return}if(z&&!ee&&me==="end"&&p.value&&I.dt<p.value){M(),oe("CREATE_RANGE_FROM_EARLY_END",_());return}if(!z&&!ee){if(me==="start"){re(!0),oe("INIT_START",`Picked start ${j}; awaiting end selection`);return}pe(r.immediatelyUpdate),oe("INIT_END",`Picked end ${j}; awaiting start selection`);return}if(!z&&ee){if(me==="start"){re(!0),oe("FILL_MISSING_START",`Inserted start ${j}; existing end ${de}`);return}pe(!1),oe("STRICT_UPDATE_END_ONLY",`Updated end to ${j}; start still null`);return}if(z&&!ee){if(me==="start"){re(!0),oe("RESELECT_START_BEFORE_END",`Replaced start with ${j}; end still null, switching to end`);return}pe(r.immediatelyUpdate),oe("FILL_MISSING_END",`Picked end ${j}; start ${xe}`);return}}function Q(){b.value=v.value,S.value=y.value,l("confirm")}function ne(){v.value=b.value,y.value=S.value,l("cancel")}function Y(){ft(()=>{var I;(I=s.value)==null||I.focus()})}return Jt(()=>{Y()}),t({focus:Y}),(I,z)=>(K(),he("div",{ref_key:"calendarRef",ref:s,class:ce([I.$style["arbo-calendar"],{[I.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":h.value,tabindex:"0"},[be("div",{class:ce([I.$style["arbo-calendar-header"],I.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),he(Pt,null,Dn(A.value,ee=>(K(),he("div",{key:ee,class:ce(I.$style["arbo-calendar-weekday"]),role:"columnheader"},at(ee),3))),128))],2),be("div",{class:ce(I.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:z[0]||(z[0]=Ht(ee=>V(fl)(ee,H),["prevent","stop"]))},[(K(!0),he(Pt,null,Dn(B.value,(ee,me)=>(K(),he("div",{key:me,class:ce(I.$style["arbo-calendar-week"])},[(K(!0),he(Pt,null,Dn(ee,xe=>Ue((K(),he("button",{key:xe.iso,class:ce([I.$style["arbo-calendar-day"],xe.classes,{[I.$style["is-focused"]]:xe.iso===D.value},{[I.$style["is-warning"]]:xe.warning!=="none"}]),disabled:r.disabled,readOnly:r.readOnly,"aria-label":xe.aria,"data-date":xe.iso,"data-weekday":xe.weekdayLabel,tabindex:xe.iso===D.value?0:-1,onClick:de=>ie(xe)},[tt(at(xe.displayLabel),1)],10,FQ)),[[V(o),{content:r.disabled||r.readOnly?r.disabledTooltip:d.value[xe.warning],bypassOverflowCheck:!0}]])),128))],2))),128))],34),r.hasWarning?(K(),he("div",{key:0,class:ce(I.$style["warning-selection"])},[ye(gt,{src:"InfoCircle",size:"16",color:"var(--tessr-snackbar-fg-warning, #F7941D)"}),z[2]||(z[2]=tt(" Outside the parent folder's date range. You can still confirm. ",-1))],2)):qe("",!0),r.readOnly?qe("",!0):(K(),he("div",{key:1,class:ce(I.$style["arbo-calendar-actions"])},[be("div",OQ,[Ue((K(),We(bt,{variant:"secondary",size:"medium",onClick:z[1]||(z[1]=ee=>se()),onKeydown:V(fl),"data-index":"today-btn"},{prefix:Ce(()=>[ye(gt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[V(o),"Today"]])]),ye(bt,{disabled:r.disabled,readOnly:r.readOnly,onKeydown:V(fl),variant:"secondary",size:"medium",onClick:ne,"data-index":"cancel-btn"},{default:Ce(()=>[tt(at(r.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ye(bt,{disabled:r.disabled||r.disableConfirm,readOnly:r.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:V(fl),onClick:Q},{default:Ce(()=>[tt(at(r.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,kQ))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_wwtcu_1","arbo-calendar-week":"_arbo-calendar-week_wwtcu_2","arbo-calendar-day":"_arbo-calendar-day_wwtcu_3","arbo-calendar":"_arbo-calendar_wwtcu_2","arbo-calendar-nav":"_arbo-calendar-nav_wwtcu_36","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_wwtcu_44","arbo-calendar-nav-label":"_arbo-calendar-nav-label_wwtcu_51","arbo-calendar-weekday":"_arbo-calendar-weekday_wwtcu_56","arbo-calendar-weeks":"_arbo-calendar-weeks_wwtcu_61","is-today":"_is-today_wwtcu_94","is-selected-start":"_is-selected-start_wwtcu_99","is-selected-end":"_is-selected-end_wwtcu_107","is-outside":"_is-outside_wwtcu_127","is-focused":"_is-focused_wwtcu_130","is-in-range":"_is-in-range_wwtcu_135","is-warning":"_is-warning_wwtcu_140","arbo-calendar-actions":"_arbo-calendar-actions_wwtcu_153","warning-selection":"_warning-selection_wwtcu_161","arbo-calendar-btn":"_arbo-calendar-btn_wwtcu_178",cancel:"_cancel_wwtcu_187",confirm:"_confirm_wwtcu_192"}}]]),NQ=["onClick"],LQ=["variant","onClick"],VQ=Et(ot({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const o=e,s=q(()=>{if(o.monthLabels&&o.monthLabels.length===12)return o.monthLabels;const k=o.locale||"en-US",O=o.monthLabelStyle||"short",L=new Intl.DateTimeFormat(k,{month:O,timeZone:"UTC"});return Array.from({length:12},(W,se)=>L.format(new Date(Date.UTC(2020,se,1))))}),r=n,i=$(o.year),a=$(o.month),l=$(o.year);Je(()=>o.year,k=>{k!==i.value&&(i.value=k,l.value=k)}),Je(()=>o.month,k=>{k!==a.value&&(a.value=k)});const u=$("days");function c(k){u.value!==k&&(u.value=k,r("mode-change",k))}const d=q(()=>o.minYear),h=q(()=>o.maxYear),f=q(()=>{const k=o.yearSpan;return l.value-l.value%k}),p=q(()=>f.value+o.yearSpan-1);function g(){const k=o.yearSpan,O=f.value-k;O>=d.value&&(l.value=O)}function v(){const k=o.yearSpan,O=f.value+k;O<=h.value&&(l.value=O)}const y=q(()=>f.value-o.yearSpan<d.value),b=q(()=>p.value+o.yearSpan>h.value),S=q(()=>{const k=o.yearSpan;return Math.ceil(k/3)});function w(k){const L=f.value+(k-1)*3;return Array.from({length:3},(H,W)=>L+W).filter(H=>H<=p.value)}function E(){u.value==="months"?c("days"):c("months")}function R(){u.value==="years"?c("days"):c("years")}function D(k){i.value=k,l.value=k,r("update:year",k),r("year-selected",k),c("months")}function x(k){a.value=k,r("update:month",k),r("month-selected",k),c("days")}function N(){if(u.value==="days"){let k=i.value,O=a.value-1;if(O<1&&(O=12,k--),k<d.value)return;i.value=k,a.value=O,r("update:year",k),r("update:month",O)}else if(u.value==="months"){if(i.value-1<d.value)return;i.value--,r("update:year",i.value)}else u.value==="years"&&g()}function B(){if(u.value==="days"){let k=i.value,O=a.value+1;if(O>12&&(O=1,k++),k>h.value)return;i.value=k,a.value=O,r("update:year",k),r("update:month",O)}else if(u.value==="months"){if(i.value+1>h.value)return;i.value++,r("update:year",i.value)}else u.value==="years"&&v()}const A=q(()=>u.value==="days"?i.value===d.value&&a.value===1:u.value==="months"?i.value-1<d.value:y.value),P=q(()=>u.value==="days"?i.value===h.value&&a.value===12:u.value==="months"?i.value+1>h.value:b.value);return t({setNavigation:(k,O)=>{i.value=k,a.value=O}}),(k,O)=>(K(),he("div",{class:ce([k.$style["cal-nav-wrapper"]])},[kt(k.$slots,"selection"),u.value==="days"?(K(),he("div",{key:0,class:ce(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:A.value,label:"",onClick:N,"data-index":"prev-btn",onKeydownCapture:po(Ht(N,["prevent","stop"]),["enter"]),onKeydown:V(fl)},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),be("div",{class:ce(k.$style["cal-nav-center"])},[ye(bt,{"data-index":"month-btn",variant:"secondary",onClick:E,onKeydown:V(fl)},{default:Ce(()=>[tt(at(s.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ye(bt,{variant:"secondary",onClick:R,"data-index":"year-btn",onKeydown:V(fl)},{default:Ce(()=>[tt(at(i.value),1)]),_:1},8,["onKeydown"])],2),ye(bt,{"data-index":"next-btn",variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:P.value,label:"",onClick:B,onKeydownCapture:po(Ht(B,["prevent","stop"]),["enter"]),onKeydown:V(fl)},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):qe("",!0),u.value==="years"?(K(),he("div",{key:1,class:ce(k.$style["year-grid"])},[be("div",{class:ce(k.$style["year-grid-header"])},[ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),be("div",{class:ce(k.$style["range-label"])},at(f.value)+" - "+at(p.value),3),ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:b.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),be("div",{class:ce(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(K(!0),he(Pt,null,Dn(S.value,L=>(K(),he("div",{key:"yr-row-"+L,class:ce(k.$style["year-grid-row"])},[(K(!0),he(Pt,null,Dn(w(L),H=>(K(),he("a",{key:H,tabindex:"0",class:ce([k.$style["year-cell"],{[k.$style.selected]:H===i.value}]),onClick:W=>D(H)},at(H),11,NQ))),128))],2))),128))],2)],2)):u.value==="months"?(K(),he("div",{key:2,class:ce(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[be("div",{class:ce(k.$style.months)},[(K(!0),he(Pt,null,Dn(s.value,(L,H)=>(K(),he("a",{tabindex:"0",key:L,variant:H+1===a.value?"primary":"text",class:ce([k.$style["month-cell"],{[k.$style.selected]:H+1===a.value}]),onClick:W=>x(H+1)},at(L),11,LQ))),128))],2)],2)):(K(),he("div",{key:3,class:ce(k.$style["days-slot"])},[kt(k.$slots,"default",{year:i.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_1hrlu_1","cal-nav-bar":"_cal-nav-bar_1hrlu_10","cal-nav-btn":"_cal-nav-btn_1hrlu_18",prev:"_prev_1hrlu_31","year-grid-header":"_year-grid-header_1hrlu_35","cal-nav-center":"_cal-nav-center_1hrlu_44","cal-nav-label":"_cal-nav-label_1hrlu_50","month-grid":"_month-grid_1hrlu_64","year-grid":"_year-grid_1hrlu_35",months:"_months_1hrlu_73","month-cell":"_month-cell_1hrlu_80","year-cell":"_year-cell_1hrlu_81","pg-btn":"_pg-btn_1hrlu_103","year-grid-body":"_year-grid-body_1hrlu_116","year-grid-row":"_year-grid-row_1hrlu_123",selected:"_selected_1hrlu_129","days-slot":"_days-slot_1hrlu_135","range-label":"_range-label_1hrlu_139"}}]]);function BQ(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:o,maxDate:s}=e,r=$(""),i=q(()=>{const g=ut.fromFormat(r.value,t,{zone:n});return g.isValid?g:null}),a=q(()=>{if(!o||!i.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const y=new Date(g.year,g.month-1,g.day),b=new Date(v.year,v.month-1,v.day);return y<b?-1:y>b?1:0},u=q(()=>{if(!s||!i.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=q(()=>r.value.length==0||r.value.length>0&&i.value!==null&&a.value&&u.value),d=q(()=>r.value.length===t.length&&c.value);return{inputValue:r,isValid:c,isComplete:d,clear:()=>{r.value=""},setDate:g=>{let v;g instanceof Date?v=ut.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?r.value=v.toFormat(t):r.value=""},getDate:()=>c.value?i.value:null}}const $Q={key:0,style:{marginLeft:"8px"}},HQ=["disabled","readonly","placeholder"],XO=Et(ot({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=$(null),a=$(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=BQ({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,timezone:s.timezone,minDate:s.minDate,maxDate:s.maxDate}),p=q(()=>s.active),g=q(()=>({disabled:s.disabled,error:!l.value&&c.value.length>0,readOnly:s.readOnly,isEmpty:c.value.length===0,inputRef:i,wrapperRef:a,active:p})),{argsMain:v,isHover:y,isFocus:b}=xo(g),S=x=>{var B;const N=(B=x.clipboardData)==null?void 0:B.getData("text/plain");N&&(c.value=N.trim())},w=x=>{if(x.key==="Escape"){r("blur"),x.target.blur(),x.preventDefault(),x.stopPropagation(),x.stopImmediatePropagation();return}else x.key==="Tab"&&D(x)},E=()=>{d(),r("clear")};t({clear:E,setDate:h,getDate:f,focus:()=>{var x;return(x=i.value)==null?void 0:x.focus()}}),Je(()=>s.modelValue,x=>{x?h(x):d()},{immediate:!0}),Je([()=>u.value,()=>c.value],()=>{if(c.value.length===0)r("complete",null);else if(l.value&&!s.readOnly&&!s.disabled&&u.value){const x=f();(x||c.value.length===0)&&r("complete",x)}}),Je(()=>l.value,x=>{x||r("invalid","")});const R=q(()=>!!s.isMultipleDate),D=x=>{x.preventDefault(),x.stopImmediatePropagation(),x.stopPropagation(),r("tab",x)};return(x,N)=>(K(),We(Oo,Kt(V(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:Ce(()=>[be("div",{class:ce([x.$style["date-input-wrapper"]])},[R.value?(K(),he("span",$Q," Multiple ")):Ue((K(),he("input",{key:1,disabled:s.disabled,readonly:s.readOnly,ref_key:"inputRef",ref:i,type:"text","onUpdate:modelValue":N[0]||(N[0]=B=>fn(c)?c.value=B:null),onPaste:Ht(S,["prevent"]),placeholder:s.placeholder,class:ce([x.$style["date-input"]]),onKeydown:w},null,42,HQ)),[[Q1,V(c)]]),kt(x.$slots,"clear",{handleClear:E},()=>[(V(c).length>0||R.value)&&!s.readOnly&&!s.disabled&&(V(y)||V(b))?Ue((K(),We(bt,{key:0,variant:["icon","primary"],onClick:Ht(E,["stop"]),size:16,rounded:!0},{default:Ce(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[V(o),"Clear"]]):(K(),We(gt,{key:1,src:"Calendar",source:"remote",class:ce(x.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_132fk_1","icon-calendar":"_icon-calendar_132fk_9",focus:"_focus_132fk_12",hover:"_hover_132fk_12",active:"_active_132fk_12","date-input":"_date-input_132fk_1",invalid:"_invalid_132fk_38"}}]]),ZO=(e,t)=>{if(e==null||e==="")return null;let n;return ut.isDateTime(e)?n=e.setZone(t):e instanceof Date?n=ut.fromJSDate(e,{zone:t}):typeof e=="number"?n=ut.fromMillis(e,{zone:t}):n=ut.fromISO(e,{zone:t}),n.isValid?n:null},GQ=ot({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:JS()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean},parent_name:{},parentConfig:{}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const o=$({case:"",behavior:""}),s=e,r=$(null),i=n,a=async(_,M)=>{i("start-update"),await _(),i("finish-update"),ft(()=>{var re,pe;M(),(pe=(re=s.params)==null?void 0:re.api)==null||pe.stopEditing()})},l=(_,M)=>{_(),ft(()=>{var re,pe;M(),(pe=(re=s.params)==null?void 0:re.api)==null||pe.stopEditing()})},u=()=>{var M;const _=ut.now().setZone(s.timezone);I.value=_.year,z.value=_.month,(M=Y.value)==null||M.setNavigation(_.year,_.month)},c=Po({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:y,beginInteraction:b,clearStart:S,clearDue:w}=WZ(s,i),E=q(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});Je(()=>s.multipleStartDates,_=>{h.value=!!_},{immediate:!0}),Je(()=>s.multipleDueDates,_=>{f.value=!!_},{immediate:!0});const R=$(null),D=$(null),x=_=>{_.preventDefault(),_.stopImmediatePropagation(),_.stopPropagation(),ie()},N=()=>{var _;(_=D.value)==null||_.focus()},B=_=>{if(!_){c.start=!1,S();return}const M=d.endDate?ut.fromJSDate(d.endDate,{zone:s.timezone}):null;if(M&&A(_,M)>0){const pe={year:_.year,month:_.month,day:_.day};c.start=!1,y(pe,!1),p(pe),ft(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const re={year:_.year,month:_.month,day:_.day};c.start=!1,y(re,!0)},A=(_,M)=>{const re=_.startOf("day"),pe=M.startOf("day");return re<pe?-1:re>pe?1:0},P=_=>{var M;_.preventDefault(),_.stopImmediatePropagation(),_.stopPropagation(),(M=document.querySelector('[data-index="prev-btn"]'))==null||M.focus()},k=_=>{if(!_){c.end=!1,w();return}const M=d.startDate?ut.fromJSDate(d.startDate,{zone:s.timezone}):null;if(M&&A(_,M)<0){const pe={year:_.year,month:_.month,day:_.day};c.end=!1,y(pe),p(pe),ft(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const re={year:_.year,month:_.month,day:_.day};c.end=!1,p(re)},O=()=>{h.value=!1,S()},L=()=>{f.value=!1,w()},H=()=>{Q()},W=q(()=>d.isSelectingStart||d.isSelectingEnd);function se(){s.disabled||s.readOnly||(b(),d.isSelectingStart=!0,d.isSelectingEnd=!1,ft(()=>{var _;(_=r.value)==null||_.focus()}))}function ie(){s.disabled||s.readOnly||(b(),d.isSelectingEnd=!0,d.isSelectingStart=!1,ft(()=>{var _;(_=R.value)==null||_.focus()}))}function Q(){d.isSelectingStart=!1,d.isSelectingEnd=!1,i("closed")}function ne(_){_.key==="Escape"?(_.stopPropagation(),Q()):_.key=="Tab"&&i("tab",_)}const Y=$(null),I=$(new Date().getFullYear()),z=$(new Date().getMonth()+1);Je(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(I.value=d.startDate.getFullYear(),z.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(I.value=d.endDate.getFullYear(),z.value=d.endDate.getMonth()+1)},{immediate:!0});const ee=$(null);function me(){if(Array.isArray(s.value)){const[M,re]=s.value;d.startDate=M||null,d.endDate=re||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const _=d.startDate||d.endDate||new Date;I.value=_.getFullYear(),z.value=_.getMonth()+1}Je(()=>{var _,M,re,pe,_e,we,X,U;return[((re=(M=(_=s.value)==null?void 0:_[0])==null?void 0:M.getTime)==null?void 0:re.call(M))||((pe=s.value)==null?void 0:pe[0]),((X=(we=(_e=s.value)==null?void 0:_e[1])==null?void 0:we.getTime)==null?void 0:X.call(we))||((U=s.value)==null?void 0:U[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{me()},{immediate:!0,deep:!0}),t({resetCalendarLogic:me,openStart:se,openEnd:ie,closePicker:Q,clearAll:H,isOpen:W,drpRef:ee,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?se():ie():se()}});const de=$(null);Je(()=>W.value,_=>{if(s.disabled||s.readOnly)return;const M=de.value;M&&(_?M.show():M.hide())},{immediate:!0});const j=_=>ut.fromJSDate(_,{zone:s.timezone}),oe=q(()=>{var _,M,re;return{start:ZO((_=s.parentConfig)==null?void 0:_.parentStartDate,s.timezone),due:ZO((M=s.parentConfig)==null?void 0:M.parentDueDate,s.timezone),name:(re=s.parentConfig)==null?void 0:re.parentName}}),ae=q(()=>{const{startDate:_,endDate:M}=d,re=oe.value.start,pe=oe.value.due,_e=X=>!!(X&&re&&j(X).startOf("day")<re.startOf("day")),we=X=>!!(X&&pe&&j(X).startOf("day")>pe.startOf("day"));return _e(_)||_e(M)||we(_)||we(M)});return(_,M)=>(K(),he("div",{class:ce(_.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:D,onKeydown:ne,tabindex:"1","data-index":"calendar-wrapper"},[ye(VQ,{year:I.value,"onUpdate:year":M[6]||(M[6]=re=>I.value=re),month:z.value,"onUpdate:month":M[7]||(M[7]=re=>z.value=re),locale:s.locale,disabled:s.disabled,readOnly:s.readOnly,ref_key:"navigationRef",ref:Y},{selection:Ce(()=>[be("div",{class:ce(_.$style["calendar-input-section"])},[ye(XO,{ref_key:"starDateRef",ref:r,"model-value":V(d).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:V(d).isSelectingStart,onClick:se,onClear:O,onComplete:B,onInvalid:M[0]||(M[0]=re=>c.start=!0),disabled:s.disabled,readOnly:s.readOnly,onBlur:N,onTab:x},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(XO,{ref_key:"endDateRef",ref:R,"model-value":V(d).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:V(d).isSelectingEnd,onClick:ie,onClear:L,disabled:s.disabled,onComplete:k,onInvalid:M[1]||(M[1]=re=>c.end=!0),readOnly:s.readOnly,isMultipleDate:V(f),onTab:P},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:Ce(({year:re,month:pe})=>[ye(MQ,{disabled:s.disabled,"has-warning":ae.value,disableConfirm:c.end||c.start,readOnly:s.readOnly,ref_key:"drpRef",ref:ee,"tracing-case":o.value,"onUpdate:tracingCase":M[2]||(M[2]=_e=>o.value=_e),year:re,month:pe,"start-date":V(d).startDate,"end-date":V(d).endDate,"active-field":E.value,timezone:s.timezone,parentConfig:s.parentConfig,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:V(y),onSelectEnd:V(p),onGotoToday:u,onConfirm:M[3]||(M[3]=()=>{a(V(v),Q)}),onCancel:M[4]||(M[4]=_e=>l(V(g),Q)),onClose:M[5]||(M[5]=_e=>a(V(v),Q))},null,8,["disabled","has-warning","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","parentConfig","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Ov=Et(GQ,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_5tolc_1","calendar-input-section":"_calendar-input-section_5tolc_11","display-wrapper":"_display-wrapper_5tolc_19","calendar-actions":"_calendar-actions_5tolc_23","clear-all-btn":"_clear-all-btn_5tolc_29"}}]]),Mv=Xa("entity",()=>{const e=$(null);function t(i){e.value=i}const n=q(()=>{var i;return((i=e.value)==null?void 0:i.name)??""}),o=q(()=>{var i;return((i=e.value)==null?void 0:i.start_date)??""}),s=q(()=>{var i;return((i=e.value)==null?void 0:i.due_date)??""}),r=q(()=>{const i=e.value;return{parentName:(i==null?void 0:i.name)??null,parentStartDate:i!=null&&i.start_date?ut.fromJSDate(new Date(i==null?void 0:i.start_date)):null,parentDueDate:i!=null&&i.due_date?ut.fromJSDate(new Date(i==null?void 0:i.due_date)):null}});return{entityData:e,setEntityData:t,entityName:n,entityStartDate:o,entityEndDate:s,parentConfig:r}}),UQ=ot({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,o=e,s=En("isSelectAll",$(!1)),r=En("bulkUpdate",$(!1)),i=q(()=>!!o.entityId&&r.value&&s.value),{apiServices:a}=no(!r.value,o),l=En("filterParams",null),u=$(null),c=async B=>{var A,P,k,O;try{w.value=!0,n("update-start");let L={workspaceId:o.workspaceId,entityId:o.entityId,itemIds:o.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in B&&(L.startDate=B.start?Cv(B.start):null),"end"in B&&(L.dueDate=B.end?Cv(B.end):null),i.value?(L.itemIds=void 0,L.entityId=o.entityId):L.entityId=void 0;const H=await((P=(A=a.value)==null?void 0:A.changeDate)==null?void 0:P.call(A,L));n("updated",{workspaceId:o.workspaceId,itemIds:o.ids,data:L}),n("update-completed",H),(k=u.value)==null||k.hide()}catch(L){console.error("Failed to update dates:",L),ft(()=>{ft(()=>{var H;n("update-failed"),(H=u.value)==null||H.open()})})}finally{(O=b.value)==null||O.resetCalendarLogic(),w.value=!1}},d=()=>{if(!o.rowSelected||o.rowSelected.length===0){h();return}o.rowSelected.length===1?f():p()},h=()=>{y.value=!1,v.value=!1,S.value=[null,null]},f=()=>{const A=o.rowSelected[0].dateRange;S.value=[(A==null?void 0:A[0])??null,(A==null?void 0:A[1])??null],y.value=!1,v.value=!1},p=()=>{var A,P;if(o.rowSelected.some(k=>k.dateRange&&(k.dateRange[0]!==null||k.dateRange[1]!==null))){const k=g(0),O=g(1);if(v.value=k,y.value=O,k)S.value[0]=null;else{const L=((A=o.rowSelected[0].dateRange)==null?void 0:A[0])??null;S.value[0]=L}if(O)S.value[1]=null;else{const L=((P=o.rowSelected[0].dateRange)==null?void 0:P[1])??null;S.value[1]=L}}else v.value=!1,y.value=!1,S.value=[null,null]},g=B=>{const A=o.rowSelected.map(k=>{var O;return(O=k.dateRange)==null?void 0:O[B]});return A.length===0?!1:new Set(A.map(k=>{var O;return(O=k==null?void 0:k.getTime)==null?void 0:O.call(k)})).size>1},v=$(!1),y=$(!1),b=$(null),S=$([null,null]);Je([()=>o.ids,()=>o.rowSelected],B=>{d(),ft(()=>{var A;(A=b.value)==null||A.focus()})},{immediate:!0,deep:!0});const w=$(!1),E=()=>{w.value=!0},R=()=>{ft(()=>{setTimeout(()=>{w.value=!1},500)})},D=(B,A)=>{B&&ft(()=>{var P;(P=b.value)==null||P.focus()})},x=Mv(),{parentConfig:N}=go(x);return(B,A)=>(K(),We(Uf,{ref_key:"wrapperRef",ref:u,isUpdating:w.value,disabled:o.disabled||w.value,onOnVisibleChange:D},{trigger:Ce(({hide:P,disabled:k})=>[ye(bt,{variant:o.variant,loading:w.value,disabled:k,onEscape:P},{default:Ce(()=>[ye(gt,{src:"Calendar"}),A[0]||(A[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:Ce(({isVisible:P,hide:k})=>[P?(K(),We(Ov,{key:0,"parent-config":V(N),immediatelyUpdate:!1,value:S.value,onConfirmed:c,ref_key:"calendarRef",ref:b,onClosed:k,onStartUpdate:E,onFinishUpdate:R,multipleDueDates:y.value,multipleStartDates:v.value},null,8,["parent-config","value","onClosed","multipleDueDates","multipleStartDates"])):qe("",!0)]),default:Ce(()=>[A[1]||(A[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),WQ=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},JO=Xa("metricStore",()=>{const e=$();return{metricList:e,setMetricList:o=>{e.value=o},checkEditType:o=>{var s;if(((s=o==null?void 0:o.auth_permission)==null?void 0:s.permission)==2)return WQ(o)}}}),zQ=["onKeydown"],jQ=["width","height","viewBox"],KQ=["d"],qQ="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",QO=ot({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(o.modelValue??0),i=$(null),a=q(()=>{var A;return((A=o.params)==null?void 0:A.size)??24}),l=q(()=>{var A;return((A=o.params)==null?void 0:A.iconViewBox)??"0 0 24 24"}),u=q(()=>{var A;return((A=o.params)==null?void 0:A.iconPath)??qQ}),c=q(()=>{var A;return((A=o.params)==null?void 0:A.wrapperTag)??"span"}),d=q(()=>{var A;return o.disabled||((A=o.params)==null?void 0:A.disabled)||!1}),h=q(()=>{var A;return o.readOnly||((A=o.params)==null?void 0:A.readOnly)||!1}),f=q(()=>!d.value&&!h.value),p=q(()=>d.value?"not-allowed":h.value?"default":"pointer");Je(()=>o.modelValue,A=>{typeof A=="number"&&A!==r.value&&(r.value=A)});const g=A=>{var P;return((P=o.params)==null?void 0:P.maxRating)-A+1<=r.value&&!v.value},v=$(!1),y=()=>{v.value=!0},b=()=>{v.value=!1},S=A=>{f.value&&w(A)},w=A=>{var k,O;if(!f.value)return;let P=((k=o.params)==null?void 0:k.maxRating)-A+1;P===r.value&&(P=0),r.value=P,s("update:modelValue",P),s("update",P),s("change",P),(O=o.params)!=null&&O.onUpdate&&o.params.onUpdate(P)},E=A=>{var P;A!==r.value&&(r.value=A,s("update:modelValue",A),s("update",A),s("change",A),(P=o.params)!=null&&P.onUpdate&&o.params.onUpdate(A),R.value=A)},R=$(r.value),D=A=>{A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation(),r.value=R.value,s("cancel")},x=A=>{A.preventDefault(),E(r.value),s("handleEnter",r.value)},N=()=>{f.value&&(r.value=Math.min(r.value+1%(o.params.maxRating+1),o.params.maxRating),E(r.value))},B=()=>{f.value&&(r.value=Math.max(r.value-1,0),E(r.value))};return t({focus:()=>{var A;(A=i.value)==null||A.focus()}}),(A,P)=>(K(),he("div",{class:ce(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:cn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:i,tabindex:"1",onKeydown:[po(Ht(B,["prevent"]),["left"]),po(Ht(N,["prevent"]),["right"]),po(Ht(B,["prevent"]),["down"]),po(Ht(N,["prevent"]),["up"]),po(Ht(x,["prevent"]),["enter"]),po(Ht(x,["prevent"]),["tab"]),po(Ht(D,["prevent"]),["escape"])]},[(K(!0),he(Pt,null,Dn(e.params.maxRating,k=>(K(),We(_C(c.value),{key:k,class:ce(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:cn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Ht(O=>S(k),["prevent","stop"]),onMouseenter:y,onMouseleave:b},{default:Ce(()=>[kt(A.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(K(),he("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[be("path",{d:u.value},null,8,KQ)],8,jQ))]),kt(A.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,zQ))}}),YQ={style:{maxWidth:"180px",lineHeight:"15px"}},XQ=["innerHTML"],eM=ot({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=()=>{r("handleCancel")},a=()=>{r("close")},l=v=>{var y;if(v.format_type==="dropdown"&&v.format_value)try{const b=JSON.parse(v.format_value);if(Array.isArray(b)){const S=b.map(w=>({label:w.name,value:w.name,id:w.name}));return S.unshift({label:"-",value:void 0,id:"-"}),S}}catch(b){console.error("Failed to parse dropdown options",b)}if(v.format_type=="number"&&v.restricted_type=="exact"){const b=((y=v.restricted_value)==null?void 0:y.split(",").map(S=>({label:v.mapping[`!${S}`]||S,value:S,id:S})))||[];return b.unshift({label:"-",value:void 0,id:"-"}),b}return[]},u=q(()=>l(s.config)),c=$(s.modelValue),d=v=>{c.value=v,r("update:modelValue",v),r("change",v||null)},h=$(u.value),f=$(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(y=>y.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=$(null);return Jt(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,y)=>(K(),We(ga,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:y[0]||(y[0]=b=>d(b.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:i},{item:Ce(({item:b,getHighlightedLabel:S,selectedIndex:w,index:E})=>[ye(hl,{hover:w==E,selected:b.value===e.modelValue,label:b.label,onSelect:R=>d(b.value||null),onClick:R=>d(b.value||null)},{label:Ce(()=>[be("div",YQ,[Ue(be("span",{innerHTML:S(b.label)},null,8,XQ),[[V(o),{content:b.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":Ce(()=>[...y[1]||(y[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),ZQ={class:"metric-input-wrapper"},JQ={key:0,class:"error-text input-2"},tM=ot({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=$(s.modelValue),i=$(s.modelValue),a=$(!1),l=$(!0),u=$(""),c=q(()=>{var L;const O=Number.parseInt(String((L=s.config)==null?void 0:L.format_value)||"2",10);return Number.isFinite(O)&&O>=0?O:2}),d=O=>{if(!O)return O;const L=String(O).split(".");return L.length>1&&L[1].length>c.value?c.value===0?L[0]:`${L[0]}.${L[1].slice(0,c.value)}`:String(O)},h=O=>{const L=d(O);L!==O&&S.value?r.value=L:r.value=O},f=O=>{const L=O.target;if(!L)return;const H=L.value||"",W=H.indexOf(".");if(O.key==="."&&c.value===0){O.preventDefault();return}W!==-1&&/[0-9]/.test(O.key)&&H.slice(W+1).length>=c.value&&O.preventDefault()},p=q(()=>l.value||s.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var ne;const O=s.config.restricted_type.trim(),L=((ne=s.config.restricted_value)==null?void 0:ne.split(",").map(Number))||[],[H,W]=L,ie={range:`Enter a value between ${H} and ${W}`,not:`These values are not allowed: ${L.join(", ")}`,exact:"Value is not allowed"}[O];return l.value?"":ie},v=q(()=>{var L;let O="";return Number((L=s.config)==null?void 0:L.format_value)&&(O+="."+Array.from({length:Number(s.config.format_value)}).map(()=>"0").join("")),`0${O}`});Je(()=>s.modelValue,O=>{r.value=O,i.value=O});const y=O=>gv(s.config,O),b=n,S=$(null),w=O=>{const L=O===""?null:O,H=i.value===""?null:i.value;return L!==H},E=O=>{const L=d(O);if(!w(L))return!1;const H=L===""?null:L;return r.value=H,i.value=H,b("update:modelValue",H),b("handleChange",H),!0},R=()=>{r.value=i.value,b("update:modelValue",i.value)},D=(O,L)=>{E(O),b("enter")},x=(O,L)=>{if(a.value){a.value=!1;return}s.saveOnBlur?E(O):R()},N=O=>{if(O===null||O===""){l.value=!0;return}l.value=gv(s.config,Number(O)),u.value=l.value?"":g()},B=(O,L)=>{a.value=!0,s.saveOnEscape?E(O):R(),b("cancel"),setTimeout(()=>{a.value=!1},100)},A=O=>{N(O),b("onValidation",O)},P=()=>{a.value=!0,R(),b("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var O;r.value=null,i.value=null,b("update:modelValue",null),b("handleChange",null),(O=S.value)==null||O.focus()};return t({focus:()=>{var O;return(O=S.value)==null?void 0:O.focus()},blur:()=>{var O;return(O=S.value)==null?void 0:O.blur()},getValue:()=>r.value,getCachedValue:()=>i.value,save:()=>E(r.value),revert:R}),Jt(()=>{var O;(O=S.value)==null||O.focus()}),(O,L)=>Ue((K(),he("div",ZQ,[ye(dl,{maxDecimalChar:c.value,modelValue:r.value,"onUpdate:modelValue":L[0]||(L[0]=H=>r.value=H),placeholder:v.value,validatorFnc:y,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:D,onBlur:x,onClear:k,onEscape:B,onCancel:P,onOnValidation:A,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:S},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(K(),he("span",JQ,at(u.value),1)):qe("",!0)])),[[V(o),p.value]])}}),QQ={key:2},eee={class:"wrapper-suffix"},tee={key:3},nee=Et(ot({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=$(null),i=$(0),a=$(null),l=$(null),u=q(()=>fO(s.config)),c=$(!1),d=q(()=>!!ee.value),h=n,f=()=>{c.value=!1,z(),h("cancel")},p=$(!0),g=de=>{if(de===null||de===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=gv(s.config,Number(de)),y.value=b()},v=()=>{c.value=!0,W()},y=$(""),b=()=>{var pe;const de=s.config.restricted_type.trim(),j=((pe=s.config.restricted_value)==null?void 0:pe.split(",").map(Number))||[],[oe,ae]=j,M={range:`Enter a value between ${oe} and ${ae}`,not:`These values are not allowed: ${j.join(", ")}`,exact:"Value is not allowed"}[de];return p.value?"":M},S=q(()=>{var j;const de=Number.parseInt(String((j=s.config)==null?void 0:j.format_value)||"2",10);return Number.isFinite(de)&&de>=0?de:2}),w=de=>{c.value=!0,r.value=de},E=()=>{c.value=!0,z(),W()},R=de=>{i.value=de,c.value=!0,W()},D=()=>(s.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(j=>j.charAt(0).toUpperCase()+j.slice(1)).join("").replace(/Outline|Solid/g,""),x=$(null),N=$(!0),B=q(()=>{var de;return{disabled:s.disabled,error:!1,readOnly:!1,isEmpty:((de=r.value)==null?void 0:de.length)===0,wrapperRef:Y,active:d,focus:s.focus,bordered:!0}}),A=$(null),P=q(()=>N.value),k=q(()=>({disabled:s.disabled,error:!1,readOnly:!1,isEmpty:i.value===0,wrapperRef:A,active:P,focus:N.value,bordered:!0})),{argsMain:O}=xo(k),{argsMain:L}=xo(B),H=$(null),W=()=>{ft(()=>{var de;(de=H.value)==null||de.focus()})},se=de=>{var j;if(de.format_type==="dropdown"&&de.format_value)try{const oe=JSON.parse(de.format_value);if(Array.isArray(oe))return oe.map(ae=>({label:ae.name,value:ae.name,id:ae.name}))}catch(oe){console.error("Failed to parse dropdown options",oe)}return de.format_type=="number"&&de.restricted_type=="exact"?((j=de.restricted_value)==null?void 0:j.split(",").map(ae=>({label:de.mapping[`!${ae}`]||ae,value:ae,id:ae})))||[]:[]},ie=q(()=>se(s.config)),Q=q(()=>{var de;return((de=ie.value.find(j=>j.value===r.value))==null?void 0:de.label)||r.value||"-"}),ne=()=>{var de;if(u.value=="rating")h("updateMetric",i.value==0?null:i.value);else if(u.value=="number"){const j=(de=l.value)==null?void 0:de.getValue();h("updateMetric",j||null)}else h("updateMetric",r.value||null);c.value=!1,z()},{triggerRef:Y,popupRef:I,hide:z,isVisible:ee,show:me}=vo({toggleOnClick:!0,appendTo:()=>s.attachTo||"parent",zIndex:1e4,offset:[0,0]}),xe=()=>{switch(u.value){case"number":ft(()=>{var de;(de=l.value)==null||de.focus()});break;case"dropdown":me(),ft(()=>{var de;(de=x.value)==null||de.focus()});break;case"rating":N.value=!0,ft(()=>{var de;(de=a.value)==null||de.focus()});break}};return t({resetState:()=>{r.value=null,i.value=0,c.value=!1},focus:xe,hasChanges:()=>c.value}),Jt(()=>{ft(()=>{setTimeout(()=>{xe()},300)})}),(de,j)=>(K(),he("div",{class:ce(de.$style["metric-editor"])},[u.value=="number"?(K(),We(tM,{key:0,config:s.config,modelValue:r.value,"onUpdate:modelValue":j[0]||(j[0]=oe=>r.value=oe),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:w,maxDecimalChar:S.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(K(),We(Oo,Kt({key:1,"tab-index":1},V(O),{ref_key:"triggerRef2",ref:A,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:Ce(()=>[ye(QO,{params:{maxRating:s.config.range},modelValue:i.value,"onUpdate:modelValue":j[1]||(j[1]=oe=>i.value=oe),onHandleEnter:R,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:Ce(()=>[ye(gt,{source:"rating",src:D()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(K(),he("div",QQ,[ye(Oo,Kt(V(L),{ref_key:"triggerRef",ref:Y,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:Ce(({})=>[be("div",eee,[ye(gt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:Ce(()=>[Ue((K(),he("span",null,[tt(at(Q.value||""),1)])),[[V(o),{content:Q.value}]])]),_:1},16),be("div",{ref_key:"popupRef",ref:I},[V(ee)?(K(),We(eM,{key:0,ref_key:"metricEditorDropdownRef",ref:x,config:s.config,modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=oe=>r.value=oe),onChange:E,onCancel:f},null,8,["config","modelValue"])):qe("",!0)],512)])):(K(),he("span",tee,"Formular")),Ue((K(),We(bt,{ref_key:"confirmButtonRef",ref:H,onHandleClick:ne,"tab-index":"1",onKeypress:[po(Ht(xe,["shift","prevent"]),["tab"]),po(Ht(f,["prevent"]),["escape"])],disabled:!p.value},{default:Ce(()=>[ye(gt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[V(o),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),oee=Et(ot({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=$(!1),a=$(null),l=$(null),u=()=>{i.value=!i.value},c=()=>{var g;i.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;i.value=!0,await ft(),(g=l.value)==null||g.focus()},h=g=>{r("handleUpdate",{id:s.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),r("loseFocus")},p=g=>{const y={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),r("focusOnSearch",g)},Tab:()=>{i.value&&c()},Enter:()=>{i.value||d()},ArrowDown:()=>{r("openSibling","down")},ArrowUp:()=>{r("openSibling","up")}}[g.key];y&&y()};return Je(i,g=>{g&&r("open")}),t({hide:c,show:d}),(g,v)=>(K(),he("div",{class:ce([g.$style["metric-item"],i.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[be("div",{class:ce(g.$style["metric-label"]),onClick:Ht(u,["stop"])},[kt(g.$slots,"default",{open:i.value},()=>[Ue((K(),he("span",{class:ce(g.$style["metric-name"])},[tt(at(e.label),1)],2)),[[V(o),{content:e.label}]]),e.morpheme&&i.value?(K(),he("small",{key:0,class:ce(g.$style["metric-morpheme"])}," ("+at(e.morpheme)+") ",3)):qe("",!0)])],2),ye(wz,{mode:"out-in",name:"slide"},{default:Ce(()=>[i.value?(K(),We(nee,{key:`editor-${e.config.id}`,"read-only":!1,focus:i.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):qe("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);function nM(e,t){return function(){return e.apply(t,arguments)}}const{toString:see}=Object.prototype,{getPrototypeOf:ma}=Object,{iterator:zf,toStringTag:oM}=Symbol,va=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sM=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Nv=(e,t,n)=>e===Object.prototype||!n&&t===null,ree=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(sM(n))return!1;const o=Object.getOwnPropertyDescriptor(e,n);return!!o&&o.configurable&&o.writable===!0})},bE=(e,t)=>{let n=e;const o=[];for(;n!=null;){if(o.indexOf(n)!==-1)return!1;o.push(n);const s=ma(n);if(Nv(n,s,n===e))return!1;if(va(n,t))return!0;n=s}return!1},iee=(e,t)=>e!=null&&bE(e,t)?e[t]:void 0,aee=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=ma(e);if(t===null&&ree(e))return e;const n=Object.create(null),o=Object.create(null),s=[];let r=e;for(;r!=null&&s.indexOf(r)===-1;){s.push(r);const i=r===e?t:ma(r);if(Nv(r,i,r===e))break;const a=Object.getOwnPropertyNames(r);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(r));for(const l of a)sM(l)||va(o,l)||(n[l]=e[l],o[l]=!0);r=i}return n},SE=(e=>t=>{const n=see.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>SE(t)===e),Lv=e=>t=>typeof t===e,{isArray:Iu}=Array,Pu=Lv("undefined");function vd(e){return e!==null&&!Pu(e)&&e.constructor!==null&&!Pu(e.constructor)&&Es(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rM=Sr("ArrayBuffer");function lee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rM(e.buffer),t}const uee=Lv("string"),Es=Lv("function"),cee=Lv("number"),yd=e=>e!==null&&typeof e=="object",dee=e=>e===!0||e===!1,Vv=e=>{if(!yd(e))return!1;const t=ma(e);return(t===null||t===Object.prototype||ma(t)===null)&&(Nv(e,t,!0)||!va(e,oM)&&!va(e,zf))},hee=e=>{if(!yd(e)||vd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},fee=Sr("Date"),pee=Sr("File"),gee=e=>!!(e&&typeof e.uri<"u"),mee=e=>e&&typeof e.getParts<"u",vee=Sr("Blob"),yee=Sr("FileList"),wee=Sr("Set"),Cee=e=>yd(e)&&Es(e.pipe);function bee(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const iM=bee(),aM=typeof iM.FormData<"u"?iM.FormData:void 0,See=e=>{if(!e)return!1;if(aM&&e instanceof aM)return!0;const t=ma(e);if(!t||t===Object.prototype||!Es(e.append))return!1;const n=SE(e);return n==="formdata"||n==="object"&&Es(e.toString)&&e.toString()==="[object FormData]"},Eee=Sr("URLSearchParams"),[_ee,Ree,Tee,Dee]=["ReadableStream","Request","Response","Headers"].map(Sr),xee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),Iu(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{if(vd(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let a;for(o=0;o<i;o++)a=r[o],t.call(null,e[a],a,e)}}function Aee(e,t){if(vd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const ku=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lM=e=>!Pu(e)&&e!==ku;function EE(...e){const{caseless:t,skipUndefined:n}=lM(this)&&this||{},o={},s=t?Object.create(null):null,r=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let l=a;if(s&&typeof a=="string"){const c=a.toLowerCase(),d=s[c];d!==void 0&&va(o,d)?l=d:s[c]=a}const u=va(o,l)?o[l]:void 0;Vv(u)&&Vv(i)?o[l]=EE(u,i):Vv(i)?o[l]=EE({},i):Iu(i)?o[l]=i.slice():(!n||!Pu(i))&&(o[l]=i)};for(let i=0,a=e.length;i<a;i++){const l=e[i];if(!l||vd(l)||(jf(l,r),typeof l!="object"||Iu(l)||!Object.getOwnPropertySymbols))continue;const u=Object.getOwnPropertySymbols(l);for(let c=0;c<u.length;c++){const d=u[c];Hee.call(l,d)&&r(l[d],d)}}return o}const Iee=(e,t,n,{allOwnKeys:o}={})=>(jf(t,(s,r)=>{n&&Es(s)?Object.defineProperty(e,r,{__proto__:null,value:nM(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),Pee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kee=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Fee=(e,t,n,o)=>{let s,r,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)i=s[r],(!o||o(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&ma(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Oee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Mee=e=>{if(!e)return null;if(Iu(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const n=new Set,o=new Set;let s=e;for(;s!=null&&n.size<t;){if(o.has(s))return null;o.add(s);const i=ma(s);if(Nv(s,i,s===e))break;Object.getOwnPropertyNames(s).forEach(a=>{const l=+a;Number.isInteger(l)&&l>=0&&l<t&&String(l)===a&&va(s,a)&&n.add(l)}),s=i}if(n.size!==t)return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Nee=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ma(Uint8Array)),Lee=(e,t)=>{const o=(e&&e[zf]).call(e);let s;for(;(s=o.next())&&!s.done;){const r=s.value;t.call(e,r[0],r[1])}},Vee=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Bee=Sr("HTMLFormElement"),$ee=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),{propertyIsEnumerable:Hee}=Object.prototype,Gee=Sr("RegExp"),uM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};jf(n,(s,r)=>{let i;(i=t(s,r,e))!==!1&&(o[r]=i||s)}),Object.defineProperties(e,o)},Uee=e=>{uM(e,(t,n)=>{if(Es(e)&&["arguments","caller","callee"].includes(n))return!1;const o=e[n];if(Es(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wee=(e,t)=>{const n={},o=s=>{s.forEach(r=>{n[r]=!0})};return Iu(e)?o(e):o(String(e).split(t)),n},zee=()=>{},jee=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kee(e){return!!(e&&Es(e.append)&&e[oM]==="FormData"&&e[zf])}const qee=e=>{const t=new WeakSet,n=o=>{if(yd(o)){if(t.has(o))return;if(vd(o))return o;if(!("toJSON"in o)){t.add(o);let s;if(wee(o)){s=[];for(const r of o){const i=n(r);!Pu(i)&&s.push(i)}}else s=Iu(o)?[]:{},jf(o,(r,i)=>{const a=n(r);!Pu(a)&&(s[i]=a)});return t.delete(o),s}}return o};return n(e)},Yee=Sr("AsyncFunction"),Xee=e=>e&&(yd(e)||Es(e))&&Es(e.then)&&Es(e.catch),cM=((e,t)=>e?setImmediate:t?((n,o)=>(ku.addEventListener("message",({source:s,data:r})=>{s===ku&&r===n&&o.length&&o.shift()()},!1),s=>{o.push(s),ku.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Es(ku.postMessage)),Zee=typeof queueMicrotask<"u"?queueMicrotask.bind(ku):typeof J<"u"&&J.nextTick||cM,dM=e=>e!=null&&Es(e[zf]),fe={isArray:Iu,isArrayBuffer:rM,isBuffer:vd,isFormData:See,isArrayBufferView:lee,isString:uee,isNumber:cee,isBoolean:dee,isObject:yd,isPlainObject:Vv,isEmptyObject:hee,isReadableStream:_ee,isRequest:Ree,isResponse:Tee,isHeaders:Dee,isUndefined:Pu,isDate:fee,isFile:pee,isReactNativeBlob:gee,isReactNative:mee,isBlob:vee,isRegExp:Gee,isFunction:Es,isStream:Cee,isURLSearchParams:Eee,isTypedArray:Nee,isFileList:yee,forEach:jf,merge:EE,extend:Iee,trim:xee,stripBOM:Pee,inherits:kee,toFlatObject:Fee,kindOf:SE,kindOfTest:Sr,endsWith:Oee,toArray:Mee,forEachEntry:Lee,matchAll:Vee,isHTMLForm:Bee,hasOwnProperty:va,hasOwnProp:va,hasOwnInPrototypeChain:bE,getSafeProp:iee,toSafeFlatObject:aee,reduceDescriptors:uM,freezeMethods:Uee,toObjectSet:Wee,toCamelCase:$ee,noop:zee,toFiniteNumber:jee,findKey:Aee,global:ku,isContextDefined:lM,isSpecCompliantForm:Kee,toJSONObject:qee,isAsyncFn:Yee,isThenable:Xee,setImmediate:cM,asap:Zee,isIterable:dM,isSafeIterable:e=>e!=null&&bE(e,zf)&&dM(e)},Jee=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qee=e=>{const t=Object.create(null);let n,o,s;return e&&e.split(`
|
|
148
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){a=!0,r=l},f:function(){try{i||n.return==null||n.return()}finally{if(a)throw r}}}}function ud(e,t,n){return(t=SO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,o)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bO(Object(n),!0).forEach(function(o){ud(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bO(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function sJ(e,t){if(e==null)return{};var n,o,s=rJ(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function rJ(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function xu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function r(f,p,g,v){var y=p&&p.prototype instanceof a?p:a,b=Object.create(y.prototype);return Ws(b,"_invoke",function(S,w,E){var R,D,x,N=0,B=E||[],A=!1,P={p:0,n:0,v:e,a:k,f:k.bind(e,4),d:function(O,L){return R=O,D=0,x=e,P.n=L,i}};function k(O,L){for(D=O,x=L,t=0;!A&&N&&!H&&t<B.length;t++){var H,W=B[t],se=P.p,ie=W[2];O>3?(H=ie===L)&&(x=W[(D=W[4])?5:(D=3,3)],W[4]=W[5]=e):W[0]<=se&&((H=O<2&&se<W[1])?(D=0,P.v=L,P.n=W[1]):se<ie&&(H=O<3||W[0]>L||L>ie)&&(W[4]=O,W[5]=L,P.n=ie,D=0))}if(H||O>1)return i;throw A=!0,L}return function(O,L,H){if(N>1)throw TypeError("Generator is already running");for(A&&L===1&&k(L,H),D=L,x=H;(t=D<2?e:x)||!A;){R||(D?D<3?(D>1&&(P.n=-1),k(D,x)):P.n=x:P.v=x);try{if(N=2,R){if(D||(O="next"),t=R[O]){if(!(t=t.call(R,x)))throw TypeError("iterator result is not an object");if(!t.done)return t;x=t.value,D<2&&(D=0)}else D===1&&(t=R.return)&&t.call(R),D<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),D=1);R=e}else if((t=(A=P.n<0)?x:S.call(w,P))!==i)break}catch(W){R=e,D=1,x=W}finally{N=1}}return{value:t,done:A}}}(f,g,v),!0),b}var i={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(Ws(t={},o,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function h(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,u):(f.__proto__=u,Ws(f,s,"GeneratorFunction")),f.prototype=Object.create(d),f}return l.prototype=u,Ws(d,"constructor",u),Ws(u,"constructor",l),l.displayName="GeneratorFunction",Ws(u,s,"GeneratorFunction"),Ws(d),Ws(d,s,"Generator"),Ws(d,o,function(){return this}),Ws(d,"toString",function(){return"[object Generator]"}),(xu=function(){return{w:r,m:h}})()}function Ws(e,t,n,o){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}Ws=function(r,i,a,l){function u(c,d){Ws(r,c,function(h){return this._invoke(c,d,h)})}i?s?s(r,i,{value:a,enumerable:!l,configurable:!l,writable:!l}):r[i]=a:(u("next",0),u("throw",1),u("return",2))},Ws(e,t,n,o)}function iJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SO(e){var t=iJ(e,"string");return typeof t=="symbol"?t:t+""}function ul(e){"@babel/helpers - typeof";return ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ul(e)}function aJ(e,t){if(e){if(typeof e=="string")return wO(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wO(e,t):void 0}}var rE=function(e){return e.TOOLBOX_EXPORT_DATA="TOOLBOX_EXPORT_DATA",e.SW_APP_LOADER="SW_APP_LOADER",e}({});function EO(e){return ul(e)==="object"&&e!==null&&!Array.isArray(e)}function _O(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function lJ(e){return typeof Blob<"u"&&e instanceof Blob}var uJ=function(t){return EO(t)&&_O(t,["file","fileName"])&&lJ(t.file)&&typeof t.fileName=="string"},cJ=function(t){return EO(t)&&_O(t,["scene_id","people_id","openGS","queryParams"])&&(typeof t.scene_id=="string"||t.scene_id===null)&&(typeof t.people_id=="string"||t.people_id===null)&&(typeof t.openGS=="boolean"||t.openGS===null)&&typeof t.queryParams=="string"},dJ=Object.freeze(ud(ud({},rE.TOOLBOX_EXPORT_DATA,uJ),rE.SW_APP_LOADER,cJ));function hJ(e){return ul(e)==="object"&&e!==null&&!Array.isArray(e)}function fJ(e,t){var n=Object.keys(e);return n.length===t.length&&t.every(function(o){return n.includes(o)})}function pJ(e){if(!hJ(e))return{valid:!1,reason:"Message must be an object."};if(e.version!==1)return{valid:!1,reason:"Unsupported or missing message version."};if(typeof e.type!="string"||!Object.values(rE).includes(e.type))return{valid:!1,reason:"Unknown or missing message type."};if(e.id!==void 0&&typeof e.id!="string")return{valid:!1,reason:"Message id must be a string when provided."};var t=e.id===void 0?["version","type","payload"]:["version","type","payload","id"];if(!fJ(e,t))return{valid:!1,reason:"Message contains missing or unexpected fields."};var n=e.type;return dJ[n](e.payload)?{valid:!0,message:e}:{valid:!1,reason:"Payload does not match the ".concat(n," schema.")}}function gJ(e){var t=e.target,n=e.allowedOrigins,o=e.onMessage,s=e.onInvalidMessage,r=t??(typeof window>"u"?void 0:window);if(!r)throw new TypeError("A target window is required outside a browser environment.");if(!Array.isArray(n)||n.length===0)throw new TypeError("At least one allowed message origin must be configured.");if(n.some(function(a){return typeof a!="string"||a.length===0||a==="*"}))throw new TypeError("Allowed message origins must be explicit origin strings; wildcards are not allowed.");if(typeof o!="function")throw new TypeError("An onMessage callback is required.");var i=function(l){if(!n.includes(l.origin)){s==null||s(l.data,"Untrusted message origin: ".concat(l.origin),l);return}var u=pJ(l.data);if(u.valid===!1){s==null||s(l.data,u.reason,l);return}o(u.message,l)};return r.addEventListener("message",i),function(){return r.removeEventListener("message",i)}}class mJ extends Error{}class cl extends mJ{constructor(){super("Zone is an abstract class")}}class RO{get type(){throw new cl}get name(){throw new cl}get ianaName(){return this.name}get isUniversal(){throw new cl}offsetName(t,n){throw new cl}formatOffset(t,n){throw new cl}offset(t){throw new cl}equals(t){throw new cl}get isValid(){throw new cl}}const iE=new Map;function vJ(e){let t=iE.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),iE.set(e,t)),t}const yJ={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function wJ(e,t){const n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,i,a,l,u,c]=o;return[i,s,r,a,l,u,c]}function CJ(e,t){const n=e.formatToParts(t),o=[];for(let s=0;s<n.length;s++){const{type:r,value:i}=n[s],a=yJ[r];r==="era"?o[a]=i:Rv(a)||(o[a]=parseInt(i,10))}return o}const aE=new Map;class _v extends RO{static create(t){let n=aE.get(t);return n===void 0&&aE.set(t,n=new _v(t)),n}static resetCache(){aE.clear(),iE.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=_v.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:o}){return EJ(t,n,o,this.name)}formatOffset(t,n){return Dv(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const o=vJ(this.name);let[s,r,i,a,l,u,c]=o.formatToParts?CJ(o,n):wJ(o,n);a==="BC"&&(s=-Math.abs(s)+1);const h=SJ({year:s,month:r,day:i,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let lE=null;class dd extends RO{static get utcInstance(){return lE===null&&(lE=new dd(0)),lE}static instance(t){return t===0?dd.utcInstance:new dd(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new dd(DO(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Dv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Dv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Dv(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}function Rv(e){return typeof e>"u"}function Tv(e,t=2){const n=e<0;let o;return n?o="-"+(""+-e).padStart(t,"0"):o=(""+e).padStart(t,"0"),o}function TO(e){if(!(Rv(e)||e===null||e===""))return parseInt(e,10)}function bJ(e){if(!(Rv(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function SJ(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function EJ(e,t,n,o=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};o&&(r.timeZone=o);const i={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,i).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function DO(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const o=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-o:o;return n*60+s}function Dv(e,t){const n=Math.trunc(Math.abs(e/60)),o=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Tv(n,2)}:${Tv(o,2)}`;case"narrow":return`${s}${n}${o>0?`:${o}`:""}`;case"techie":return`${s}${Tv(n,2)}${Tv(o,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const xO=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function hd(...e){const t=e.reduce((n,o)=>n+o.source,"");return RegExp(`^${t}$`)}function fd(...e){return t=>e.reduce(([n,o,s],r)=>{const[i,a,l]=r(t,s);return[{...n,...i},a||o,l]},[{},null,1]).slice(0,2)}function AO(...e){return(t,n)=>{const o={};let s;for(s=0;s<e.length;s++)o[e[s]]=TO(t[n+s]);return[o,null,n+s]}}const IO=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,_J=`(?:${IO.source}?(?:\\[(${xO.source})\\])?)?`,PO=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,kO=RegExp(`${PO.source}${_J}`),uE=RegExp(`(?:[Tt]${kO.source})?`),RJ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,TJ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,DJ=/(\d{4})-?(\d{3})/,xJ=AO("weekYear","weekNumber","weekDay"),AJ=AO("year","ordinal"),IJ=/(\d{4})-(\d\d)-(\d\d)/,FO=RegExp(`${PO.source} ?(?:${IO.source}|(${xO.source}))?`),PJ=RegExp(`(?: ${FO.source})?`);function pd(e,t,n){const o=e[t];return Rv(o)?n:TO(o)}function kJ(e,t){return[{year:pd(e,t),month:pd(e,t+1,1),day:pd(e,t+2,1)},null,t+3]}function gd(e,t){return[{hours:pd(e,t,0),minutes:pd(e,t+1,0),seconds:pd(e,t+2,0),milliseconds:bJ(e[t+3])},null,t+4]}function Bf(e,t){const n=!e[t]&&!e[t+1],o=DO(e[t+1],e[t+2]),s=n?null:dd.instance(o);return[{},s,t+3]}function $f(e,t){const n=e[t]?_v.create(e[t]):null;return[{},n,t+1]}hd(RJ,uE),hd(TJ,uE),hd(DJ,uE),hd(kO),fd(kJ,gd,Bf,$f),fd(xJ,gd,Bf,$f),fd(AJ,gd,Bf,$f),fd(gd,Bf,$f),fd(gd),hd(IJ,PJ),hd(FO),fd(gd,Bf,$f);var FJ=["accessTokenKey","refreshTokenKey","domain","path","secure","sameSite","canSetTokens","cookieParser"];function Dt(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function Hf(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).error.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function xv(){if(typeof sessionStorage<"u"&&sessionStorage.getItem("APP_DEBUG")==="1"){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).warn.apply(e,["[DEBUG COMMON_UTILS]"].concat(n))}}function OJ(){var e=typeof window<"u"?sessionStorage.getItem("BASE_DOMAIN_COOKIE")||window.location.hostname:void 0;return Dt("getStandardizedCookieConfig - domain:",e,"from BASE_DOMAIN_COOKIE:",sessionStorage.getItem("BASE_DOMAIN_COOKIE")),{accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:e,path:"/",secure:!0,sameSite:"lax"}}function MJ(){return{maxRetries:5,retryDelay:500,backoffFactor:1.5}}var OO=1e3,NJ=1e4;function MO(e){if(!(typeof window>"u")){var t=window.self!==window.top;try{if(t&&window.top){Dt("Inside iframe - redirecting top window to:",e),window.top.location.replace(e);return}}catch(n){Hf("Top window redirect blocked, redirecting current window instead:",n)}try{Dt("Redirecting current window to:",e),window.location.replace(e)}catch(n){Hf("Failed to redirect:",n)}}}function Av(e){return typeof e!="string"||!e?e:e.length<=2?"*".repeat(e.length):"".concat(e[0]).concat("*".repeat(e.length-2)).concat(e[e.length-1])}function LJ(e){return cd(cd({},e),{},{access_token:Av(e.access_token),token:Av(e.token),refresh_token:Av(e.refresh_token)})}function Iv(e){if(!e)return!1;var t=e.trim();return!!t&&t!=="undefined"&&t!=="null"}function NO(e){return Iv(e.getAccessToken())||Iv(e.getRefreshToken())}function VJ(e){if(!(typeof document>"u")){var t=typeof window<"u"?window.location.hostname:"",n=e||(typeof sessionStorage<"u"?sessionStorage.getItem("BASE_DOMAIN_COOKIE"):null)||t,o=Array.from(new Set([n,t].filter(Boolean)));Dt("Clearing all cookies - domains:",o);var s=document.cookie.split(";");s.forEach(function(r){var i=r.split("=")[0].trim();i&&(document.cookie="".concat(i,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"),o.forEach(function(a){document.cookie="".concat(i,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=").concat(a)}))})}}function BJ(){typeof sessionStorage<"u"&&sessionStorage.clear()}function $J(e){return function(t){var n,o=(n=t.response)===null||n===void 0?void 0:n.status,s=NO(e);if(Dt("getStandardizedTokenExpiredDetection - status:",o,"userLoggedIn:",s),!s)return Dt("User not logged in - returning false"),!1;if(o===400){var r,i,a,l=(r=t.response)===null||r===void 0?void 0:r.data,u=(l==null?void 0:l.error)==="invalid_token"||(l==null||(i=l.error)===null||i===void 0?void 0:i.key)==="invalid_token";return Dt(" 400 error - isInvalidToken:",u,"error:",l==null?void 0:l.error,"error.key:",l==null||(a=l.error)===null||a===void 0?void 0:a.key),!1}if(o===401){var c,d,h=(c=t.response)===null||c===void 0?void 0:c.data,f=h==null||(d=h.error)===null||d===void 0?void 0:d.key,p=h==null?void 0:h.details;return Dt(" 401 error - errorKey:",f,"details:",p),f==="unauthenticated"&&(!p||Object.keys(p).length===0||p.reason==="refresh_token_expired")?(Dt(" 401 unauthenticated - triggering refresh"),!0):(Dt(" 401 error but not unauthenticated - returning false"),!1)}return o===425?(Dt(" 425 error - triggering refresh"),!0):(Dt("Status",o,"not handled - returning false"),!1)}}var HJ=function(){function e(){var t,n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oE(this,e),this.accessTokenKey=o.accessTokenKey||"access_token",this.refreshTokenKey=o.refreshTokenKey||"refresh_token",this.domain=o.domain,this.path=o.path||"/",this.secure=(t=o.secure)!==null&&t!==void 0?t:!0,this.sameSite=o.sameSite||"lax",this.canSetTokens=(n=o.canSetTokens)!==null&&n!==void 0?n:!0,this.cookieParser=o.cookieParser}return sE(e,[{key:"getCookieValue",value:function(n){if(typeof document>"u")return null;var o=document.cookie.split(";"),s=oJ(o),r;try{for(s.s();!(r=s.n()).done;){var i=r.value;if(i=i.trim(),i.startsWith(n+"=")){var a=i.substring(n.length+1);return this.cookieParser?this.cookieParser(a,n):decodeURIComponent(a)}}}catch(l){s.e(l)}finally{s.f()}return null}},{key:"getAccessToken",value:function(){return this.getCookieValue(this.accessTokenKey)}},{key:"getRefreshToken",value:function(){return this.getCookieValue(this.refreshTokenKey)}},{key:"getExpiresInRefreshToken",value:function(){return this.getCookieValue("account.expires_in_refresh_token")}},{key:"setTokens",value:function(n){if(!this.canSetTokens||typeof document>"u"){xv(" CookieTokenStorage: Token setting is disabled or running in a non-browser environment");return}Dt(" setTokens called - storing tokens with keys:",this.accessTokenKey,this.refreshTokenKey,"domain:",this.domain);var o=this.domain?"; domain=".concat(this.domain):"",s=this.secure?"; secure":"",r="; samesite=".concat(this.sameSite),i="",a="";if(n.expires_in&&typeof n.expires_in=="number"){var l=new Date;l.setTime(l.getTime()+n.expires_in*1e3),i=";expires=".concat(l.toUTCString())}var u=this.getExpiresInRefreshToken();if(Dt("setTokens - refresh token data:",LJ(n)),Dt("setTokens - refresh token expires_in value:",u),u){var c=new Date;c.setTime(c.getTime()+Number(u)*1e3),a=";expires=".concat(c.toUTCString())}if(n.access_token||n.token){var d=n.access_token||n.token,h="".concat(this.accessTokenKey,"=").concat(encodeURIComponent(d),"; path=").concat(this.path).concat(o).concat(s).concat(r).concat(i);document.cookie=h}if(n.refresh_token_expires_in&&typeof n.refresh_token_expires_in=="number"){var f=new Date;f.setTime(f.getTime()+n.refresh_token_expires_in*1e3),i=";expires=".concat(f.toUTCString())}if(n.refresh_token){Dt("setTokens - refresh token set to:",Av(n.refresh_token)),Dt("setTokens - refresh token expires_in set to:",a);var p="".concat(this.refreshTokenKey,"=").concat(encodeURIComponent(n.refresh_token),"; path=").concat(this.path).concat(o).concat(s).concat(r).concat(a);document.cookie=p}}},{key:"hasTokens",value:function(){return!!this.getAccessToken()&&!!this.getRefreshToken()}}])}(),GJ=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auth_state_channel",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auth_state_event";oE(this,e),ud(this,"channel",null),this.channelName=t,this.storageKey=n,this.initChannel()}return sE(e,[{key:"initChannel",value:function(){if(typeof BroadcastChannel<"u")try{this.channel=new BroadcastChannel(this.channelName)}catch(n){console.error("Failed to create BroadcastChannel, falling back to storage events:",n),this.channel=null}}},{key:"broadcastEvent",value:function(n){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={type:n,data:s,timestamp:Date.now()};this.channel?this.channel.postMessage(r):typeof localStorage<"u"&&(localStorage.setItem(this.storageKey,JSON.stringify(r)),setTimeout(function(){return localStorage.removeItem(o.storageKey)},100))}},{key:"onEvent",value:function(n){var o=this;return this.channel?this.channel.onmessage=function(s){n(s.data)}:typeof window<"u"&&window.addEventListener("storage",function(s){if(s.key===o.storageKey&&s.newValue)try{var r=JSON.parse(s.newValue);n(r)}catch(i){console.error("Failed to parse auth event:",i)}}),function(){o.channel?o.channel.onmessage=null:typeof window<"u"&&window.removeEventListener("storage",function(){})}}},{key:"destroy",value:function(){this.channel&&(this.channel.close(),this.channel=null)}}])}(),UJ=function(){function e(t){var n=this;if(oE(this,e),ud(this,"currentAttempt",0),ud(this,"isLoggingOut",!1),this.instanceId=Math.random().toString(36).substring(2,15),this.refreshTokenFn=t.refreshTokenFn,this.tokenStorage=t.storage,this.useStandardizedConfig=t.useStandardizedConfig===!0,Dt("RefreshTokenHandler initialized - useStandardizedConfig:",this.useStandardizedConfig),this.useStandardizedConfig){var o=MJ();this.maxRetries=o.maxRetries,this.retryDelay=o.retryDelay,this.backoffFactor=o.backoffFactor,Dt(" Using standardized retry config - maxRetries:",this.maxRetries,"retryDelay:",this.retryDelay,"backoffFactor:",this.backoffFactor)}else this.maxRetries=t.maxRetries||3,this.retryDelay=t.retryDelay||1e3,this.backoffFactor=t.backoffFactor||2,Dt(" Using custom retry config - maxRetries:",this.maxRetries,"retryDelay:",this.retryDelay,"backoffFactor:",this.backoffFactor);this.onCrossTabLogout=t.onCrossTabLogout,this.authStateManager=new GJ,this.initCrossTabListener(),this.onRefreshSuccess=t.onRefreshSuccess||function(){Dt("Token refresh successful")},this.onRefreshFailure=t.onRefreshFailure||function(s){console.error("Token refresh failed:",s)},this.onTokenInvalid=t.onTokenInvalid||function(){Dt("Token is invalid or cannot be refreshed");var s=new Error("No refresh token available");n.useStandardizedConfig?n.handleLogout("no_refresh_token",s):(n.onRefreshFailure(s),n.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:n.instanceId,reason:"no_refresh_token",error:"No refresh token available"}))}}return sE(e,[{key:"isLogoutInProgress",get:function(){return this.isLoggingOut}},{key:"handleLogout",value:function(n,o){if(this.isLoggingOut){Dt("handleLogout skipped - logout already in progress");return}Dt("handleLogout called with reason:",n),this.onRefreshFailure&&(Dt("Calling onRefreshFailure callback"),this.onRefreshFailure(o));var s=this.getLogoutTag(n,"this-tab");this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:n,tag:s,error:(o==null?void 0:o.message)||"Token refresh failed"}),this.clearStateAndRedirectToLogin(s)}},{key:"getLogoutTag",value:function(n,o){return Iv(this.tokenStorage.getRefreshToken())?(console.error("False logout detected. Refresh token not expired. Reason: ".concat(n)),console.error("Sender channel: ".concat(o)),-1):1}},{key:"clearStateAndRedirectToLogin",value:function(n){if(!this.isLoggingOut){this.isLoggingOut=!0;var o=typeof sessionStorage<"u"&&sessionStorage.getItem("BASE_URL")||"",s=typeof sessionStorage<"u"&&sessionStorage.getItem("BASE_DOMAIN_COOKIE")||void 0;if(typeof localStorage<"u"&&typeof window<"u")try{var r="".concat(window.location.pathname).concat(window.location.search);localStorage.setItem("last_url_access_after_timeout",r),localStorage.removeItem("retryCount"),Dt("localStorage updated - saved last URL:",r)}catch(a){Hf("Failed to update localStorage:",a)}Dt("Clearing sessionStorage and cookies"),BJ(),VJ(s);var i="".concat(o,"/login?timeout=").concat(n);Dt("Redirecting to login in ".concat(OO,"ms:"),i),setTimeout(function(){return MO(i)},OO)}}},{key:"initCrossTabListener",value:function(){var n=this;this.authStateManager.onEvent(function(o){if(o.type==="auth:logout")if(Dt("Received logout event:",o.data),o.data&&o.data.sourceInstanceId!==n.instanceId){if(Dt("Logout event from different tab, executing logout handlers"),n.onCrossTabLogout?(Dt("Executing onCrossTabLogout with reason: ".concat(o.data.reason||"cross_tab_logout")),n.onCrossTabLogout(o.data.reason||"cross_tab_logout")):typeof n.onLogout=="function"?(Dt("Executing legacy onLogout with reason: ".concat(o.data.reason)),n.onLogout(o.data.reason)):n.useStandardizedConfig||console.warn("No logout handler defined for cross-tab events"),n.useStandardizedConfig){var s=o.data.tag===-1||o.data.tag===1,r=s?o.data.tag:n.getLogoutTag(o.data.reason||"cross_tab_logout","cross-tab");s&&r===-1&&(console.error("False logout detected. Reason: ".concat(o.data.reason||"cross_tab_logout")),console.error("Sender channel: cross-tab")),Dt("Standardized mode - logging out this tab after cross-tab event, tag:",r),n.clearStateAndRedirectToLogin(r)}}else Dt("Ignoring self-generated logout event")})}},{key:"handleTokenRefresh",value:function(){var t=nE(xu().m(function o(){var s=this,r,i,a,l;return xu().w(function(u){for(;;)switch(u.p=u.n){case 0:if(r=this.tokenStorage.getRefreshToken(),Dt(" handleTokenRefresh started, refreshToken available:",!!r),r){u.n=1;break}return Dt(" ERROR: No refresh token available - cannot refresh"),this.onTokenInvalid(),u.a(2,!1);case 1:return this.currentAttempt=0,u.p=2,u.n=3,this.executeWithRetry(function(){return Dt("Refresh attempt ".concat(s.currentAttempt+1,"/").concat(s.maxRetries)),s.refreshTokenFn(s.tokenStorage.getRefreshToken())});case 3:if(i=u.v,!(!i||!i.access_token&&!i.token)){u.n=4;break}throw console.error("Invalid token response received"),new Error("Invalid token response");case 4:return i.token&&!i.access_token&&(i.access_token=i.token),Dt(" Token refresh successful, saving new tokens"),this.tokenStorage.setTokens(i),Dt(" Calling onRefreshSuccess callback"),this.onRefreshSuccess(i),u.a(2,!0);case 5:return u.p=5,l=u.v,console.error("Token refresh failed after all attempts:",l),l===void 0&&(l=new Error("Undefined error during token refresh")),this.useStandardizedConfig?this.handleLogout("max_retry_reached",l):(this.onRefreshFailure(l),this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:"max_retry_reached",error:((a=l)===null||a===void 0?void 0:a.message)||"Token refresh failed after maximum retries"})),u.a(2,!1)}},o,this,[[2,5]])}));function n(){return t.apply(this,arguments)}return n}()},{key:"executeWithRetry",value:function(){var t=nE(xu().m(function o(s){var r,i,a,l;return xu().w(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,s();case 1:return u.a(2,u.v);case 2:if(u.p=2,l=u.v,this.currentAttempt++,!(this.currentAttempt>=this.maxRetries)){u.n=3;break}throw Dt("Maximum retry attempts (".concat(this.maxRetries,") reached")),l;case 3:return i=(l==null||(r=l.response)===null||r===void 0?void 0:r.status)===425,a=i?this.getRetryAfterDelay(l):this.retryDelay*Math.pow(this.backoffFactor,this.currentAttempt-1),Dt("Retry in ".concat(a,"ms, attempt ").concat(this.currentAttempt,"/").concat(this.maxRetries)),u.n=4,new Promise(function(c){return setTimeout(c,a)});case 4:return u.a(2,this.executeWithRetry(s))}},o,this,[[0,2]])}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getRetryAfterDelay",value:function(n){var o;if(n!=null&&(o=n.response)!==null&&o!==void 0&&o.headers){var s=n.response.headers["retry-after"];if(s){var r=parseInt(s,10);if(!isNaN(r))return r*1e3;var i=new Date(s);if(!isNaN(i.getTime()))return i.getTime()-Date.now()}}return this.retryDelay*Math.pow(this.backoffFactor,this.currentAttempt-1)}},{key:"broadcastLogout",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"manual_logout";Dt("Broadcasting logout event with reason: ".concat(n)),this.authStateManager.broadcastEvent("auth:logout",{sourceInstanceId:this.instanceId,reason:n,timestamp:Date.now()})}}])}();function WJ(e,t){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=(n=o.useStandardizedConfig)!==null&&n!==void 0?n:t.useStandardizedConfig;Dt("createRefreshInterceptor called - useStandardizedConfig:",s);var r=s?$J(t.tokenStorage):o.tokenExpiredDetection||function(u){var c;return((c=u.response)===null||c===void 0?void 0:c.status)===401},i=s?[401,425]:o.retryStatusCodes||[401,425],a=o.tokenHeaderFormatter||function(u){return"Bearer ".concat(u)};Dt("Interceptor config - retryStatusCodes:",i,"using standardized detection:",s);var l=null;e.interceptors.response.use(function(u){return u},function(){var u=nE(xu().m(function c(d){var h,f,p,g,v,y,b,S,w,E,R,D,x,N,B,A,P,k,O,L,H;return xu().w(function(W){for(;;)switch(W.p=W.n){case 0:if(g=d.config,v=function(ie){var Q,ne=s&&t.isLogoutInProgress;return xv(ne?"HOLD ->":"REJECT ->",((g==null?void 0:g.method)||"").toUpperCase(),g==null?void 0:g.url,"| status:",(Q=d.response)===null||Q===void 0?void 0:Q.status,"| reason:",ie,"| logoutInProgress:",t.isLogoutInProgress,"| at:",new Date().toISOString().slice(11,23)),ne?new Promise(function(Y,I){setTimeout(function(){xv("Logout redirect did not happen in time - releasing held request:",g==null?void 0:g.url),I(d)},NJ)}):Promise.reject(d)},g){W.n=1;break}return W.a(2,v("no request config"));case 1:if(!g._retry){W.n=2;break}return W.a(2,v("retried request failed again"));case 2:if(y=(h=d.response)===null||h===void 0?void 0:h.status,Dt(" Response error handler triggered - status:",y,"url:",g.url),b=r(d),Dt(" tokenExpiredDetection returned:",b),S=!1,y===400)if(R=(w=d.response)===null||w===void 0?void 0:w.data,D=(R==null?void 0:R.error)==="invalid_token"||(R==null||(E=R.error)===null||E===void 0?void 0:E.key)==="invalid_token",D)if(S=!1,s){if(Dt(" 400 invalid_token (standardized) - clearing account.token from cookies"),typeof document<"u")try{x=sessionStorage.getItem("BASE_DOMAIN_COOKIE")||window.location.hostname,Dt(" Clearing account.token - domain:",x),document.cookie="account.token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=".concat(x),document.cookie="account.token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/",Dt(" ✅ Removed account.token from cookies (prevents infinite 400 loop)")}catch(se){Hf(" Failed to clear account.token:",se)}typeof window<"u"&&(N=sessionStorage.getItem("BASE_URL")||"",B="".concat(N,"/sw?redirect=1"),Dt("Redirecting to re-auth page - URL:",B),MO(B))}else Dt(" 400 invalid_token (custom config) - user handles via callbacks");else S=!1,Dt(" 400 non-invalid_token - skip refresh");else s&&y===401&&!NO(t.tokenStorage)?(A=typeof window<"u"&&window.location.pathname.includes("/login"),P=/login|refresh-token|refreshToken/i.test(g.url||""),A||P?Dt("401 with no tokens on login page/auth request - not redirecting"):(Dt("401 with no tokens - logging out and redirecting to /login"),t.handleLogout("no_tokens",new Error("No authentication tokens available"))),S=!1):(S=b&&i.includes(y),Dt(" Status",y,"- shouldRefresh:",b,"in retryStatusCodes:",i.includes(y),"canRetry:",S));if(S){W.n=3;break}return W.a(2,v("not eligible for refresh"));case 3:if(k=((f=g.url)===null||f===void 0?void 0:f.includes("refresh-token"))||((p=g.url)===null||p===void 0?void 0:p.includes("refreshToken")),!k){W.n=4;break}return W.a(2,v("refresh endpoint itself failed"));case 4:return g._retry=!0,W.p=5,l?Dt(" Using existing refresh promise"):(Dt(" Starting new token refresh"),l=t.handleTokenRefresh()),W.n=6,l;case 6:if(O=W.v,l=null,O){W.n=7;break}return W.a(2,v("token refresh failed (waiting request)"));case 7:return L=t.tokenStorage.getAccessToken(),Dt(" Token refreshed successfully, new token available:",!!L),L?(Dt(" Injecting refreshed token into Authorization header for retry"),g.headers.Authorization=a(L)):xv(" WARNING: Token refresh succeeded but no token in storage!"),Dt(" Retrying original request with new token"),W.a(2,e(g));case 8:return W.p=8,H=W.v,Hf(" Error during refresh:",H),l=null,W.a(2,v("error thrown during refresh"))}},c,null,[[5,8]])}));return function(c){return u.apply(this,arguments)}}()),e.interceptors.request.use(function(u){var c=u.headers.Authorization;if(c){var d=String(c).replace(/^Bearer\s*/i,"").trim();if(d&&d!=="undefined"&&d!=="null")return u;Dt("Removing invalid Authorization header:",c),delete u.headers.Authorization}var h=t.tokenStorage.getAccessToken(),f=t.tokenStorage.getRefreshToken();return Dt(" Request interceptor: token exists:",!!h,"refreshToken exists:",!!f,"url:",u.url),h&&Iv(h)?(Dt(" Access token available - injecting into Authorization header"),u.headers.Authorization=a(h)):Dt(f?" Access token missing/empty but refresh token available - response interceptor will handle 401":" Both tokens missing/empty - allowing request (no token to inject)"),u},function(u){return Promise.reject(u)})}function zJ(e){var t=e.useStandardizedConfig===!0;Dt("createCookieRefreshHandler called - useStandardizedConfig:",t);var n;if(t){var o=OJ();n=cd(cd({},o),{},{canSetTokens:e.canSetTokens,cookieParser:e.cookieParser}),Dt(" Applied standardized cookie config:",n)}else{var s=e.accessTokenKey,r=e.refreshTokenKey,i=e.domain,a=e.path,l=e.secure,u=e.sameSite,c=e.canSetTokens,d=e.cookieParser;n={accessTokenKey:s,refreshTokenKey:r,domain:i,path:a,secure:l,sameSite:u,canSetTokens:c,cookieParser:d},Dt(" Applied custom cookie config:",n)}var h=new HJ(n);e.accessTokenKey,e.refreshTokenKey,e.domain,e.path,e.secure,e.sameSite,e.canSetTokens,e.cookieParser;var f=sJ(e,FJ);return new UJ(cd(cd({},f),{},{storage:h,useStandardizedConfig:t}))}var Fo=function(e){return e.review="{reviewDomain}/{ws_code}",e.review_take="{reviewDomain}/{ws_code}?id={take_id}",e.review_scene="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",e.review_rendition="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",e.review_frame="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",e.review_rendition_comment="{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}&tab=comment",e.review_comment="{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",e.scene_hub="{baseDomain}/{ws_code}/{scene_id}?o=st",e.hub_rendition="{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",e.hub_comment="{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",e.people_insight="{baseDomain}/{ws_code}/{user_id}?o=pt",e.people_detail="{baseDomain}/{ws_code}/ws/ppl/{display_name}-{user_id}",e.project="{baseDomain}/{ws_code}/pl/dir/{entity_id}",e.project_focusMode="{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",e.woohoo="{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",e.update="{baseDomain}/{ws_code}/pl/au?id={entity_id}",e.core="{baseDomain}/{ws_code}",e}(Fo||{});Fo.review,Fo.review_take,Fo.review_scene,Fo.review_rendition,Fo.review_frame,Fo.review_rendition_comment,Fo.review_comment,Fo.scene_hub,Fo.hub_rendition,Fo.hub_comment,Fo.people_insight,Fo.people_detail,Fo.project,Fo.woohoo,Fo.update,Fo.core,Fo.project_focusMode;var cE=null;function jJ(e){cE=e}function Pv(){if(!cE)throw new Error("i18n instance not set. Call setI18nInstance(i18n) before using errorHelper.");return cE}function kv(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function LO(){try{var e=sessionStorage.getItem("APP_DEBUG")?"✅":"",t=Pv();return"".concat(kv(t.t("errorMessages.fallback.unknownError"))," ").concat(e)}catch{return"An error occurred. Please try again or contact support."}}function KJ(e,t,n,o){var s=e.replace(/{field}/g,t);if(o&&ul(o)==="object")Object.keys(o).forEach(function(i){var a="{".concat(i,"}"),l=o[i];Array.isArray(l)?l=l.join(", "):i==="value"&&(o.min||o.max)&&(l="".concat(o.min||o.value," and ").concat(o.max||o.value)),s=s.replace(new RegExp(a,"g"),l||"")});else if(Array.isArray(n)&&n.length>0){var r=n[0]||"";n.length>1?r="".concat(n[0]," and ").concat(n[1]):n.length===1&&Array.isArray(n[0])&&(r=n[0].join(", ")),s=s.replace(/{value}/g,r)}return s}function qJ(e,t){for(var n=Object.keys(t),o=0,s=n;o<s.length;o++){var r=s[o],i=Array.isArray(t[r])?t[r].join(", "):String(t[r]);e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),i)}if(n.length>0&&e.includes("{value}")){var a=t[n[0]],l=Array.isArray(a)?a.join(", "):String(a);e=e.replace(/{value}/g,l)}return e}function VO(e){return!!(e&&e.validation&&e.validation.fields&&Object.keys(e.validation.fields).length>0)}function BO(e,t){if(!e||ul(e)!=="object")return null;try{var n=Pv();if(e.validation&&e.validation.fields)for(var o=e.validation.fields,s=Object.keys(o),r=0,i=s;r<i.length;r++){var a=i[r],l=o[a];if(l&&l.rule){var u=l.rule,c=l.data||[],d=l.params||{};try{var h,f,p=((h=n.messages)===null||h===void 0?void 0:h.value)||n.messages,g=((f=n.locale)===null||f===void 0?void 0:f.value)||n.locale,v=null;if(t){var y,b=t.toUpperCase();v=(y=p[g])===null||y===void 0||(y=y.errorMessages)===null||y===void 0||(y=y[b])===null||y===void 0||(y=y.validation_rules)===null||y===void 0?void 0:y[u]}if(!v){var S;v=(S=p[g])===null||S===void 0||(S=S.errorMessages)===null||S===void 0||(S=S.GEN)===null||S===void 0||(S=S.validation_rules)===null||S===void 0?void 0:S[u]}if(v&&typeof v=="string")return kv(KJ(v,a,c,d))}catch(w){console.error("Error in validation rules",w)}}}}catch(w){return console.error("Error in getValidationErrorMessage:",w),null}return null}function $O(e){var t=sessionStorage.getItem("APP_DEBUG")?"✅":"";if(!e)return LO();var n=e.code,o=e.error,s=e.details,r=e.message;if(VO(s)&&s){var i=BO(s,o==null?void 0:o.type);if(sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",i),i)return n!==""?"[".concat(n,"] ").concat(i," ").concat(t):"".concat(i);try{var a=Pv();return kv(a.t("errorMessages.GEN.validation_error"))}catch{return"Validation error occurred."}}if(o&&ul(o)==="object"&&o.type&&o.key){var l=o.type.toUpperCase();try{var u,c,d,h="errorMessages.".concat(l,".").concat(o.key),f=Pv(),p=((u=f.messages)===null||u===void 0?void 0:u.value)||f.messages,g=((c=f.locale)===null||c===void 0?void 0:c.value)||f.locale,v=(d=p[g])===null||d===void 0||(d=d.errorMessages)===null||d===void 0||(d=d[l])===null||d===void 0?void 0:d[o.key];if(v&&typeof v=="string"){var y=v;return s!=null&&s.context&&(y=qJ(y,s.context),sessionStorage.getItem("APP_DEBUG")&&console.log("[Error Utils Debug]",y)),y=kv(y),n!==""?"[".concat(n,"] ").concat(y," ").concat(t):"".concat(y," ").concat(t)}}catch(S){console.error("[Error Utils Debug]",S)}}if(o&&ul(o)!=="object"&&VO(s)){var b=BO(s);if(b)return n!==""?"[".concat(n,"] ").concat(b," ").concat(t):"".concat(b," ").concat(t)}return r?"".concat(r):LO()}const Ss=Xa("toast",()=>{const e=u=>$O(u),t=u=>{var c;if((u==null?void 0:u.apiCode)==="offline")r({id:"offline",type:"error",message:"You are currently offline. Please check your network connection."});else{const d=$O((c=u==null?void 0:u.res)==null?void 0:c.data);r({id:u==null?void 0:u.apiCode,type:"error",message:d})}},n=$([]),o=(u,c)=>{const d=tJ[u];if(d){const h=d[c];if(h){r({id:u,type:c,message:h});return}}else r({id:u,type:c,message:u})},s=new Map,r=(u,c=5e3)=>{const d={...u,id:u.id??Date.now()+Math.random()};if(n.value.push(d),c>0){const h=Date.now(),f=setTimeout(()=>{i(d.id),s.delete(d.id)},c);s.set(d.id,{timeoutId:f,remainingTime:c,startTime:h})}};function i(u){n.value=n.value.filter(d=>d.id!==u);const c=s.get(u);c&&(clearTimeout(c.timeoutId),s.delete(u))}function a(u){const c=s.get(u);if(c){clearTimeout(c.timeoutId);const d=Date.now()-c.startTime;c.remainingTime=Math.max(0,c.remainingTime-d)}}function l(u){const c=s.get(u);if(c&&c.remainingTime>0){const d=setTimeout(()=>{i(u),s.delete(u)},c.remainingTime);c.timeoutId=d,c.startTime=Date.now()}}return{notifications:n,addNotification:r,removeNotification:i,showMessage:o,showErrorNetMessage:t,pauseAutoDismiss:a,resumeAutoDismiss:l,getErrorMessageFromResponse:e}}),dE=Xa("sortStore",()=>{const e=$({}),t=$(void 0),n={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"actual_due_date",status:"template_flow_status",assignees:"assignee"},o={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}};return{sortingAPIConfiguration:q(()=>{const u=e.value;return Object.values(u).filter(d=>d.sort!=="none"&&!!d.sort).map(d=>{let h;switch(d.colId){case"dateRange":h=o[d.sort];break;default:if(d.colId.includes("metric")){const[f,p]=d.colId.split("_");h={column:f,direction:d.sort,type:p}}else h={column:n[d.colId]||d.colId,direction:d.sort};break}return h})}),sorts:e,setSort:(u,c)=>{e.value={[u]:{colId:u,sort:c}}},clearSorting:()=>{e.value={}},isSortingRunning:$(!1),defaultSortStorePreferences:t,setDefaultSort:u=>{t.value=u}}}),hE=10,fE=5,yi={number:{first:"001",step:"1"},letter:{first:"A",step:"1"}},HO={up:{first:"Start at",step:"Increase by"},down:{first:"End at",step:"Decrease by"}},YJ=/^[0-9]$/,XJ=/^[A-Za-z]$/,GO=(e,t)=>t==="first"&&e==="letter"?XJ:YJ,UO=(e,t,n)=>GO(e,t).test(n),ZJ=e=>e==="first"?hE:fE,JJ=e=>e&&e[0]===e[0].toLowerCase()?e.toLowerCase():e.toUpperCase(),WO=(e,t,n)=>{const o=GO(e,t),s=Array.from(n).filter(r=>o.test(r)).join("").slice(0,ZJ(t));return t==="first"&&e==="letter"?JJ(s):s},Fv=(e,t)=>t!==""&&(e==="first"||Number(t)>0),QJ=e=>Array.from(e.toUpperCase()).reduce((t,n)=>t*26+(n.charCodeAt(0)-64),0),eQ=e=>{let t="",n=e;for(;n>0;){const o=(n-1)%26;t=String.fromCharCode(65+o)+t,n=Math.floor((n-1)/26)}return t},pE=({type:e,direction:t,first:n,step:o,count:s})=>{const r=Number(o)||1,i=u=>(t==="up"?u:s-1-u)*r;if(e==="number"){const u=Number(n);return Array.from({length:s},(c,d)=>String(u+i(d)).padStart(n.length,"0"))}const a=QJ(n),l=n!==""&&n[0]===n[0].toLowerCase();return Array.from({length:s},(u,c)=>{const d=eQ(a+i(c));return l?d.toLowerCase():d})},tQ="Your update is queued. Reload the table later to see the changes.",gE="Update failed.",nQ=new Set(["bulkDelete","bulkArchive","bulkUnarchive","bulkDateUpdate","bulkAssignUpdate","bulkStatusUpdate","bulkMetricUpdate","bulkRename","removeAssignee","delete_thumbnail","delete_rendition"]),oQ=(e,t,n)=>{const o=e.getRowNode(t);o&&o.setData({...o.data,...n})},sQ=(e,{currentName:t,counterValue:n})=>e.map(o=>{switch(o.type){case"text":return o.value;case"current_name":return t;case"counter":return n;default:return""}}).join(""),rQ=(e,t)=>{const n=e.find(o=>o.type==="counter");return n?pE({type:n.format,direction:n.direction==="asc"?"up":"down",first:n.value,step:n.step,count:t}):[]},zO=(e,t,n)=>Ss().addNotification({id:n,type:e,message:t}),iQ=(e,t,n={})=>{const o=Vf(),{selectionStatus:s}=go(o),{sortingAPIConfiguration:r}=go(dE()),i=q(()=>s.value===Ft.CHECKED),a=q(()=>e.selectRowData.map(ne=>ne.id)),l=q(()=>e.selectRowData.length>0),{apiServices:u}=no(!1,e),c=En("filterParams",void 0),d=q(()=>({workspaceId:String(e.workspaceId),itemIds:l.value&&i.value?[]:a.value,entityId:e.entityId,filterParams:c!=null&&c.value?c.value:void 0})),h=$(!0),f=$(!1);let p=null;const g=ne=>{var I,z;if(!ne.apiCode||!nQ.has(ne.apiCode))return;const Y=(I=ne.res)==null?void 0:I.data;p={success:ne.success,status:(z=ne.res)==null?void 0:z.status,data:typeof Y=="object"&&Y!==null?Y:void 0,error:ne.error}};Je(u,(ne,Y)=>{Y==null||Y.off("call-api",g),ne==null||ne.on("call-api",g)},{immediate:!0}),Vn(()=>{var ne;return(ne=u.value)==null?void 0:ne.off("call-api",g)}),Je(()=>e.selectRowData,()=>{h.value=!1},{deep:!0,immediate:!0});const v=()=>{p=null},y=ne=>{var xe,de;const Y=p,I=Y==null?void 0:Y.data,z=(Y==null?void 0:Y.error)??ne,ee=(I==null?void 0:I.message)??((de=(xe=z==null?void 0:z.response)==null?void 0:xe.data)==null?void 0:de.message),me=typeof ee=="string"&&ee.trim()?ee:gE;zO("error",me,"bulk-update-error")},b=(ne,Y,I,z)=>{ne.length!==0&&(ne.forEach(ee=>{const me=Y.getRowNode(ee);me&&me.setData({...me.data,...I})}),Y.refreshCells({...z.length>0?{columns:z}:{},force:!0}))},S=ne=>{const Y=e.gridApi;if(Y){if(i.value){Y.deselectAll();return}ne.forEach(I=>{var z;return(z=Y.getRowNode(I))==null?void 0:z.setSelected(!1)})}},w=({ids:ne,apply:Y,columns:I,isDelete:z=!1})=>{var oe;let ee=ne;ne.length==0&&(ee=e.selectRowData.map(ae=>ae.id)??[]),console.log("Finishing bulk action for ids:",{ids:ee,columns:I,isDelete:z,selectedRows:e.selectRowData,lastOutcome:p});const me=p;if((me==null?void 0:me.status)!==br.ACCEPTED){Y(),z&&S(ee);return}zO("white",tQ,"bulk-update-queued");const xe=(oe=me.data)==null?void 0:oe.bulk_process;let de;typeof(xe==null?void 0:xe.state)=="number"?de=xe.state:de=z?0:1;const j=e.gridApi;j&&(ee.forEach(ae=>oQ(j,ae,{isProcessing:{state:de,message:typeof(xe==null?void 0:xe.message)=="string"?xe.message:""}})),j.refreshCells({columns:[...I,"name"],force:!0})),(z||de==0)&&S(ee)},E=async({request:ne,apply:Y,columns:I,isDelete:z=!1})=>{var xe,de,j;const ee=a.value,me=e.gridApi;if(!me){console.error("Grid API is not available for bulk action.");return}v();try{const oe=ne();if(!oe)throw new Error("Bulk update service is unavailable.");await oe}catch(oe){console.error("Bulk action failed:",oe),y(oe),(xe=t.value)==null||xe.open();return}if((p==null?void 0:p.success)===!1){const oe=p.error??new Error(gE);console.error("Bulk action failed:",oe),y(oe),(de=t.value)==null||de.open();return}w({ids:ee,columns:I,isDelete:z,apply:()=>Y(ee,me)}),(j=t.value)==null||j.hide()},R=({itemIds:ne,data:Y,isUpdateAll:I})=>{let z=ne;I&&(console.log("Bulk update for all items with data:",Y),z=a.value),console.log("Handling bulk update for status with itemIds:",z,"and data:",Y);const ee=e.gridApi;if(!ee){console.error("Grid API is undefined");return}w({ids:z,columns:["status"],apply:()=>{b(z,ee,{status:Y},["status"])}})},D=({itemIds:ne,data:Y})=>{var z;const I=e.gridApi;if(!I){console.error("Grid API is undefined");return}w({ids:ne,columns:["dateRange","name"],apply:()=>{let ee=ne;console.log("Applying bulk date update for itemIds:",ne,"with data:",Y),(!ne||ne.length===0)&&(console.warn("No itemIds provided for bulk date update."),ee=e.selectRowData.map(me=>me.id)),ee.forEach(me=>{const xe=I.getRowNode(me);if(xe){const de=[...xe.data.dateRange||[null,null]];"startDate"in Y&&Y.startDate!==void 0&&(de[0]=Y.startDate?new Date(Y.startDate):null),"dueDate"in Y&&Y.dueDate!==void 0&&(de[1]=Y.dueDate?new Date(Y.dueDate):null),xe.setData({...xe.data,dateRange:de})}})}}),(z=n.onUpdated)==null||z.call(n)},x=ne=>{var ee;const Y=e.gridApi,{id:I,value:z}=ne;if(!Y){console.error("Grid API is undefined");return}b(a.value,Y,{[`metric_${I}`]:z},[`metric_${I}`]),(ee=n.onUpdated)==null||ee.call(n)},N=ne=>{const{assignees:Y,type:I}=ne,z=e.gridApi;if(!z){console.error("Grid API is not available for bulk update.");return}const ee=new Set(Y.map(xe=>xe.id)),me=xe=>{const de=z.getRowNode(xe);if(!de)return;const j=de.data.assignees||[];let oe=[];switch(I){case"add":{const ae=new Set(j.map(_=>_.id));oe=[...j,...Y.filter(_=>!ae.has(_.id))];break}case"overwrite":oe=Y;break;case"remove":oe=j.filter(ae=>!ee.has(ae.id));break;case"removeAll":oe=[];break}de.setData({...de.data,assignees:oe})};w({ids:a.value,columns:["assignees","name"],apply:()=>a.value.forEach(me)})},B=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkDeleteItems(d.value)},isDelete:!0,columns:["name"],apply:(ne,Y)=>b(ne,Y,{isDeleted:!0,disabled:!0,isProcessing:{state:0,message:""}},[])}),A=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkUnarchiveItems(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{isArchived:!1},["name"])}),P=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.bulkArchiveItems(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{isArchived:!0},["name"])}),k=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.deleteThumbnail(d.value)},columns:["thumbnail"],apply:(ne,Y)=>b(ne,Y,{thumbnail:null},["thumbnail"])}),O=()=>E({request:()=>{var ne;return(ne=u.value)==null?void 0:ne.deleteRendition(d.value)},columns:["name"],apply:(ne,Y)=>b(ne,Y,{},["name"])}),L=()=>{v(),h.value=!0},H=ne=>{console.trace("Bulk update response:",ne),ft(()=>{h.value=!1})},W=()=>{y(),H({})},se=(ne,Y)=>{const I=new Map(e.selectRowData.map(ee=>[ee.id,ee.name||""])),z=rQ(ne,Y.length);return Y.map((ee,me)=>{const xe=I.get(ee)??"",de=sQ(ne,{currentName:xe,counterValue:z[me]??""});return{id:ee,from:xe,to:de}})},ie=()=>{const ne=e.gridApi;return ne==null?[]:e.selectRowData.map((Y,I)=>{var z;return{id:Y.id,rowIndex:((z=ne.getRowNode(Y.id))==null?void 0:z.rowIndex)??I}}).sort((Y,I)=>Y.rowIndex-I.rowIndex).map(({id:Y})=>Y)};return{apiServices:u,selectionStatus:s,isSelectAll:i,selectedIds:a,isBulkUpdate:l,isUpdating:h,isLoading:f,handleUpdateStart:L,handleUpdatePostUpdate:H,handleUpdateFailed:W,handleUpdateBulkStatus:R,handleUpdateBulkDate:D,handleBulkUpdateMetric:x,handleUpdateNewAssignee:N,handleDelete:B,handleArchive:P,handleUnarchive:A,deleteThumbnail:k,deleteRendition:O,handleBulkUpdateName:async ne=>{var xe;if(!e.workspaceId||!e.entityId)return;const Y=ie(),I={item_ids:Y,segments:ne},z=r.value;i.value&&(delete I.item_ids,I.entity_id=e.entityId),I.sort_by=z;const ee={workspaceId:e.workspaceId,entityId:e.entityId,payload:I,filter:c!=null&&c.value?c.value:void 0},me=se(ne,Y);v(),h.value=!0,f.value=!0;try{const de=(xe=u.value)==null?void 0:xe.bulkRename(ee);if(!de)throw new Error("Bulk update service is unavailable.");if(await de,(p==null?void 0:p.success)===!1){y(p.error??new Error(gE));return}}catch(de){y(de);return}finally{h.value=!1,f.value=!1}w({ids:Y,columns:["name"],apply:()=>{var j;const de=e.gridApi;de&&(me.forEach(({id:oe,to:ae})=>{var _;return(_=de.getRowNode(oe))==null?void 0:_.setDataValue("name",ae)}),(j=n.onRefreshSelectedRow)==null||j.call(n))}})}}},jO=Et(ot({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:void 0},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=Vs,{triggerRef:n,popupRef:o}=vo({toggleOnClick:!0,trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),s=q(()=>{switch(r.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"transparent"}}),r=e;return(i,a)=>(K(),he("div",{class:ce(i.$style["status-badge-wrapper"]),style:cn({"--badge-size":`${r.size}px`,"--badge-color":s.value})},[kt(i.$slots,"default"),Ue(be("div",{class:ce(i.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[lr,r.showBadge],[V(t),{isLoading:r.loading,fullwidth:!0}]]),be("div",{ref_key:"popupRef",ref:o,class:ce(i.$style["badge-tooltip"])},at(r.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_30ykl_1","badge-indicator":"_badge-indicator_30ykl_6",active:"_active_30ykl_19",offline:"_offline_30ykl_22",busy:"_busy_30ykl_25",away:"_away_30ykl_28","badge-tooltip":"_badge-tooltip_30ykl_32"}}]]),md=Xa("switchStore",()=>{const e=$(null),t=En("switchInstance");return{openSceneHub:(s,r)=>{if(s){if(!t)throw console.error("Switch instance not found"),new Error("Switch instance not found");r?t("scene_hub",{id:s,commentId:r},{showLoading:!1}):t("scene_hub",{id:s,tab:"home"},{showLoading:!1})}},openPeopleInsight:s=>{if(!s){console.error("No people_id provided, defaulting to empty string");return}const r=t||e.value;if(!r)console.error("Switch instance not found");else if(window.switchApploader)window.switchApploader("people_insight",{tab:"home",id:s||""},{showLoading:!1});else throw console.error("Switch instance not found and switchApploader is not available"),new Error("Switch instance not found and switchApploader is not available");r("people_insight",{tab:"home",id:s||""},{showLoading:!1})},switchInstanceFunc:e}}),aQ=ot({__name:"MiniPeopleCard",props:{user:{},status:{default:void 0},timezone:{default:pv()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1},showPrivateUser:{type:Boolean,default:!1},switchInstance:{type:Function,default:void 0}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=qt,o=Vs,s=e,r=t,i={active:"Active in the workspace in the last 10 minutes.",offline:"Logged out from account.",busy:"User is busy",away:"No activity in the workspace within the last 10 minutes"},a=$(new Date),l=$(!0),u=$(!1),c=$(!1),d=$(null);let h=null,f=null;const p=md(),{openPeopleInsight:g}=p,v=q(()=>!s.private&&!u.value),y=q(()=>{var H,W;return((H=d.value)==null?void 0:H.display_name)??((W=s.user)==null?void 0:W.name)}),b=q(()=>{var H,W;return!v.value||!d.value?s.status:(H=d.value.private_info)!=null&&H.is_offline?"offline":(W=d.value.private_info)!=null&&W.last_active?"active":"away"}),S=q(()=>{var H;return!!((H=d.value)!=null&&H.private_info)}),w=q(()=>{const H=b.value;return H?i[H]:""}),E=q(()=>{var H,W;return((W=(H=d.value)==null?void 0:H.private_info)==null?void 0:W.timezone)??s.timezone}),R=q(()=>{if(!E.value)return"";try{return a.value.toLocaleTimeString("en-US",{timeZone:E.value,hour:"numeric",minute:"2-digit",hour12:!0})}catch{return console.error("Invalid timezone:",E.value),""}}),D=q(()=>{var H,W,se;return{id:s.user.id,name:y.value,initial:((H=d.value)==null?void 0:H.initial)??s.user.initial,profile_image:((W=d.value)==null?void 0:W.profile_image)??s.user.profile_image,color:((se=d.value)==null?void 0:se.color)??s.user.color,size:72,borderRadius:"8px"}}),x=q(()=>{const H=ln.getInstance().getItem("BASE_URL"),W=ln.getInstance().getItem("ws.code")||"";return Zo({type:"people_insight",config:{ws_code:W,baseDomain:H,user_id:s.user.id}}).url}),{copyToClipboard:N,tooltip:B}=gO(x.value,()=>r("copyLink",s.user.id)),A=async()=>{if(!s.apiUpdateFunction){l.value=!1;return}try{const H=await s.apiUpdateFunction(s.user.id);H?(d.value=H,r("dataUpdated",H)):(u.value=!0,c.value=!0,r("dataUpdated",null))}catch(H){u.value=!0,c.value=!0,console.error("Failed to fetch user data:",H)}finally{l.value=!1}},P=()=>{k(),s.apiUpdateFunction&&s.enableAutoRefresh&&(f=setInterval(A,s.refreshInterval))},k=()=>{f!==null&&(clearInterval(f),f=null)},O=H=>{var W;if(H.ctrlKey||H.metaKey){window.open(x.value,"_blank");return}try{g(String(s.user.id))}catch{s.switchInstance?(W=s.switchInstance)==null||W.call(s,"people_insight",{tab:"home",id:s.user.id||""},{showLoading:!1}):window.open(x.value,"_blank")}},L=H=>{O(H),r("insightClick",s.user.id)};return Je([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],P),Jt(async()=>{h=setInterval(()=>{a.value=new Date},1e4),s.apiUpdateFunction?(await A(),P()):l.value=!1}),ou(()=>{h&&clearInterval(h),k()}),(H,W)=>s.showPrivateUser&&(s.private||c.value)?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style["private-badge"]])},[...W[0]||(W[0]=[be("span",null,"Private User",-1)])],2)):(K(),he("div",{key:1,class:ce([H.$style["mini-people-card"],{[H.$style.loading]:l.value},"bg-skeleton"])},[be("div",{class:ce(H.$style["avatar-section"])},[v.value&&S.value?(K(),We(jO,{key:0,size:12,status:b.value,loading:l.value,"status-tooltip":w.value},{default:Ce(()=>[ye(wf,Kt({readOnly:!0},D.value),null,16)]),_:1},8,["status","loading","status-tooltip"])):(K(),We(wf,Kt({key:1,readOnly:!0},D.value),null,16))],2),be("div",{class:ce(H.$style["user-info"])},[be("div",{class:ce(H.$style["info-column"])},[Ue((K(),he("span",{class:ce(H.$style["user-name"])},[tt(at(y.value),1)],2)),[[V(n),{content:y.value,delay:[1e3,0]}]]),E.value&&v.value&&S.value?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style["time-row"]])},[Ue((K(),he("div",{class:ce(H.$style["time-display"])},[ye(gt,{source:"remote",src:"Globe",class:ce(H.$style["clock-icon"]),size:"10"},null,8,["class"]),be("span",{class:ce(H.$style["time-text"])},at(R.value)+" ("+at(E.value)+")",3)],2)),[[V(o),{isLoading:l.value,fullwidth:!0}]])],2)):qe("",!0)],2),!e.readOnly&&v.value?(K(),he("div",{key:0,class:ce([H.$style["info-row"],H.$style.actions])},[e.showInsightButton&&S.value?(K(),We(bt,{key:0,label:"Insights",variant:"secondary",size:"small",onClick:Ht(L,["prevent","stop"]),disabled:s.disabled},null,8,["disabled"])):qe("",!0),e.showCopyLinkButton&&S.value?Ue((K(),We(bt,{key:1,variant:["icon","secondary"],size:"small",onClick:Ht(V(N),["prevent","stop"]),disabled:s.disabled},{default:Ce(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[V(n),{content:V(B),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):qe("",!0)],2)):qe("",!0)],2)],2))}}),lQ=Et(aQ,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_ign8a_1",loading:"_loading_ign8a_25","avatar-section":"_avatar-section_ign8a_28","user-info":"_user-info_ign8a_33","info-column":"_info-column_ign8a_42","info-row":"_info-row_ign8a_50","time-row":"_time-row_ign8a_56","time-display":"_time-display_ign8a_62","time-text":"_time-text_ign8a_70",actions:"_actions_ign8a_79","user-name":"_user-name_ign8a_83","v-enter-active":"_v-enter-active_ign8a_103","v-leave-active":"_v-leave-active_ign8a_104","v-enter-from":"_v-enter-from_ign8a_108","v-leave-to":"_v-leave-to_ign8a_109"}}]]),uQ=Et(ot({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e,{expose:t}){const n=Do,o=qt,s=e,{isEditing:r}=ld(s),i=()=>{var h,f;const c=(h=s.params)==null?void 0:h.api,d={rowIndex:(f=c==null?void 0:c.getRowNode(String(s.id)))==null?void 0:f.rowIndex,colKey:"options"};c==null||c.startEditingCell(d)},a=q(()=>{var d,h;const c=(h=(d=s.params)==null?void 0:d.api)==null?void 0:h.getRowNode(String(s.id));return((c==null?void 0:c.rowIndex)??0)+10}),l=()=>{var c,d;(d=(c=s.params)==null?void 0:c.api)==null||d.stopEditing()},u=$();return t({focus(){var c;(c=u.value)==null||c.focus()},blur(){var c;(c=u.value)==null||c.blur()}}),(c,d)=>Ue((K(),We(bt,{class:ce(c.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:V(r),onClick:Ht(i,["stop"]),onEscape:l,ref_key:"buttonRef",ref:u},{default:Ce(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[V(o),"More actions"],[V(n),a.value]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_137ge_1"}}]]),cQ=["src","width","height","alt"],pa=Et(ot({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=Vs,{getCachedValue:n,setCachedValue:o}=vf({dbName:"visual-cache-db",storeName:"visuals"}),s=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},r=e,i=q(()=>({minWidth:s(r.minWidth),maxWidth:s(r.maxWidth),minHeight:s(r.minHeight),maxHeight:s(r.maxHeight),aspectRatio:r.ratio,width:s(r.size)})),a=async h=>{const f=await n(h);if(typeof f=="string")return f},l=async(h,f)=>{await o(h,f)},u=q(()=>({name:r.src,size:Number(r.size||100),color:""})),{url:c,loading:d}=IP(u,"visual",l,a);return(h,f)=>Ue((K(),he("div",{class:ce([h.$style.visualWrapper,{[h.$style.loading]:V(d)}]),style:cn(i.value)},[be("img",{src:V(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:cn(i.value)},null,12,cQ)],6)),[[V(t),{isLoading:V(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_lvp0k_1",loading:"_loading_lvp0k_8",pulse:"_pulse_lvp0k_1"}}]]),dQ=["tabindex"],Oo=Et(ot({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{},bordered:{type:Boolean},tabIndex:{},focusableIndex:{}},emits:["event","escape"],setup(e,{expose:t,emit:n}){const o=e,s=n;zg();const r=rm(),i=$(null),a=$("default"),l=q(()=>{if(typeof o.size=="number")return`${o.size}px`;switch(o.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),u=q(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=q(()=>({[r["display-wrapper"]]:!0,[r.disabled]:o.disabled,[r.readOnly]:o.readOnly,[r.error]:o.error,[r.clickable]:o.clickable,[r.active]:o.actived,[r.hovered]:o.hovered,[r.focused]:!o.readOnly&&!o.disabled&&o.focused,[r.bordered]:o.bordered})),d=()=>{var w,E;const g=((w=i.value)==null?void 0:w.querySelectorAll(":scope > .wrapper-prefix").length)||0,v=((E=i.value)==null?void 0:E.querySelectorAll(":scope > .wrapper-suffix").length)||0,y="var(--icon-size)",S=`calc(var(--gap-size) * ${g+v})`;return g&&!v?`repeat(${g}, ${y}) calc(100% - (${g} * ${y} + ${S}))`:!g&&v?`calc(100% - (${v} * ${y} + ${S})) repeat(${v}, ${y})`:g&&v?`repeat(${g}, ${y}) calc(100% - (${g} * ${y} + ${v} * ${y} + ${S})) repeat(${v}, ${y})`:"100%"},h=$("100%"),f=()=>{h.value=d()};Nh(()=>{f()}),Jt(()=>{f()});const p=g=>{a.value=g};return t({rootEl:i,updateState:p,componentState:a,focus:()=>{ft(()=>{var g;(g=i.value)==null||g.focus()})},triggerFocus:()=>{console.log("triggerFocus called"),ft(()=>{var g;(g=i.value)==null||g.focus()})},escape:()=>{s("escape")}}),(g,v)=>{const y=Ec("focusable");return Ue((K(),he("div",{ref_key:"rootEl",ref:i,class:ce([V(r)["display-wrapper"],c.value]),tabindex:e.tabIndex,style:cn({"--grid-template":h.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[kt(g.$slots,"prefix",{hovered:o.hovered,focused:o.focused}),kt(g.$slots,"default",{hovered:o.hovered,focused:o.focused,updateComponentState:p,disabled:o.disabled}),kt(g.$slots,"suffix",{hovered:o.hovered,focused:o.focused})],14,dQ)),[[y,o.focusableIndex]])}}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_rxmoy_1",readOnly:"_readOnly_rxmoy_26",bordered:"_bordered_rxmoy_29",disabled:"_disabled_rxmoy_29",active:"_active_rxmoy_29",focused:"_focused_rxmoy_29",hovered:"_hovered_rxmoy_33",error:"_error_rxmoy_37",clickable:"_clickable_rxmoy_50",suffix:"_suffix_rxmoy_56",prefix:"_prefix_rxmoy_57"}}]]),hQ=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fQ=Object.prototype.toString,pQ=e=>fQ.call(e)==="[object Object]",wi=()=>{};function gQ(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return"cancel"in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function mQ(e,t={}){let n,o,s=wi,r=wi;const i=xg(!1),a=c=>{clearTimeout(c),s(),s=wi};let l;return Object.assign(c=>{const d=Ji(e),h=Ji(t.maxWait);return n&&a(n),d<=0||h!==void 0&&h<=0?(o&&(a(o),o=void 0),i.value=!1,Promise.resolve(c())):(i.value=!0,new Promise((f,p)=>{s=t.rejectOnCancel?p:f,r=f,l=c,h&&!o&&(o=setTimeout(()=>{n&&a(n),o=void 0,i.value=!1,f(l())},h)),n=setTimeout(()=>{o&&a(o),o=void 0,i.value=!1,f(c())},d)}))},{cancel:()=>{n&&(a(n),n=void 0),o&&(a(o),o=void 0),i.value=!1,r=wi},flush:()=>{if(i.value){n&&(clearTimeout(n),n=void 0),o&&(clearTimeout(o),o=void 0),i.value=!1;const c=r;s=wi,r=wi,c(l())}},isPending:Nr(i)})}function mE(e){return Array.isArray(e)?e:[e]}function vQ(e,t=200,n={}){return gQ(mQ(t,n),e)}function yQ(e,t,n){return Je(e,t,{...n,immediate:!0})}const KO=hQ?window:void 0;function Gf(e){var t;const n=Ji(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function vE(...e){const t=(o,s,r,i)=>(o.addEventListener(s,r,i),()=>o.removeEventListener(s,r,i)),n=q(()=>{const o=mE(Ji(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return yQ(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>Gf(r)))!==null&&o!==void 0?o:[KO].filter(r=>r!=null),mE(Ji(n.value?e[1]:e[0])),mE(V(n.value?e[2]:e[1])),Ji(n.value?e[3]:e[2])]},([o,s,r,i],a,l)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const u=pQ(i)?{...i}:i,c=o.flatMap(d=>s.flatMap(h=>r.map(f=>t(d,h,f,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function yE(e,t,n={}){const{window:o=KO,ignore:s=[],capture:r=!0,detectIframe:i=!1,controls:a=!1}=n;if(!o)return a?{stop:wi,cancel:wi,trigger:wi}:wi;let l=!0;const u=v=>Ji(s).some(y=>{if(typeof y=="string")return Array.from(o.document.querySelectorAll(y)).some(b=>b===v.target||v.composedPath().includes(b));{const b=Gf(y);return b&&(v.target===b||v.composedPath().includes(b))}});function c(v){const y=Ji(v);return y&&y.$.subTree.shapeFlag===16}function d(v,y){const b=Ji(v),S=b.$.subTree&&b.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some(w=>w.el===y.target||y.composedPath().includes(w.el))}const h=v=>{const y=Gf(e);if(v.target!=null&&!(!(y instanceof Element)&&c(e)&&d(e,v))&&!(!y||y===v.target||v.composedPath().includes(y))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let f=!1;const p=[vE(o,"click",v=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(v))},{passive:!0,capture:r}),vE(o,"pointerdown",v=>{const y=Gf(e);l=!u(v)&&!!(y&&!v.composedPath().includes(y))},{passive:!0}),i&&vE(o,"blur",v=>{setTimeout(()=>{const y=Gf(e);let b=o.document.activeElement;for(;b!=null&&b.shadowRoot;)b=b.shadowRoot.activeElement;(b==null?void 0:b.tagName)==="IFRAME"&&!(y!=null&&y.contains(o.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),g=()=>p.forEach(v=>v());return a?{stop:g,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:g}const wQ=["type","value","placeholder","max","min","disabled","readonly","aria-invalid","aria-disabled","inputmode","maxlength"],dl=Et(ot({__name:"InputText",props:{type:{default:"text"},autoEmit:{type:Boolean,default:!1},debounceDelay:{default:300},selectOnFocus:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,default:!0},blurOnEscape:{type:Boolean,default:!0},maxDecimalChar:{},showClear:{type:Boolean,default:!0},maxValue:{default:void 0},minValue:{default:0},modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{}},emits:["update:modelValue","input","clear","focus","blur","change","enterValue","enter","escape","cancel","tab","keydown","keyup","paste","cut","select","onValidation"],setup(e,{expose:t,emit:n}){const o=Do,s=qt,r=e,i=n,a=$(null),l=$(r.modelValue||""),u=$(!1),c=$(!1),d=$(r.modelValue||"");Je(()=>r.modelValue,I=>{l.value=I||"",d.value=I||""});const h=q(()=>l.value.length>0),f={text:I=>I.slice(0,r.maxLength??255),number:I=>{const z=r.minValue<0;let ee=I.replace(z?/[^\d.-]/g:/[^\d.]/g,"");const me=ee.split(".");me.length>2&&(ee=me[0]+"."+me.slice(1).join("")),ee=ee.replace(/-/g,(ae,_)=>_===0?ae:"");const de=ee.startsWith("-")?"-":"",oe=ee.replace("-","").split(".");return oe[0].length>17&&(oe[0]=oe[0].substring(0,17)),r.maxDecimalChar!==void 0&&oe.length>1&&(oe[1]=oe[1].substring(0,r.maxDecimalChar)),ee=de+oe.join("."),r.maxLength!==void 0&&ee.length>r.maxLength&&(ee=ee.slice(0,r.maxLength).replace(/\.$/,""),ee==="-"&&(ee="")),ee},email:I=>I.replace(/\s/g,"").slice(0,r.maxLength??255),url:I=>I.replace(/\s/g,"").slice(0,r.maxLength??255),tel:I=>I.replace(/[^\d+\-() ]/g,"").slice(0,r.maxLength??20)},p=I=>{const z=f[r.type];return z?z(I):I},g=vQ(I=>{r.autoEmit&&(i("update:modelValue",I),i("input",I))},r.debounceDelay),v=I=>{const z=I;if(r.disabled||r.readOnly){z.preventDefault();return}const ee=z.target,me=ee.selectionStart??ee.value.length,xe=ee.value,de=l.value;let j=p(xe);if(r.type==="number"&&j!==""&&j!=="-"){const oe=Number(j);(r.maxValue!==void 0&&oe>r.maxValue||!Number.isNaN(oe)&&oe<r.minValue)&&(j=de)}if(ee.value!==j){const oe=Math.max(0,xe.length-j.length);if(ee.value=j,ee.selectionStart!==null){const ae=Math.max(0,Math.min(me-oe,j.length));ee.setSelectionRange(ae,ae)}}de!==j&&(l.value=j,i("input",j),r.autoEmit&&g(j))},y=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}c.value=!0;const z=l.value;l.value="",i("update:modelValue",""),i("clear"),z!==""&&i("change",""),I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),ft(()=>{var ee;(ee=a.value)==null||ee.focus(),setTimeout(()=>{c.value=!1},100)})},b=I=>{r.disabled||r.readOnly||(i("focus",I),r.selectOnFocus&&ft(()=>{I.target.select()}))},S=I=>{if(c.value)return;const ee=I.target.value;r.autoEmit||i("update:modelValue",ee),d.value!==ee&&(i("change",ee),d.value=ee),i("blur",ee,I)},w=I=>{const z=I.target.value;i("enter",z,I),i("enterValue",z),r.submitOnEnter&&(I.preventDefault(),r.autoEmit||i("update:modelValue",z),d.value!==z&&(i("change",z),d.value=z))},E=I=>{const z=I.target,ee=z.value;if(i("escape",ee,I),I.preventDefault(),I.stopImmediatePropagation(),I.stopPropagation(),r.autoEmit){i("cancel"),r.blurOnEscape&&z.blur();return}l.value=r.modelValue||"",a.value&&(a.value.value=l.value),i("cancel"),r.blurOnEscape&&z.blur()},R=I=>{const ee=I.target.value;i("tab",ee,I),r.autoEmit||(i("update:modelValue",ee),d.value!==ee&&(i("change",ee),d.value=ee))},D=(I,z,ee)=>new RegExp(`^-?\\d{0,${z}}(\\.\\d{0,${ee}})?$`).test(I)?ee>0||!I.includes("."):!1,x=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"]),N=I=>{if(i("keydown",I),I.key===" "&&I.stopPropagation(),r.type==="number"){if(I.key==="e"||I.key==="E"){I.preventDefault();return}if(I.key.length===1&&!I.ctrlKey&&!I.metaKey&&!I.altKey&&!x.has(I.key)){if(!(r.minValue<0?/[\d.-]/:/[\d.]/).test(I.key)){I.preventDefault();return}const ee=I.target,me=l.value,xe=ee.selectionStart??me.length,de=ee.selectionEnd??xe,j=me.slice(0,xe)+I.key+me.slice(de);if(!D(j,17,r.maxDecimalChar??2)){I.preventDefault();return}const oe=Number(j);if(r.maxValue!==void 0&&oe>r.maxValue||j!=="-"&&!Number.isNaN(oe)&&oe<r.minValue){I.preventDefault();return}}}I.key==="Escape"?E(I):I.key==="Enter"?w(I):I.key==="Tab"?R(I):(I.key==="ArrowUp"||I.key==="ArrowDown")&&r.type==="number"&&I.preventDefault()},B=I=>{i("keyup",I)},A=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}i("paste",I)},P=I=>{if(r.disabled||r.readOnly){I.preventDefault();return}i("cut",I)},k=I=>{i("select",I)},O=`input-text-${Math.random().toString(36).slice(2,11)}`,L=q(()=>{switch(r.type){case"number":return"decimal";case"email":return"email";case"tel":return"tel";case"url":return"url";default:return"text"}});Je(l,I=>{i("onValidation",I),u.value=r.validatorFnc?!!I&&!r.validatorFnc(I):!1});const H=$(null),W=q(()=>({disabled:r.disabled,readOnly:r.readOnly,error:u.value,inputRef:a,clickable:!r.disabled&&!r.readOnly,focused:r.focused,wrapperRef:H,bordered:!0})),{argsMain:se,isHover:ie,isFocus:Q}=xo(W);t({triggerFocus:()=>{ft(()=>{var I;(I=a.value)==null||I.focus()})},focus:()=>{ne()},blur:()=>{ft(()=>{var I;(I=a.value)==null||I.blur()})},select:()=>{ft(()=>{var I;(I=a.value)==null||I.select()})},setSelectionRange:(I,z)=>{ft(()=>{var ee;(ee=a.value)==null||ee.setSelectionRange(I,z)})},getValue:()=>l.value,setValue:I=>{l.value=p(I),a.value&&(a.value.value=l.value)},reset:()=>{l.value=r.modelValue||"",a.value&&(a.value.value=l.value)}});const ne=()=>{!r.disabled&&!r.readOnly&&ft(()=>{var I;(I=a.value)==null||I.focus()})},Y=q(()=>Q.value&&h.value);return(I,z)=>(K(),he("div",{class:ce([I.$style["input-wrapper"],"input-editor"]),onClick:ne},[Ue((K(),We(Oo,Kt(V(se),{ref_key:"wrapperRef",ref:H,class:[I.$style["input-box"],{[I.$style["is-hovered"]]:V(ie),[I.$style["is-focused"]]:V(Q),[I.$style["has-input"]]:h.value,[I.$style["is-editting"]]:Y.value}],style:{"--icon-size":"20px","--gap-size":"4px"},bordered:r.bordered}),{prefix:Ce(()=>[kt(I.$slots,"prefix")]),suffix:Ce(()=>[h.value&&!r.disabled&&!r.readOnly&&r.showClear?kt(I.$slots,"clear",{},()=>[Ue((K(),We(bt,{variant:["icon","tertiary"],"aria-label":"Clear",onMousedown:Ht(y,["prevent","stop"]),size:18,rounded:!0,class:ce(["wrapper-suffix",I.$style["clear-button"]])},{default:Ce(()=>[ye(gt,{src:"CircleXMark",size:"20",color:"var(--primary-color)"})]),_:1},8,["class"])),[[V(s),{content:"Clear",contentClass:"extra-padding"}]])],void 0,0):kt(I.$slots,"suffix",{},void 0,void 0,1)]),default:Ce(()=>[be("input",{tabindex:"-1",ref_key:"inputRef",ref:a,type:r.type,value:l.value,placeholder:e.placeholder,class:ce([I.$style["column-config__input"]]),max:r.maxValue,min:r.minValue,id:O,disabled:e.disabled,readonly:e.readOnly,"aria-invalid":u.value||void 0,"aria-disabled":e.disabled||void 0,inputmode:L.value,maxlength:r.maxLength,onInput:v,onFocus:b,onBlur:S,onKeydown:N,onKeyup:B,onPaste:A,onCut:P,onSelect:k},null,42,wQ)]),_:3},16,["class","bordered"])),[[V(o),r.focusIndex]]),u.value?kt(I.$slots,"error",{},void 0,void 0,0):qe("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_83ot4_1","is-disabled":"_is-disabled_83ot4_16","is-readonly":"_is-readonly_83ot4_16","is-hovered":"_is-hovered_83ot4_16","is-focused":"_is-focused_83ot4_20","column-config__input":"_column-config__input_83ot4_44","clear-button":"_clear-button_83ot4_59"}}]]),CQ={class:"wrapper-prefix",style:{width:"18px",height:"18px"}},wE=ot({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search"},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{},bordered:{type:Boolean},focusIndex:{default:void 0}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null),i=vr(u=>{s("update:modelValue",u),s("search",u)},vi),a=()=>{s("update:modelValue",""),s("clear"),ft(()=>{var u;(u=r.value)==null||u.focus()})},l=$(o.modelValue);return t({focus:()=>{var u;(u=r.value)==null||u.focus()},setValue(u){l.value=u}}),(u,c)=>(K(),We(dl,{focusIndex:o.focusIndex,ref_key:"searchInput",ref:r,modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),type:"text",placeholder:e.placeholder,onInput:V(i),onClear:a,onCancel:c[1]||(c[1]=d=>s("cancel")),"auto-emit":!0},{prefix:Ce(()=>[be("div",CQ,[ye(gt,{src:"MagnifyingGlass",color:"var(--grey-200)",size:"14"})])]),_:1},8,["focusIndex","modelValue","placeholder","onInput"]))}}),hl=Et(ot({name:"ListItem",directives:{tooltip:qt,focusable:Do},__name:"ListItem",props:{itemWidth:{default:"250px"},label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean},focusIndex:{}},emits:["click","handleClick","keydown","update:selected","select","escape"],setup(e,{expose:t,emit:n}){const o=Do,s=e,r=n,i=$(!1),a=$(!1);function l(E){if(!E||typeof E!="object")return!1;const R=E;return typeof R.name=="string"&&typeof R.id=="string"&&typeof R.initial=="string"}const u=q(()=>s.type==="status"||s.type==="assignee"||s.type==="icon"||!!w.prefix),c=q(()=>!!w.suffix||s.danger&&i.value),d=q(()=>{var E;return s.type==="status"&&typeof((E=s.data)==null?void 0:E.color)=="string"?{backgroundColor:s.data.color,border:Qb(s.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),h=rm(),f=q(()=>({[h.active]:s.selected??!1,[h.disabled]:s.disabled??!1,[h.hover]:s.hover??!1,[h.clickable]:(s.clickable??!0)&&!s.disabled,[h.danger]:s.danger??!1,[h["has-prefix"]]:u.value,[h["has-suffix"]]:c.value,[h.readOnly]:s.readOnly}));q(()=>({content:"Cancel",...S})),q(()=>({content:"Confirm",theme:"warning",...S}));function p(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function g(){i.value=!1}function v(E){E?r("click",E):(s.clickable??!0)&&(r("update:selected",!s.selected),r("select",!s.selected))}function y(E){if(!s.disabled){if(s.danger&&!i.value){i.value=!0;return}else s.danger||v(E);r("handleClick",E)}}const b=()=>{i.value?g():r("escape")},S=Object.freeze({delay:[300,0],contentClass:["extra-padding"]}),w=zg();return Je(()=>s.show,E=>{E===!1&&(i.value=!1)}),t({select:()=>{y(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}),(E,R)=>{const D=Ec("tooltip");return Ue((K(),We(bt,{variant:["menu-item",e.danger?"danger":"menu-item"],class:ce([E.$style["list-item"],f.value]),onHandleClick:y,onMouseenter:R[0]||(R[0]=x=>a.value=!0),onMouseleave:R[1]||(R[1]=x=>a.value=!1),onEscape:b,style:cn({width:s.itemWidth})},{default:Ce(()=>[u.value?(K(),he("div",{key:0,class:ce(E.$style["list-item__prefix"])},[kt(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),We(gt,{key:0,src:e.icon,source:"remote",class:ce(E.$style["item-icon"]),color:s.danger?void 0:"#a6a6a6"},null,8,["src","class","color"])):e.type==="status"?(K(),he("div",{key:1,class:ce(E.$style["status-indicator"]),style:cn(d.value)},null,6)):e.type==="assignee"&&l(e.data)?(K(),We(wf,Kt({key:2},p(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):qe("",!0)])],2)):qe("",!0),be("div",{class:ce(E.$style["list-item__label"])},[kt(E.$slots,"label",{selected:e.selected},()=>[tt(at(e.label),1)])],2),c.value?(K(),he("div",{key:1,class:ce(E.$style["list-item__suffix"])},[kt(E.$slots,"suffix",{item:E.$props,hovered:a.value},()=>[e.danger&&i.value?(K(),he("div",{key:0,class:ce(E.$style["confirm-action"])},[Ue((K(),We(bt,{variant:["tertiary","icon","danger"],size:"small",onClick:Ht(g,["stop","prevent"])},{default:Ce(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.0`],[D,{content:"Cancel ",delay:[300,0],contentClass:["extra-padding"]}]]),Ue((K(),We(bt,{variant:["danger","primary","icon"],size:"small",onClick:Ht(v,["stop","prevent"])},{default:Ce(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[V(o),`${s.focusIndex}.1`],[D,{delay:[300,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):qe("",!0)])],2)):qe("",!0)]),_:3},8,["variant","class","style"])),[[V(o),s.focusIndex]])}}}),[["__cssModules",{$style:{"list-item":"_list-item_iekfz_1",disabled:"_disabled_iekfz_17",danger:"_danger_iekfz_24","has-prefix":"_has-prefix_iekfz_27","has-suffix":"_has-suffix_iekfz_27",clickable:"_clickable_iekfz_41",readOnly:"_readOnly_iekfz_44",hover:"_hover_iekfz_48",active:"_active_iekfz_54","list-item__prefix":"_list-item__prefix_iekfz_79","list-item__label":"_list-item__label_iekfz_87","list-item__suffix":"_list-item__suffix_iekfz_101","status-indicator":"_status-indicator_iekfz_108","item-icon":"_item-icon_iekfz_114","arbo-icon-state":"_arbo-icon-state_iekfz_119","item-avatar":"_item-avatar_iekfz_122","confirm-action":"_confirm-action_iekfz_131"}}]]),bQ=["aria-activedescendant"],SQ=["innerHTML"],EQ=10,ga=Et(ot({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"218px"},width:{default:"250px"},itemWidth:{default:"250px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel","tab"],setup(e,{expose:t,emit:n}){const o=qt,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},r=e,i=n,a=$(""),l=$(-1),u=$(null),c=$(null),d=$(new Map),h=q(()=>YS(a.value)),f=()=>{const Y=h.value;if(!Y||Y.length<r.minQueryLength)return r.options;if(d.value.has(Y))return d.value.get(Y);const I=r.options.map(z=>({item:z,score:BZ(` ${z.label} `,Y)})).filter(({score:z})=>z>0).sort((z,ee)=>ee.score-z.score).map(({item:z})=>z);return d.value.set(Y,I),I},p=$([]);Je(()=>r.options,()=>{p.value=f()},{immediate:!0,deep:!0});const g=q(()=>r.hasMore&&!r.loading&&!r.loadingMore),v=vr(Y=>{a.value=Y,l.value=-1,i("search",Y)},vi),y=async Y=>{Q.value=0,await v(Y||""),Q.value=1},b=Y=>a.value?$Z(Y,a.value):Y,S=Y=>{const z={[s.ARROW_DOWN]:()=>w(Y),[s.ARROW_UP]:()=>E(Y),[s.ENTER]:()=>x(Y),[s.ESCAPE]:()=>N(Y),[s.TAB]:()=>B(Y)}[Y.key];z&&z()},w=Y=>{Y.preventDefault(),R(1)},E=Y=>{Y.preventDefault(),R(-1)},R=Y=>{const I=p.value.length;if(I===0)return;let z;Y>0?z=(l.value+1)%I:l.value>0?z=l.value-1:z=I-1,l.value=z,D()},D=()=>{ft(()=>{var I;const Y=(I=c.value)==null?void 0:I.querySelectorAll('[role="menuitem"]')[l.value];Y==null||Y.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},x=Y=>{if(Y.preventDefault(),l.value>=0&&l.value<p.value.length){const z=p.value[l.value];A(z,Y)}},N=Y=>{Y.preventDefault(),k()},B=Y=>{i("tab",Y)},A=(Y,I)=>{!Y||Y.disabled||(i("select",Y,I),l.value=-1,k())},P=Y=>{Y>=0&&Y<p.value.length&&(l.value=Y)},k=()=>{i("close")},O=()=>{if(!g.value||!c.value)return;const{scrollTop:Y,clientHeight:I,scrollHeight:z}=c.value;z-(Y+I)<=EQ&&i("loadMore")},L=()=>{var Y,I,z;(Y=c.value)==null||Y.addEventListener("scroll",O),(z=(I=se.value)==null?void 0:I.$el)==null||z.addEventListener("keydown",S)},H=()=>{var Y,I,z;(Y=c.value)==null||Y.removeEventListener("scroll",O),(z=(I=se.value)==null?void 0:I.$el)==null||z.removeEventListener("keydown",S)};Jt(()=>{L()}),Vn(()=>{H()}),Je(()=>r.loading,Y=>{!Y&&p.value.length>0&&(l.value=-1)});const W=Y=>Y?Array.isArray(r.selectedId)?r.selectedId.includes(String(Y.id)):r.selectedId==Y.id:!1,se=$(null);Je(l,()=>{D()});const ie=()=>{ft(()=>{var Y;(Y=se.value)==null||Y.focus()})};t({focus:()=>{ft(()=>{var Y;(Y=se.value)==null||Y.focus()})},reset:()=>{var Y;(Y=se.value)==null||Y.focus(),l.value=-1},query:a,filteredOptions:p,selectedIndex:l,closeDropdown:k,clearSearch:()=>{a.value=""},scrollTo:Y=>{c.value&&(c.value.scrollTop=Y)},selectIndex:Y=>{Y>=0&&Y<p.value.length&&(l.value=Y,D())}});const Q=$(0);Je([()=>r.loading,()=>a.value,()=>r.options,()=>r.loadingMore],()=>{const Y=r.options.length>0&&p.value.length>0,I=!Y&&a.value.length>0,z=!Y&&a.value.length===0;r.loading?Q.value=0:Y?Q.value=1:I?Q.value=2:z&&(Q.value=3)},{immediate:!0,deep:!0});const ne=()=>{i("cancel")};return(Y,I)=>(K(),he("datalist",{ref_key:"searchListRef",ref:u,class:ce([Y.$style["search-list"],Q.value===3||Q.value===2?Y.$style.empty:"",p.value.length>8?Y.$style.scrollable:""]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:cn({width:e.itemWidth||e.width})},[ye(wE,{ref_key:"searchBoxRef",ref:se,modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=z=>a.value=z),class:ce(Y.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:I[1]||(I[1]=z=>y("")),onCancel:ne},null,8,["modelValue","class","disabled"]),be("div",{ref_key:"popupRef",ref:c,class:ce(Y.$style["list-container"])},[kt(Y.$slots,"extra-item",{query:a.value,isEmpty:Q.value===3||Q.value===2,isLoading:r.loading}),(K(!0),he(Pt,null,Dn(p.value,(z,ee)=>Ue((K(),he("div",{key:`${z.id}-${ee}`,role:"menuitem"},[kt(Y.$slots,"item",{item:z,index:ee,selectedIndex:l.value,isSelected:W,handleSelect:A,handleItemHover:P,getHighlightedLabel:b,query:a.value,idx:ee,focused:l.value==ee,focus:ie},()=>[z.hide?qe("",!0):(K(),We(hl,Kt({key:0,ref_for:!0},z,{hover:ee===l.value,selected:W(z),type:z.type,id:`item-${ee}`,"aria-selected":ee===l.value,onClick:me=>A(z,me),onMouseover:me=>P(ee),onEscape:k,itemWidth:e.itemWidth||e.width}),{prefix:Ce(()=>[kt(Y.$slots,"prefix-item",{item:z})]),label:Ce(()=>[a.value?Ue((K(),he("span",{key:0,class:ce(Y.$style.match),innerHTML:b(z.label)},null,10,SQ)),[[V(o),{content:z.label,delay:[1e3,0]}]]):Ue((K(),he("span",{key:1,class:ce(Y.$style["item-label"])},[tt(at(z.label),1)],2)),[[V(o),{content:z.label,delay:[1e3,0]}]])]),suffix:Ce(({hovered:me})=>[kt(Y.$slots,"action",{item:z,isHovered:ee===l.value,hovered:me,selected:l.value==ee})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover","itemWidth"]))])])),[[lr,Q.value===1]])),128)),Q.value===0?kt(Y.$slots,"loading-more",{},()=>[(K(),he(Pt,null,Dn(8,z=>be("div",{class:ce(Y.$style["loading-more"]),key:z},[be("div",{class:ce(Y.$style["loading-skeleton"])},null,2),be("div",{class:ce(Y.$style["loading-skeleton"])},null,2)],2)),64))],void 0,0):qe("",!0),Q.value===2?(K(),he("div",{key:1,class:ce(Y.$style["no-results"])},[kt(Y.$slots,"empty",{query:a.value},()=>[be("div",{class:ce(Y.$style["no-results-content"])},[...I[2]||(I[2]=[be("div",null,[tt(" No results. "),be("br"),tt(" Try another search. ")],-1)])],2)])],2)):qe("",!0),Q.value===3?(K(),he("div",{key:2,class:ce(Y.$style["no-results"])},[kt(Y.$slots,"empty-list",{},()=>[be("div",{class:ce(Y.$style["no-results-content"])},[...I[3]||(I[3]=[be("div",null,"No items available.",-1)])],2)])],2)):qe("",!0),kt(Y.$slots,"footer")],2)],14,bQ))}}),[["__cssModules",{$style:{"search-list":"_search-list_1rcj9_1",empty:"_empty_1rcj9_11",scrollable:"_scrollable_1rcj9_17","list-container":"_list-container_1rcj9_24","item-label":"_item-label_1rcj9_45","loading-state":"_loading-state_1rcj9_53","loading-more":"_loading-more_1rcj9_54","loading-skeleton":"_loading-skeleton_1rcj9_65","is-loading":"_is-loading_1rcj9_72","no-results":"_no-results_1rcj9_127","no-results-content":"_no-results-content_1rcj9_134",title:"_title_1rcj9_137",tips:"_tips_1rcj9_143",match:"_match_1rcj9_157","skeleton-loading":"_skeleton-loading_1rcj9_1"}}]]),Au=ot({__name:"AvatarProfile",props:{user:{},showProfile:{type:Boolean,default:!0},apiUpdateFunction:{},appendTo:{}},setup(e){const t=E8,n=e,o=$(n.appendTo||void 0),s=()=>({user:n.showProfile?n.user:void 0,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:n.apiUpdateFunction,appendTo:o.value}),r=$(s());Je(()=>n,()=>{setTimeout(()=>{ft(()=>{o.value=n.appendTo||void 0,r.value=s()})},50)},{immediate:!0,deep:!0});const i=q(()=>ln.getInstance().getItem("user.ws_user_role_id")),a=q(()=>({id:n.user.id,name:n.user.name,profile_image:n.user.profile_image,color:n.user.color,initial:n.user.initial,isMe:n.user.id===i.value}));return(l,u)=>Ue((K(),We(wf,KG(v1(a.value)),null,16)),[[V(t),r.value]])}}),_Q={class:"avatar-wrapper"},RQ={class:"assignee-label"},TQ=Et(ot({__name:"AssigneeItem",props:{user:{},hovered:{type:Boolean},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},multipleSelect:{type:Boolean,default:!1},isMe:{type:Boolean},appendTo:{},apiUpdateFunction:{}},emits:["select","deselect","reselect"],setup(e,{emit:t}){const n=qt,o=e,s=q(()=>({name:o.user.name,id:o.user.id,profile_image:o.user.profile_image,color:{bgColor:o.user.color.bgColor,textColor:o.user.color.textColor},initial:o.user.initial})),r=zg(),i=q(()=>{if(!a.value&&!o.hover&&!o.focused||!r.actions)return 0;let l=0;const u=c=>{c.forEach(d=>{d.type===Pt&&Array.isArray(d.children)?u(d.children):d.type!==to&&d.type!==Wa&&l++})};return u(r.actions()),l}),a=$(!1);return(l,u)=>(K(),he("div",{class:ce(["assignee-selector-item",{hovered:a.value||o.hovered,disabled:o.disabled,selected:o.selected,single:i.value==0,focused:o.focused}]),style:cn({"--actions-count":i.value}),onMouseenter:u[0]||(u[0]=c=>a.value=!0),onMouseleave:u[1]||(u[1]=c=>a.value=!1)},[be("div",_Q,[ye(Au,{user:s.value,"show-profile":!0,"append-to":o.appendTo,"api-update-function":o.apiUpdateFunction},null,8,["user","append-to","api-update-function"]),o.multipleSelect?(K(),he("div",{key:0,class:ce(["avatar-indicator",[o.selected?"remove":"add"]])},[o.selected?(K(),We(gt,{key:0,src:"CircleXMark"})):(K(),We(gt,{key:1,src:"CirclePlus"}))],2)):qe("",!0)]),Ue((K(),he("div",RQ,[kt(l.$slots,"name",{},()=>[tt(at(o.user.name),1)],!0)])),[[V(n),{content:o.user.name,delay:[1e3,0]}]]),a.value||o.hovered||o.focused?kt(l.$slots,"actions",{},void 0,!0,0):qe("",!0)],38))}}),[["__scopeId","data-v-4de522be"]]),DQ={class:"unassign-icon"},CE=Et(ot({__name:"UnassignBtn",props:{actived:{type:Boolean,default:!1},label:{default:"No assignee"},borderLeft:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t,o=()=>{n("click")};return(s,r)=>(K(),We(V(bt),{variant:"menu-item",onClick:o,actived:e.actived,style:cn({"border-top-width":0,"border-bottom-width":0,"border-left-width":e.borderLeft?"4px":"0"})},{prefix:Ce(()=>[be("div",DQ,[kt(s.$slots,"icon",{},()=>[r[0]||(r[0]=be("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[be("path",{d:"M2.17953 2.75285C1.98276 2.5977 1.69706 2.63365 1.54191 2.83042C1.38677 3.0272 1.42271 3.3129 1.61949 3.46805L12.8204 12.2471C13.0172 12.4023 13.3029 12.3663 13.458 12.1696C13.6132 11.9728 13.5772 11.6871 13.3805 11.532L8.13003 7.41675C9.16308 7.14051 9.9218 6.19827 9.9218 5.07818C9.9218 3.7405 8.83765 2.65636 7.49997 2.65636C6.17932 2.65636 5.10653 3.71212 5.07815 5.0252L2.17953 2.75285ZM6.4461 8.41386C4.67136 8.51035 3.26179 9.98237 3.26179 11.7817C3.26179 12.092 3.51343 12.3436 3.82372 12.3436H11.1762C11.25 12.3436 11.32 12.3304 11.3843 12.3039L6.4461 8.41386Z",fill:"#a6a6a6"})],-1))],!0)])]),default:Ce(()=>[kt(s.$slots,"label",{},()=>[tt(at(e.label),1)],!0)]),_:3},8,["actived","style"]))}}),[["__scopeId","data-v-ec3b3a15"]]),xQ=["innerHTML"],qO=20,YO=Et(ot({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{}},emits:["updated","cancel","update-start","update-failed","update-completed"],setup(e,{expose:t,emit:n}){const o=qt,s=e,{id:r}=Ag(s),i=n,a=z=>{var me,xe;const ee=(xe=(me=s.params)==null?void 0:me.api)==null?void 0:xe.getRowNode(String(r.value));ee==null||ee.setDataValue("assignees",Xm(z.assignees)),I("updated",z)},l=$(!1),u=$(!1),c=$(null),d=$(1),h=$(!0),f=$(0),p=$(""),g=En("bulkUpdate",$(!1)),v=En("isSelectAll",$(!1)),y=q(()=>{var z;return g.value&&v.value?[]:(z=s.ids)!=null&&z.length?s.ids:[String(r.value)]}),{unAssignAll:b,replaceAssignees:S,handleSelect:w,assigneeList:E,mergedOptions:R,selectedUserIds:D}=Sv({...s,entityId:s.entityId,updateRowData:a,value:s.value,isBulkUpdate:g,isSelectAll:v,errorCallback:()=>{I("update-failed")}},y),{apiServices:x}=no(!g.value,s),N=En("workspaceId"),B=async(z=1,ee="",me=!1)=>{var de,j,oe,ae,_,M;if(!x.value)throw console.error("API service or item identifiers are undefined",x.value),new Error("API service or item identifiers are undefined");if(me?u.value=!0:l.value=!0,c.value=null,!((de=x.value)!=null&&de.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");const xe=(s.ids??(s.id?[s.id]:[])).map(String);try{let re;xe.length==0?re=await((j=x.value)==null?void 0:j.getEntityUserRoles({workspaceId:String(N),page:z,per_page:qO,display_name_like:ee.trim(),entity_ids:String(s.entityId)})):re=await((oe=x.value)==null?void 0:oe.multipleAssignableUser({workspaceId:String(N),itemIds:xe,page:z,perPage:qO,q:ee.trim(),entityId:String(s.entityId)}));const pe=((ae=ad(re.data))==null?void 0:ae.map(bv))??[];E.value=me?Kc(E.value,pe,"id"):pe,f.value=re.meta.total,h.value=(((_=re==null?void 0:re.meta)==null?void 0:_.current_page)||0)<(((M=re==null?void 0:re.meta)==null?void 0:M.last_page)||0),d.value=z}catch(re){console.error("Error fetching assignable users:",re),c.value="Failed to load assignable users"}finally{l.value=!1,u.value=!1}},A=()=>{!u.value&&h.value&&B(d.value+1,p.value,!0)},P=vr(async z=>{p.value=z,await B(1,z,!1)},vi),k=()=>B(1,p.value,!1);Jt(()=>{var z;(z=L.value)==null||z.focus()}),t({getValue:()=>{var z;return(z=R.value.find(ee=>ee.selected))==null?void 0:z.value},refresh:k,clearInternal:()=>{D.value=[]},focus:()=>{var z;(z=L.value)==null||z.focus()}});const O=()=>{const z=ln.getInstance().getItem("BASE_URL"),ee=Zo({type:"access_setting",config:{baseDomain:z,ws_code:s.workspaceId,entity_id:N}}).url;window.open(ee,"_blank")},L=$(null);Jt(()=>{ft(()=>{var z;(z=L.value)==null||z.focus()})}),Je([()=>s.id,()=>s.workspaceId],()=>{B()},{deep:!0,immediate:!0});const H=z=>{var me;const ee=ln.getInstance().getItem("ws.code");return((me=x.value)==null?void 0:me.getUserInformation(ee,z))||Promise.resolve(null)},W=async(z,ee,me)=>{ee.preventDefault(),ee.stopPropagation(),ee.stopImmediatePropagation(),I("update-start");try{const xe=await w(z);if(xe)I("update-completed",xe);else throw new Error("Failed to update assignees")}catch(xe){I("update-failed"),console.error("Error updating assignees:",xe)}},se=async()=>{try{I("update-start");const z=await b();if(z)I("update-completed",z);else throw new Error("Failed to unassign all assignees")}catch(z){I("update-failed"),console.error("Error unassigning all assignees:",z)}finally{}},ie=async z=>{try{I("update-start");const ee=await S(z);if(ee)I("update-completed",ee);else throw new Error("Failed to replace assignees")}catch(ee){I("update-failed"),console.error("Error replacing assignees:",ee)}finally{}},Q=()=>{var z,ee;i("cancel"),(ee=(z=s.params)==null?void 0:z.api)==null||ee.stopEditing()};ri("popupAttachRef",L);const ne=$(),Y=$(!1),I=(z,ee)=>{switch(z){case"updated":i("updated",ee);break;case"update-start":i("update-start");break;case"update-failed":i("update-failed");break;case"update-completed":i("update-completed",ee);break}};return Jt(()=>{ft(()=>{setTimeout(()=>{Y.value=!0},50)})}),(z,ee)=>(K(),he("div",{class:"assigne-editor-wrapper",ref_key:"wrapperRef",ref:ne},[ye(ga,Kt({"selected-id":V(D)},{...s},{options:V(R),loading:l.value,ref_key:"popupRef",ref:L,"loading-more":u.value,"has-more":h.value,onSelect:ee[0]||(ee[0]=(me,xe)=>{W(me,xe)}),"data-wrapper":"true",onSearch:V(P),onLoadMore:A,onCancel:Q,onClose:Q}),Lh({"extra-item":Ce(({isEmpty:me,isLoading:xe})=>[!me&&!xe?(K(),We(CE,{key:0,onClick:se,actived:!1,label:"Unassign"},{icon:Ce(()=>[ye(gt,{src:"UserXMark",source:"remote"})]),_:1})):qe("",!0)]),item:Ce(({item:me,selectedIndex:xe,isSelected:de,handleItemHover:j,getHighlightedLabel:oe,query:ae,idx:_,focused:M})=>[ye(TQ,{user:me.data,"multiple-select":!0,"append-to":ne.value,isMe:!1,hover:_===xe,selected:de(me),focused:M,onClick:Ht(re=>W(me,re,"click"),["stop","prevent"]),onMouseover:re=>j(_),"api-update-function":H},{name:Ce(()=>[ae?Ue((K(),he("span",{key:0,class:ce([z.$style["item-label"],z.$style.match]),style:{flex:"1"},innerHTML:oe(me.label)},null,10,xQ)),[[V(o),{content:me.label}]]):Ue((K(),he("span",{key:1,class:ce(z.$style["item-label"]),style:{flex:"1"}},[tt(at(me.label),1)],2)),[[V(o),{content:me.label}]])]),actions:Ce(()=>[Ue((K(),We(bt,{tabindex:-1,variant:["secondary","icon"],size:"small",label:"",onClick:Ht(re=>{var pe;return ie((pe=me.data)==null?void 0:pe.id)},["stop"])},{default:Ce(()=>[ye(gt,{src:"PeopleArrows"})]),_:1},8,["onClick"])),[[V(o),"Unassign others and reassign"]])]),_:2},1032,["user","append-to","hover","selected","focused","onClick","onMouseover"])]),"empty-list":Ce(()=>[be("div",{class:ce(z.$style["empty-state"])},[ee[3]||(ee[3]=tt(" No assignee available. ",-1)),ee[4]||(ee[4]=be("br",null,null,-1)),ye(bt,{onClick:O,variant:["tertiary"],size:"small"},{default:Ce(()=>[...ee[2]||(ee[2]=[tt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[c.value?{name:"error",fn:Ce(()=>[be("div",{class:ce(z.$style["error-message"])},[tt(at(c.value)+" ",1),ye(bt,{onClick:k,size:"small"},{default:Ce(()=>[...ee[1]||(ee[1]=[tt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"])],512))}}),[["__cssModules",{$style:{action:"_action_nv6on_1","item-assignee":"_item-assignee_nv6on_6","item-action":"_item-action_nv6on_6","item-label":"_item-label_nv6on_16","error-message":"_error-message_nv6on_25","empty-state":"_empty-state_nv6on_35","skeleton-avatar":"_skeleton-avatar_nv6on_48"}}]]),AQ={key:0,class:"inner"},Uf=Et(ot({__name:"BulkUpdateBtnWrapper",props:{isUpdating:{type:Boolean,default:!1},disabled:{type:Boolean}},emits:["onVisibleChange"],setup(e,{expose:t,emit:n}){const o=e,s=$(null),{triggerRef:r,popupRef:i,isVisible:a,hide:l,toggle:u,show:c}=vo({toggleOnClick:!0,zIndex:2,disabled:o.disabled,placement:"top",appendTo:s.value||void 0}),d=$(null),h=v=>{v.key==="Escape"&&i.value&&l()},f=Po({isShow:!1,isRender:!1});Jt(()=>{var y;const v=d.value instanceof HTMLElement?d.value:(y=d.value)==null?void 0:y.$el;v&&v.addEventListener("keydown",h)}),Vn(()=>{var y;const v=d.value instanceof HTMLElement?d.value:(y=d.value)==null?void 0:y.$el;v&&v.removeEventListener("keydown",h)});const p=n,g=(v,y)=>{f.isShow=v,f.isRender=y};return Je(()=>a.value,(v,y)=>{v?ft(()=>{a.value&&g(!0,!0)}):f.isShow=!1,p("onVisibleChange",v,y)}),t({hide:()=>{console.log(" "),l(),g(!1,!0)},isVisible:a,open:()=>{c(),g(!0,!0)},destroy(){l(),g(!1,!1)}}),(v,y)=>(K(),he("div",{class:"bulk-update-btn-wrapper",ref_key:"containerRef",ref:s},[be("div",{class:"trigger-slot",ref_key:"triggerRef",ref:r},[kt(v.$slots,"trigger",{isVisible:V(a),hide:V(l),disabled:o.isUpdating||o.disabled,popupRef:V(i),triggerRef:V(r),toggle:V(u)},void 0,!0)],512),be("div",{class:"popup-slot",ref_key:"popupRef",ref:i},[f.isRender?Ue((K(),he("div",AQ,[kt(v.$slots,"popup",{isVisible:V(a),hide:V(l),popupRef:V(i),triggerRef:V(r),toggle:V(u),open:V(c)},void 0,!0)],512)),[[lr,f.isShow]]):qe("",!0)],512)],512))}}),[["__scopeId","data-v-af84b00b"]]),IQ=ot({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},ids:{},variant:{},selectedAll:{type:Boolean}},emits:["update","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=e;ri("bulkUpdate",!0);const o=$(!1),s=t,r=$(null),i=()=>{var d;o.value=!0,s("update-start"),(d=l.value)==null||d.hide()},a=(d,h)=>{var f,p;o.value=!1,d?(s("update-completed",h),(f=l.value)==null||f.destroy()):(s("update-failed"),(p=l.value)==null||p.open())},l=$(null),u=d=>{var h;s("update",d),(h=r.value)==null||h.clearInternal()},c=(d,h)=>{ft(()=>{var f,p;d?(f=r.value)==null||f.focus():(p=r.value)==null||p.clearInternal()})};return(d,h)=>(K(),We(Uf,{ref_key:"wrapperRef",ref:l,isUpdating:o.value,disabled:n.disabled||o.value,onOnVisibleChange:c},{trigger:Ce(({hide:f,disabled:p})=>[ye(bt,{variant:n.variant,loading:o.value,disabled:p,onEscape:f},{default:Ce(()=>[ye(gt,{src:"UserPlus",class:"icon"}),h[2]||(h[2]=tt(" Assignee ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:Ce(({hide:f})=>[ye(YO,Kt({ref_key:"assigneeGroupEditorRef",ref:r},n,{ids:e.ids,onUpdated:u,onUpdateStart:i,onUpdateFailed:h[0]||(h[0]=p=>a(!1)),onUpdateCompleted:h[1]||(h[1]=p=>a(!0,p)),onCancel:f}),null,16,["ids","onCancel"])]),default:Ce(()=>[h[3]||(h[3]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),Wf=["start-input","due-input","prev-btn","month-btn","year-btn","next-btn","month-selection","year-selection","date-selection","today-btn","cancel-btn","save-btn"],PQ=new Set(["Tab","Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),fl=(e,t)=>{const n=o=>{var s,r;if(o.key==="Tab"){const i=o.shiftKey||o.metaKey;o.preventDefault(),o.stopImmediatePropagation(),o.stopPropagation();const a=document.activeElement,l=(s=a==null?void 0:a.dataset)==null?void 0:s.index;if(l){let u=Wf.indexOf(l);const c=i?-1:1;for(const d of Wf){u=(u+c+Wf.length)%Wf.length;const h=Wf[u],f=document.querySelector(`[data-index="${h}"]`);if(f){f.focus();return}}}}else if(o.key==="Enter")(r=o.target)==null||r.dispatchEvent(new MouseEvent("click",{bubbles:!0}));else if(o.key==="Escape"){o.stopPropagation(),o.stopImmediatePropagation();const i=document.querySelector('[data-index="calendar-wrapper"]');i==null||i.focus()}};if(PQ.has(e.key))e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n(e),t&&t(e);else return},kQ=["aria-label"],FQ=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],OQ={style:{flex:"1"}},MQ=Et(ot({__name:"MainCalendar",props:$D({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1},hasWarning:{type:Boolean,default:!0},disabledTooltip:{default:"This date is disabled"},parentConfig:{}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:$D(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel","gotoToday"],["update:tracingCase"]),setup(e,{expose:t,emit:n}){const o=qt,s=$(null),r=e,i=q(()=>r.startDate&&r.endDate),a=IW(e,"tracingCase"),l=n,u=$(r.year),c=$(r.month),d=q(()=>{var xe,de,j;const I=oe=>oe==null?void 0:oe.toFormat("yyyy-MM-dd"),z=(xe=r.parentConfig)==null?void 0:xe.parentName,ee=(de=r.parentConfig)==null?void 0:de.parentStartDate,me=(j=r.parentConfig)==null?void 0:j.parentDueDate;return{smaller:`Before the ${z} start date (${I(ee)})`,larger:`After the ${z} due date (${I(me)})`,none:""}});Je(()=>[r.year,r.month],([I,z])=>{u.value=I,c.value=z});const h=q(()=>ut.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}).setLocale(r.locale||"en-US").toFormat("LLLL yyyy")),f=q(()=>ut.now().setZone(r.timezone)),p=q(()=>r.startDate?ut.fromJSDate(r.startDate,{zone:r.timezone}):null),g=q(()=>r.endDate?ut.fromJSDate(r.endDate,{zone:r.timezone}):null),v=$(p.value),y=$(g.value),b=$(p.value),S=$(g.value);Je([p,g],()=>{r.requireConfirm||(v.value=p.value,y.value=g.value,b.value=p.value,S.value=g.value)},{immediate:!0});const w=q(()=>r.requireConfirm?v.value:p.value),E=q(()=>r.requireConfirm?y.value:g.value);Je(()=>r.activeField,I=>{const z=I==="start"?w.value:E.value;z&&(u.value=z.year,c.value=z.month)}),Je(()=>{var I,z;return[(I=w.value)==null?void 0:I.toISODate(),(z=E.value)==null?void 0:z.toISODate(),r.activeField]},()=>{const I=r.activeField==="start"?w.value:E.value;I&&(I.year!==u.value||I.month!==c.value)&&(u.value=I.year,c.value=I.month)});function R(I){return I.setZone("utc")}const D=$("");function x(I){D.value=I.toISODate()||"",ft(()=>{const z=document.querySelector(`.arbo-calendar-day[data-date="${D.value}"]`);z==null||z.focus()})}Je(()=>{var I,z;return[u.value,c.value,r.activeField,(I=w.value)==null?void 0:I.toISODate(),(z=E.value)==null?void 0:z.toISODate()]},()=>{const I=r.activeField==="start"?w.value:E.value;let z;I&&I.year===u.value&&I.month===c.value?z=I:w.value&&w.value.year===u.value&&w.value.month===c.value?z=w.value:z=f.value,x(z)});function N(I){return I.toFormat("d")}const B=q(()=>{var M,re,pe,_e,we,X,U,te;const I=ut.fromObject({year:u.value,month:c.value,day:1},{zone:r.timezone}),z=I.weekday,ee=r.weekStart===1?(z+6)%7:z%7;let me=I.minus({days:ee});const xe=[],de=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"}),j=rm(),oe=(re=(M=r.parentConfig)==null?void 0:M.parentStartDate)==null?void 0:re.startOf("day").toMillis(),ae=(_e=(pe=r.parentConfig)==null?void 0:pe.parentDueDate)==null?void 0:_e.endOf("day").toMillis();console.log("calculating classes for cursor:",{cursor:me.toISODate(),parentStartMs:oe,parentDueMs:ae,parentConfig:r.parentConfig});for(let le=0;le<42;le++){const Ye=[];me.month!==c.value&&Ye.push(j["is-outside"]),me.hasSame(f.value,"day")&&Ye.push(j["is-today"]),w.value&&me.hasSame(w.value,"day")&&Ye.push(j["is-selected-start"]),E.value&&me.hasSame(E.value,"day")&&Ye.push(j["is-selected-end"]),w.value&&E.value&&me>w.value&&me<E.value&&Ye.push(j["is-in-range"]);const Be=N(me),ze=de[me.weekday-1]||"";let Oe="none";const nt=me.startOf("day").toMillis();oe!==void 0&&nt<oe?Oe="smaller":ae!==void 0&&nt>ae&&(Oe="larger"),console.log("dayMs:",me.startOf("day").toFormat("yyyy-MM-dd"),"parentStartMs:",(X=(we=r.parentConfig)==null?void 0:we.parentStartDate)==null?void 0:X.toFormat("yyyy-MM-dd"),"parentDueMs:",(te=(U=r.parentConfig)==null?void 0:U.parentDueDate)==null?void 0:te.toFormat("yyyy-MM-dd"),"resulting warning:",Oe),xe.push({dt:me,iso:me.toISODate()||"",label:me.toFormat("d"),displayLabel:Be,weekdayLabel:ze,aria:me.setLocale(r.locale||"en-US").toFormat("cccc, d LLLL yyyy"),warning:Oe,classes:Ye}),me=me.plus({days:1})}const _=[];for(let le=0;le<6;le++)_.push(xe.slice(le*7,le*7+7));return console.log("cells:",_),_}),A=q(()=>{const I=rd.weekdays(r.weekdayLabelStyle||"short",{locale:r.locale||"en-US"});return r.weekStart===1?I:[I[6],...I.slice(0,6)]});function P(I,z,ee){const me=I==="start"?z.startOf("day"):z.endOf("day"),xe=R(me),de={year:me.year,month:me.month,day:me.day,utc:xe.toISO()||""};I==="start"?(l("select-start",de,ee??!0),l("select-start-utc",de.utc)):(l("select-end",de),l("select-end-utc",de.utc))}function k(I){let z=u.value,ee=c.value+I;for(;ee<1;)ee+=12,z-=1;for(;ee>12;)ee-=12,z+=1;u.value=z,c.value=ee,l("update:year",z),l("update:month",ee)}function O(I){const ee=(D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value).plus({days:I});ee.month===c.value&&ee.year===u.value&&x(ee)}function L(I=!1){const ee=(D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value).weekday%7,me=I?6-ee:-ee;O(me)}const H=I=>{W(I)};function W(I){switch(I.preventDefault(),I.stopPropagation(),I.key){case"ArrowLeft":I.preventDefault(),O(-1);break;case"ArrowRight":I.preventDefault(),O(1);break;case"ArrowUp":I.preventDefault(),O(-7);break;case"ArrowDown":I.preventDefault(),O(7);break;case"Home":I.preventDefault(),L(!1);break;case"End":I.preventDefault(),L(!0);break;case"PageUp":I.preventDefault(),k(I.shiftKey?-12:-1);break;case"PageDown":I.preventDefault(),k(I.shiftKey?12:1);break;case"Enter":case" ":{I.preventDefault();const z=D.value?ut.fromISO(D.value,{zone:r.timezone}):f.value,ee=B.value.flat().find(me=>me.iso===z.toISODate());ee&&ie(ee);break}}}const se=I=>{const z=ut.now().setZone(r.timezone);u.value=z.year,c.value=z.month,l("update:year",z.year),l("update:month",z.month),x(z),l("gotoToday")};function ie(I){var _e,we;const z=!!p.value,ee=!!g.value,me=r.activeField,xe=((_e=p.value)==null?void 0:_e.toISODate())||"null",de=((we=g.value)==null?void 0:we.toISODate())||"null",j=I.dt.toISODate()||"",oe=(X,U)=>{a.value={case:X,behavior:U}},ae=()=>`Selected start ${j} > existing end ${de} -> reset both to ${j}`,_=()=>`Selected end ${j} < existing start ${xe} -> reset both to ${j}`,M=()=>{P("start",I.dt,!0),P("end",I.dt),l("update:activeField","end")},re=(X=!1)=>{P("start",I.dt,X),X&&l("update:activeField","end")},pe=(X=!1)=>{P("end",I.dt),X&&l("close")};if(z&&ee){me==="start"?g.value&&I.dt>g.value?(M(),oe("INVERT_RANGE_FROM_START",ae())):(re(!1),oe("UPDATE_START_IN_RANGE",`Updated start from ${xe} to ${j}; end remains ${de}`)):p.value&&I.dt<p.value?(M(),oe("INVERT_RANGE_FROM_END",_())):(pe(!1),oe("UPDATE_END_IN_RANGE",`Updated end from ${de} to ${j}; start remains ${xe}`));return}if(!z&&ee&&me==="start"&&g.value&&I.dt>g.value){M(),oe("CREATE_RANGE_FROM_LATE_START",ae());return}if(z&&!ee&&me==="end"&&p.value&&I.dt<p.value){M(),oe("CREATE_RANGE_FROM_EARLY_END",_());return}if(!z&&!ee){if(me==="start"){re(!0),oe("INIT_START",`Picked start ${j}; awaiting end selection`);return}pe(r.immediatelyUpdate),oe("INIT_END",`Picked end ${j}; awaiting start selection`);return}if(!z&&ee){if(me==="start"){re(!0),oe("FILL_MISSING_START",`Inserted start ${j}; existing end ${de}`);return}pe(!1),oe("STRICT_UPDATE_END_ONLY",`Updated end to ${j}; start still null`);return}if(z&&!ee){if(me==="start"){re(!0),oe("RESELECT_START_BEFORE_END",`Replaced start with ${j}; end still null, switching to end`);return}pe(r.immediatelyUpdate),oe("FILL_MISSING_END",`Picked end ${j}; start ${xe}`);return}}function Q(){b.value=v.value,S.value=y.value,l("confirm")}function ne(){v.value=b.value,y.value=S.value,l("cancel")}function Y(){ft(()=>{var I;(I=s.value)==null||I.focus()})}return Jt(()=>{Y()}),t({focus:Y}),(I,z)=>(K(),he("div",{ref_key:"calendarRef",ref:s,class:ce([I.$style["arbo-calendar"],{[I.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":h.value,tabindex:"0"},[be("div",{class:ce([I.$style["arbo-calendar-header"],I.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),he(Pt,null,Dn(A.value,ee=>(K(),he("div",{key:ee,class:ce(I.$style["arbo-calendar-weekday"]),role:"columnheader"},at(ee),3))),128))],2),be("div",{class:ce(I.$style["arbo-calendar-weeks"]),"data-index":"date-selection",tabindex:"0",onKeydownCapture:z[0]||(z[0]=Ht(ee=>V(fl)(ee,H),["prevent","stop"]))},[(K(!0),he(Pt,null,Dn(B.value,(ee,me)=>(K(),he("div",{key:me,class:ce(I.$style["arbo-calendar-week"])},[(K(!0),he(Pt,null,Dn(ee,xe=>Ue((K(),he("button",{key:xe.iso,class:ce([I.$style["arbo-calendar-day"],xe.classes,{[I.$style["is-focused"]]:xe.iso===D.value},{[I.$style["is-warning"]]:xe.warning!=="none"}]),disabled:r.disabled,readOnly:r.readOnly,"aria-label":xe.aria,"data-date":xe.iso,"data-weekday":xe.weekdayLabel,tabindex:xe.iso===D.value?0:-1,onClick:de=>ie(xe)},[tt(at(xe.displayLabel),1)],10,FQ)),[[V(o),{content:r.disabled||r.readOnly?r.disabledTooltip:d.value[xe.warning],bypassOverflowCheck:!0}]])),128))],2))),128))],34),r.hasWarning?(K(),he("div",{key:0,class:ce(I.$style["warning-selection"])},[ye(gt,{src:"InfoCircle",size:"16",color:"var(--tessr-snackbar-fg-warning, #F7941D)"}),z[2]||(z[2]=tt(" Outside the parent folder's date range. You can still confirm. ",-1))],2)):qe("",!0),r.readOnly?qe("",!0):(K(),he("div",{key:1,class:ce(I.$style["arbo-calendar-actions"])},[be("div",OQ,[Ue((K(),We(bt,{variant:"secondary",size:"medium",onClick:z[1]||(z[1]=ee=>se()),onKeydown:V(fl),"data-index":"today-btn"},{prefix:Ce(()=>[ye(gt,{src:"CalendarDay"})]),_:1},8,["onKeydown"])),[[V(o),"Today"]])]),ye(bt,{disabled:r.disabled,readOnly:r.readOnly,onKeydown:V(fl),variant:"secondary",size:"medium",onClick:ne,"data-index":"cancel-btn"},{default:Ce(()=>[tt(at(r.cancelLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"]),ye(bt,{disabled:r.disabled||r.disableConfirm,readOnly:r.readOnly,variant:"primary",size:"medium","data-index":"save-btn",onKeydown:V(fl),onClick:Q},{default:Ce(()=>[tt(at(r.confirmLabel),1)]),_:1},8,["disabled","readOnly","onKeydown"])],2))],10,kQ))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_wwtcu_1","arbo-calendar-week":"_arbo-calendar-week_wwtcu_2","arbo-calendar-day":"_arbo-calendar-day_wwtcu_3","arbo-calendar":"_arbo-calendar_wwtcu_2","arbo-calendar-nav":"_arbo-calendar-nav_wwtcu_36","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_wwtcu_44","arbo-calendar-nav-label":"_arbo-calendar-nav-label_wwtcu_51","arbo-calendar-weekday":"_arbo-calendar-weekday_wwtcu_56","arbo-calendar-weeks":"_arbo-calendar-weeks_wwtcu_61","is-today":"_is-today_wwtcu_94","is-selected-start":"_is-selected-start_wwtcu_99","is-selected-end":"_is-selected-end_wwtcu_107","is-outside":"_is-outside_wwtcu_127","is-focused":"_is-focused_wwtcu_130","is-in-range":"_is-in-range_wwtcu_135","is-warning":"_is-warning_wwtcu_140","arbo-calendar-actions":"_arbo-calendar-actions_wwtcu_153","warning-selection":"_warning-selection_wwtcu_161","arbo-calendar-btn":"_arbo-calendar-btn_wwtcu_178",cancel:"_cancel_wwtcu_187",confirm:"_confirm_wwtcu_192"}}]]),NQ=["onClick"],LQ=["variant","onClick"],VQ=Et(ot({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{expose:t,emit:n}){const o=e,s=q(()=>{if(o.monthLabels&&o.monthLabels.length===12)return o.monthLabels;const k=o.locale||"en-US",O=o.monthLabelStyle||"short",L=new Intl.DateTimeFormat(k,{month:O,timeZone:"UTC"});return Array.from({length:12},(W,se)=>L.format(new Date(Date.UTC(2020,se,1))))}),r=n,i=$(o.year),a=$(o.month),l=$(o.year);Je(()=>o.year,k=>{k!==i.value&&(i.value=k,l.value=k)}),Je(()=>o.month,k=>{k!==a.value&&(a.value=k)});const u=$("days");function c(k){u.value!==k&&(u.value=k,r("mode-change",k))}const d=q(()=>o.minYear),h=q(()=>o.maxYear),f=q(()=>{const k=o.yearSpan;return l.value-l.value%k}),p=q(()=>f.value+o.yearSpan-1);function g(){const k=o.yearSpan,O=f.value-k;O>=d.value&&(l.value=O)}function v(){const k=o.yearSpan,O=f.value+k;O<=h.value&&(l.value=O)}const y=q(()=>f.value-o.yearSpan<d.value),b=q(()=>p.value+o.yearSpan>h.value),S=q(()=>{const k=o.yearSpan;return Math.ceil(k/3)});function w(k){const L=f.value+(k-1)*3;return Array.from({length:3},(H,W)=>L+W).filter(H=>H<=p.value)}function E(){u.value==="months"?c("days"):c("months")}function R(){u.value==="years"?c("days"):c("years")}function D(k){i.value=k,l.value=k,r("update:year",k),r("year-selected",k),c("months")}function x(k){a.value=k,r("update:month",k),r("month-selected",k),c("days")}function N(){if(u.value==="days"){let k=i.value,O=a.value-1;if(O<1&&(O=12,k--),k<d.value)return;i.value=k,a.value=O,r("update:year",k),r("update:month",O)}else if(u.value==="months"){if(i.value-1<d.value)return;i.value--,r("update:year",i.value)}else u.value==="years"&&g()}function B(){if(u.value==="days"){let k=i.value,O=a.value+1;if(O>12&&(O=1,k++),k>h.value)return;i.value=k,a.value=O,r("update:year",k),r("update:month",O)}else if(u.value==="months"){if(i.value+1>h.value)return;i.value++,r("update:year",i.value)}else u.value==="years"&&v()}const A=q(()=>u.value==="days"?i.value===d.value&&a.value===1:u.value==="months"?i.value-1<d.value:y.value),P=q(()=>u.value==="days"?i.value===h.value&&a.value===12:u.value==="months"?i.value+1>h.value:b.value);return t({setNavigation:(k,O)=>{i.value=k,a.value=O}}),(k,O)=>(K(),he("div",{class:ce([k.$style["cal-nav-wrapper"]])},[kt(k.$slots,"selection"),u.value==="days"?(K(),he("div",{key:0,class:ce(k.$style["cal-nav-bar"]),"aria-label":"Calendar navigation"},[ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Previous",disabled:A.value,label:"",onClick:N,"data-index":"prev-btn",onKeydownCapture:po(Ht(N,["prevent","stop"]),["enter"]),onKeydown:V(fl)},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"]),be("div",{class:ce(k.$style["cal-nav-center"])},[ye(bt,{"data-index":"month-btn",variant:"secondary",onClick:E,onKeydown:V(fl)},{default:Ce(()=>[tt(at(s.value[a.value-1]),1)]),_:1},8,["onKeydown"]),ye(bt,{variant:"secondary",onClick:R,"data-index":"year-btn",onKeydown:V(fl)},{default:Ce(()=>[tt(at(i.value),1)]),_:1},8,["onKeydown"])],2),ye(bt,{"data-index":"next-btn",variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:P.value,label:"",onClick:B,onKeydownCapture:po(Ht(B,["prevent","stop"]),["enter"]),onKeydown:V(fl)},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled","onKeydownCapture","onKeydown"])],2)):qe("",!0),u.value==="years"?(K(),he("div",{key:1,class:ce(k.$style["year-grid"])},[be("div",{class:ce(k.$style["year-grid-header"])},[ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.prev]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"]),be("div",{class:ce(k.$style["range-label"])},at(f.value)+" - "+at(p.value),3),ye(bt,{variant:"tertiary",class:ce([k.$style["cal-nav-btn"],k.$style.next]),"aria-label":"Next",disabled:b.value,"prefix-icon":"AnglesRight",label:"",onClick:v},{default:Ce(({hovered:L})=>[ye(gt,{src:"AnglesRight",source:"remote",color:L?"#3C9BFA":"#6B6B6B"},null,8,["color"])]),_:1},8,["class","disabled"])],2),be("div",{class:ce(k.$style["year-grid-body"]),role:"grid","data-index":"year-selection"},[(K(!0),he(Pt,null,Dn(S.value,L=>(K(),he("div",{key:"yr-row-"+L,class:ce(k.$style["year-grid-row"])},[(K(!0),he(Pt,null,Dn(w(L),H=>(K(),he("a",{key:H,tabindex:"0",class:ce([k.$style["year-cell"],{[k.$style.selected]:H===i.value}]),onClick:W=>D(H)},at(H),11,NQ))),128))],2))),128))],2)],2)):u.value==="months"?(K(),he("div",{key:2,class:ce(k.$style["month-grid"]),"aria-label":"Select month","data-index":"month-selection"},[be("div",{class:ce(k.$style.months)},[(K(!0),he(Pt,null,Dn(s.value,(L,H)=>(K(),he("a",{tabindex:"0",key:L,variant:H+1===a.value?"primary":"text",class:ce([k.$style["month-cell"],{[k.$style.selected]:H+1===a.value}]),onClick:W=>x(H+1)},at(L),11,LQ))),128))],2)],2)):(K(),he("div",{key:3,class:ce(k.$style["days-slot"])},[kt(k.$slots,"default",{year:i.value,month:a.value,mode:u.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_1hrlu_1","cal-nav-bar":"_cal-nav-bar_1hrlu_10","cal-nav-btn":"_cal-nav-btn_1hrlu_18",prev:"_prev_1hrlu_31","year-grid-header":"_year-grid-header_1hrlu_35","cal-nav-center":"_cal-nav-center_1hrlu_44","cal-nav-label":"_cal-nav-label_1hrlu_50","month-grid":"_month-grid_1hrlu_64","year-grid":"_year-grid_1hrlu_35",months:"_months_1hrlu_73","month-cell":"_month-cell_1hrlu_80","year-cell":"_year-cell_1hrlu_81","pg-btn":"_pg-btn_1hrlu_103","year-grid-body":"_year-grid-body_1hrlu_116","year-grid-row":"_year-grid-row_1hrlu_123",selected:"_selected_1hrlu_129","days-slot":"_days-slot_1hrlu_135","range-label":"_range-label_1hrlu_139"}}]]);function BQ(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:o,maxDate:s}=e,r=$(""),i=q(()=>{const g=ut.fromFormat(r.value,t,{zone:n});return g.isValid?g:null}),a=q(()=>{if(!o||!i.value)return!0;const g={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year>g.year?!0:v.year<g.year?!1:v.month>g.month?!0:v.month<g.month?!1:l(v,g)>=0}),l=(g,v)=>{const y=new Date(g.year,g.month-1,g.day),b=new Date(v.year,v.month-1,v.day);return y<b?-1:y>b?1:0},u=q(()=>{if(!s||!i.value)return!0;const g={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:i.value.year,month:i.value.month,day:i.value.day};return v.year<g.year?!0:v.year>g.year?!1:v.month<g.month?!0:v.month>g.month?!1:l(v,g)<=0}),c=q(()=>r.value.length==0||r.value.length>0&&i.value!==null&&a.value&&u.value),d=q(()=>r.value.length===t.length&&c.value);return{inputValue:r,isValid:c,isComplete:d,clear:()=>{r.value=""},setDate:g=>{let v;g instanceof Date?v=ut.fromJSDate(g,{zone:n}):v=g.setZone(n),v.isValid?r.value=v.toFormat(t):r.value=""},getDate:()=>c.value?i.value:null}}const $Q={key:0,style:{marginLeft:"8px"}},HQ=["disabled","readonly","placeholder"],XO=Et(ot({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0},isMultipleDate:{type:Boolean,default:!1}},emits:["complete","invalid","clear","blur","tab"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=$(null),a=$(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:f}=BQ({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,timezone:s.timezone,minDate:s.minDate,maxDate:s.maxDate}),p=q(()=>s.active),g=q(()=>({disabled:s.disabled,error:!l.value&&c.value.length>0,readOnly:s.readOnly,isEmpty:c.value.length===0,inputRef:i,wrapperRef:a,active:p})),{argsMain:v,isHover:y,isFocus:b}=xo(g),S=x=>{var B;const N=(B=x.clipboardData)==null?void 0:B.getData("text/plain");N&&(c.value=N.trim())},w=x=>{if(x.key==="Escape"){r("blur"),x.target.blur(),x.preventDefault(),x.stopPropagation(),x.stopImmediatePropagation();return}else x.key==="Tab"&&D(x)},E=()=>{d(),r("clear")};t({clear:E,setDate:h,getDate:f,focus:()=>{var x;return(x=i.value)==null?void 0:x.focus()}}),Je(()=>s.modelValue,x=>{x?h(x):d()},{immediate:!0}),Je([()=>u.value,()=>c.value],()=>{if(c.value.length===0)r("complete",null);else if(l.value&&!s.readOnly&&!s.disabled&&u.value){const x=f();(x||c.value.length===0)&&r("complete",x)}}),Je(()=>l.value,x=>{x||r("invalid","")});const R=q(()=>!!s.isMultipleDate),D=x=>{x.preventDefault(),x.stopImmediatePropagation(),x.stopPropagation(),r("tab",x)};return(x,N)=>(K(),We(Oo,Kt(V(v),{ref_key:"wrapperRef",ref:a,bordered:!0,actived:p.value,size:32,style:{padding:"0 4px 0 0",background:"#FAFAFA"}}),{default:Ce(()=>[be("div",{class:ce([x.$style["date-input-wrapper"]])},[R.value?(K(),he("span",$Q," Multiple ")):Ue((K(),he("input",{key:1,disabled:s.disabled,readonly:s.readOnly,ref_key:"inputRef",ref:i,type:"text","onUpdate:modelValue":N[0]||(N[0]=B=>fn(c)?c.value=B:null),onPaste:Ht(S,["prevent"]),placeholder:s.placeholder,class:ce([x.$style["date-input"]]),onKeydown:w},null,42,HQ)),[[Q1,V(c)]]),kt(x.$slots,"clear",{handleClear:E},()=>[(V(c).length>0||R.value)&&!s.readOnly&&!s.disabled&&(V(y)||V(b))?Ue((K(),We(bt,{key:0,variant:["icon","primary"],onClick:Ht(E,["stop"]),size:16,rounded:!0},{default:Ce(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[V(o),"Clear"]]):(K(),We(gt,{key:1,src:"Calendar",source:"remote",class:ce(x.$style["icon-calendar"]),color:"var(--grey-200)"},null,8,["class"]))])],2)]),_:3},16,["actived"]))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_132fk_1","icon-calendar":"_icon-calendar_132fk_9",focus:"_focus_132fk_12",hover:"_hover_132fk_12",active:"_active_132fk_12","date-input":"_date-input_132fk_1",invalid:"_invalid_132fk_38"}}]]),ZO=(e,t)=>{if(e==null||e==="")return null;let n;return ut.isDateTime(e)?n=e.setZone(t):e instanceof Date?n=ut.fromJSDate(e,{zone:t}):typeof e=="number"?n=ut.fromMillis(e,{zone:t}):n=ut.fromISO(e,{zone:t}),n.isValid?n:null},GQ=ot({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:JS()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"Due"},startPlaceholder:{default:"Start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1},multipleStartDates:{type:Boolean},multipleDueDates:{type:Boolean},parent_name:{},parentConfig:{}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update","tab"],setup(e,{expose:t,emit:n}){const o=$({case:"",behavior:""}),s=e,r=$(null),i=n,a=async(_,M)=>{i("start-update"),await _(),i("finish-update"),ft(()=>{var re,pe;M(),(pe=(re=s.params)==null?void 0:re.api)==null||pe.stopEditing()})},l=(_,M)=>{_(),ft(()=>{var re,pe;M(),(pe=(re=s.params)==null?void 0:re.api)==null||pe.stopEditing()})},u=()=>{var M;const _=ut.now().setZone(s.timezone);I.value=_.year,z.value=_.month,(M=Y.value)==null||M.setNavigation(_.year,_.month)},c=Po({start:!1,end:!1}),{states:d,showMultipleStartDates:h,showMultipleDueDates:f,selectEndDate:p,cancelSelection:g,confirmSelection:v,selectStartDate:y,beginInteraction:b,clearStart:S,clearDue:w}=WZ(s,i),E=q(()=>{if(d.isSelectingStart)return"start";if(d.isSelectingEnd)return"end"});Je(()=>s.multipleStartDates,_=>{h.value=!!_},{immediate:!0}),Je(()=>s.multipleDueDates,_=>{f.value=!!_},{immediate:!0});const R=$(null),D=$(null),x=_=>{_.preventDefault(),_.stopImmediatePropagation(),_.stopPropagation(),ie()},N=()=>{var _;(_=D.value)==null||_.focus()},B=_=>{if(!_){c.start=!1,S();return}const M=d.endDate?ut.fromJSDate(d.endDate,{zone:s.timezone}):null;if(M&&A(_,M)>0){const pe={year:_.year,month:_.month,day:_.day};c.start=!1,y(pe,!1),p(pe),ft(()=>{d.isSelectingStart=!0,d.isSelectingEnd=!1});return}const re={year:_.year,month:_.month,day:_.day};c.start=!1,y(re,!0)},A=(_,M)=>{const re=_.startOf("day"),pe=M.startOf("day");return re<pe?-1:re>pe?1:0},P=_=>{var M;_.preventDefault(),_.stopImmediatePropagation(),_.stopPropagation(),(M=document.querySelector('[data-index="prev-btn"]'))==null||M.focus()},k=_=>{if(!_){c.end=!1,w();return}const M=d.startDate?ut.fromJSDate(d.startDate,{zone:s.timezone}):null;if(M&&A(_,M)<0){const pe={year:_.year,month:_.month,day:_.day};c.end=!1,y(pe),p(pe),ft(()=>{d.isSelectingEnd=!0,d.isSelectingStart=!1});return}const re={year:_.year,month:_.month,day:_.day};c.end=!1,p(re)},O=()=>{h.value=!1,S()},L=()=>{f.value=!1,w()},H=()=>{Q()},W=q(()=>d.isSelectingStart||d.isSelectingEnd);function se(){s.disabled||s.readOnly||(b(),d.isSelectingStart=!0,d.isSelectingEnd=!1,ft(()=>{var _;(_=r.value)==null||_.focus()}))}function ie(){s.disabled||s.readOnly||(b(),d.isSelectingEnd=!0,d.isSelectingStart=!1,ft(()=>{var _;(_=R.value)==null||_.focus()}))}function Q(){d.isSelectingStart=!1,d.isSelectingEnd=!1,i("closed")}function ne(_){_.key==="Escape"?(_.stopPropagation(),Q()):_.key=="Tab"&&i("tab",_)}const Y=$(null),I=$(new Date().getFullYear()),z=$(new Date().getMonth()+1);Je(()=>[d.isSelectingStart,d.isSelectingEnd,d.startDate,d.endDate],()=>{d.isSelectingStart&&d.startDate?(I.value=d.startDate.getFullYear(),z.value=d.startDate.getMonth()+1):d.isSelectingEnd&&d.endDate&&(I.value=d.endDate.getFullYear(),z.value=d.endDate.getMonth()+1)},{immediate:!0});const ee=$(null);function me(){if(Array.isArray(s.value)){const[M,re]=s.value;d.startDate=M||null,d.endDate=re||null}d.isSelectingStart=!1,d.isSelectingEnd=!1;const _=d.startDate||d.endDate||new Date;I.value=_.getFullYear(),z.value=_.getMonth()+1}Je(()=>{var _,M,re,pe,_e,we,X,U;return[((re=(M=(_=s.value)==null?void 0:_[0])==null?void 0:M.getTime)==null?void 0:re.call(M))||((pe=s.value)==null?void 0:pe[0]),((X=(we=(_e=s.value)==null?void 0:_e[1])==null?void 0:we.getTime)==null?void 0:X.call(we))||((U=s.value)==null?void 0:U[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{me()},{immediate:!0,deep:!0}),t({resetCalendarLogic:me,openStart:se,openEnd:ie,closePicker:Q,clearAll:H,isOpen:W,drpRef:ee,getValues:()=>({startDate:d.startDate,endDate:d.endDate,dateRange:[d.startDate,d.endDate]}),focus:()=>{d.startDate||d.endDate?d.startDate?se():ie():se()}});const de=$(null);Je(()=>W.value,_=>{if(s.disabled||s.readOnly)return;const M=de.value;M&&(_?M.show():M.hide())},{immediate:!0});const j=_=>ut.fromJSDate(_,{zone:s.timezone}),oe=q(()=>{var _,M,re;return{start:ZO((_=s.parentConfig)==null?void 0:_.parentStartDate,s.timezone),due:ZO((M=s.parentConfig)==null?void 0:M.parentDueDate,s.timezone),name:(re=s.parentConfig)==null?void 0:re.parentName}}),ae=q(()=>{const{startDate:_,endDate:M}=d,re=oe.value.start,pe=oe.value.due,_e=X=>!!(X&&re&&j(X).startOf("day")<re.startOf("day")),we=X=>!!(X&&pe&&j(X).startOf("day")>pe.startOf("day"));return _e(_)||_e(M)||we(_)||we(M)});return(_,M)=>(K(),he("div",{class:ce(_.$style["calendar-wrapper"]),ref_key:"calendarWrapperRef",ref:D,onKeydown:ne,tabindex:"1","data-index":"calendar-wrapper"},[ye(VQ,{year:I.value,"onUpdate:year":M[6]||(M[6]=re=>I.value=re),month:z.value,"onUpdate:month":M[7]||(M[7]=re=>z.value=re),locale:s.locale,disabled:s.disabled,readOnly:s.readOnly,ref_key:"navigationRef",ref:Y},{selection:Ce(()=>[be("div",{class:ce(_.$style["calendar-input-section"])},[ye(XO,{ref_key:"starDateRef",ref:r,"model-value":V(d).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:V(d).isSelectingStart,onClick:se,onClear:O,onComplete:B,onInvalid:M[0]||(M[0]=re=>c.start=!0),disabled:s.disabled,readOnly:s.readOnly,onBlur:N,onTab:x},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(XO,{ref_key:"endDateRef",ref:R,"model-value":V(d).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:V(d).isSelectingEnd,onClick:ie,onClear:L,disabled:s.disabled,onComplete:k,onInvalid:M[1]||(M[1]=re=>c.end=!0),readOnly:s.readOnly,isMultipleDate:V(f),onTab:P},null,8,["model-value","placeholder","timezone","active","disabled","readOnly","isMultipleDate"])],2)]),default:Ce(({year:re,month:pe})=>[ye(MQ,{disabled:s.disabled,"has-warning":ae.value,disableConfirm:c.end||c.start,readOnly:s.readOnly,ref_key:"drpRef",ref:ee,"tracing-case":o.value,"onUpdate:tracingCase":M[2]||(M[2]=_e=>o.value=_e),year:re,month:pe,"start-date":V(d).startDate,"end-date":V(d).endDate,"active-field":E.value,timezone:s.timezone,parentConfig:s.parentConfig,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:V(y),onSelectEnd:V(p),onGotoToday:u,onConfirm:M[3]||(M[3]=()=>{a(V(v),Q)}),onCancel:M[4]||(M[4]=_e=>l(V(g),Q)),onClose:M[5]||(M[5]=_e=>a(V(v),Q))},null,8,["disabled","has-warning","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","parentConfig","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],34))}}),Ov=Et(GQ,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_5tolc_1","calendar-input-section":"_calendar-input-section_5tolc_11","display-wrapper":"_display-wrapper_5tolc_19","calendar-actions":"_calendar-actions_5tolc_23","clear-all-btn":"_clear-all-btn_5tolc_29"}}]]),Mv=Xa("entity",()=>{const e=$(null);function t(i){e.value=i}const n=q(()=>{var i;return((i=e.value)==null?void 0:i.name)??""}),o=q(()=>{var i;return((i=e.value)==null?void 0:i.start_date)??""}),s=q(()=>{var i;return((i=e.value)==null?void 0:i.due_date)??""}),r=q(()=>{const i=e.value;return{parentName:(i==null?void 0:i.name)??null,parentStartDate:i!=null&&i.start_date?ut.fromJSDate(new Date(i==null?void 0:i.start_date)):null,parentDueDate:i!=null&&i.due_date?ut.fromJSDate(new Date(i==null?void 0:i.due_date)):null}});return{entityData:e,setEntityData:t,entityName:n,entityStartDate:o,entityEndDate:s,parentConfig:r}}),UQ=ot({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{},rowSelected:{},disabled:{type:Boolean},selectedAll:{type:Boolean}},emits:["updated","update-start","update-completed","update-failed"],setup(e,{emit:t}){const n=t,o=e,s=En("isSelectAll",$(!1)),r=En("bulkUpdate",$(!1)),i=q(()=>!!o.entityId&&r.value&&s.value),{apiServices:a}=no(!r.value,o),l=En("filterParams",null),u=$(null),c=async B=>{var A,P,k,O;try{w.value=!0,n("update-start");let L={workspaceId:o.workspaceId,entityId:o.entityId,itemIds:o.ids,startDate:void 0,dueDate:void 0,filterParams:l!=null&&l.value?l.value:void 0};"start"in B&&(L.startDate=B.start?Cv(B.start):null),"end"in B&&(L.dueDate=B.end?Cv(B.end):null),i.value?(L.itemIds=void 0,L.entityId=o.entityId):L.entityId=void 0;const H=await((P=(A=a.value)==null?void 0:A.changeDate)==null?void 0:P.call(A,L));n("updated",{workspaceId:o.workspaceId,itemIds:o.ids,data:L}),n("update-completed",H),(k=u.value)==null||k.hide()}catch(L){console.error("Failed to update dates:",L),ft(()=>{ft(()=>{var H;n("update-failed"),(H=u.value)==null||H.open()})})}finally{(O=b.value)==null||O.resetCalendarLogic(),w.value=!1}},d=()=>{if(!o.rowSelected||o.rowSelected.length===0){h();return}o.rowSelected.length===1?f():p()},h=()=>{y.value=!1,v.value=!1,S.value=[null,null]},f=()=>{const A=o.rowSelected[0].dateRange;S.value=[(A==null?void 0:A[0])??null,(A==null?void 0:A[1])??null],y.value=!1,v.value=!1},p=()=>{var A,P;if(o.rowSelected.some(k=>k.dateRange&&(k.dateRange[0]!==null||k.dateRange[1]!==null))){const k=g(0),O=g(1);if(v.value=k,y.value=O,k)S.value[0]=null;else{const L=((A=o.rowSelected[0].dateRange)==null?void 0:A[0])??null;S.value[0]=L}if(O)S.value[1]=null;else{const L=((P=o.rowSelected[0].dateRange)==null?void 0:P[1])??null;S.value[1]=L}}else v.value=!1,y.value=!1,S.value=[null,null]},g=B=>{const A=o.rowSelected.map(k=>{var O;return(O=k.dateRange)==null?void 0:O[B]});return A.length===0?!1:new Set(A.map(k=>{var O;return(O=k==null?void 0:k.getTime)==null?void 0:O.call(k)})).size>1},v=$(!1),y=$(!1),b=$(null),S=$([null,null]);Je([()=>o.ids,()=>o.rowSelected],B=>{d(),ft(()=>{var A;(A=b.value)==null||A.focus()})},{immediate:!0,deep:!0});const w=$(!1),E=()=>{w.value=!0},R=()=>{ft(()=>{setTimeout(()=>{w.value=!1},500)})},D=(B,A)=>{B&&ft(()=>{var P;(P=b.value)==null||P.focus()})},x=Mv(),{parentConfig:N}=go(x);return(B,A)=>(K(),We(Uf,{ref_key:"wrapperRef",ref:u,isUpdating:w.value,disabled:o.disabled||w.value,onOnVisibleChange:D},{trigger:Ce(({hide:P,disabled:k})=>[ye(bt,{variant:o.variant,loading:w.value,disabled:k,onEscape:P},{default:Ce(()=>[ye(gt,{src:"Calendar"}),A[0]||(A[0]=tt(" Date ",-1))]),_:1},8,["variant","loading","disabled","onEscape"])]),popup:Ce(({isVisible:P,hide:k})=>[P?(K(),We(Ov,{key:0,"parent-config":V(N),immediatelyUpdate:!1,value:S.value,onConfirmed:c,ref_key:"calendarRef",ref:b,onClosed:k,onStartUpdate:E,onFinishUpdate:R,multipleDueDates:y.value,multipleStartDates:v.value},null,8,["parent-config","value","onClosed","multipleDueDates","multipleStartDates"])):qe("",!0)]),default:Ce(()=>[A[1]||(A[1]=tt(" > ",-1))]),_:1},8,["isUpdating","disabled"]))}}),WQ=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return"formula"},JO=Xa("metricStore",()=>{const e=$();return{metricList:e,setMetricList:o=>{e.value=o},checkEditType:o=>{var s;if(((s=o==null?void 0:o.auth_permission)==null?void 0:s.permission)==2)return WQ(o)}}}),zQ=["onKeydown"],jQ=["width","height","viewBox"],KQ=["d"],qQ="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",QO=ot({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change","handleEnter","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(o.modelValue??0),i=$(null),a=q(()=>{var A;return((A=o.params)==null?void 0:A.size)??24}),l=q(()=>{var A;return((A=o.params)==null?void 0:A.iconViewBox)??"0 0 24 24"}),u=q(()=>{var A;return((A=o.params)==null?void 0:A.iconPath)??qQ}),c=q(()=>{var A;return((A=o.params)==null?void 0:A.wrapperTag)??"span"}),d=q(()=>{var A;return o.disabled||((A=o.params)==null?void 0:A.disabled)||!1}),h=q(()=>{var A;return o.readOnly||((A=o.params)==null?void 0:A.readOnly)||!1}),f=q(()=>!d.value&&!h.value),p=q(()=>d.value?"not-allowed":h.value?"default":"pointer");Je(()=>o.modelValue,A=>{typeof A=="number"&&A!==r.value&&(r.value=A)});const g=A=>{var P;return((P=o.params)==null?void 0:P.maxRating)-A+1<=r.value&&!v.value},v=$(!1),y=()=>{v.value=!0},b=()=>{v.value=!1},S=A=>{f.value&&w(A)},w=A=>{var k,O;if(!f.value)return;let P=((k=o.params)==null?void 0:k.maxRating)-A+1;P===r.value&&(P=0),r.value=P,s("update:modelValue",P),s("update",P),s("change",P),(O=o.params)!=null&&O.onUpdate&&o.params.onUpdate(P)},E=A=>{var P;A!==r.value&&(r.value=A,s("update:modelValue",A),s("update",A),s("change",A),(P=o.params)!=null&&P.onUpdate&&o.params.onUpdate(A),R.value=A)},R=$(r.value),D=A=>{A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation(),r.value=R.value,s("cancel")},x=A=>{A.preventDefault(),E(r.value),s("handleEnter",r.value)},N=()=>{f.value&&(r.value=Math.min(r.value+1%(o.params.maxRating+1),o.params.maxRating),E(r.value))},B=()=>{f.value&&(r.value=Math.max(r.value-1,0),E(r.value))};return t({focus:()=>{var A;(A=i.value)==null||A.focus()}}),(A,P)=>(K(),he("div",{class:ce(["rating-component",{"rating-component--disabled":d.value,"rating-component--readOnly":h.value}]),style:cn({"--max-rating":e.params.maxRating}),ref_key:"ratingRef",ref:i,tabindex:"1",onKeydown:[po(Ht(B,["prevent"]),["left"]),po(Ht(N,["prevent"]),["right"]),po(Ht(B,["prevent"]),["down"]),po(Ht(N,["prevent"]),["up"]),po(Ht(x,["prevent"]),["enter"]),po(Ht(x,["prevent"]),["tab"]),po(Ht(D,["prevent"]),["escape"])]},[(K(!0),he(Pt,null,Dn(e.params.maxRating,k=>(K(),We(_C(c.value),{key:k,class:ce(["rating-item",{filled:g(k),"rating-item--disabled":d.value,"rating-item--readOnly":h.value}]),style:cn({cursor:p.value,order:e.params.maxRating-k,height:a.value+"px",width:a.value+"px"}),"aria-checked":g(k),"aria-disabled":d.value,"aria-readOnly":h.value,title:e.params.maxRating-k+1,tabindex:-1,onClick:Ht(O=>S(k),["prevent","stop"]),onMouseenter:y,onMouseleave:b},{default:Ce(()=>[kt(A.$slots,"icon",{index:k,filled:g(k),size:a.value,iconViewBox:l.value,disabled:d.value,readOnly:h.value,value:k},()=>[(K(),he("svg",{class:"rating-icon",width:a.value,height:a.value,viewBox:l.value,"aria-hidden":"true",focusable:"false"},[be("path",{d:u.value},null,8,KQ)],8,jQ))]),kt(A.$slots,"overlay",{index:k,filled:g(k),disabled:d.value,readOnly:h.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","title","onClick"]))),128))],46,zQ))}}),YQ={style:{maxWidth:"180px",lineHeight:"15px"}},XQ=["innerHTML"],eM=ot({__name:"MetricEditorDropdown",props:{config:{},modelValue:{}},emits:["update:modelValue","change","close","handleCancel"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=()=>{r("handleCancel")},a=()=>{r("close")},l=v=>{var y;if(v.format_type==="dropdown"&&v.format_value)try{const b=JSON.parse(v.format_value);if(Array.isArray(b)){const S=b.map(w=>({label:w.name,value:w.name,id:w.name}));return S.unshift({label:"-",value:void 0,id:"-"}),S}}catch(b){console.error("Failed to parse dropdown options",b)}if(v.format_type=="number"&&v.restricted_type=="exact"){const b=((y=v.restricted_value)==null?void 0:y.split(",").map(S=>({label:v.mapping[`!${S}`]||S,value:S,id:S})))||[];return b.unshift({label:"-",value:void 0,id:"-"}),b}return[]},u=q(()=>l(s.config)),c=$(s.modelValue),d=v=>{c.value=v,r("update:modelValue",v),r("change",v||null)},h=$(u.value),f=$(!1),p=v=>{f.value=!0,v?h.value=u.value.filter(y=>y.label.toLowerCase().includes(v.toLowerCase())):h.value=u.value,setTimeout(()=>{f.value=!1},300)},g=$(null);return Jt(()=>{var v;(v=g.value)==null||v.focus()}),t({focus:()=>{var v;(v=g.value)==null||v.focus()}}),(v,y)=>(K(),We(ga,{style:{width:326},loading:f.value,options:h.value,"selected-id":e.modelValue||void 0,onSearch:p,onSelect:y[0]||(y[0]=b=>d(b.id)),ref_key:"searchListRef",ref:g,onClose:a,onCancel:i},{item:Ce(({item:b,getHighlightedLabel:S,selectedIndex:w,index:E})=>[ye(hl,{hover:w==E,selected:b.value===e.modelValue,label:b.label,onSelect:R=>d(b.value||null),onClick:R=>d(b.value||null)},{label:Ce(()=>[be("div",YQ,[Ue(be("span",{innerHTML:S(b.label)},null,8,XQ),[[V(o),{content:b.label}]])])]),_:2},1032,["hover","selected","label","onSelect","onClick"])]),"empty-list":Ce(()=>[...y[1]||(y[1]=[tt("No options available.",-1)])]),_:1},8,["loading","options","selected-id"]))}}),ZQ={class:"metric-input-wrapper"},JQ={key:0,class:"error-text input-2"},tM=ot({__name:"MetricEditorInput",props:{config:{},modelValue:{},saveOnBlur:{type:Boolean,default:!0},saveOnEscape:{type:Boolean,default:!1},showInlineError:{type:Boolean,default:!1}},emits:["update:modelValue","handleChange","cancel","enter","onValidation"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=$(s.modelValue),i=$(s.modelValue),a=$(!1),l=$(!0),u=$(""),c=q(()=>{var L;const O=Number.parseInt(String((L=s.config)==null?void 0:L.format_value)||"2",10);return Number.isFinite(O)&&O>=0?O:2}),d=O=>{if(!O)return O;const L=String(O).split(".");return L.length>1&&L[1].length>c.value?c.value===0?L[0]:`${L[0]}.${L[1].slice(0,c.value)}`:String(O)},h=O=>{const L=d(O);L!==O&&S.value?r.value=L:r.value=O},f=O=>{const L=O.target;if(!L)return;const H=L.value||"",W=H.indexOf(".");if(O.key==="."&&c.value===0){O.preventDefault();return}W!==-1&&/[0-9]/.test(O.key)&&H.slice(W+1).length>=c.value&&O.preventDefault()},p=q(()=>l.value||s.showInlineError?{content:""}:{content:u.value,placement:"top",theme:"error",trigger:"mouseenter focus",hideOnClick:!1,interactive:!0,showOnCreate:!0,alwayShow:!0,maxWidth:"200px"}),g=()=>{var ne;const O=s.config.restricted_type.trim(),L=((ne=s.config.restricted_value)==null?void 0:ne.split(",").map(Number))||[],[H,W]=L,ie={range:`Enter a value between ${H} and ${W}`,not:`These values are not allowed: ${L.join(", ")}`,exact:"Value is not allowed"}[O];return l.value?"":ie},v=q(()=>{var L;let O="";return Number((L=s.config)==null?void 0:L.format_value)&&(O+="."+Array.from({length:Number(s.config.format_value)}).map(()=>"0").join("")),`0${O}`});Je(()=>s.modelValue,O=>{r.value=O,i.value=O});const y=O=>gv(s.config,O),b=n,S=$(null),w=O=>{const L=O===""?null:O,H=i.value===""?null:i.value;return L!==H},E=O=>{const L=d(O);if(!w(L))return!1;const H=L===""?null:L;return r.value=H,i.value=H,b("update:modelValue",H),b("handleChange",H),!0},R=()=>{r.value=i.value,b("update:modelValue",i.value)},D=(O,L)=>{E(O),b("enter")},x=(O,L)=>{if(a.value){a.value=!1;return}s.saveOnBlur?E(O):R()},N=O=>{if(O===null||O===""){l.value=!0;return}l.value=gv(s.config,Number(O)),u.value=l.value?"":g()},B=(O,L)=>{a.value=!0,s.saveOnEscape?E(O):R(),b("cancel"),setTimeout(()=>{a.value=!1},100)},A=O=>{N(O),b("onValidation",O)},P=()=>{a.value=!0,R(),b("cancel"),setTimeout(()=>{a.value=!1},100)},k=()=>{var O;r.value=null,i.value=null,b("update:modelValue",null),b("handleChange",null),(O=S.value)==null||O.focus()};return t({focus:()=>{var O;return(O=S.value)==null?void 0:O.focus()},blur:()=>{var O;return(O=S.value)==null?void 0:O.blur()},getValue:()=>r.value,getCachedValue:()=>i.value,save:()=>E(r.value),revert:R}),Jt(()=>{var O;(O=S.value)==null||O.focus()}),(O,L)=>Ue((K(),he("div",ZQ,[ye(dl,{maxDecimalChar:c.value,modelValue:r.value,"onUpdate:modelValue":L[0]||(L[0]=H=>r.value=H),placeholder:v.value,validatorFnc:y,style:{"--bg-input":"#FAFAFA"},onInput:h,onKeydown:f,onEnter:D,onBlur:x,onClear:k,onEscape:B,onCancel:P,onOnValidation:A,type:"number",autoEmit:!1,submitOnEnter:!0,blurOnEscape:!1,ref_key:"inputRef",ref:S},null,8,["maxDecimalChar","modelValue","placeholder"]),!l.value&&e.showInlineError?(K(),he("span",JQ,at(u.value),1)):qe("",!0)])),[[V(o),p.value]])}}),QQ={key:2},eee={class:"wrapper-suffix"},tee={key:3},nee=Et(ot({__name:"MetricEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean},config:{},attachTo:{},focus:{type:Boolean}},emits:["enter","cancel","blur","updateMetric"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=$(null),i=$(0),a=$(null),l=$(null),u=q(()=>fO(s.config)),c=$(!1),d=q(()=>!!ee.value),h=n,f=()=>{c.value=!1,z(),h("cancel")},p=$(!0),g=de=>{if(de===null||de===""){p.value=!0;return}if(u.value!=="number"){p.value=!0;return}p.value=gv(s.config,Number(de)),y.value=b()},v=()=>{c.value=!0,W()},y=$(""),b=()=>{var pe;const de=s.config.restricted_type.trim(),j=((pe=s.config.restricted_value)==null?void 0:pe.split(",").map(Number))||[],[oe,ae]=j,M={range:`Enter a value between ${oe} and ${ae}`,not:`These values are not allowed: ${j.join(", ")}`,exact:"Value is not allowed"}[de];return p.value?"":M},S=q(()=>{var j;const de=Number.parseInt(String((j=s.config)==null?void 0:j.format_value)||"2",10);return Number.isFinite(de)&&de>=0?de:2}),w=de=>{c.value=!0,r.value=de},E=()=>{c.value=!0,z(),W()},R=de=>{i.value=de,c.value=!0,W()},D=()=>(s.config.format_symbol||"BoltSolid").split(/[\s-_]+/).map(j=>j.charAt(0).toUpperCase()+j.slice(1)).join("").replace(/Outline|Solid/g,""),x=$(null),N=$(!0),B=q(()=>{var de;return{disabled:s.disabled,error:!1,readOnly:!1,isEmpty:((de=r.value)==null?void 0:de.length)===0,wrapperRef:Y,active:d,focus:s.focus,bordered:!0}}),A=$(null),P=q(()=>N.value),k=q(()=>({disabled:s.disabled,error:!1,readOnly:!1,isEmpty:i.value===0,wrapperRef:A,active:P,focus:N.value,bordered:!0})),{argsMain:O}=xo(k),{argsMain:L}=xo(B),H=$(null),W=()=>{ft(()=>{var de;(de=H.value)==null||de.focus()})},se=de=>{var j;if(de.format_type==="dropdown"&&de.format_value)try{const oe=JSON.parse(de.format_value);if(Array.isArray(oe))return oe.map(ae=>({label:ae.name,value:ae.name,id:ae.name}))}catch(oe){console.error("Failed to parse dropdown options",oe)}return de.format_type=="number"&&de.restricted_type=="exact"?((j=de.restricted_value)==null?void 0:j.split(",").map(ae=>({label:de.mapping[`!${ae}`]||ae,value:ae,id:ae})))||[]:[]},ie=q(()=>se(s.config)),Q=q(()=>{var de;return((de=ie.value.find(j=>j.value===r.value))==null?void 0:de.label)||r.value||"-"}),ne=()=>{var de;if(u.value=="rating")h("updateMetric",i.value==0?null:i.value);else if(u.value=="number"){const j=(de=l.value)==null?void 0:de.getValue();h("updateMetric",j||null)}else h("updateMetric",r.value||null);c.value=!1,z()},{triggerRef:Y,popupRef:I,hide:z,isVisible:ee,show:me}=vo({toggleOnClick:!0,appendTo:()=>s.attachTo||"parent",zIndex:1e4,offset:[0,0]}),xe=()=>{switch(u.value){case"number":ft(()=>{var de;(de=l.value)==null||de.focus()});break;case"dropdown":me(),ft(()=>{var de;(de=x.value)==null||de.focus()});break;case"rating":N.value=!0,ft(()=>{var de;(de=a.value)==null||de.focus()});break}};return t({resetState:()=>{r.value=null,i.value=0,c.value=!1},focus:xe,hasChanges:()=>c.value}),Jt(()=>{ft(()=>{setTimeout(()=>{xe()},300)})}),(de,j)=>(K(),he("div",{class:ce(de.$style["metric-editor"])},[u.value=="number"?(K(),We(tM,{key:0,config:s.config,modelValue:r.value,"onUpdate:modelValue":j[0]||(j[0]=oe=>r.value=oe),style:{width:"100%"},saveOnBlur:!0,saveOnEscape:!1,"show-inline-error":!0,onCancel:f,onOnValidation:g,onEnter:v,onHandleChange:w,maxDecimalChar:S.value,ref_key:"metricEditorInputRef",ref:l},null,8,["config","modelValue","maxDecimalChar"])):u.value=="rating"?(K(),We(Oo,Kt({key:1,"tab-index":1},V(O),{ref_key:"triggerRef2",ref:A,bordered:!0,style:{"--box-padding":"0 ","--icon-size":"18px",background:"#FAFAFA"}}),{default:Ce(()=>[ye(QO,{params:{maxRating:s.config.range},modelValue:i.value,"onUpdate:modelValue":j[1]||(j[1]=oe=>i.value=oe),onHandleEnter:R,onCancel:f,ref_key:"ratingComponentRef",ref:a},{icon:Ce(()=>[ye(gt,{source:"rating",src:D()||"Star",size:17},null,8,["src"])]),_:1},8,["params","modelValue"])]),_:1},16)):u.value=="dropdown"?(K(),he("div",QQ,[ye(Oo,Kt(V(L),{ref_key:"triggerRef",ref:Y,bordered:!0,style:{"--box-padding":"0 4px 0 4px","--icon-size":"18px",background:"#FAFAFA"}}),{suffix:Ce(({})=>[be("div",eee,[ye(gt,{src:"ChevronDown",color:"#A6A6A6",size:"12"})])]),default:Ce(()=>[Ue((K(),he("span",null,[tt(at(Q.value||""),1)])),[[V(o),{content:Q.value}]])]),_:1},16),be("div",{ref_key:"popupRef",ref:I},[V(ee)?(K(),We(eM,{key:0,ref_key:"metricEditorDropdownRef",ref:x,config:s.config,modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=oe=>r.value=oe),onChange:E,onCancel:f},null,8,["config","modelValue"])):qe("",!0)],512)])):(K(),he("span",tee,"Formular")),Ue((K(),We(bt,{ref_key:"confirmButtonRef",ref:H,onHandleClick:ne,"tab-index":"1",onKeypress:[po(Ht(xe,["shift","prevent"]),["tab"]),po(Ht(f,["prevent"]),["escape"])],disabled:!p.value},{default:Ce(()=>[ye(gt,{src:"Check"})]),_:1},8,["onKeypress","disabled"])),[[V(o),"Update"]])],2))}}),[["__cssModules",{$style:{"metric-editor":"_metric-editor_18l4p_1","dropdown-trigger":"_dropdown-trigger_18l4p_10"}}]]),oee=Et(ot({__name:"MetricBulkItem",props:{label:{},morpheme:{},type:{},config:{},attachTo:{}},emits:["loseFocus","open","handleUpdate","focusOnSearch","openSibling"],setup(e,{expose:t,emit:n}){const o=qt,s=e,r=n,i=$(!1),a=$(null),l=$(null),u=()=>{i.value=!i.value},c=()=>{var g;i.value=!1,(g=l.value)==null||g.resetState()},d=async()=>{var g;i.value=!0,await ft(),(g=l.value)==null||g.focus()},h=g=>{r("handleUpdate",{id:s.config.id.toString(),value:g})},f=()=>{var g;(g=a.value)==null||g.focus(),r("loseFocus")},p=g=>{const y={Escape:()=>{g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),r("focusOnSearch",g)},Tab:()=>{i.value&&c()},Enter:()=>{i.value||d()},ArrowDown:()=>{r("openSibling","down")},ArrowUp:()=>{r("openSibling","up")}}[g.key];y&&y()};return Je(i,g=>{g&&r("open")}),t({hide:c,show:d}),(g,v)=>(K(),he("div",{class:ce([g.$style["metric-item"],i.value?g.$style.open:""]),tabindex:"0",ref_key:"metricRef",ref:a,onKeydown:p},[be("div",{class:ce(g.$style["metric-label"]),onClick:Ht(u,["stop"])},[kt(g.$slots,"default",{open:i.value},()=>[Ue((K(),he("span",{class:ce(g.$style["metric-name"])},[tt(at(e.label),1)],2)),[[V(o),{content:e.label}]]),e.morpheme&&i.value?(K(),he("small",{key:0,class:ce(g.$style["metric-morpheme"])}," ("+at(e.morpheme)+") ",3)):qe("",!0)])],2),ye(wz,{mode:"out-in",name:"slide"},{default:Ce(()=>[i.value?(K(),We(nee,{key:`editor-${e.config.id}`,"read-only":!1,focus:i.value,type:e.type,config:e.config,"attach-to":e.attachTo,ref_key:"metricEditorRef",ref:l,onCancel:f,onUpdateMetric:h},null,8,["focus","type","config","attach-to"])):qe("",!0)]),_:1})],34))}}),[["__cssModules",{$style:{"metric-item":"_metric-item_18ft8_1","metric-label":"_metric-label_18ft8_11",open:"_open_18ft8_19","metric-name":"_metric-name_18ft8_23","metric-morpheme":"_metric-morpheme_18ft8_29"}}]]);function nM(e,t){return function(){return e.apply(t,arguments)}}const{toString:see}=Object.prototype,{getPrototypeOf:ma}=Object,{iterator:zf,toStringTag:oM}=Symbol,va=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sM=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Nv=(e,t,n)=>e===Object.prototype||!n&&t===null,ree=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(sM(n))return!1;const o=Object.getOwnPropertyDescriptor(e,n);return!!o&&o.configurable&&o.writable===!0})},bE=(e,t)=>{let n=e;const o=[];for(;n!=null;){if(o.indexOf(n)!==-1)return!1;o.push(n);const s=ma(n);if(Nv(n,s,n===e))return!1;if(va(n,t))return!0;n=s}return!1},iee=(e,t)=>e!=null&&bE(e,t)?e[t]:void 0,aee=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=ma(e);if(t===null&&ree(e))return e;const n=Object.create(null),o=Object.create(null),s=[];let r=e;for(;r!=null&&s.indexOf(r)===-1;){s.push(r);const i=r===e?t:ma(r);if(Nv(r,i,r===e))break;const a=Object.getOwnPropertyNames(r);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(r));for(const l of a)sM(l)||va(o,l)||(n[l]=e[l],o[l]=!0);r=i}return n},SE=(e=>t=>{const n=see.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>SE(t)===e),Lv=e=>t=>typeof t===e,{isArray:Iu}=Array,Pu=Lv("undefined");function vd(e){return e!==null&&!Pu(e)&&e.constructor!==null&&!Pu(e.constructor)&&Es(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rM=Sr("ArrayBuffer");function lee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rM(e.buffer),t}const uee=Lv("string"),Es=Lv("function"),cee=Lv("number"),yd=e=>e!==null&&typeof e=="object",dee=e=>e===!0||e===!1,Vv=e=>{if(!yd(e))return!1;const t=ma(e);return(t===null||t===Object.prototype||ma(t)===null)&&(Nv(e,t,!0)||!va(e,oM)&&!va(e,zf))},hee=e=>{if(!yd(e)||vd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},fee=Sr("Date"),pee=Sr("File"),gee=e=>!!(e&&typeof e.uri<"u"),mee=e=>e&&typeof e.getParts<"u",vee=Sr("Blob"),yee=Sr("FileList"),wee=Sr("Set"),Cee=e=>yd(e)&&Es(e.pipe);function bee(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const iM=bee(),aM=typeof iM.FormData<"u"?iM.FormData:void 0,See=e=>{if(!e)return!1;if(aM&&e instanceof aM)return!0;const t=ma(e);if(!t||t===Object.prototype||!Es(e.append))return!1;const n=SE(e);return n==="formdata"||n==="object"&&Es(e.toString)&&e.toString()==="[object FormData]"},Eee=Sr("URLSearchParams"),[_ee,Ree,Tee,Dee]=["ReadableStream","Request","Response","Headers"].map(Sr),xee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),Iu(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{if(vd(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let a;for(o=0;o<i;o++)a=r[o],t.call(null,e[a],a,e)}}function Aee(e,t){if(vd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const ku=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lM=e=>!Pu(e)&&e!==ku;function EE(...e){const{caseless:t,skipUndefined:n}=lM(this)&&this||{},o={},s=t?Object.create(null):null,r=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let l=a;if(s&&typeof a=="string"){const c=a.toLowerCase(),d=s[c];d!==void 0&&va(o,d)?l=d:s[c]=a}const u=va(o,l)?o[l]:void 0;Vv(u)&&Vv(i)?o[l]=EE(u,i):Vv(i)?o[l]=EE({},i):Iu(i)?o[l]=i.slice():(!n||!Pu(i))&&(o[l]=i)};for(let i=0,a=e.length;i<a;i++){const l=e[i];if(!l||vd(l)||(jf(l,r),typeof l!="object"||Iu(l)||!Object.getOwnPropertySymbols))continue;const u=Object.getOwnPropertySymbols(l);for(let c=0;c<u.length;c++){const d=u[c];Hee.call(l,d)&&r(l[d],d)}}return o}const Iee=(e,t,n,{allOwnKeys:o}={})=>(jf(t,(s,r)=>{n&&Es(s)?Object.defineProperty(e,r,{__proto__:null,value:nM(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),Pee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kee=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Fee=(e,t,n,o)=>{let s,r,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)i=s[r],(!o||o(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&ma(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Oee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Mee=e=>{if(!e)return null;if(Iu(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const n=new Set,o=new Set;let s=e;for(;s!=null&&n.size<t;){if(o.has(s))return null;o.add(s);const i=ma(s);if(Nv(s,i,s===e))break;Object.getOwnPropertyNames(s).forEach(a=>{const l=+a;Number.isInteger(l)&&l>=0&&l<t&&String(l)===a&&va(s,a)&&n.add(l)}),s=i}if(n.size!==t)return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Nee=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ma(Uint8Array)),Lee=(e,t)=>{const o=(e&&e[zf]).call(e);let s;for(;(s=o.next())&&!s.done;){const r=s.value;t.call(e,r[0],r[1])}},Vee=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Bee=Sr("HTMLFormElement"),$ee=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),{propertyIsEnumerable:Hee}=Object.prototype,Gee=Sr("RegExp"),uM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};jf(n,(s,r)=>{let i;(i=t(s,r,e))!==!1&&(o[r]=i||s)}),Object.defineProperties(e,o)},Uee=e=>{uM(e,(t,n)=>{if(Es(e)&&["arguments","caller","callee"].includes(n))return!1;const o=e[n];if(Es(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wee=(e,t)=>{const n={},o=s=>{s.forEach(r=>{n[r]=!0})};return Iu(e)?o(e):o(String(e).split(t)),n},zee=()=>{},jee=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kee(e){return!!(e&&Es(e.append)&&e[oM]==="FormData"&&e[zf])}const qee=e=>{const t=new WeakSet,n=o=>{if(yd(o)){if(t.has(o))return;if(vd(o))return o;if(!("toJSON"in o)){t.add(o);let s;if(wee(o)){s=[];for(const r of o){const i=n(r);!Pu(i)&&s.push(i)}}else s=Iu(o)?[]:{},jf(o,(r,i)=>{const a=n(r);!Pu(a)&&(s[i]=a)});return t.delete(o),s}}return o};return n(e)},Yee=Sr("AsyncFunction"),Xee=e=>e&&(yd(e)||Es(e))&&Es(e.then)&&Es(e.catch),cM=((e,t)=>e?setImmediate:t?((n,o)=>(ku.addEventListener("message",({source:s,data:r})=>{s===ku&&r===n&&o.length&&o.shift()()},!1),s=>{o.push(s),ku.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Es(ku.postMessage)),Zee=typeof queueMicrotask<"u"?queueMicrotask.bind(ku):typeof J<"u"&&J.nextTick||cM,dM=e=>e!=null&&Es(e[zf]),fe={isArray:Iu,isArrayBuffer:rM,isBuffer:vd,isFormData:See,isArrayBufferView:lee,isString:uee,isNumber:cee,isBoolean:dee,isObject:yd,isPlainObject:Vv,isEmptyObject:hee,isReadableStream:_ee,isRequest:Ree,isResponse:Tee,isHeaders:Dee,isUndefined:Pu,isDate:fee,isFile:pee,isReactNativeBlob:gee,isReactNative:mee,isBlob:vee,isRegExp:Gee,isFunction:Es,isStream:Cee,isURLSearchParams:Eee,isTypedArray:Nee,isFileList:yee,forEach:jf,merge:EE,extend:Iee,trim:xee,stripBOM:Pee,inherits:kee,toFlatObject:Fee,kindOf:SE,kindOfTest:Sr,endsWith:Oee,toArray:Mee,forEachEntry:Lee,matchAll:Vee,isHTMLForm:Bee,hasOwnProperty:va,hasOwnProp:va,hasOwnInPrototypeChain:bE,getSafeProp:iee,toSafeFlatObject:aee,reduceDescriptors:uM,freezeMethods:Uee,toObjectSet:Wee,toCamelCase:$ee,noop:zee,toFiniteNumber:jee,findKey:Aee,global:ku,isContextDefined:lM,isSpecCompliantForm:Kee,toJSONObject:qee,isAsyncFn:Yee,isThenable:Xee,setImmediate:cM,asap:Zee,isIterable:dM,isSafeIterable:e=>e!=null&&bE(e,zf)&&dM(e)},Jee=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qee=e=>{const t=Object.create(null);let n,o,s;return e&&e.split(`
|
|
149
149
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim();const a=fe.hasOwnProp(t,n);!n||a&&fe.hasOwnProp(Jee,n)||(n==="set-cookie"?a?t[n].push(o):t[n]=[o]:t[n]=a?t[n]+", "+o:o)}),t};function ete(e){let t=0,n=e.length;for(;t<n;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;n>t;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const tte=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),nte=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _E(e,t){return fe.isArray(e)?e.map(n=>_E(n,t)):ete(String(e).replace(t,""))}const ote=e=>_E(e,tte),ste=e=>_E(e,nte);function hM(e){const t=Object.create(null);return fe.forEach(e.toJSON(),(n,o)=>{t[o]=ste(n)}),t}const fM=Symbol("internals");function Kf(e){return e&&String(e).trim().toLowerCase()}function Bv(e){return e===!1||e==null?e:fe.isArray(e)?e.map(Bv):ote(String(e))}function rte(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const ite=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function RE(e){let t=0,n=e.length;for(;t<n;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;n>t;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function ate(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let o=1;o<t;o++){const s=e.charCodeAt(o);if(s===34||s===92&&(o+=1,o>=t))return e;n+=e[o]}return n}function lte(e){const t=Object.create(null),n=String(e);let o=0,s=!1,r=!1;function i(a){const l=RE(n.slice(o,a)),u=l.indexOf("=");if(u<1)return;const c=RE(l.slice(0,u));if(!ite.test(c))return;const d=c.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=RE(l.slice(u+1));t[d]=ate(h)}for(let a=0;a<n.length;a++){const l=n.charCodeAt(a);s?r?r=!1:l===92?r=!0:l===34&&(s=!1):l===34?s=!0:(l===44||l===59)&&(i(a),o=a+1)}return i(n.length),t}const ute=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),cte="__Proto__",pM=e=>e==="__proto__"?cte:e;function TE(e,t,n,o,s){if(fe.isFunction(o))return o.call(e,t,n);if(s&&(t=n),!!fe.isString(t)){if(fe.isString(o))return t.indexOf(o)!==-1;if(fe.isRegExp(o))return o.test(t)}}function dte(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function hte(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{__proto__:null,value:function(s,r,i){return this[o].call(this,t,s,r,i)},configurable:!0})})}let Ao=class{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function r(a,l,u){const c=Kf(l);if(!c)return;const d=fe.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[pM(d||l)]=Bv(a))}const i=(a,l)=>fe.forEach(a,(u,c)=>r(u,c,l));if(fe.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(fe.isString(t)&&(t=t.trim())&&!ute(t))i(Qee(t),n);else if(fe.isObject(t)&&fe.isSafeIterable(t)){let a=Object.create(null),l,u;for(const c of t){if(!fe.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],fe.hasOwnProp(a,u)?(l=a[u],a[u]=fe.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}i(a,n)}else t!=null&&r(n,t,o);return this}get(t,n){if(t=Kf(t),t){const o=fe.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return rte(s);if(fe.isFunction(n))return n.call(this,s,o);if(fe.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Kf(t),t){const o=fe.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||TE(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function r(i){if(i=Kf(i),i){const a=fe.findKey(o,i);a&&(!n||TE(o,o[a],a,n))&&(delete o[a],s=!0)}}return fe.isArray(t)?t.forEach(r):r(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const r=n[o];(!t||TE(this,this[r],r,t,!0))&&(delete this[r],s=!0)}return s}normalize(t){const n=this,o=Object.create(null);return fe.forEach(this,(s,r)=>{const i=fe.findKey(o,r);if(i){n[i]=Bv(s),delete n[r];return}const a=pM(t?dte(r):String(r).trim());a!==r&&delete n[r],n[a]=Bv(s),o[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return fe.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&fe.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
150
150
|
`)}getSetCookie(){const t=this.get("set-cookie");return fe.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return lte(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[fM]=this[fM]={accessors:{}}).accessors,s=this.prototype;function r(i){const a=Kf(i);o[a]||(hte(s,i),o[a]=!0)}return fe.isArray(t)?t.forEach(r):r(t),this}};Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(Ao.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),fe.freezeMethods(Ao);const $v="[REDACTED ****]";function fte(e){if(fe.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(fe.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function pte(e,t){const n=new Set(t.map(r=>String(r).toLowerCase())),o=[],s=r=>{if(r===null||typeof r!="object"||fe.isBuffer(r))return r;if(o.indexOf(r)!==-1)return;r instanceof Ao&&(r=r.toJSON()),o.push(r);let i;if(fe.isArray(r))i=[],r.forEach((a,l)=>{const u=s(a);fe.isUndefined(u)||(i[l]=u)});else{if(!fe.isPlainObject(r)&&fte(r))return o.pop(),r;i=Object.create(null);for(const[a,l]of Object.entries(r)){const u=n.has(a.toLowerCase())?$v:s(l);fe.isUndefined(u)||(i[a]=u)}}return o.pop(),i};return s(e)}function gM(e){try{return String(e)}catch{return""}}function gte(e){return e.errors.map(n=>{try{return n&&n.message?gM(n.message):gM(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}const mte=`
|
|
151
151
|
Caused by: `,DE=Symbol("causeStack");function vte(e,t){const n=fe.hasOwnProp(e,DE)&&e[DE];return n&&t.endsWith(n)?t.length-n.length:-1}function yte(e,t){try{const n=t&&t.stack;if(typeof n!="string"||!n)return;const o=e.stack;if(typeof o!="string"||!o)return;const s=mte+n;e.stack=o+s,Object.defineProperty(e,DE,{__proto__:null,value:s})}catch{}}let lt=class MG extends Error{static from(t,n,o,s,r,i){let a=t.message;!a&&fe.isArray(t.errors)&&t.errors.length&&(a=gte(t));const l=new MG(a,n||t.code,o,s,r);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,yte(l,t),t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,o,s,r){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),o&&(this.config=o),s&&(this.request=s),r&&(this.response=r,this.status=r.status)}toJSON(){const t=this.config,n=t&&fe.hasOwnProp(t,"redact")?t.redact:void 0,o=fe.isArray(n)&&n.length>0?pte(t,n):fe.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",lt.ERR_BAD_OPTION="ERR_BAD_OPTION",lt.ECONNABORTED="ECONNABORTED",lt.ETIMEDOUT="ETIMEDOUT",lt.ECONNREFUSED="ECONNREFUSED",lt.ERR_NETWORK="ERR_NETWORK",lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",lt.ERR_DEPRECATED="ERR_DEPRECATED",lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",lt.ERR_CANCELED="ERR_CANCELED",lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",lt.ERR_INVALID_URL="ERR_INVALID_URL",lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const wte=null,mM=100;function xE(e){return fe.isPlainObject(e)||fe.isArray(e)}function vM(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function AE(e,t,n){return e?e.concat(t).map(function(s,r){return s=vM(s),!n&&r?"["+s+"]":s}).join(n?".":""):t}function Cte(e){return fe.isArray(e)&&!e.some(xE)}const bte=fe.toFlatObject(fe,{},null,function(t){return/^is[A-Z]/.test(t)});function Hv(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(b,S)=>{const w=fe.getSafeProp(n,b);return fe.isUndefined(w)?S:w},s=o("metaTokens",!0),r=o("visitor")||g,i=o("dots",!1),a=o("indexes",!1),l=o("Blob")||typeof Blob<"u"&&Blob,u=o("maxDepth",mM),c=l&&fe.isSpecCompliantForm(t),d=[];if(!fe.isFunction(r))throw new TypeError("visitor must be a function");function h(b){if(b===null)return"";if(fe.isDate(b))return b.toISOString();if(fe.isBoolean(b))return b.toString();if(!c&&fe.isBlob(b))throw new lt("Blob is not supported. Use a Buffer instead.");if(fe.isArrayBuffer(b)||fe.isTypedArray(b)){if(c&&typeof l=="function")return new l([b]);throw new lt("Blob is not supported. Use a Buffer instead.",lt.ERR_NOT_SUPPORT)}return b}function f(b){if(b>u)throw new lt("Object is too deeply nested ("+b+" levels). Max depth: "+u,lt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(b,S){if(u===1/0)return JSON.stringify(b);const w=[];return JSON.stringify(b,function(R,D){if(!fe.isObject(D))return D;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(D),f(S+w.length-1),D})}function g(b,S,w){let E=b;if(fe.isReactNative(t)&&fe.isReactNativeBlob(b))return t.append(AE(w,S,i),h(b)),!1;if(b&&!w&&typeof b=="object"){if(fe.endsWith(S,"{}"))S=s?S:S.slice(0,-2),b=p(b,1);else if(fe.isArray(b)&&Cte(b)||(fe.isFileList(b)||fe.endsWith(S,"[]"))&&(E=fe.toArray(b)))return S=vM(S),E.forEach(function(D,x){!(fe.isUndefined(D)||D===null)&&t.append(a===!0?AE([S],x,i):a===null?S:S+"[]",h(D))}),!1}return xE(b)?!0:(t.append(AE(w,S,i),h(b)),!1)}const v=Object.assign(bte,{defaultVisitor:g,convertValue:h,isVisitable:xE});function y(b,S,w=0){if(!fe.isUndefined(b)){if(f(w),d.indexOf(b)!==-1)throw new Error("Circular reference detected in "+S.join("."));d.push(b),fe.forEach(b,function(R,D){(!(fe.isUndefined(R)||R===null)&&r.call(t,R,fe.isString(D)?D.trim():D,S,v))===!0&&y(R,S?S.concat(D):[D],w+1)}),d.pop()}}if(!fe.isObject(e))throw new TypeError("data must be an object");return y(e),t}function yM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(o){return t[o]})}function IE(e,t){this._pairs=[],e&&Hv(e,this,t)}const wM=IE.prototype;wM.append=function(t,n){this._pairs.push([t,n])},wM.toString=function(t){const n=t?o=>t.call(this,o,yM):yM;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ste(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function CM(e,t,n){if(!t)return e;e=e||"";const o=fe.isFunction(n)?{serialize:n}:n,s=fe.getSafeProp(o,"encode")||Ste,r=fe.getSafeProp(o,"serialize");let i;if(r?i=r(t,o):i=fe.isURLSearchParams(t)?t.toString():new IE(t,o).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const qf=Symbol("internals");function bM(e){return e?e.length:0}function SM(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Ete(e){return typeof e=="string"&&e!==""&&String(Number(e))===e?Number(e):e}function Yf(e,t){const n=e.handlers,o=bM(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):o!==t.handlersLength&&(o?t.handlerEntries.forEach(function(r,i){n[r.index]!==r.handler&&t.handlerEntries.delete(i)}):t.handlerEntries.clear()),t.handlersLength=o}class EM{constructor(){this.handlers=[],this[qf]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,o){const s={fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null},r=this[qf];this.handlers==null&&(this.handlers=[]),Yf(this,r);const i=r.nextId++;return this.handlers.push(s),r.handlerEntries.set(i,{handler:s,index:this.handlers.length-1}),r.handlersLength=this.handlers.length,i}eject(t){const n=this[qf];Yf(this,n);const o=Ete(t),s=n.handlerEntries.get(o);if(s){if(n.handlerEntries.delete(o),this.handlers[s.index]!==s.handler)return;this.handlers[s.index]=null,n.iterationDepth||(SM(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Yf(this,this[qf]))}forEach(t){const n=this[qf];Yf(this,n),n.iterationDepth++;try{fe.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--n.iterationDepth||(Yf(this,n),SM(this.handlers),n.handlersLength=bM(this.handlers))}}}const PE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},_te={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:IE,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},kE=typeof window<"u"&&typeof document<"u",FE=typeof navigator=="object"&&navigator||void 0,Rte=kE&&(!FE||["ReactNative","NativeScript","NS"].indexOf(FE.product)<0),Tte=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dte=kE&&window.location.href||"http://localhost",yo={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:kE,hasStandardBrowserEnv:Rte,hasStandardBrowserWebWorkerEnv:Tte,navigator:FE,origin:Dte},Symbol.toStringTag,{value:"Module"})),..._te};function xte(e,t){return Hv(e,new yo.classes.URLSearchParams,{visitor:function(n,o,s,r){return yo.isNode&&fe.isBuffer(n)?(this.append(o,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}const _M=mM;function RM(e){if(e>_M)throw new lt("FormData field is too deeply nested ("+e+" levels). Max depth: "+_M,lt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ate(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let o;for(;(o=n.exec(e))!==null;)RM(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function TM(e){const t={},n=Object.keys(e);let o;const s=n.length;let r;for(o=0;o<s;o++)r=n[o],t[r]=e[r];return t}function DM(e){if(!fe.isArray(e))return e;const t=Object.keys(e);return t.length!==e.length||t.some((n,o)=>n!==String(o))?TM(e):e}function Ite(e){const t=[e];for(;t.length;){const n=t.pop();Object.keys(n).forEach(o=>{const s=n[o]=DM(n[o]);(fe.isArray(s)||fe.isPlainObject(s))&&t.push(s)})}return e}function xM(e){function t(n,o,s,r){RM(r);let i=n[r++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=r>=n.length;return i=!i&&fe.isArray(s)?s.length:i,l?(fe.hasOwnProp(s,i)?(s[i]=DM(s[i]),s[i]=fe.isArray(s[i])?s[i].concat(o):[s[i],o]):s[i]=o,!a):((!fe.hasOwnProp(s,i)||!fe.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],r)&&fe.isArray(s[i])&&(s[i]=TM(s[i])),!a)}if(fe.isFormData(e)&&fe.isFunction(e.entries)){const n={};return fe.forEachEntry(e,(o,s)=>{t(Ate(o),s,n,0)}),Ite(n)}return null}const AM=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),wd=(e,t)=>e!=null&&fe.hasOwnProp(e,t)?e[t]:void 0;function Pte(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Xf={transitional:PE,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,r=fe.isObject(t);if(r&&fe.isHTMLForm(t)&&(t=new FormData(t)),fe.isFormData(t))return s?JSON.stringify(xM(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){const l=wd(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return xte(t,l).toString();if((a=fe.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=wd(this,"env"),c=u&&u.FormData;return Hv(a?{"files[]":t}:t,c&&new c,l)}}return r||s?(n.setContentType("application/json",!1),Pte(t)):t}],transformResponse:[function(t){const n=wd(this,"transitional")||Xf.transitional,o=n&&n.forcedJSONParsing,s=wd(this,"responseType"),r=s==="json";if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(o&&!s||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t,wd(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?lt.from(l,lt.ERR_BAD_RESPONSE,this,null,wd(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yo.classes.FormData,Blob:yo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(AM,e=>{Xf.headers[e]={}});function OE(e,t){const n=this||Xf,o=t||n,s=Ao.from(o.headers);let r=o.data;return fe.forEach(e,function(a){r=a.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function IM(e){return!!(e&&e.__CANCEL__)}let Zf=class extends lt{constructor(t,n,o){super(t??"canceled",lt.ERR_CANCELED,n,o),this.name="CanceledError",this.__CANCEL__=!0}};function PM(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new lt("Request failed with status code "+n.status,n.status>=400&&n.status<500?lt.ERR_BAD_REQUEST:lt.ERR_BAD_RESPONSE,n.config,n.request,n))}const kte=/[\t\n\r]/g;function kM(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(kte,"")}function ME(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}const FM=e=>{try{return decodeURIComponent(e)}catch{return e}},OM=yo.hasStandardBrowserEnv?{write(e,t,n,o,s,r,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];fe.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),fe.isString(o)&&a.push(`path=${o}`),fe.isString(s)&&a.push(`domain=${s}`),r===!0&&a.push("secure"),fe.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie;if(!t)return null;const n=t.split(";");for(let o=0;o<n.length;o++){const s=n[o].replace(/^\s+/,""),r=s.indexOf("=");if(r!==-1&&s.slice(0,r)===e)return FM(s.slice(r+1))}return null},async readAsync(e){try{const t=typeof window<"u"&&window.cookieStore;if(t&&fe.isFunction(t.get)){const n=await t.get(e);return n?FM(n.value):null}}catch{}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},async readAsync(){return null},remove(){}};function Fte(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,r=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[r];i||(i=u),n[s]=l,o[s]=u;let d=r,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),u-i<t)return;const f=c&&u-c;return f?Math.round(h*1e3/f):void 0}}function Ote(e,t){let n=0,o=1e3/t,s,r;const i=(c,d=Date.now())=>{n=d,s=null,r&&(clearTimeout(r),r=null),e(...c)};return[(...c)=>{const d=Date.now(),h=d-n;h>=o?i(c,d):(s=c,r||(r=setTimeout(()=>{r=null,i(s)},o-h)))},()=>s&&i(s),(...c)=>i(c)]}const Gv=(e,t,n=3)=>{let o=0;const s=Fte(50,250);return Ote(r=>{if(!r||!fe.isNumber(r.loaded))return;const i=r.loaded,a=r.lengthComputable?r.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),u=Math.max(0,l-o),c=s(u);o=Math.max(o,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},MM=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},NM=(e,t=fe.asap)=>(...n)=>t(()=>e(...n)),Mte=yo.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||yo.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(yo.origin)):()=>!0;function Nte(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lte(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Vte=/^https?:(?!\/\/)/i;function Bte(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,o="")=>`${n}${o}${$v}`)}function $te(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${$v}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${$v}`);return n===-1?s:`${s}#${Bte(t.slice(n+1))}`}function LM(e,t){if(typeof e=="string"){const n=kM(e);if(Vte.test(n))throw new lt(`Invalid URL ${JSON.stringify($te(n))}: missing "//" after protocol`,lt.ERR_INVALID_URL,t)}}function VM(e,t,n,o){LM(t,o);let s=!Nte(t);return e&&(s||n===!1)?(LM(e,o),Lte(e,t)):t}function Hte(e){const t=[{value:e}],n=new WeakSet,o=new WeakSet;for(;t.length;){const{value:s,done:r}=t.pop();if(!fe.isPlainObject(s)&&!fe.isArray(s))continue;if(r){n.delete(s);continue}if(n.has(s))throw new lt("Circular reference detected in params",lt.ERR_BAD_OPTION_VALUE);if(o.has(s))continue;o.add(s),n.add(s),t.push({value:s,done:!0});const i=Object.keys(s);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(s).forEach(a=>{const l=Object.getOwnPropertyDescriptor(s,a);l&&l.enumerable&&i.push(a)}),i.forEach(a=>{if(a==="__proto__"||a==="constructor"||a==="prototype"){const l=Object.getOwnPropertyDescriptor(s,a);l&&fe.hasOwnProp(l,"value")&&t.push({value:l.value})}else t.push({value:s[a]})})}}const BM=e=>e instanceof Ao?{...e}:e,NE=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{const n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function Gte(e,t){const n=[],o=new WeakMap,s={};function r(a,l){if(!fe.isPlainObject(l))return fe.isArray(l)?l.slice():l;const u=fe.isPlainObject(a)?a:s;let c=o.get(l);if(c||(c=new WeakMap,o.set(l,c)),c.has(u))return c.get(u);const d={};return c.set(u,d),n.push({base:u,source:l,result:d}),d}const i=fe.isUndefined(t)?r(void 0,e):r(e,t);for(;n.length;){const{base:a,source:l,result:u}=n.pop(),c=new Set(NE(a)),d=new Set(NE(l));new Set([...c,...d]).forEach(f=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=d.has(f),g=p?l[f]:void 0,v=(!p||fe.isPlainObject(g))&&c.has(f)?a[f]:void 0;u[f]=p?r(v,g):r(void 0,v)})}return Hte(i),i}function pl(e,t,n,o){return fe.isPlainObject(e)&&fe.isPlainObject(t)?fe.merge.call({caseless:o},e,t):fe.isPlainObject(t)?fe.merge({},t):fe.isArray(t)?t.slice():t}function $M(e,t,n,o){if(fe.isUndefined(t)){if(!fe.isUndefined(e))return pl(void 0,e,n,o)}else return pl(e,t,n,o)}function LE(e,t){if(!fe.isUndefined(t))return pl(void 0,t)}function Hn(e,t){if(fe.isUndefined(t)){if(!fe.isUndefined(e))return pl(void 0,e)}else return pl(void 0,t)}function Ute(e,t,n){const o=fe.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!fe.isUndefined(o))if(fe.isPlainObject(o)){if(fe.hasOwnProp(o,n))return o[n]}else return;const s=fe.hasOwnProp(e,"transitional")?e.transitional:void 0;if(fe.isPlainObject(s)&&fe.hasOwnProp(s,n))return s[n]}function VE(e,t,n,o,s){if(fe.hasOwnProp(s,n))return pl(e,t);if(fe.hasOwnProp(o,n))return pl(void 0,e)}function Wte(e,t,n){return $M(BM(e),BM(t),n,!0)}const zte=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),HM={url:LE,method:LE,data:LE,baseURL:Hn,transformRequest:Hn,transformResponse:Hn,params:Gte,paramsSerializer:Hn,timeout:Hn,timeoutErrorMessage:Hn,withCredentials:Hn,withXSRFToken:Hn,adapter:Hn,responseType:Hn,xsrfCookieName:Hn,xsrfHeaderName:Hn,onUploadProgress:Hn,onDownloadProgress:Hn,decompress:Hn,maxContentLength:Hn,maxBodyLength:Hn,beforeRedirect:Hn,transport:Hn,httpAgent:Hn,httpsAgent:Hn,cancelToken:Hn,socketPath:Hn,allowedSocketPaths:Hn,responseEncoding:Hn,validateStatus:VE,headers:Wte};function Fu(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",zte);const o=NE({...e,...t});for(let s=0,r=o.length;s<r;s++){const i=o[s];if(i==="__proto__"||i==="constructor"||i==="prototype")continue;const a=fe.hasOwnProp(HM,i)?HM[i]:$M,l=fe.hasOwnProp(e,i)?e[i]:void 0,u=fe.hasOwnProp(t,i)?t[i]:void 0,c=a===VE?a(l,u,i,e,t):a(l,u,i);fe.isUndefined(c)&&a!==VE||(n[i]=c)}return fe.hasOwnProp(t,"validateStatus")&&fe.isUndefined(t.validateStatus)&&Ute(e,t,"validateStatusUndefinedResolves")===!1&&(fe.hasOwnProp(e,"validateStatus")?n.validateStatus=pl(void 0,e.validateStatus):delete n.validateStatus),n}const jte=["content-type","content-length"];function Kte(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([o,s])=>{jte.includes(o.toLowerCase())&&e.set(o,s)})}const GM=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),qte=e=>OM.read(e);function UM(e,t=qte){const n=Fu({},e),o=f=>fe.hasOwnProp(n,f)?n[f]:void 0,s=o("data");let r=o("withXSRFToken");const i=o("xsrfHeaderName"),a=o("xsrfCookieName");let l=o("headers");const u=o("auth"),c=o("baseURL"),d=o("allowAbsoluteUrls"),h=o("url");if(n.headers=l=Ao.from(l),n.url=CM(VM(c,h,d,n),o("params"),o("paramsSerializer")),u){const f=fe.getSafeProp(u,"username")||"",p=fe.getSafeProp(u,"password")||"",g=o("transitional"),v=g&&fe.hasOwnProp(g,"encodeBasicAuthUsername")&&g.encodeBasicAuthUsername===!0;try{l.set("Authorization","Basic "+btoa((v?GM(f):f)+":"+(p?GM(p):"")))}catch(y){throw lt.from(y,lt.ERR_BAD_OPTION_VALUE,e)}}if(fe.isFormData(s)){const f=fe.getSafeProp(s,"getHeaders");yo.hasStandardBrowserEnv||yo.hasStandardBrowserWebWorkerEnv||fe.isReactNative(s)?l.setContentType(void 0):fe.isFunction(f)&&Kte(l,f.call(s),o("formDataHeaderPolicy"))}if(yo.hasStandardBrowserEnv&&(fe.isFunction(r)&&(r=r(n)),r===!0||r==null&&Mte(n.url))){const p=i&&a&&t(a);p&&l.set(i,p)}return n}const Yte=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){let s;try{const x=yo.hasStandardBrowserEnv&&typeof window<"u"&&window.cookieStore;s=x&&fe.isFunction(x.get)}catch{}let r;const i=UM(e,s?x=>(r=x,null):void 0);let a=i.data;const l=Ao.from(i.headers).normalize();let{responseType:u,onUploadProgress:c,onDownloadProgress:d}=i,h,f,p,g,v,y,b;function S(){clearTimeout(f);try{v&&v()}catch(x){setTimeout(()=>{throw x})}try{y&&y()}catch(x){setTimeout(()=>{throw x})}w&&(g&&w.removeEventListener("progress",g),w.upload&&(p&&w.upload.removeEventListener("progress",p),v&&w.upload.removeEventListener("loadend",v))),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function E(x){if(!w)return;if(w.status===0&&(ME(kM(i.url))||ME(yo.origin))!=="file"&&!(w.responseURL&&w.responseURL.startsWith("file:"))){o(new lt("Request aborted",lt.ECONNABORTED,e,w)),S(),w=null;return}try{x?b&&b(x):y&&y()}catch(P){setTimeout(()=>{throw P})}if(!w)return;const N=Ao.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),A={data:!u||u==="text"||u==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:N,config:e,request:w};PM(function(k){n(k),S()},function(k){o(k),S()},A),w=null}if("onloadend"in w?w.onloadend=E:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(E)},w.onabort=function(){w&&(o(new lt("Request aborted",lt.ECONNABORTED,e,w)),S(),w=null)},w.onerror=function(N){const B=N&&N.message?N.message:"Network Error",A=new lt(B,lt.ERR_NETWORK,e,w);A.event=N||null,o(A),S(),w=null},w.ontimeout=function(){if(!w)return;let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const B=i.transitional||PE;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),o(new lt(N,B.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,e,w)),S(),w=null},a===void 0&&l.setContentType(null),fe.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),u&&u!=="json"&&(w.responseType=i.responseType),d&&([g,y,b]=Gv(d,!0),w.addEventListener("progress",g)),c&&w.upload&&([p,v]=Gv(c),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",v)),i.cancelToken||i.signal){if(h=x=>{if(!w)return;o(!x||x.type?new Zf(null,e,w):x);const N=w;S(),w=null,N.abort()},i.cancelToken&&i.cancelToken.subscribe(h),!w)return;i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h))}if(!w)return;const R=ME(i.url);if(R&&!yo.protocols.includes(R)){o(new lt("Unsupported protocol "+R+":",lt.ERR_BAD_REQUEST,e)),S();return}const D=()=>{w&&("setRequestHeader"in w&&fe.forEach(hM(l),function(N,B){w.setRequestHeader(B,N)}),w.send(a||null))};if(r){const x=typeof performance<"u"&&fe.isFunction(performance.now)?()=>performance.now():Date.now,N=w.timeout>0?x()+Number(w.timeout):void 0,B=()=>{if(!w)return;const A=w;A.ontimeout(),A.abort()};if(N!==void 0){const A=()=>{const P=N-x();P>0?f=setTimeout(A,Math.min(P,2147483647)):B()};A()}OM.readAsync(r).then(A=>{if(w){if(N!==void 0&&x()>=N){B();return}if(A){const P=fe.hasOwnProp(i,"xsrfHeaderName")&&i.xsrfHeaderName;l.set(P,A)}D()}}).catch(A=>{w&&(o(lt.from(A,null,e,w)),S(),w=null)})}else D()})},Xte=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let o=!1;const s=function(l){if(!o){o=!0,i();const u=l instanceof Error?l:this.reason;n.abort(u instanceof lt?u:new Zf(u instanceof Error?u.message:u))}};let r=t&&setTimeout(()=>{r=null,s(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const i=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(l=>{const u=fe.getSafeProp(l,"unsubscribe");fe.isFunction(u)?u.call(l,s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!o){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>fe.asap(i),a},Zte=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,s;for(;o<n;)s=o+t,yield e.slice(o,s),o=s},Jte=async function*(e,t){for await(const n of Qte(e))yield*Zte(n,t)},Qte=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},WM=(e,t,n,o)=>{const s=Jte(e,t);let r=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=r+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},gl=`\r
|
|
@@ -189,7 +189,7 @@ ${l}`:c)}throw i},onCacheKey:i=>$re(t,n,i)}}function Bae(e){if(Tt(e))return e;if
|
|
|
189
189
|
* (c) 2026 kazuya kawaguchi
|
|
190
190
|
* Released under the MIT License.
|
|
191
191
|
*/const Yae="11.4.17";function Xae(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Sl().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Sl().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sl().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sl().__INTLIFY_PROD_DEVTOOLS__=!1)}const xn={UNEXPECTED_RETURN_TYPE:sae,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function hs(e,...t){return Dd(e,null,J.env.NODE_ENV!=="production"?{messages:JL,args:t}:void 0)}const JL={[xn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[xn.INVALID_ARGUMENT]:"Invalid argument",[xn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[xn.NOT_INSTALLED]:"Need to install with `app.use` function",[xn.UNEXPECTED_ERROR]:"Unexpected error",[xn.REQUIRED_VALUE]:"Required in value: {0}",[xn.INVALID_VALUE]:"Invalid value",[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[xn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[xn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},M0=_i("__translateVNode"),N0=_i("__datetimeParts"),L0=_i("__numberParts"),_a=_i("__enableEmitter"),Gu=_i("__disableEmitter"),QL=_i("__setPluralRules"),eV=_i("__injectWithOption"),kd=_i("__dispose"),Ds={FALLBACK_TO_ROOT:Hu,NOT_FOUND_PARENT_SCOPE:Hu+1,IGNORE_OBJ_FLATTEN:Hu+2,DEPRECATE_LEGACY_MODE:Hu+3,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:Hu+4,DUPLICATE_USE_I18N_CALLING:Hu+5,IGNORE_UNSAFE_LOCALE:Hu+6},Zae={[Ds.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Ds.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Ds.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Ds.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
192
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Ds.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[Ds.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Uu(e,...t){return fy(Zae[e],...t)}let tV=null;{const e=Sl().__VUE_INSTANCE_SETTERS__;On(e)&&e.push(t=>{tV=t})}function Dl(e){return eL(e)?(J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function mp(e){if(!rn(e)||El(e))return e;for(const t in e)if(Rr(e,t))if(!t.includes("."))rn(e[t])&&mp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let a=0;a<o;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in s||(s[n[a]]=_n()),!rn(s[n[a]])){J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_OBJ_FLATTEN,{key:n[a]})),r=!0;break}if(El(s[n[a]])&&(yL.includes(n[a+1])||n[a+1]==="cacheKey")){r=!0;break}s=s[n[a]]}r||(s[n[o]]=e[t],delete e[t]);const i=s[n[o]];rn(i)&&mp(i)}return e}function V0(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=Pn(n)?n:On(o)?_n():{[e]:_n()};if(On(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;if(l){if(Dl(l))return;i[l]=No(i,l)||_n(),my(u,i[l])}else my(u,i)}else Tt(a)&&my(JSON.parse(a),i)}),s==null&&r)for(const a in i)Rr(i,a)&&mp(i[a]);return i}function nV(e){return e.type}function oV(e,t,n){let o=rn(t.messages)?t.messages:_n();"__i18nGlobal"in n&&(o=V0(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(rn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(rn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function sV(e){return ye(Wa,null,e,0)}function Fd(){return tV??Go()}const rV="__INTLIFY_META__",iV=()=>[],Jae=()=>!1;let aV=0;function lV(e){return(t,n,o,s)=>e(n,o,Fd()||void 0,s)}const Qae=()=>{const e=Fd();let t=null;return e&&(t=nV(e)[rV])?{[rV]:t}:null};function Sy(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,r=Kr?$:xg;let i=Rn(e.inheritLocale)?e.inheritLocale:!0;const a=r(t&&i?t.locale.value:Tt(e.locale)?e.locale:gp),l=r(t&&i?t.fallbackLocale.value:Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),u=r(V0(a.value,e)),c=r(Pn(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=r(Pn(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:Rn(e.missingWarn)||$u(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Rn(e.fallbackWarn)||$u(e.fallbackWarn)?e.fallbackWarn:!0,p=t?t.fallbackRoot:Rn(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,v=In(e.missing)?e.missing:null,y=In(e.missing)?lV(e.missing):null,b=In(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const E=t?t.modifiers:Pn(e.modifiers)?e.modifiers:{};let R=e.pluralRules||t&&t.pluralRules,D;D=(()=>{o&&AL(null);const Te={version:Yae,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:E,pluralRules:R,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:f,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Te.datetimeFormats=c.value,Te.numberFormats=d.value;const He=Dae(Te);return o&&AL(He),He})(),Cy(D,a.value,l.value);function N(){return[a.value,l.value,u.value,c.value,d.value]}const B=q({get:()=>a.value,set:Te=>{D.locale=Te,a.value=Te}});function A(Te){o||(D.fallbackContext=Tae());try{return Te()}finally{o||(D.fallbackContext=void 0)}}function P(Te){A(()=>Cy(D,a.value,Te))}const k=q({get:()=>l.value,set:Te=>{l.value=Te,D.fallbackLocale=l.value,P(l.value)}}),O=q(()=>u.value),L=q(()=>c.value),H=q(()=>d.value);function W(){return In(b)?b:null}function se(Te){b=Te,D.postTranslation=Te}function ie(){return v}function Q(Te){Te!==null&&(y=lV(Te)),v=Te,D.missing=y}function ne(Te,He){return Te!=="translate"||!He.resolvedMessage}const Y=(Te,He,_t,Lt,Yt,Mn)=>{N();let Ne;try{J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,Ne=A(()=>Te(D))}finally{J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(_t!=="translate exists"&&oo(Ne)&&Ne===wy||_t==="translate exists"&&!Ne){const[Ve,Rt]=He();if(J.env.NODE_ENV!=="production"&&t&&Tt(Ve)&&ne(_t,Rt)&&(p&&(A0(f,Ve)||PL(h,Ve))&&Ts(Uu(Ds.FALLBACK_TO_ROOT,{key:Ve,type:_t})),J.env.NODE_ENV!=="production")){const{__v_emitter:jt}=D;jt&&p&&jt.emit("fallback",{type:_t,key:Ve,to:"global",groupId:bl(_t,Ve)})}return t&&p?Lt(t):Yt(Ve)}else{if(Mn(Ne))return Ne;throw hs(xn.UNEXPECTED_RETURN_TYPE)}};function I(...Te){return Y(He=>Reflect.apply(qL,null,[He,...Te]),()=>F0(...Te),"translate",He=>Reflect.apply(He.t,He,[...Te]),He=>He,He=>Tt(He))}function z(...Te){const[He,_t,Lt]=Te;if(Lt&&!rn(Lt))throw hs(xn.INVALID_ARGUMENT);return I(He,_t,so({resolvedMessage:!0},Lt||{}))}function ee(...Te){return Y(He=>Reflect.apply(HL,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>Reflect.apply(He.d,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function me(...Te){return Y(He=>Reflect.apply(WL,null,[He,...Te]),()=>P0(...Te),"number format",He=>Reflect.apply(He.n,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function xe(Te){return Te.map(He=>Tt(He)||oo(He)||Rn(He)?sV(String(He)):He)}const j={normalize:xe,interpolate:Te=>Te,type:"vnode"};function oe(...Te){return Y(He=>{let _t;const Lt=He;try{Lt.processor=j,_t=Reflect.apply(qL,null,[Lt,...Te])}finally{Lt.processor=null}return _t},()=>F0(...Te),"translate",He=>He[M0](...Te),He=>[sV(He)],He=>On(He))}function ae(...Te){return Y(He=>Reflect.apply(WL,null,[He,...Te]),()=>P0(...Te),"number format",He=>He[L0](...Te),iV,He=>Tt(He)||On(He))}function _(...Te){return Y(He=>Reflect.apply(HL,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>He[N0](...Te),iV,He=>Tt(He)||On(He))}function M(Te){R=Te,D.pluralRules=R}function re(Te,He){const _t=X(Te),Lt=D.messageResolver(_t,He);return Lt===null?No(_t,He):Lt}function pe(Te,He){return Y(()=>{if(!Te)return!1;const _t=Tt(He)?He:a.value,Lt=Tt(He)?[_t]:D.localeFallbacker(D,l.value,_t);for(let Yt=0;Yt<Lt.length;Yt++)if(by(re(Lt[Yt],Te)))return!0;return!1},()=>[Te],"translate exists",_t=>Reflect.apply(_t.te,_t,[Te,He]),Jae,_t=>Rn(_t))}function _e(Te){let He=null;const _t=D.localeFallbacker(D,l.value,a.value);for(let Lt=0;Lt<_t.length;Lt++){const Yt=re(_t[Lt],Te);if(Yt!=null){He=Yt;break}}return He}function we(Te){const He=_e(Te);return He??(t?t.tm(Te)||{}:{})}function X(Te){return No(u.value,Te)||{}}function U(Te,He){Dl(Te)||(s&&mp(He),u.value[Te]=He,D.messages=u.value)}function te(Te,He){Dl(Te)||(u.value[Te]=No(u.value,Te)||{},s&&mp(He),my(He,u.value[Te]),D.messages=u.value)}function le(Te){return No(c.value,Te)||{}}function Ye(Te,He){Dl(Te)||(c.value[Te]=He,D.datetimeFormats=c.value,UL(D,Te,He))}function Be(Te,He){Dl(Te)||(c.value[Te]=so(No(c.value,Te)||{},He),D.datetimeFormats=c.value,UL(D,Te,He))}function ze(Te){return No(d.value,Te)||{}}function Oe(Te,He){Dl(Te)||(d.value[Te]=He,D.numberFormats=d.value,jL(D,Te,He))}function nt(Te,He){Dl(Te)||(d.value[Te]=so(No(d.value,Te)||{},He),D.numberFormats=d.value,jL(D,Te,He))}aV++,Je(l,()=>P(l.value),{deep:!0,flush:"sync"}),t&&Kr&&(Je(t.locale,Te=>{i&&(a.value=Te,D.locale=Te,Cy(D,a.value,l.value))}),Je(t.fallbackLocale,Te=>{i&&(l.value=Te,D.fallbackLocale=l.value,Cy(D,a.value,l.value))}));const Ze={id:aV,locale:B,fallbackLocale:k,get inheritLocale(){return i},set inheritLocale(Te){i=Te,Te&&t&&(B.value=t.locale.value,k.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:O,get modifiers(){return E},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(Te){h=Te,D.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(Te){f=Te,D.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(Te){p=Te},get fallbackFormat(){return g},set fallbackFormat(Te){g=Te,D.fallbackFormat=g},get warnHtmlMessage(){return S},set warnHtmlMessage(Te){S=Te,D.warnHtmlMessage=Te},get escapeParameter(){return w},set escapeParameter(Te){w=Te,D.escapeParameter=Te},t:I,getLocaleMessage:X,setLocaleMessage:U,mergeLocaleMessage:te,getPostTranslationHandler:W,setPostTranslationHandler:se,getMissingHandler:ie,setMissingHandler:Q,[QL]:M};return Ze.datetimeFormats=L,Ze.numberFormats=H,Ze.rt=z,Ze.te=pe,Ze.tm=we,Ze.d=ee,Ze.n=me,Ze.getDateTimeFormat=le,Ze.setDateTimeFormat=Ye,Ze.mergeDateTimeFormat=Be,Ze.getNumberFormat=ze,Ze.setNumberFormat=Oe,Ze.mergeNumberFormat=nt,Ze[eV]=n,Ze[M0]=oe,Ze[N0]=_,Ze[L0]=ae,J.env.NODE_ENV!=="production"&&(Ze[_a]=Te=>{D.__v_emitter=Te},Ze[Gu]=()=>{D.__v_emitter=void 0}),Ze}const uV="vue-i18n: composer properties",B0={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},ele={"vue-i18n-resource-inspector":"Search for scopes ..."},tle={"vue-i18n-timeline":16764185};let $0;async function nle(e,t){return new Promise((n,o)=>{try{qae({id:"vue-devtools-plugin-vue-i18n",label:B0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[uV],app:e},s=>{$0=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{ole(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.__VUE_I18N__&&a&&(t.mode==="legacy"?i.__VUE_I18N__!==t.global.__composer&&dV(a,i.__VUE_I18N__):dV(a,i.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:B0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:ele["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&lle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),cle(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=ule(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&hle(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:B0["vue-i18n-timeline"],color:tle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function cV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function ole(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==o){const s={label:`i18n (${cV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function dV(e,t){const n=uV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:H0(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function H0(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];In(o)&&"source"in o?t[n]=ale(o):El(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:rn(o)?t[n]=H0(o):t[n]=o}),t}const sle={"<":"<",">":">",'"':""","&":"&"};function rle(e){return e.replace(/[<>"&]/g,ile)}function ile(e){return sle[e]||e}function ale(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${rle(e.source)}")`:"(?)"}`}}}function lle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${cV(o)} Scope`})}}function ule(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function hV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function cle(e,t){const n=hV(e.nodeId,t);return n&&(e.state=dle(n)),null}function dle(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:H0(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Wu(e,t){if($0){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),$0.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function hle(e,t){const n=hV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Tt(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Tt(e.state.value)||On(e.state.value)||rn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&Rn(e.state.value)&&(n.inheritLocale=e.state.value)}}const G0=new WeakMap;function Od(e){if(!$u(e))return!e;let t=G0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),G0.set(e,t),G0.set(t,e)),t}function fle(e){const t=Tt(e.locale)?e.locale:gp,n=Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=In(e.missing)?e.missing:void 0,s=Rn(e.silentTranslationWarn)||$u(e.silentTranslationWarn)?Od(e.silentTranslationWarn):!0,r=Rn(e.silentFallbackWarn)||$u(e.silentFallbackWarn)?Od(e.silentFallbackWarn):!0,i=Rn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Pn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=In(e.postTranslation)?e.postTranslation:void 0,d=Tt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=Rn(e.sync)?e.sync:!0;let p=e.messages;if(Pn(e.sharedMessages)){const E=e.sharedMessages;p=Object.keys(E).reduce((D,x)=>{if(Dl(x))return D;const N=No(D,x)||(D[x]={});return so(N,E[x]),D},p||{})}const{__i18n:g,__root:v,__injectWithOption:y}=e,b=e.datetimeFormats,S=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:b,numberFormats:S,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:g,__root:v,__injectWithOption:y}}function U0(e={}){const t=Sy(fle(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Od(t.missingWarn)},set silentTranslationWarn(s){t.missingWarn=Od(s)},get silentFallbackWarn(){return Od(t.fallbackWarn)},set silentFallbackWarn(s){t.fallbackWarn=Od(s)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,r){return t.te(s,r)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,r){t.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){t.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,r){t.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){t.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,r){t.setNumberFormat(s,r)},mergeNumberFormat(s,r){t.mergeNumberFormat(s,r)}};return o.__extender=n,J.env.NODE_ENV!=="production"&&(o.__enableEmitter=s=>{const r=t;r[_a]&&r[_a](s)},o.__disableEmitter=()=>{const s=t;s[Gu]&&s[Gu]()}),o}function ple(e,t,n){return{beforeCreate(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=so({},s.i18n);if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=fV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=U0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=fV(e,s);else{this.$i18n=U0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&oV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(J.env.NODE_ENV!=="production"&&this.$i18n){const o=Fd();if(!o)return;const s=this.$i18n;o.__VUE_I18N__=s.__composer;const r=this.__v_emitter=gy();s.__enableEmitter&&s.__enableEmitter(r),r.on("*",Wu)}},unmounted(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$i18n;J.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Wu),delete this.__v_emitter),s&&(s.__disableEmitter&&s.__disableEmitter(),delete o.__VUE_I18N__)),s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s!=null&&s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function fV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[QL](t.pluralizationRules||e.pluralizationRules);const n=V0(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const W0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function gle({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},_n())}function pV(){return Pt}const gV=ot({name:"i18n-t",props:so({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>oo(e)||!isNaN(e)}},W0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||z0({useScope:e.scope,__useComponent:!0});return()=>{const r=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),u=_n();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Tt(e.plural)?+e.plural:e.plural);const c=gle(t,l);return s[M0](e.keypath,c,u)},i=so(_n(),o),a=Tt(e.tag)||rn(e.tag)?e.tag:pV();return rn(a)?za(a,i,{default:r}):za(a,i,r())}}});function mle(e){return On(e)&&!Tt(e[0])}function mV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i=()=>{const u={part:!0};let c=_n();e.locale&&(u.locale=e.locale),Tt(e.format)?u.key=e.format:rn(e.format)&&(Tt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((f,p)=>n.includes(p)?so(_n(),f,{[p]:e.format[p]}):f,_n()));const d=o(e.value,u,c);let h=[u.key];return On(d)?h=d.map((f,p)=>{const g=s[f.type],v=g?g({[f.type]:f.value,index:p,parts:d}):[f.value];return mle(v)&&(v[0].key=`${f.type}-${p}`),v}):Tt(d)&&(h=[d]),h},a=so(_n(),r),l=Tt(e.tag)||rn(e.tag)?e.tag:pV();return rn(l)?za(l,a,{default:i}):za(l,a,i())}}const vV=ot({name:"i18n-n",props:so({value:{type:Number,required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return mV(e,t,zL,(...o)=>n[L0](...o))}});function vle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function yle(e){const t=i=>{J.env.NODE_ENV!=="production"&&py(Uu(Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=i;if(!a||!a.$)throw hs(xn.UNEXPECTED_ERROR);const u=vle(e,a.$),c=yV(l);return[Reflect.apply(u.t,u,[...wV(c)]),u]};return{created:(i,a)=>{const[l,u]=t(a);Kr&&(i.__i18nWatcher=Je(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Kr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=yV(a);i.textContent=Reflect.apply(l.t,l,[...wV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function yV(e){if(Tt(e))return{path:e};if(Pn(e)){if(!("path"in e))throw hs(xn.REQUIRED_VALUE,"path");return e}else throw hs(xn.INVALID_VALUE)}function wV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Tt(n)&&(i.locale=n),oo(s)&&(i.plural=s),oo(r)&&(i.plural=r),[t,a,i]}function wle(e,t,...n){const o=Pn(n[0])?n[0]:{};(Rn(o.globalInstall)?o.globalInstall:!0)&&([gV.name,"I18nT"].forEach(r=>e.component(r,gV)),[vV.name,"I18nN"].forEach(r=>e.component(r,vV)),[SV.name,"I18nD"].forEach(r=>e.component(r,SV))),e.directive("t",yle(t))}const Cle=_i("global-vue-i18n");function ble(e={}){const t=__VUE_I18N_LEGACY_API__&&Rn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;J.env.NODE_ENV!=="production"&&t&&py(Uu(Ds.DEPRECATE_LEGACY_MODE));const n=Rn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,r]=Sle(e,t),i=_i(J.env.NODE_ENV!=="production"?"vue-i18n":"");function a(d){return o.get(d)||null}function l(d,h){o.set(d,h)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...h){if(J.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=c),d.__VUE_I18N_SYMBOL__=i,d.provide(d.__VUE_I18N_SYMBOL__,c),Pn(h[0])){const g=h[0];c.__composerExtend=g.__composerExtend,c.__vueI18nExtend=g.__vueI18nExtend}let f=null;!t&&n&&(f=Ale(d,c.global)),__VUE_I18N_FULL_INSTALL__&&wle(d,c,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(ple(r,r.__composer,c));const p=d.unmount;d.unmount=()=>{f&&f(),c.dispose(),p()},J.env.NODE_ENV!=="production"&&nle(d,c).then(g=>{if(!g)throw hs(xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=gy();if(t){const y=r;y.__enableEmitter&&y.__enableEmitter(v)}else{const y=r;y[_a]&&y[_a](v)}v.on("*",Wu)}).catch(()=>{J.env.NODE_ENV!=="production"&&Ts(JL[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return r},dispose(){s.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:u};return c}function z0(e={}){const t=Fd();if(t==null)throw hs(xn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw hs(xn.NOT_INSTALLED);const n=Ele(t),o=Rle(n),s=nV(t),r=_le(e,s);if(r==="global")return oV(o,e,s),o;if(r==="parent"){let l=CV(n,t,e.__useComponent);return l==null&&(J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.NOT_FOUND_PARENT_SCOPE)),l=o),l}if(r==="isolated"){if(n.mode!=="composition")throw hs(xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,u=so({},e),c=CV(n,t);u.__root=c||o;const d=Sy(u);l.__composerExtend&&(d[kd]=l.__composerExtend(d));let h=null;if(J.env.NODE_ENV!=="production"){h=gy();const p=d;p[_a]&&p[_a](h),h.on("*",Wu)}return Qw()&&eC(()=>{if(J.env.NODE_ENV!=="production"){h&&h.off("*",Wu);const g=d;g[Gu]&&g[Gu]()}const p=d[kd];p&&(p(),delete d[kd])}),d}const i=n;let a=i.__getInstance(t);if(a==null){const l=so({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Sy(l),i.__composerExtend&&(a[kd]=i.__composerExtend(a)),Dle(i,t,a),i.__setInstance(t,a)}else J.env.NODE_ENV!=="production"&&r==="local"&&Ts(Uu(Ds.DUPLICATE_USE_I18N_CALLING));return a}function Sle(e,t){const n=Jw(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Sy(e));if(o==null)throw hs(xn.UNEXPECTED_ERROR);return[n,o]}function Ele(e){const t=En(e.isCE?Cle:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw hs(e.isCE?xn.NOT_INSTALLED_WITH_PROVIDE:xn.UNEXPECTED_ERROR);return t}function _le(e,t){return v0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Rle(e){return e.mode==="composition"?e.global:e.global.__composer}function CV(e,t,n=!1){let o=null;const s=t.root;let r=Tle(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[eV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function Tle(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dle(e,t,n){let o=null;Jt(()=>{if(J.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,o=gy();const s=n;s[_a]&&s[_a](o),o.on("*",Wu)}},t),ou(()=>{const s=n;J.env.NODE_ENV!=="production"&&(o&&o.off("*",Wu),s[Gu]&&s[Gu](),delete t.__VUE_I18N__),e.__deleteInstance(t);const r=s[kd];r&&(r(),delete s[kd])},t)}const xle=["locale","fallbackLocale","availableLocales"],bV=["t","rt","d","n","tm","te"];function Ale(e,t){const n=Object.create(null);return xle.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw hs(xn.UNEXPECTED_ERROR);const i=fn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,bV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw hs(xn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,bV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const SV=ot({name:"i18n-d",props:so({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return mV(e,t,GL,(...o)=>n[N0](...o))}});if(Xae(),bae(Qie),Sae(vae),Eae(aae),J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Sl();e.__INTLIFY__=!0,eae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}J.env.NODE_ENV;const EV={en:{}};function Ile(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function Ple(e,t=10,n=300){for(let o=0;o<t;o++){const s=Ile(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function kle(){const e=await Ple("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function Fle(){const e=await kle();return{...EV,en:{...EV.en,errorMessages:e}}}async function Ole(){return ble({legacy:!1,locale:"en",fallbackLocale:"en",messages:await Fle(),formatFallbackMessages:!0})}const Mle=async()=>{const e=await Ole();return jJ(e.global),e},_V=32,Nle=Math.round(_V*16/9),Lle="arbo-thumbnails",vp="thumbnails";let yp=null;const j0=new Map,K0=new Map;function RV(){return yp||(yp=new Promise((e,t)=>{const n=indexedDB.open(Lle,1);n.onupgradeneeded=()=>n.result.createObjectStore(vp),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),yp.catch(()=>yp=null)),yp}async function Vle(e,t){try{const n=await RV();return await new Promise((o,s)=>{const r=n.transaction(vp,"readonly").objectStore(vp).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Ble(e,t,n){try{const o=await RV();if(K0.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(vp,"readwrite");i.objectStore(vp).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function $le(e){return new Promise(t=>{new mP(e,{width:Nle,height:_V,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Hle(e,t){K0.set(e,t);let n=j0.get(e);n||(n=new Map,j0.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await Vle(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await $le(await i.blob());return await Ble(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(j0.delete(e),K0.delete(e))});return n.set(t,s),s}const Gle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",Ule="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Wle=["src"],zle=["src"],jle=["src"],Kle=Et(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=q(()=>t.value),o=q(()=>t.id),s=q(()=>t.disabled),r=q(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=q(()=>n.value==null||n.value===""),c=q(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=md(),{openSceneHub:g}=p,v=q(()=>{const S=ln.getInstance().getItem("ws.code"),w=ln.getInstance().getItem("BASE_URL"),E=S||t.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:w,ws_code:E,scene_id:String(t.id)}}).url}),y=S=>{try{if(S.ctrlKey||S.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{b()}},b=()=>{var E,R,D,x,N,B;(E=t.params)==null||E.api.clearFocusedCell();const S=((D=(R=t.params)==null?void 0:R.column)==null?void 0:D.getColId())||"",w=((N=(x=t.params)==null?void 0:x.node)==null?void 0:N.rowIndex)||0;(B=t.params)==null||B.api.setFocusedCell(w,S)};return Je(()=>[o.value,n.value],async([S,w],E,R)=>{let D=!0;if(R(()=>{D=!1,h()}),l.value=!1,i.value="",!(S==null||S===""||!w))try{const x=await Hle(String(S),w);if(!D||S!==o.value||w!==n.value)return;a=URL.createObjectURL(x),i.value=a}catch(x){D&&S===o.value&&w===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",x),i.value=w)}},{immediate:!0}),Vn(f),(S,w)=>(K(),he("div",{class:ce(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:y},[u.value?(K(),he("img",{key:0,src:V(Ule),alt:"No thumbnail"},null,8,Wle)):c.value?(K(),he("img",{key:1,src:V(Gle),alt:"Broken thumbnail"},null,8,zle)):i.value?(K(),he("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,jle)):qe("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),qle={class:"left-section"},Yle={class:"create-count"},Xle={class:"modified-template-options"},Zle=["onClick"],Jle={class:"setting-count"},Qle={class:"field-label"},eue={class:"field-label"},tue={class:"status-selection"},nue={class:"preview-section"},oue={key:0,class:"preview-list"},sue={key:0,class:"preview-more"},rue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},q0=1e3,TV=8,DV=7,iue=Et(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=qt,s=Do,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(ae,_)=>{c.value[ae]=_ instanceof HTMLElement?_:null},h=$(null),f=$("1"),p=ae=>{var re;const _=Number(ae),M=_===0?"1":_>q0?String(q0):ae;f.value=M,(re=i.value)==null||re.setValue(M)},g=e,v=$([]),y=q(()=>{const ae=b.value;let _=1;const M="9999.",re={createCount:`${M}0`,input:`${M}1`,firstField:`${M}5`,stepField:`${M}6`,number_up:`${M}1`,number_down:`${M}2`,letter_up:`${M}3`,letter_down:`${M}4`,statusSelect:`${M}7`};return["number_up","number_down","letter_up","letter_down"].forEach((_e,we)=>{_++,re[_e]=`${M}${_}`}),ae?(_++,re.statusSelect=`${M}${_}`,_++,re.firstField=`${M}${_}`,_++,re.stepField=`${M}${_}`):(delete re.firstField,delete re.stepField),re}),b=q(()=>v.value.find(ae=>typeof ae!="string"&&(ae.id==="number"||ae.id==="letter"))),S=$("number"),w=$("up"),E=Po({...yi.number}),R=Po({...yi.number}),D=()=>{Object.assign(E,yi[S.value]),Object.assign(R,yi[S.value])};Je(b,ae=>{if(!ae)return;const _=ae.id;_!==S.value&&(S.value=_,D()),w.value=ae.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const x=q(()=>HO[w.value]),N=q(()=>{const ae=Number(f.value);return Number.isFinite(ae)?Math.min(q0,Math.max(0,Math.floor(ae))):0}),B=(ae,_)=>{const M=WO(S.value,ae,_);E[ae]=M,Fv(ae,M)&&(R[ae]=M)},A=$(null),P=$(null),k=$(null),O=(ae,_)=>{var re,pe,_e,we;if(_.key==="Enter"||_.key==="Escape")return;if(_.key==="Tab"){_.preventDefault(),_.stopPropagation(),_.stopImmediatePropagation();const X=_.shiftKey;ae=="first"&&(X?(re=c.value.letter_down)==null||re.focus():(pe=A.value)==null||pe.focus()),ae=="step"&&(X?(_e=A.value)==null||_e.focus():(we=i.value)==null||we.focus());return}_.key.length===1&&!_.ctrlKey&&!_.metaKey&&!_.altKey&&!UO(S.value,ae,_.key)&&_.preventDefault()},L=(ae,_)=>{var we;_.preventDefault();const M=_.target,re=((we=_.clipboardData)==null?void 0:we.getData("text/plain"))??"",pe=M.selectionStart??M.value.length,_e=M.selectionEnd??M.value.length;M.value=M.value.slice(0,pe)+re+M.value.slice(_e),B(ae,M.value),M.value=E[ae]},H=ae=>{if(Fv(ae,E[ae]))return;const _=yi[S.value][ae];E[ae]=_,R[ae]=_},W=q(()=>b.value?pE({type:S.value,direction:w.value,first:R.first,step:R.step,count:N.value}):[]),se=q(()=>v.value.every(ae=>typeof ae=="string"&&!ae)),ie=q(()=>N.value===0||se.value?[]:Array.from({length:N.value}).map((ae,_)=>v.value.map(M=>typeof M=="string"?M:W.value[_]??"").join(""))),Q=q(()=>ie.value.length>TV?ie.value.length-DV:0),ne=q(()=>ie.value.length>TV?ie.value.slice(0,DV):ie.value),Y=ae=>{z.value=[ae];const _=ae.id.split("_")[0],M=ae.id.split("_")[1],re=l[ae.id],pe=r.value;if(!pe)return;const _e=X=>v.value.find(U=>typeof U!="string"&&X.includes(U.id));if(_==="name"){_e(["name"])?pe.deleteTag("name"):pe.insertTag({id:_,text:re,direction:void 0});return}const we=_e(["number","letter"]);if(we){const X=we.id===_,U=we.direction===M;if(X&&U){pe.deleteTag(we.id);return}pe.deleteTag(we.id),pe.insertTag({id:_,text:re,direction:M})}else pe.insertTag({id:_,text:re,direction:M})},I=ae=>ee(ae.id)?ae.description.active:!!b.value&&ae.description.switch?ae.description.switch:ae.description.inactive,z=$(null),ee=ae=>{const[_,M]=ae.split("_");return v.value.some(re=>typeof re!="string"&&re.id===_&&re.direction===M)},me=n,xe=q(()=>{const[ae]=v.value;return v.value.length===1&&typeof ae!="string"&&ae.id==="name"});q(()=>v.value.length===0||xe.value);const de=()=>{const ae=v.value.map(_=>typeof _=="string"?{type:"text",value:_}:_.id==="name"?{type:"current_name"}:{type:"counter",value:E.first,direction:_.direction=="up"?"asc":"desc",format:_.id==="number"?"number":"letter",step:E.step});me("changed",{data:ae,count:N.value,template_flow_status_id:u.value||void 0})};Je([v,f,E,u],()=>{de()},{deep:!0,immediate:!0}),Je(v,()=>{console.log("inputContent changed",v.value)}),t({reset:()=>{z.value=null,v.value=[]},focus:()=>{var ae;(ae=i.value)==null||ae.focus()}}),Jt(()=>{var ae,_;(ae=r.value)==null||ae.insertText(g.takeName),(_=r.value)==null||_.insertTag({id:"number",text:"1→9",direction:"up"}),ft(()=>{var M;(M=i.value)==null||M.focus()})});const oe=ae=>{var _,M;ae.preventDefault(),ae.stopPropagation(),(_=i.value)==null||_.blur(),(M=h.value)==null||M.focus()};return(ae,_)=>(K(),he("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[be("div",qle,[be("div",Yle,[_[10]||(_[10]=be("span",null,"How many to create?",-1)),Ue(ye(V(dl),{"model-value":f.value,type:"number","max-decimal-char":0,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:"Enter count","onUpdate:modelValue":p},null,8,["model-value"]),[[V(s),y.value.createCount]])]),Ue(ye(hN,{modelValue:v.value,"onUpdate:modelValue":_[0]||(_[0]=M=>v.value=M),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:oe},null,8,["modelValue"]),[[V(s),y.value.input]]),be("div",Xle,[(K(!0),he(Pt,null,Dn(e.options,M=>Ue((K(),he("button",{onClick:re=>Y(M),ref_for:!0,ref:re=>d(M.id,re),key:M.id,class:ce([{active:ee(M.id)},"template-option"])},[tt(at(M.name)+" ",1),M.icon?(K(),We(V(gt),{key:0,src:M.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,Zle)),[[V(o),{content:I(M),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${y.value[M.id]}`]])),128))]),be("div",Jle,[be("span",Qle,at(x.value.first),1),Ue((K(),We(V(dl),{ref_key:"firstFieldRef",ref:P,"model-value":E.first,disabled:!b.value,"max-length":V(hE),onInput:_[1]||(_[1]=M=>B("first",M)),onKeydown:_[2]||(_[2]=M=>O("first",M)),onPaste:_[3]||(_[3]=M=>L("first",M)),onBlur:_[4]||(_[4]=M=>H("first")),"show-clear":!1},{clear:Ce(()=>[..._[11]||(_[11]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),y.value.firstField]]),be("span",eue,at(x.value.step),1),Ue(ye(V(dl),{"model-value":E.step,disabled:!b.value,"max-length":V(fE),onInput:_[5]||(_[5]=M=>B("step",M)),onKeydown:_[6]||(_[6]=M=>O("step",M)),onPaste:_[7]||(_[7]=M=>L("step",M)),onBlur:_[8]||(_[8]=M=>H("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:A},null,8,["model-value","disabled","max-length"]),[[V(s),y.value.stepField]])]),be("div",tue,[_[12]||(_[12]=be("span",null,"Status",-1)),ye(V(KN),{modelValue:u.value,"onUpdate:modelValue":_[9]||(_[9]=M=>u.value=M),"get-status-func":g.getStatusFunc,"workspace-id":g.workspaceId,id:g.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:k,"focus-index":y.value.statusSelect,placeholder:"Select status"},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),be("div",nue,[_[13]||(_[13]=be("span",{class:"preview-title"},"Preview",-1)),ne.value.length>0?(K(),he("ul",oue,[(K(!0),he(Pt,null,Dn(ne.value,(M,re)=>(K(),he("li",{key:re},[ye(pN,{text:M},null,8,["text"])]))),128)),Q.value>0?(K(),he("li",sue," … "+at(Q.value)+" more ",1)):qe("",!0)])):(K(),he("div",rue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-707a6dae"]]),xV={text:ml,id:void 0,assignees:Ooe,status:bN,dateRange:Moe,isStarted:ml,isCompleted:ml,lastUpdated:ml,completedOn:ml,isDeleted:ml,isArchived:ml,isProcessing:ml,name:mN,options:uQ,metric:wN,__checkboxSelection:void 0,description:Vre,thumbnail:Kle},aue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},lue={text:null,id:void 0,assignees:YO,status:cN,dateRange:Noe,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:mN,options:vN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},uue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},cue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},due=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Md=e=>{if(e)return due(e)};function AV(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Md((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class Y0{constructor(){bn(this,"eGui");bn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const IV=new Map;class wp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=AV((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Md(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&xV.metric?Md(n)==="rating"?o=kre:o=wN:o=xV[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Md(n);return o&&["number","dropdown"].includes(r)?s=Wse:s=lue[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=AV((r=n.colDef)==null?void 0:r.field,n),s=aue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=uue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=cue[o]??{},i=Md(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>hue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}bn(wp,"wrappers",null);const hue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return IV.set(o,(IV.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:Y0,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:Y0,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:Y0,params:{fullwidth:!1}}:t},fue=Et(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=q(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=q(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=q(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(K(),We(_C(r.value),Kt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function pue(e){return"stopEditing"in e}const gue=8,mue=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function PV(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"componsenExposed",null);bn(this,"params");bn(this,"isEditor",!1);bn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=pue(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(fue,i),YC(this.vNode,this.container);const a=performance.now()-o;a>gue&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():mue(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Md(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{YC(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Ey(e){return PV(e)}function kV(e){return PV(e)}var zu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ra(e){return e==null||e===""?null:e}function pt(e){return e!=null&&e!==""}function Gn(e){return!pt(e)}function X0(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Cp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function vue(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var yue=/[&<>"']/g,wue={"&":"&","<":"<",">":">",'"':""","'":"'"};function Nd(e){return(e==null?void 0:e.toString().toString())??null}function bp(e){var t;return((t=Nd(e))==null?void 0:t.replace(yue,n=>wue[n]))??null}function Di(e){return e.eRootDiv.getRootNode()}function jn(e){return Di(e).activeElement}function Vo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&pt(s)?o=s():n&&(o=n.ownerDocument),o&&pt(o)?o:document}function FV(e){const t=jn(e);return t===null||t===Vo(e).body}function OV(e){return Vo(e).defaultView||window}function Z0(e){let t=null,n=null;try{t=Vo(e).fullscreenElement}catch{}finally{t||(t=Di(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function Cue(e){const t=Z0(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function bue(e){const t=Z0(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function qr(e,t,n){n==null||typeof n=="string"&&n==""?MV(e,t):Tr(e,t,n)}function Tr(e,t,n){e.setAttribute(NV(t),n.toString())}function MV(e,t){e.removeAttribute(NV(t))}function NV(e){return`aria-${e}`}function xl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Sue(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Eue(e){return e.getAttribute("aria-label")}function Ld(e,t){qr(e,"label",t)}function Sp(e,t){qr(e,"labelledby",t)}function LV(e,t){qr(e,"live",t)}function _ue(e,t){qr(e,"atomic",t)}function Rue(e,t){qr(e,"relevant",t)}function Tue(e,t){qr(e,"invalid",t)}function Due(e,t){qr(e,"disabled",t)}function VV(e,t){qr(e,"hidden",t)}function J0(e,t){Tr(e,"expanded",t)}function xue(e,t){Tr(e,"setsize",t)}function Aue(e,t){Tr(e,"posinset",t)}function Iue(e,t){Tr(e,"multiselectable",t)}function Pue(e,t){Tr(e,"rowcount",t)}function _y(e,t){Tr(e,"rowindex",t)}function kue(e,t){Tr(e,"rowspan",t)}function Fue(e,t){Tr(e,"colcount",t)}function BV(e,t){Tr(e,"colindex",t)}function Oue(e,t){Tr(e,"colspan",t)}function Mue(e,t){Tr(e,"sort",t)}function Nue(e){MV(e,"sort")}function $V(e,t){qr(e,"selected",t)}function Lue(e,t){qr(e,"controls",t)}function Vue(e,t){Lue(e,t.id),Sp(t,e.id)}function HV(e,t){qr(e,"owns",t)}function Ry(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Bue="[tabindex], input, select, button, textarea, [href]",GV="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ep(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(GV)?!1:xi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||VV(e,!t)}function $ue(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||VV(e,!t)}function _p(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function ju(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function Ku(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function Q0(e){const t=Ku(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Rp(e){const t=Ku(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function UV(e){const{height:t,marginBottom:n,marginTop:o}=Ku(e);return Math.floor(t+n+o)}function Ty(e){const{width:t,marginLeft:n,marginRight:o}=Ku(e);return Math.floor(t+n+o)}function WV(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=Ku(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Dy(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function xy(e,t,n){n&&(t*=-1),e.scrollLeft=t}function zo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Yr(e){e!=null&&e.parentNode&&e.remove()}function zV(e){return!!e.offsetParent}function xi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!zV(e)||window.getComputedStyle(e).visibility!=="visible")}function e_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jV(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function KV(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Hue(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Tp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Hue(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Ay(e){return()=>{const t=e();return t?t_(t)||qV(t):!0}}function t_(e){return e.clientWidth<e.scrollWidth}function qV(e){return e.clientHeight<e.scrollHeight}function Iy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ai(e,t)}function Ai(e,t){t=n_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Dp(e,t){t=n_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function n_(e){return typeof e=="number"?`${e}px`:e}function o_(e){return e instanceof Node||e instanceof HTMLElement}function Ys(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Al(e,t,n){const s=OV(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function Ta(e,t){const n=OV(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var YV="data-ref",s_;function XV(){return s_??(s_=document.createTextNode(" ")),s_.cloneNode()}function xp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(YV,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(XV()),l=!1),a.append(xp(u)),a.appendChild(XV())))}return a}var Gue=["touchstart","touchend","touchmove","touchcancel","scroll"],Uue=["wheel"],r_={},ZV=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof r_[n]=="boolean")return r_[n];const o=document.createElement(e[n]||"div");return n="on"+n,r_[n]=n in o}})();function Wue(e,t){return!t||!e?!1:jue(t).indexOf(e)>=0}function zue(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function jue(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():zue(t)}function Kue(e,t,n){const o=que(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var que=e=>{const t=Gue.includes(e),n=Uue.includes(e);if(t)return!0;if(n)return!1};function JV(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Ap=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Ip(e,t){return e.gos.isElementInThisInstance(t.target)}function Yue(e,t,n){const s=e.getBoundingClientRect().height,r=Cue(n)-2,i=bue(n)-2;if(!e.offsetParent)return;const l=WV(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Vo(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Py=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},i_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Il=e=>{e.cancelable&&e.preventDefault()};function Xue(e,t){return t}function QV(e){return(e==null?void 0:e.getLocaleTextFunc())??Xue}function Zue(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Jue(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Que(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Ii=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new zu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if(ece(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=tce(e);e instanceof HTMLElement?Kue(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return QV(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ece(e){return e.__addEventListener!==void 0}function tce(e){return e.eventServiceType==="global"}var Ke=class extends Ii{},eB={};function a_(e,t){eB[t]||(e(),eB[t]=!0)}var nce={pending:!1,funcs:[]},oce={pending:!1,funcs:[]};function l_(e,t="setTimeout",n){const o=t==="raf"?oce:nce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?Ta(n,s):window.setTimeout(s,0)}function jo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function tB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function sce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var nB=new Set(["__proto__","constructor","prototype"]);function rce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!nB.has(o)))t(n,e[n])}}function fs(e,t,n=!0,o=!1){pt(t)&&rce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),oB(r)&&oB(i)&&!Array.isArray(i)?fs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function oB(e){return typeof e=="object"&&e!==null}var u_=class Ba{static applyGlobalGridOptions(t){if(!Ba.gridOptions)return{...t};let n={};return fs(n,Ba.gridOptions,!0,!0),Ba.mergeStrategy==="deep"?fs(n,t,!0,!0):n={...n,...t},Ba.gridOptions.context&&(n.context=Ba.gridOptions.context),t.context&&(Ba.mergeStrategy==="deep"&&n.context&&fs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ba.mergeStrategy==="deep"){const o=ice(t);if(o&&typeof o=="object"&&typeof n=="object")return Ba.applyGlobalGridOptions({[t]:n})[t]}return n}};u_.gridOptions=void 0,u_.mergeStrategy="shallow";var c_=u_;function ice(e){var t;return(t=c_.gridOptions)==null?void 0:t[e]}var ace={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},sB="https://www.ag-grid.com";function Pl(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Pp(e,...t){a_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Vd(e,...t){a_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var rB=new Set,ky={},Bd={},Fy,iB=!1,aB=!1,lce=!1;function uce(e){const[t,n]=e.version.split(".")||[],[o,s]=Fy.split(".")||[];return t===o&&n===s}function cce(e){var o;Fy||(Fy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?uce(e)||Vd(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Fy}.`)):Vd(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&Vd(`${n.message}`)}function kp(e,t,n=!1){n||(iB=!0),cce(e);const o=e.rowModels??["all"];rB.add(e);let s;t!==void 0?(aB=!0,Bd[t]===void 0&&(Bd[t]={}),s=Bd[t]):s=ky;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)kp(r,t,n)}function dce(e){delete Bd[e]}function d_(e,t,n){const o=s=>{var r,i,a;return!!((r=ky[s])!=null&&r[e])||!!((a=(i=Bd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function h_(){return aB}function hce(e,t){const n=Bd[e]??{};return[...Object.values(ky.all??{}),...Object.values(n.all??{}),...Object.values(ky[t]??{}),...Object.values(n[t]??{})]}function fce(){return new Set(rB)}function pce(){return iB}function lB(){return lce}var gce=class{static register(e){kp(e,void 0)}static registerModules(e){for(const t of e)kp(t,void 0)}},dt="34.3.1",uB=2e3,cB=100,dB="_version_",Oy=null,$d=`${sB}/javascript-data-grid`;function mce(e){Oy=e}function vce(e){$d=e}function hB(e,t,n){return(Oy==null?void 0:Oy(e,t))??[bce(e,t,n)]}function f_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...hB(t,n,s))}function yce(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function wce(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=yce(e)),t}function My(e){return e===void 0?"undefined":e===null?"null":e}function p_(e,t){return`${e}?${t.toString()}`}function Cce(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=p_(e,t);for(const[r,i]of o){if(r===dB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>cB?i.slice(0,i.length-u)+l:i.slice(0,cB)+l;t.set(r,c),s=p_(e,t)}return s}function fB(e,t){const n=new URLSearchParams;if(n.append(dB,dt),t)for(const r of Object.keys(t))n.append(r,wce(t[r]));const o=`${$d}/errors/${e}`,s=p_(o,n);return s.length<=uB?s:Cce(o,n,uB)}var bce=(e,t,n)=>{const o=fB(e,t),s=`${n?n+`
|
|
192
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Ds.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[Ds.IGNORE_UNSAFE_LOCALE]:"Ignore '{locale}' locale: it is a property name of Object.prototype"};function Uu(e,...t){return fy(Zae[e],...t)}let tV=null;{const e=Sl().__VUE_INSTANCE_SETTERS__;On(e)&&e.push(t=>{tV=t})}function Dl(e){return eL(e)?(J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function mp(e){if(!rn(e)||El(e))return e;for(const t in e)if(Rr(e,t))if(!t.includes("."))rn(e[t])&&mp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let a=0;a<o;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in s||(s[n[a]]=_n()),!rn(s[n[a]])){J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.IGNORE_OBJ_FLATTEN,{key:n[a]})),r=!0;break}if(El(s[n[a]])&&(yL.includes(n[a+1])||n[a+1]==="cacheKey")){r=!0;break}s=s[n[a]]}r||(s[n[o]]=e[t],delete e[t]);const i=s[n[o]];rn(i)&&mp(i)}return e}function V0(e,t){const{messages:n,__i18n:o,messageResolver:s,flatJson:r}=t,i=Pn(n)?n:On(o)?_n():{[e]:_n()};if(On(o)&&o.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;if(l){if(Dl(l))return;i[l]=No(i,l)||_n(),my(u,i[l])}else my(u,i)}else Tt(a)&&my(JSON.parse(a),i)}),s==null&&r)for(const a in i)Rr(i,a)&&mp(i[a]);return i}function nV(e){return e.type}function oV(e,t,n){let o=rn(t.messages)?t.messages:_n();"__i18nGlobal"in n&&(o=V0(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(rn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(rn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function sV(e){return ye(Wa,null,e,0)}function Fd(){return tV??Go()}const rV="__INTLIFY_META__",iV=()=>[],Jae=()=>!1;let aV=0;function lV(e){return(t,n,o,s)=>e(n,o,Fd()||void 0,s)}const Qae=()=>{const e=Fd();let t=null;return e&&(t=nV(e)[rV])?{[rV]:t}:null};function Sy(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,r=Kr?$:xg;let i=Rn(e.inheritLocale)?e.inheritLocale:!0;const a=r(t&&i?t.locale.value:Tt(e.locale)?e.locale:gp),l=r(t&&i?t.fallbackLocale.value:Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),u=r(V0(a.value,e)),c=r(Pn(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=r(Pn(e.numberFormats)?e.numberFormats:{[a.value]:{}});let h=t?t.missingWarn:Rn(e.missingWarn)||$u(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Rn(e.fallbackWarn)||$u(e.fallbackWarn)?e.fallbackWarn:!0,p=t?t.fallbackRoot:Rn(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,v=In(e.missing)?e.missing:null,y=In(e.missing)?lV(e.missing):null,b=In(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const E=t?t.modifiers:Pn(e.modifiers)?e.modifiers:{};let R=e.pluralRules||t&&t.pluralRules,D;D=(()=>{o&&AL(null);const Te={version:Yae,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:E,pluralRules:R,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:f,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Te.datetimeFormats=c.value,Te.numberFormats=d.value;const He=Dae(Te);return o&&AL(He),He})(),Cy(D,a.value,l.value);function N(){return[a.value,l.value,u.value,c.value,d.value]}const B=q({get:()=>a.value,set:Te=>{D.locale=Te,a.value=Te}});function A(Te){o||(D.fallbackContext=Tae());try{return Te()}finally{o||(D.fallbackContext=void 0)}}function P(Te){A(()=>Cy(D,a.value,Te))}const k=q({get:()=>l.value,set:Te=>{l.value=Te,D.fallbackLocale=l.value,P(l.value)}}),O=q(()=>u.value),L=q(()=>c.value),H=q(()=>d.value);function W(){return In(b)?b:null}function se(Te){b=Te,D.postTranslation=Te}function ie(){return v}function Q(Te){Te!==null&&(y=lV(Te)),v=Te,D.missing=y}function ne(Te,He){return Te!=="translate"||!He.resolvedMessage}const Y=(Te,He,_t,Lt,Yt,Mn)=>{N();let Ne;try{J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,Ne=A(()=>Te(D))}finally{J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__}if(_t!=="translate exists"&&oo(Ne)&&Ne===wy||_t==="translate exists"&&!Ne){const[Ve,Rt]=He();if(J.env.NODE_ENV!=="production"&&t&&Tt(Ve)&&ne(_t,Rt)&&(p&&(A0(f,Ve)||PL(h,Ve))&&Ts(Uu(Ds.FALLBACK_TO_ROOT,{key:Ve,type:_t})),J.env.NODE_ENV!=="production")){const{__v_emitter:jt}=D;jt&&p&&jt.emit("fallback",{type:_t,key:Ve,to:"global",groupId:bl(_t,Ve)})}return t&&p?Lt(t):Yt(Ve)}else{if(Mn(Ne))return Ne;throw hs(xn.UNEXPECTED_RETURN_TYPE)}};function I(...Te){return Y(He=>Reflect.apply(qL,null,[He,...Te]),()=>F0(...Te),"translate",He=>Reflect.apply(He.t,He,[...Te]),He=>He,He=>Tt(He))}function z(...Te){const[He,_t,Lt]=Te;if(Lt&&!rn(Lt))throw hs(xn.INVALID_ARGUMENT);return I(He,_t,so({resolvedMessage:!0},Lt||{}))}function ee(...Te){return Y(He=>Reflect.apply(HL,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>Reflect.apply(He.d,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function me(...Te){return Y(He=>Reflect.apply(WL,null,[He,...Te]),()=>P0(...Te),"number format",He=>Reflect.apply(He.n,He,[...Te]),()=>Id,He=>Tt(He)||On(He))}function xe(Te){return Te.map(He=>Tt(He)||oo(He)||Rn(He)?sV(String(He)):He)}const j={normalize:xe,interpolate:Te=>Te,type:"vnode"};function oe(...Te){return Y(He=>{let _t;const Lt=He;try{Lt.processor=j,_t=Reflect.apply(qL,null,[Lt,...Te])}finally{Lt.processor=null}return _t},()=>F0(...Te),"translate",He=>He[M0](...Te),He=>[sV(He)],He=>On(He))}function ae(...Te){return Y(He=>Reflect.apply(WL,null,[He,...Te]),()=>P0(...Te),"number format",He=>He[L0](...Te),iV,He=>Tt(He)||On(He))}function _(...Te){return Y(He=>Reflect.apply(HL,null,[He,...Te]),()=>I0(...Te),"datetime format",He=>He[N0](...Te),iV,He=>Tt(He)||On(He))}function M(Te){R=Te,D.pluralRules=R}function re(Te,He){const _t=X(Te),Lt=D.messageResolver(_t,He);return Lt===null?No(_t,He):Lt}function pe(Te,He){return Y(()=>{if(!Te)return!1;const _t=Tt(He)?He:a.value,Lt=Tt(He)?[_t]:D.localeFallbacker(D,l.value,_t);for(let Yt=0;Yt<Lt.length;Yt++)if(by(re(Lt[Yt],Te)))return!0;return!1},()=>[Te],"translate exists",_t=>Reflect.apply(_t.te,_t,[Te,He]),Jae,_t=>Rn(_t))}function _e(Te){let He=null;const _t=D.localeFallbacker(D,l.value,a.value);for(let Lt=0;Lt<_t.length;Lt++){const Yt=re(_t[Lt],Te);if(Yt!=null){He=Yt;break}}return He}function we(Te){const He=_e(Te);return He??(t?t.tm(Te)||{}:{})}function X(Te){return No(u.value,Te)||{}}function U(Te,He){Dl(Te)||(s&&mp(He),u.value[Te]=He,D.messages=u.value)}function te(Te,He){Dl(Te)||(u.value[Te]=No(u.value,Te)||{},s&&mp(He),my(He,u.value[Te]),D.messages=u.value)}function le(Te){return No(c.value,Te)||{}}function Ye(Te,He){Dl(Te)||(c.value[Te]=He,D.datetimeFormats=c.value,UL(D,Te,He))}function Be(Te,He){Dl(Te)||(c.value[Te]=so(No(c.value,Te)||{},He),D.datetimeFormats=c.value,UL(D,Te,He))}function ze(Te){return No(d.value,Te)||{}}function Oe(Te,He){Dl(Te)||(d.value[Te]=He,D.numberFormats=d.value,jL(D,Te,He))}function nt(Te,He){Dl(Te)||(d.value[Te]=so(No(d.value,Te)||{},He),D.numberFormats=d.value,jL(D,Te,He))}aV++,Je(l,()=>P(l.value),{deep:!0,flush:"sync"}),t&&Kr&&(Je(t.locale,Te=>{i&&(a.value=Te,D.locale=Te,Cy(D,a.value,l.value))}),Je(t.fallbackLocale,Te=>{i&&(l.value=Te,D.fallbackLocale=l.value,Cy(D,a.value,l.value))}));const Ze={id:aV,locale:B,fallbackLocale:k,get inheritLocale(){return i},set inheritLocale(Te){i=Te,Te&&t&&(B.value=t.locale.value,k.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:O,get modifiers(){return E},get pluralRules(){return R||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(Te){h=Te,D.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(Te){f=Te,D.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(Te){p=Te},get fallbackFormat(){return g},set fallbackFormat(Te){g=Te,D.fallbackFormat=g},get warnHtmlMessage(){return S},set warnHtmlMessage(Te){S=Te,D.warnHtmlMessage=Te},get escapeParameter(){return w},set escapeParameter(Te){w=Te,D.escapeParameter=Te},t:I,getLocaleMessage:X,setLocaleMessage:U,mergeLocaleMessage:te,getPostTranslationHandler:W,setPostTranslationHandler:se,getMissingHandler:ie,setMissingHandler:Q,[QL]:M};return Ze.datetimeFormats=L,Ze.numberFormats=H,Ze.rt=z,Ze.te=pe,Ze.tm=we,Ze.d=ee,Ze.n=me,Ze.getDateTimeFormat=le,Ze.setDateTimeFormat=Ye,Ze.mergeDateTimeFormat=Be,Ze.getNumberFormat=ze,Ze.setNumberFormat=Oe,Ze.mergeNumberFormat=nt,Ze[eV]=n,Ze[M0]=oe,Ze[N0]=_,Ze[L0]=ae,J.env.NODE_ENV!=="production"&&(Ze[_a]=Te=>{D.__v_emitter=Te},Ze[Gu]=()=>{D.__v_emitter=void 0}),Ze}const uV="vue-i18n: composer properties",B0={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},ele={"vue-i18n-resource-inspector":"Search for scopes ..."},tle={"vue-i18n-timeline":16764185};let $0;async function nle(e,t){return new Promise((n,o)=>{try{qae({id:"vue-devtools-plugin-vue-i18n",label:B0["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[uV],app:e},s=>{$0=s,s.on.visitComponentTree(({componentInstance:i,treeNode:a})=>{ole(i,a,t)}),s.on.inspectComponent(({componentInstance:i,instanceData:a})=>{i.__VUE_I18N__&&a&&(t.mode==="legacy"?i.__VUE_I18N__!==t.global.__composer&&dV(a,i.__VUE_I18N__):dV(a,i.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:B0["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:ele["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&lle(i,t)});const r=new Map;s.on.getInspectorState(async i=>{if(i.app===e&&i.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),cle(i,t),i.nodeId==="global"){if(!r.has(i.app)){const[a]=await s.getComponentInstances(i.app);r.set(i.app,a)}s.highlightElement(r.get(i.app))}else{const a=ule(i.nodeId,t);a&&s.highlightElement(a)}}),s.on.editInspectorState(i=>{i.app===e&&i.inspectorId==="vue-i18n-resource-inspector"&&hle(i,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:B0["vue-i18n-timeline"],color:tle["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),o(!1)}})}function cV(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function ole(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==o){const s={label:`i18n (${cV(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function dV(e,t){const n=uV;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:H0(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function H0(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];In(o)&&"source"in o?t[n]=ale(o):El(o)&&o.loc&&o.loc.source?t[n]=o.loc.source:rn(o)?t[n]=H0(o):t[n]=o}),t}const sle={"<":"<",">":">",'"':""","&":"&"};function rle(e){return e.replace(/[<>"&]/g,ile)}function ile(e){return sle[e]||e}function ale(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${rle(e.source)}")`:"(?)"}`}}}function lle(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,s]of t.__instances){const r=t.mode==="composition"?s:s.__composer;n!==r&&e.rootNodes.push({id:r.id.toString(),label:`${cV(o)} Scope`})}}function ule(e,t){let n=null;if(e!=="global"){for(const[o,s]of t.__instances.entries())if(s.id.toString()===e){n=o;break}}return n}function hV(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function cle(e,t){const n=hV(e.nodeId,t);return n&&(e.state=dle(n)),null}function dle(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:H0(e.messages.value)}];t[s]=r;{const i="Datetime formats info",a=[{type:i,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[i]=a;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function Wu(e,t){if($0){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),$0.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function hle(e,t){const n=hV(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&Tt(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(Tt(e.state.value)||On(e.state.value)||rn(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&Rn(e.state.value)&&(n.inheritLocale=e.state.value)}}const G0=new WeakMap;function Od(e){if(!$u(e))return!e;let t=G0.get(e);return t||(t=new RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,"")),G0.set(e,t),G0.set(t,e)),t}function fle(e){const t=Tt(e.locale)?e.locale:gp,n=Tt(e.fallbackLocale)||On(e.fallbackLocale)||Pn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=In(e.missing)?e.missing:void 0,s=Rn(e.silentTranslationWarn)||$u(e.silentTranslationWarn)?Od(e.silentTranslationWarn):!0,r=Rn(e.silentFallbackWarn)||$u(e.silentFallbackWarn)?Od(e.silentFallbackWarn):!0,i=Rn(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=Pn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=In(e.postTranslation)?e.postTranslation:void 0,d=Tt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=Rn(e.sync)?e.sync:!0;let p=e.messages;if(Pn(e.sharedMessages)){const E=e.sharedMessages;p=Object.keys(E).reduce((D,x)=>{if(Dl(x))return D;const N=No(D,x)||(D[x]={});return so(N,E[x]),D},p||{})}const{__i18n:g,__root:v,__injectWithOption:y}=e,b=e.datetimeFormats,S=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:b,numberFormats:S,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:g,__root:v,__injectWithOption:y}}function U0(e={}){const t=Sy(fle(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Od(t.missingWarn)},set silentTranslationWarn(s){t.missingWarn=Od(s)},get silentFallbackWarn(){return Od(t.fallbackWarn)},set silentFallbackWarn(s){t.fallbackWarn=Od(s)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,r){return t.te(s,r)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,r){t.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){t.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,r){t.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){t.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,r){t.setNumberFormat(s,r)},mergeNumberFormat(s,r){t.mergeNumberFormat(s,r)}};return o.__extender=n,J.env.NODE_ENV!=="production"&&(o.__enableEmitter=s=>{const r=t;r[_a]&&r[_a](s)},o.__disableEmitter=()=>{const s=t;s[Gu]&&s[Gu]()}),o}function ple(e,t,n){return{beforeCreate(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=so({},s.i18n);if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=fV(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=U0(r);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=fV(e,s);else{this.$i18n=U0({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&oV(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,i)=>this.$i18n.te(r,i),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){if(J.env.NODE_ENV!=="production"&&this.$i18n){const o=Fd();if(!o)return;const s=this.$i18n;o.__VUE_I18N__=s.__composer;const r=this.__v_emitter=gy();s.__enableEmitter&&s.__enableEmitter(r),r.on("*",Wu)}},unmounted(){const o=Fd();if(!o)throw hs(xn.UNEXPECTED_ERROR);const s=this.$i18n;J.env.NODE_ENV!=="production"&&o.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Wu),delete this.__v_emitter),s&&(s.__disableEmitter&&s.__disableEmitter(),delete o.__VUE_I18N__)),s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s!=null&&s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function fV(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[QL](t.pluralizationRules||e.pluralizationRules);const n=V0(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const W0={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function gle({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Pt?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},_n())}function pV(){return Pt}const gV=ot({name:"i18n-t",props:so({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>oo(e)||!isNaN(e)}},W0),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||z0({useScope:e.scope,__useComponent:!0});return()=>{const r=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),u=_n();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Tt(e.plural)?+e.plural:e.plural);const c=gle(t,l);return s[M0](e.keypath,c,u)},i=so(_n(),o),a=Tt(e.tag)||rn(e.tag)?e.tag:pV();return rn(a)?za(a,i,{default:r}):za(a,i,r())}}});function mle(e){return On(e)&&!Tt(e[0])}function mV(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const i=()=>{const u={part:!0};let c=_n();e.locale&&(u.locale=e.locale),Tt(e.format)?u.key=e.format:rn(e.format)&&(Tt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((f,p)=>n.includes(p)?so(_n(),f,{[p]:e.format[p]}):f,_n()));const d=o(e.value,u,c);let h=[u.key];return On(d)?h=d.map((f,p)=>{const g=s[f.type],v=g?g({[f.type]:f.value,index:p,parts:d}):[f.value];return mle(v)&&(v[0].key=`${f.type}-${p}`),v}):Tt(d)&&(h=[d]),h},a=so(_n(),r),l=Tt(e.tag)||rn(e.tag)?e.tag:pV();return rn(l)?za(l,a,{default:i}):za(l,a,i())}}const vV=ot({name:"i18n-n",props:so({value:{type:Number,required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return mV(e,t,zL,(...o)=>n[L0](...o))}});function vle(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function yle(e){const t=i=>{J.env.NODE_ENV!=="production"&&py(Uu(Ds.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:a,value:l}=i;if(!a||!a.$)throw hs(xn.UNEXPECTED_ERROR);const u=vle(e,a.$),c=yV(l);return[Reflect.apply(u.t,u,[...wV(c)]),u]};return{created:(i,a)=>{const[l,u]=t(a);Kr&&(i.__i18nWatcher=Je(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=u,i.textContent=l},unmounted:i=>{Kr&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,u=yV(a);i.textContent=Reflect.apply(l.t,l,[...wV(u)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function yV(e){if(Tt(e))return{path:e};if(Pn(e)){if(!("path"in e))throw hs(xn.REQUIRED_VALUE,"path");return e}else throw hs(xn.INVALID_VALUE)}function wV(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,i={},a=o||{};return Tt(n)&&(i.locale=n),oo(s)&&(i.plural=s),oo(r)&&(i.plural=r),[t,a,i]}function wle(e,t,...n){const o=Pn(n[0])?n[0]:{};(Rn(o.globalInstall)?o.globalInstall:!0)&&([gV.name,"I18nT"].forEach(r=>e.component(r,gV)),[vV.name,"I18nN"].forEach(r=>e.component(r,vV)),[SV.name,"I18nD"].forEach(r=>e.component(r,SV))),e.directive("t",yle(t))}const Cle=_i("global-vue-i18n");function ble(e={}){const t=__VUE_I18N_LEGACY_API__&&Rn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;J.env.NODE_ENV!=="production"&&t&&py(Uu(Ds.DEPRECATE_LEGACY_MODE));const n=Rn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,r]=Sle(e,t),i=_i(J.env.NODE_ENV!=="production"?"vue-i18n":"");function a(d){return o.get(d)||null}function l(d,h){o.set(d,h)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},install(d,...h){if(J.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=c),d.__VUE_I18N_SYMBOL__=i,d.provide(d.__VUE_I18N_SYMBOL__,c),Pn(h[0])){const g=h[0];c.__composerExtend=g.__composerExtend,c.__vueI18nExtend=g.__vueI18nExtend}let f=null;!t&&n&&(f=Ale(d,c.global)),__VUE_I18N_FULL_INSTALL__&&wle(d,c,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(ple(r,r.__composer,c));const p=d.unmount;d.unmount=()=>{f&&f(),c.dispose(),p()},J.env.NODE_ENV!=="production"&&nle(d,c).then(g=>{if(!g)throw hs(xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=gy();if(t){const y=r;y.__enableEmitter&&y.__enableEmitter(v)}else{const y=r;y[_a]&&y[_a](v)}v.on("*",Wu)}).catch(()=>{J.env.NODE_ENV!=="production"&&Ts(JL[xn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return r},dispose(){s.stop()},__instances:o,__getInstance:a,__setInstance:l,__deleteInstance:u};return c}function z0(e={}){const t=Fd();if(t==null)throw hs(xn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw hs(xn.NOT_INSTALLED);const n=Ele(t),o=Rle(n),s=nV(t),r=_le(e,s);if(r==="global")return oV(o,e,s),o;if(r==="parent"){let l=CV(n,t,e.__useComponent);return l==null&&(J.env.NODE_ENV!=="production"&&Ts(Uu(Ds.NOT_FOUND_PARENT_SCOPE)),l=o),l}if(r==="isolated"){if(n.mode!=="composition")throw hs(xn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,u=so({},e),c=CV(n,t);u.__root=c||o;const d=Sy(u);l.__composerExtend&&(d[kd]=l.__composerExtend(d));let h=null;if(J.env.NODE_ENV!=="production"){h=gy();const p=d;p[_a]&&p[_a](h),h.on("*",Wu)}return Qw()&&eC(()=>{if(J.env.NODE_ENV!=="production"){h&&h.off("*",Wu);const g=d;g[Gu]&&g[Gu]()}const p=d[kd];p&&(p(),delete d[kd])}),d}const i=n;let a=i.__getInstance(t);if(a==null){const l=so({},e);"__i18n"in s&&(l.__i18n=s.__i18n),o&&(l.__root=o),a=Sy(l),i.__composerExtend&&(a[kd]=i.__composerExtend(a)),Dle(i,t,a),i.__setInstance(t,a)}else J.env.NODE_ENV!=="production"&&r==="local"&&Ts(Uu(Ds.DUPLICATE_USE_I18N_CALLING));return a}function Sle(e,t){const n=Jw(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>U0(e)):n.run(()=>Sy(e));if(o==null)throw hs(xn.UNEXPECTED_ERROR);return[n,o]}function Ele(e){const t=En(e.isCE?Cle:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw hs(e.isCE?xn.NOT_INSTALLED_WITH_PROVIDE:xn.UNEXPECTED_ERROR);return t}function _le(e,t){return v0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Rle(e){return e.mode==="composition"?e.global:e.global.__composer}function CV(e,t,n=!1){let o=null;const s=t.root;let r=Tle(t,n);for(;r!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(r);a!=null&&(o=a.__composer,n&&o&&!o[eV]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function Tle(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dle(e,t,n){let o=null;Jt(()=>{if(J.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,o=gy();const s=n;s[_a]&&s[_a](o),o.on("*",Wu)}},t),ou(()=>{const s=n;J.env.NODE_ENV!=="production"&&(o&&o.off("*",Wu),s[Gu]&&s[Gu](),delete t.__VUE_I18N__),e.__deleteInstance(t);const r=s[kd];r&&(r(),delete s[kd])},t)}const xle=["locale","fallbackLocale","availableLocales"],bV=["t","rt","d","n","tm","te"];function Ale(e,t){const n=Object.create(null);return xle.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw hs(xn.UNEXPECTED_ERROR);const i=fn(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,bV.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw hs(xn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,bV.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const SV=ot({name:"i18n-d",props:so({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W0),setup(e,t){const n=e.i18n||z0({useScope:e.scope,__useComponent:!0});return mV(e,t,GL,(...o)=>n[N0](...o))}});if(Xae(),bae(Qie),Sae(vae),Eae(aae),J.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Sl();e.__INTLIFY__=!0,eae(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}J.env.NODE_ENV;const EV={en:{}};function Ile(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}async function Ple(e,t=10,n=300){for(let o=0;o<t;o++){const s=Ile(e);if(s)return s;await new Promise(r=>setTimeout(r,n))}return null}async function kle(){const e=await Ple("account.tessr_i18n_file_version_url");if(!e)return{};const t=await fetch(e);if(!t.ok)throw new Error("Failed to load en-error.json");return await t.json()}async function Fle(){const e=await kle();return{...EV,en:{...EV.en,errorMessages:e}}}async function Ole(){return ble({legacy:!1,locale:"en",fallbackLocale:"en",messages:await Fle(),formatFallbackMessages:!0})}const Mle=async()=>{const e=await Ole();return jJ(e.global),e},_V=32,Nle=Math.round(_V*16/9),Lle="arbo-thumbnails",vp="thumbnails";let yp=null;const j0=new Map,K0=new Map;function RV(){return yp||(yp=new Promise((e,t)=>{const n=indexedDB.open(Lle,1);n.onupgradeneeded=()=>n.result.createObjectStore(vp),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)}),yp.catch(()=>yp=null)),yp}async function Vle(e,t){try{const n=await RV();return await new Promise((o,s)=>{const r=n.transaction(vp,"readonly").objectStore(vp).get(e);r.onsuccess=()=>{const i=r.result;o((i==null?void 0:i.url)===t&&i.blob instanceof Blob?i.blob:null)},r.onerror=()=>s(r.error)})}catch{return null}}async function Ble(e,t,n){try{const o=await RV();if(K0.get(e)!==t)return;await new Promise((s,r)=>{const i=o.transaction(vp,"readwrite");i.objectStore(vp).put({url:t,blob:n},e),i.oncomplete=()=>s(),i.onerror=()=>r(i.error)})}catch{}}function $le(e){return new Promise(t=>{new mP(e,{width:Nle,height:_V,resize:"cover",quality:.8,success:t,error:()=>t(e)})})}function Hle(e,t){K0.set(e,t);let n=j0.get(e);n||(n=new Map,j0.set(e,n));const o=n.get(t);if(o)return o;const s=(async()=>{const r=await Vle(e,t);if(r)return r;const i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail request failed: ${i.status}`);const a=await $le(await i.blob());return await Ble(e,t,a),a})().finally(()=>{n.delete(t),n.size===0&&(j0.delete(e),K0.delete(e))});return n.set(t,s),s}const Gle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fo6etc+oS8AAAINUlEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYOWPjuGEgii45w4DKWQIDu4orAcEtB3Z0iWdUBpuAY4W2qnRACTgLiwVS/MUbJ7YV6AnEx1+Sp8FgMBgMBoPBYNDGy3sB+kD+3zfqnu9c4E4XM8v8oc554RKOLiYu0Pu6By7xoIuFCxzUNSsXOeliV344PRO4SP1L7tQxM9e9uMxJ/bJwEZ9STknCfglc5PGUBoBBN3OZW0w5yCt+bbDamBkw4/eGa5k1PPVKYG6osYibPWrpNRZxsyctvcaqYdgnK7fVWMCTfeeWGguZc1tzjYWr8aGpxiJG/MxNNVaHuqSxxiKebhOXeYoDxNNtba2xeC1eHdbTnkA82HdNKF0YiAf7Xt/BC6j6xhc/fv3++ufrsH5kXxO67jRbvZWEcpiFntVDPaOV0/tbz3UuVEvJpHS2uWf1ehVdtQ3ds3qofu+7FuOh4xJfP502rbds0OpqUd+R1ecY8ObUpzjMmFNf+OIOqu7qAe9A1X1DjbWnHlPOnHqqsaDqjkrMdlc9NRp76pvdmIvTC6i6oyIreKVpKLJsT53sji+pzmGqO2oo8ZjqnhpGN3vqcWC3p56qLKS6o8RfPk65ykKq+/8fqBzyLVlw9evyfhWrLLj65XJIVfaAVHdf/s4PqcpCqnttWEk5B62+8wdilYVWD3GFpSqLqO6yl6WcVGUR1X32stRdqrLI6jtHxCoLrL5x5BRy7gao7qJj5CZVWUB1H69sNec8rvrECS9VWRvqUsQzoLp7Wl21yuKp+/xF4EOssrDqOz8hjuz21GOVxVN3wodcTinn8NS9pC5WWVT1wE/cxJyzpx6rLJy6E9WlKgunLq+6VGXtqcecs6eeqiyaurjX5Rep0NSlVT9JrLKg6lu+6tmzCQvqp/wiFZq6q6pT/GcwdWVyy6osvvpR+swXpvqiqMeRHUxduTeXVVkwdeVmdD6yQ6pnjyDEKgupTpx4UCnnsNSVZ255lcVSVx4y5zmHqb5kZ5tQZTHVpyzgpYiHUo/RlVLO2qrTli1tPraCqi9pqxtLeJozv/wWFZa6E35PjbE297mjf1I54DHHl7jsb0Rka3L7XN1X5YNPHkzdUWJ+v9bc1l2ahJJy5tRn8DuyESXlQO/D/yPnjG0ch4EoahlQ4AJcgvpQCRNohLlMyfXBJpRfcslWuYGBAaRPcybl548WhpMHmp+PErmNzORvXxp5k79za+Qkf9N6zVDv179nYj9Vcc1QZ2m+Z2E/QXXNUOfmEi1Hh14d9aHOyMYtR3sy+pKxzsPHLceHbpHGDov+VPq7L981lrfmJGq5YRe3RYdVmrcqrcha+CXa7YuEBT/opvWlqoM+qphVlfYBlcUtx/pYUmKNHfJh9KflhnwF8dFY1gsgFrcc6+tGSWgs9wWQZsuRnqqwhMaSXgC5ov/8q7Uc6QkqueGUisZyXwDxj6zWcpynJe02yntNYzkvgMAol0rLcZ6MlvsoHxWN5b4A4p9YpeA5b0HYfbOyocZ6Vlb01+1XvQC6UKELbFYKaKxno0I3WMtW/wJkZ0U/r7+DSTGFFF1j9JUJXWAt27zwMcKEbt+PjpwKMU705T6h3wrZOdGddEWl8TChC25WxGcAZiVCN9ysWKPnDkb0CSe0YowRfVbPo9FzROjiKDihF8UQoVtlFT9aPUeIrp6myh586NV/EK8Y40GHRTxQ2Y0H3WrqVho9x4fuC1mksoUO/dRsz9GgC0hrtGWnQTcY30BlNzb0WT3Bll3Z0D8gKZUtLOgCwxtt2Q8WdKtOamtUvHChP1XzPceFDj/shsruLOgCBR+qbCFBt/oidjRUdqVCP9UTq6xQoasnobJGgi4wtuGWfSdBNyj4WGULEfqikLXVc0ToPrQ5lRUOdPE/8yprHOgGNR6r7M6DDiMbvH1SHnSosmjLvlKgC9LFKntQoBtoS6bnaNAVEqjsxoIO4xpu2ZUCXcBaMiq7MqAbFFmq50jQYVhjlTUS9FOrsVbPMaALoqHKYhjQDQo+pbKFAh1qLKOyBwU6kGUOUgkButQLPlLZjQDdoMVSB6l2BnQo+JzKFgJ0mMk5lT36Rxco+JzKSv/oBkOaU9mNAP1USEZldwJ0haRWN/3fPfofhaScRv92j+4JTBZDje77l+HQd//mcOhe8OOh47KO2R895sy23Ew36o4eKvxwo+5UJx06DGbmzRN+qce8ky038aGDo8VbVow9esyS1Vg+9DlAT9WhPHrMK1nwwazoMVNOY6dgVvSYZ1JjA+3pMlmNpfNY769QY+lkLgt18hmNL9iRxvIt6z6LA40lXNt+2bNjHARCIAqgExMLucfeyVh5qe0tzZ5SVxMaI2zomLxX0xDg8wl1Vp0am/BuezuSckvGgG8nWB2TMeAjlgPRnTLlmkXtmjrlmhfXPXON3a39x3rOox5x7v855Xusf52665l1v9dFHauxt5jZpVdjc+b7x9qpsUlDblfGa+wjJldGa+wzple2X3Va219TpzsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8GIPDgQAAAAAgPxfG0FVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVdqDQwIAAAAAQf9f+8IEAAAAAAAAwCmRg3Unf/8l+AAAAABJRU5ErkJggg==",Ule="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoAgMAAAAwzTx3AAAACVBMVEXz9fjX19fk5OUH9i6SAAAGd0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD24EAAAAAAAMj/tRFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXYuXvcCGEgDMODJQrScwSK3GKP4GI/ZKWiSZRjcAn326TZU0YRsOwPkcCuPN88Nxi9wRjwxhhjjDHGGLOPuyYZpXhvSHSRwjkkK737D5L1UrQGGQYpWYsMZymYwy4ar/YaWbyUK2IvbQudw27a/uIb7Kdsje+QKUipIsB6sSObFKpCtpOUqcFBeta5DgfpWedaHKVmGx9xlJolHodpWeIdEujYylZIoeLu1iCFirtbjRQqHtmJR++QQsWepsWk/0rwWfSeps3alUQFow+SpCl5OxezNiVOweiSqOTRMy/WtuBNfObdqbPRS0Q/updENe/o5VcPVt2qW3WK6sQrvN3XrbpVt+pWXWt14vu67easulXnqO5l9Y6Pkah6uJ8c6CmrO/wZGKtPGXvG6pgMNNX989GaQFM9rKPM+KpHzE5s1R0Wnq16g8WZpbpfI856lurh9YT4SFY94uZEVh2rgat6hZUnqb4x+pmkeng9IX7mql5j1XNV73CHq/rD6CTV/cZv3kaO6mFrdKvOUT3izomq+uPoHNU9b/Vg1a06e3W7r2uvbrs5xie3QP/kVmPVk1SfR29439IQv5ursApc1R3ve3jiry/S8n5z63Bj39dpqldYBLbqgsXAUt3L8zo3slQPTxXR852bc5h4vtOSt/9Tw1d9foIJjCejp+wj43l4cRH4pvwVhIi7XmTDdVRf/d+8H/qrb3IABpXV/Z7lLKis/sveHdtGDgNRGJYEbKACVIKSq4IlzAF8xIRKrg8mVwL7PSwM35jiCiC5kR73y+hs/Nvy2AZErXnDWBizOp7iiNVnPB0jVl/xJIzVpWpz8YzVteo9imHE6vgSx6u+4Isbr/qKL0JYXepeJ+4Jq2vlO7XHq45vcbTqC7650aqv+CZ81aXy0gTlq66VdyGF0aon/DdY9QXGjVV9hjnoqkvt1TBKV11rb3zzY1VPgBmq+oKf3EjVZ/x0sFWX6guwlK26Vl+A5UeqnpAZqTpycZzqM3IHWXWpv9xRyKpr/TV/nrr6r1iusYa5+gMh2glnkbh6dp5xdnBVl9MjPRRPOSNc1fUcMtrpzPNW3wDgsNNZ4K2efy5QiqzVFzx5OxUcVXU5b2/BTgWhqq5Fx2inM2Wtvmdf1RtKgbV6yhYXvMJaPfuqXvCKY6peLq7ennIFYaqu5eJqkxWUs/qeLS4bXgmc1bfsF7SElzirJ8A+tOA1R1Rdyv8yqT3zCgdRdS3/MhGsaUEZq9uwsKYFz1h9z76hEy4wVk/ZNzSuOJ7q8v9odJpx5eCpbpefGD89cEX5qufv39pxxfNVzzrHhEt81TfAOFyLNNXFHvDmN64dNNXtzWOVhK36jFqerfqKWoGt+o5qkaW6vT24lmOprnaoJFzVF9TzXNVX1Atc1R9oEEmqiyWs5Uiqq62xtYSqOlooU/UZLQJT9RVNSKqLjVHNcVRXW2OrCVH1hCbKU31Bm8BTfUYjjupiU9RzFNXVpqh30FRPaKQ01dHKs1Rf0Iyiutga2yAyVNfnEM0OkuobmglJ9YRmnqP6gg4M1WWa0SESVNdpRYeDovqODkJRfUMHT1EdPQJBdVnQJd6/uq7o4giqP9BFCKrv6OIJqid0CQTV0env7Uf/jU5/bj96v8/od/QZ/TN6pzDdUfqM/hm9j5/uaPuMPuDoO/A+ne7oAbxPpjsaePQVeN8x3dEMvM9Nd7QA74vTLaEHw28vfescxR7bt9NQbDR9Ow3FRtP3043iZ9s/9uvYCkAQCKKgj9D+TKzO2Cp9lsAasc60AHzuot+t429LEt8S+CDxLYEPOtdSufnO1VQuGGVLxtjgsbcMNMnKXrGsz974tvs+McZ39X2q8V19/xq6c1vb+OlLf+1H6NqWN+7I8mcOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADzswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a1+YAAAAAAAAALgEoKO2OvzgJtMAAAAASUVORK5CYII=",Wle=["src"],zle=["src"],jle=["src"],Kle=Et(ot({__name:"ThumbnailRender",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isEditing:{type:Boolean}},setup(e){const t=e,n=q(()=>t.value),o=q(()=>t.id),s=q(()=>t.disabled),r=q(()=>t.readOnly),i=$("");let a=null;const l=$(!1),u=q(()=>n.value==null||n.value===""),c=q(()=>!u.value&&l.value),d=()=>{l.value=!0},h=()=>{a&&URL.revokeObjectURL(a),a=null},f=()=>{i.value="",h()},p=md(),{openSceneHub:g}=p,v=q(()=>{const S=ln.getInstance().getItem("ws.code"),w=ln.getInstance().getItem("BASE_URL"),E=S||t.workspaceId;return Zo({type:"scene_hub",config:{baseDomain:w,ws_code:E,scene_id:String(t.id)}}).url}),y=S=>{try{if(S.ctrlKey||S.metaKey){window.open(v.value,"_blank");return}g(String(t.id))}catch{window.open(v.value,"_blank")}finally{b()}},b=()=>{var E,R,D,x,N,B;(E=t.params)==null||E.api.clearFocusedCell();const S=((D=(R=t.params)==null?void 0:R.column)==null?void 0:D.getColId())||"",w=((N=(x=t.params)==null?void 0:x.node)==null?void 0:N.rowIndex)||0;(B=t.params)==null||B.api.setFocusedCell(w,S)};return Je(()=>[o.value,n.value],async([S,w],E,R)=>{let D=!0;if(R(()=>{D=!1,h()}),l.value=!1,i.value="",!(S==null||S===""||!w))try{const x=await Hle(String(S),w);if(!D||S!==o.value||w!==n.value)return;a=URL.createObjectURL(x),i.value=a}catch(x){D&&S===o.value&&w===n.value&&(console.warn("Failed to load cached thumbnail; using the original URL.",x),i.value=w)}},{immediate:!0}),Vn(f),(S,w)=>(K(),he("div",{class:ce(["thumbnail-wrapper",{disabled:s.value,"read-only":r.value}]),onClick:y},[u.value?(K(),he("img",{key:0,src:V(Ule),alt:"No thumbnail"},null,8,Wle)):c.value?(K(),he("img",{key:1,src:V(Gle),alt:"Broken thumbnail"},null,8,zle)):i.value?(K(),he("img",{key:2,src:i.value,alt:"Thumbnail",onError:d},null,40,jle)):qe("",!0)],2))}}),[["__scopeId","data-v-1fd3dd73"]]),qle={class:"left-section"},Yle={class:"create-count"},Xle={class:"modified-template-options"},Zle=["onClick"],Jle={class:"setting-count"},Qle={class:"field-label"},eue={class:"field-label"},tue={class:"status-selection"},nue={class:"preview-section"},oue={key:0,class:"preview-list"},sue={key:0,class:"preview-more"},rue={key:1,style:{color:"var(--tessr-text-secondary, #6b6b6b)","align-items":"center",width:"100%","text-align":"center",display:"flex",flex:"1 1 0%"}},q0=1e3,TV=8,DV=7,iue=Et(ot({__name:"BulkCreateCount",props:{item:{},takeName:{},options:{default:()=>[{id:"number_up",name:"Number",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a number that counts up",switch:"Switch to a number that counts up"}},{id:"number_down",name:"Number",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a number that counts down",switch:"Switch to a number that counts down"}},{id:"letter_up",name:"Letter",icon:"ArrowLeft",description:{active:"Remove from the name",inactive:"Add a letter that counts up",switch:"Switch to a letter that counts up"}},{id:"letter_down",name:"Letter",icon:"ArrowRight",description:{active:"Remove from the name",inactive:"Add a letter that counts down",switch:"Switch to a letter that counts down"}}]},getStatusFunc:{},workspaceId:{},entityId:{}},emits:["cancel","changed"],setup(e,{expose:t,emit:n}){const o=qt,s=Do,r=$(null),i=$(null),a=["number","letter","name"],l={number_up:"1→9",number_down:"9→1",letter_up:"A→Z",letter_down:"Z→A",name:"Name"},u=$(null),c=$({}),d=(ae,_)=>{c.value[ae]=_ instanceof HTMLElement?_:null},h=$(null),f=$("1"),p=ae=>{var re;const _=Number(ae),M=_===0?"1":_>q0?String(q0):ae;f.value=M,(re=i.value)==null||re.setValue(M)},g=e,v=$([]),y=q(()=>{const ae=b.value;let _=1;const M="9999.",re={createCount:`${M}0`,input:`${M}1`,firstField:`${M}5`,stepField:`${M}6`,number_up:`${M}1`,number_down:`${M}2`,letter_up:`${M}3`,letter_down:`${M}4`,statusSelect:`${M}7`};return["number_up","number_down","letter_up","letter_down"].forEach((_e,we)=>{_++,re[_e]=`${M}${_}`}),ae?(_++,re.statusSelect=`${M}${_}`,_++,re.firstField=`${M}${_}`,_++,re.stepField=`${M}${_}`):(delete re.firstField,delete re.stepField),re}),b=q(()=>v.value.find(ae=>typeof ae!="string"&&(ae.id==="number"||ae.id==="letter"))),S=$("number"),w=$("up"),E=Po({...yi.number}),R=Po({...yi.number}),D=()=>{Object.assign(E,yi[S.value]),Object.assign(R,yi[S.value])};Je(b,ae=>{if(!ae)return;const _=ae.id;_!==S.value&&(S.value=_,D()),w.value=ae.direction==="down"?"down":"up"},{immediate:!0,flush:"sync"});const x=q(()=>HO[w.value]),N=q(()=>{const ae=Number(f.value);return Number.isFinite(ae)?Math.min(q0,Math.max(0,Math.floor(ae))):0}),B=(ae,_)=>{const M=WO(S.value,ae,_);E[ae]=M,Fv(ae,M)&&(R[ae]=M)},A=$(null),P=$(null),k=$(null),O=(ae,_)=>{var re,pe,_e,we;if(_.key==="Enter"||_.key==="Escape")return;if(_.key==="Tab"){_.preventDefault(),_.stopPropagation(),_.stopImmediatePropagation();const X=_.shiftKey;ae=="first"&&(X?(re=c.value.letter_down)==null||re.focus():(pe=A.value)==null||pe.focus()),ae=="step"&&(X?(_e=A.value)==null||_e.focus():(we=i.value)==null||we.focus());return}_.key.length===1&&!_.ctrlKey&&!_.metaKey&&!_.altKey&&!UO(S.value,ae,_.key)&&_.preventDefault()},L=(ae,_)=>{var we;_.preventDefault();const M=_.target,re=((we=_.clipboardData)==null?void 0:we.getData("text/plain"))??"",pe=M.selectionStart??M.value.length,_e=M.selectionEnd??M.value.length;M.value=M.value.slice(0,pe)+re+M.value.slice(_e),B(ae,M.value),M.value=E[ae]},H=ae=>{if(Fv(ae,E[ae]))return;const _=yi[S.value][ae];E[ae]=_,R[ae]=_},W=q(()=>b.value?pE({type:S.value,direction:w.value,first:R.first,step:R.step,count:N.value}):[]),se=q(()=>v.value.every(ae=>typeof ae=="string"&&!ae)),ie=q(()=>N.value===0||se.value?[]:Array.from({length:N.value}).map((ae,_)=>v.value.map(M=>typeof M=="string"?M:W.value[_]??"").join(""))),Q=q(()=>ie.value.length>TV?ie.value.length-DV:0),ne=q(()=>ie.value.length>TV?ie.value.slice(0,DV):ie.value),Y=ae=>{z.value=[ae];const _=ae.id.split("_")[0],M=ae.id.split("_")[1],re=l[ae.id],pe=r.value;if(!pe)return;const _e=X=>v.value.find(U=>typeof U!="string"&&X.includes(U.id));if(_==="name"){_e(["name"])?pe.deleteTag("name"):pe.insertTag({id:_,text:re,direction:void 0});return}const we=_e(["number","letter"]);if(we){const X=we.id===_,U=we.direction===M;if(X&&U){pe.deleteTag(we.id);return}pe.deleteTag(we.id),pe.insertTag({id:_,text:re,direction:M})}else pe.insertTag({id:_,text:re,direction:M})},I=ae=>ee(ae.id)?ae.description.active:!!b.value&&ae.description.switch?ae.description.switch:ae.description.inactive,z=$(null),ee=ae=>{const[_,M]=ae.split("_");return v.value.some(re=>typeof re!="string"&&re.id===_&&re.direction===M)},me=n,xe=q(()=>{const[ae]=v.value;return v.value.length===1&&typeof ae!="string"&&ae.id==="name"});q(()=>v.value.length===0||xe.value);const de=()=>{const ae=v.value.map(_=>typeof _=="string"?{type:"text",value:_}:_.id==="name"?{type:"current_name"}:{type:"counter",value:E.first,direction:_.direction=="up"?"asc":"desc",format:_.id==="number"?"number":"letter",step:E.step});me("changed",{data:ae,count:N.value,template_flow_status_id:u.value||void 0})};Je([v,f,E,u],()=>{de()},{deep:!0,immediate:!0}),Je(v,()=>{console.log("inputContent changed",v.value)}),t({reset:()=>{z.value=null,v.value=[]},focus:()=>{var ae;(ae=i.value)==null||ae.focus()}}),Jt(()=>{var ae,_;(ae=r.value)==null||ae.insertText(g.takeName),(_=r.value)==null||_.insertTag({id:"number",text:"1→9",direction:"up"}),ft(()=>{var M;(M=i.value)==null||M.focus()})});const oe=ae=>{var _,M;ae.preventDefault(),ae.stopPropagation(),(_=i.value)==null||_.blur(),(M=h.value)==null||M.focus()};return(ae,_)=>(K(),he("div",{class:"bulk-rename-core",ref_key:"popupRef",ref:h,tabindex:"-1"},[be("div",qle,[be("div",Yle,[_[10]||(_[10]=be("span",null,"How many to create?",-1)),Ue(ye(V(dl),{"model-value":f.value,type:"number","max-decimal-char":0,maxLength:4,"show-clear":!1,ref_key:"counterRef",ref:i,placeholder:"Enter count","onUpdate:modelValue":p},null,8,["model-value"]),[[V(s),y.value.createCount]])]),Ue(ye(hN,{modelValue:v.value,"onUpdate:modelValue":_[0]||(_[0]=M=>v.value=M),"allowed-tags":a,ref_key:"templateInputRef",ref:r,placeholder:"Enter name",onEscape:oe},null,8,["modelValue"]),[[V(s),y.value.input]]),be("div",Xle,[(K(!0),he(Pt,null,Dn(e.options,M=>Ue((K(),he("button",{onClick:re=>Y(M),ref_for:!0,ref:re=>d(M.id,re),key:M.id,class:ce([{active:ee(M.id)},"template-option"])},[tt(at(M.name)+" ",1),M.icon?(K(),We(V(gt),{key:0,src:M.icon,style:{transform:"rotate(90deg)"}},null,8,["src"])):qe("",!0)],10,Zle)),[[V(o),{content:I(M),bypassOverflowCheck:!0,delay:[300,0],interactive:!1,hideOnClick:!1,appendTo:"parent"}],[V(s),`${y.value[M.id]}`]])),128))]),be("div",Jle,[be("span",Qle,at(x.value.first),1),Ue((K(),We(V(dl),{ref_key:"firstFieldRef",ref:P,"model-value":E.first,disabled:!b.value,"max-length":V(hE),onInput:_[1]||(_[1]=M=>B("first",M)),onKeydown:_[2]||(_[2]=M=>O("first",M)),onPaste:_[3]||(_[3]=M=>L("first",M)),onBlur:_[4]||(_[4]=M=>H("first")),"show-clear":!1},{clear:Ce(()=>[..._[11]||(_[11]=[be("div",null,null,-1)])]),_:1},8,["model-value","disabled","max-length"])),[[V(s),y.value.firstField]]),be("span",eue,at(x.value.step),1),Ue(ye(V(dl),{"model-value":E.step,disabled:!b.value,"max-length":V(fE),onInput:_[5]||(_[5]=M=>B("step",M)),onKeydown:_[6]||(_[6]=M=>O("step",M)),onPaste:_[7]||(_[7]=M=>L("step",M)),onBlur:_[8]||(_[8]=M=>H("step")),"show-clear":!1,ref_key:"fieldStepRef",ref:A},null,8,["model-value","disabled","max-length"]),[[V(s),y.value.stepField]])]),be("div",tue,[_[12]||(_[12]=be("span",null,"Status",-1)),ye(V(KN),{modelValue:u.value,"onUpdate:modelValue":_[9]||(_[9]=M=>u.value=M),"get-status-func":g.getStatusFunc,"workspace-id":g.workspaceId,id:g.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:k,"focus-index":y.value.statusSelect,placeholder:"Select status"},null,8,["modelValue","get-status-func","workspace-id","id","focus-index"])])]),be("div",nue,[_[13]||(_[13]=be("span",{class:"preview-title"},"Preview",-1)),ne.value.length>0?(K(),he("ul",oue,[(K(!0),he(Pt,null,Dn(ne.value,(M,re)=>(K(),he("li",{key:re},[ye(pN,{text:M},null,8,["text"])]))),128)),Q.value>0?(K(),he("li",sue," … "+at(Q.value)+" more ",1)):qe("",!0)])):(K(),he("div",rue," Add a name or a counter to see a preview. "))])],512))}}),[["__scopeId","data-v-9b837594"]]),xV={text:ml,id:void 0,assignees:Ooe,status:bN,dateRange:Moe,isStarted:ml,isCompleted:ml,lastUpdated:ml,completedOn:ml,isDeleted:ml,isArchived:ml,isProcessing:ml,name:mN,options:uQ,metric:wN,__checkboxSelection:void 0,description:Vre,thumbnail:Kle},aue={text:!1,id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1,description:!1,thumbnail:!1},lue={text:null,id:void 0,assignees:YO,status:cN,dateRange:Noe,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:mN,options:vN,metric:void 0,__checkboxSelection:void 0,description:void 0,thumbnail:void 0},uue={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50],text:[200,300],description:[200,300],thumbnail:[82,82]},cue={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized",editable:!0}},due=e=>{var t,n,o;if(e){if(Number((t=e.metric_type)==null?void 0:t.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number((n=e.metric_type)==null?void 0:n.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number((o=e.metric_type)==null?void 0:o.id)==3)return}},Md=e=>{if(e)return due(e)};function AV(e,t){var s,r,i,a;const n=(s=t==null?void 0:t.data)==null?void 0:s.permissions;let o={disabled:!1,readOnly:!1,type:void 0};if(!t||!e)o={disabled:!1,readOnly:!0,type:void 0};else if(e==="options")o={disabled:!1,readOnly:!1,type:void 0};else if(e!=null&&e.includes("metric")){const l=`metric_permission_${e==null?void 0:e.replace("metric_","")}`;o={disabled:!1,readOnly:!((t==null?void 0:t.data)&&t.data[l]&&((r=t.data[l])==null?void 0:r.permission)==2&&!((i=t.colDef)!=null&&i.context.formula)&&!t.data.isLocked&&!t.data.isDeleted),type:Md((a=t.colDef)==null?void 0:a.context)}}else{const u={assignees:(n==null?void 0:n.has_update_assignee_permission)??0,completedOn:0,name:(n==null?void 0:n.has_edit_permission)??0,permissions:0,status:(n==null?void 0:n.has_edit_template_flow_status_permission)??0,dateRange:(n==null?void 0:n.has_edit_date_permission)??0,isStarted:0,isDeleted:0,isArchived:0,isLocked:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1,disabled:0,description:(n==null?void 0:n.has_edit_permission)??0,thumbnail:1}[e]??0;o={disabled:u===-1,readOnly:u!==1,type:void 0}}return o}class Y0{constructor(){bn(this,"eGui");bn(this,"params")}init(t){this.params=t}getGui(){var n,o,s,r,i;const t=document.createElement("div");return(n=this.params)!=null&&n.height&&t.style.setProperty("--height",(o=this.params)==null?void 0:o.height),(s=this.params)!=null&&s.width?t.style.setProperty("--width",(r=this.params)==null?void 0:r.width):(i=this.params)!=null&&i.fullwidth?t.style.setProperty("--width","100%"):t.style.setProperty("--width",`${Math.floor(Math.random()*50)+50}%`),t.className="ag-cell-skeleton",t.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation()}),this.eGui=t,t}refresh(t){return!1}getValue(){var t;return(t=this.params)==null?void 0:t.value}isPopup(t){return!1}getPopupPosition(){}destroy(){}}const IV=new Map;class wp{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t,n){var u,c,d;const o=t.data||((u=t.node)==null?void 0:u.data),s=(c=t.colDef)==null?void 0:c.field,r=s&&o?o[s]:void 0,i=AV((d=t.colDef)==null?void 0:d.field,t),a=typeof n=="function"?n(t):n??{};return{...t,value:r,disabled:i==null?void 0:i.disabled,readOnly:i==null?void 0:i.readOnly,type:Md(t.context),...a}}static resolveRendererComponent(t,n){let o;return t.includes("metric")&&xV.metric?Md(n)==="rating"?o=kre:o=wN:o=xV[t]??void 0,o}static resolveEditorComponent(t,n){const o=t.includes("metric");let s;const r=Md(n);return o&&["number","dropdown"].includes(r)?s=Wse:s=lue[t],s}static canEditField(t,n){var r;if(n.data===void 0)return!1;const o=AV((r=n.colDef)==null?void 0:r.field,n),s=aue[t]??!0;return!(o!=null&&o.disabled)&&!(o!=null&&o.readOnly)&&s&&(o==null?void 0:o.type)!=="rating"}static resolveSize(t){const[n=250,o=300]=uue[t]??[];return{minWidth:n,maxWidth:o}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellEditor:n}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=cue[o]??{},i=Md(t.context),a=i==="number"||i==="rating",l=i=="rating"?t.context.range*24+20:s.minWidth;return{...t,headerName:t.headerName,...s,...t,cellEditorSelector:c=>{const d=this.resolveEditorComponent(o,t.context);return{component:n(d),params:this.buildCommonCellParams(c,t.cellRendererParams),popup:!a}},singleClickEdit:!0,cellEditorPopup:!a,cellEditorPopupPosition:a?void 0:"under",editable:c=>{let d;return c.data===void 0||c.data.isDeleted||c.node.data===void 0?d=!1:d=this.canEditField(o,c),d},minWidth:l,cellRendererSelector:c=>hue(c,{component:n(this.resolveRendererComponent(o,t.context)),params:this.buildCommonCellParams(c,t.cellRendererParams)}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r,cellClass:c=>`${i}--${c.colDef.field}`}}}bn(wp,"wrappers",null);const hue=(e,t)=>{var s;const n=(s=e.colDef)==null?void 0:s.field,o=`${n}-${e.node.rowIndex}`;return IV.set(o,(IV.get(o)??0)+1),n!=null&&n.includes("metric")?e.value===void 0?{component:Y0,params:{fullwidth:!1}}:t:e.data&&(n!=null&&n.includes("thumbnail"))||e.data&&e.value!==void 0?t:!n||n==="options"||n==="__checkboxSelection"?e.data?t:{component:Y0,params:{fullwidth:!0,width:"24px",height:"24px"}}:!e.data||e.value===void 0?{component:Y0,params:{fullwidth:!1}}:t},fue=Et(ot({__name:"Vue3Wrapper",props:{component:{},params:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!0},value:{},data:{},id:{},tooltip:{},isNoData:{type:Boolean,default:!1},workspaceId:{},entityId:{},axiosService:{},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{default:"default"},maxRating:{default:5},config:{}},setup(e,{expose:t}){const n=e,o=$(null),s=q(()=>{var a;return((a=n.component)==null?void 0:a.name)||"UnknownComponent"}),r=q(()=>{var a;return((a=n.component)==null?void 0:a.default)||n.component}),i=q(()=>({params:n.params,disabled:n.disabled,readOnly:n.readOnly,value:n.value,maxRating:n.maxRating,data:n.data,id:n.id,workspaceId:n.workspaceId,entityId:n.entityId,axiosService:n.axiosService,tooltip:n.tooltip,isSearching:n.isSearching,isFiltering:n.isFiltering,isNoData:n.isNoData,config:n.config}));return t({focus:()=>{var a;return(a=o.value)!=null&&a.focus?o.value.focus():console.warn(`Component ${s.value} does not have a focus method.`),!0},blur:()=>{var a,l;return(l=(a=o.value)==null?void 0:a.blur)==null||l.call(a),!0},trigger:(a,l)=>{var u;return(u=o.value)==null||u.$emit(a,l),!0}}),(a,l)=>(K(),We(_C(r.value),Kt(i.value,{ref_key:"componentRef",ref:o}),null,16))}}),[["__cssModules",{$style:{skeleton:"_skeleton_7xde7_1",shimmer:"_shimmer_7xde7_16","skeleton-loading":"_skeleton-loading_7xde7_1"}}]]);function pue(e){return"stopEditing"in e}const gue=8,mue=e=>{if(!e)return;const t=e.__vueParentComponent,n=t==null?void 0:t.exposed;n&&typeof n.triggerFocus=="function"?n.triggerFocus():e.focus()};function PV(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"componsenExposed",null);bn(this,"params");bn(this,"isEditor",!1);bn(this,"_destroyed",!1)}init(n){var l,u,c,d;if(!n){console.error("[Vue3CellWrapper] Missing params");return}const o=performance.now();this.params=n,this.isEditor=pue(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.width="100%",this.container.style.height="100%";const s=n.context.apiClass,r=n,i={component:e,params:Object.freeze(n),disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1,config:r.config,sceneId:(r==null?void 0:r.sceneId)||void 0};this.vNode=ye(fue,i),YC(this.vNode,this.container);const a=performance.now()-o;a>gue&&console.warn(`[Vue3CellWrapper] Slow render (${a.toFixed(1)}ms) for "${(u=n.colDef)==null?void 0:u.field}"`),this.componentInstance=(c=this.vNode.component)==null?void 0:c.proxy,this.componsenExposed=(d=this.vNode.component)==null?void 0:d.exposed}getGui(){return this.container}refresh(n){return!1}focusUi(){var n;(n=this.componsenExposed)!=null&&n.focus?this.componsenExposed.focus():mue(this.container)}getValue(){var n,o,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(o=this.componentInstance).getValue)==null?void 0:s.call(o))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(n){var i,a,l,u,c;const o=(l=(a=(i=this.params)==null?void 0:i.colDef)==null?void 0:a.field)==null?void 0:l.includes("metric"),s=((u=this.params)==null?void 0:u.context)&&Md(this.params.context);return o||(s==="number"||s==="rating")||!this.isEditor?!1:(c=this.componentInstance)!=null&&c.isPopup?this.componentInstance.isPopup():!0}getPopupPosition(){var o,s,r;return this.isEditor?(o=this.componentInstance)!=null&&o.getPopupPosition?this.componentInstance.getPopupPosition():((r=(s=this.params)==null?void 0:s.colDef)==null?void 0:r.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during $destroy:",s)}try{typeof n.destroy=="function"&&n.destroy()}catch(s){console.warn("[Vue3CellWrapper] Error during destroy():",s)}}(typeof queueMicrotask=="function"?queueMicrotask:s=>Promise.resolve().then(s))(()=>{try{YC(null,this.container)}catch(s){console.warn("[Vue3CellWrapper] Error during unmount:",s)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Ey(e){return PV(e)}function kV(e){return PV(e)}var zu=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&n&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const o=this.getListeners(e,n,!1);o&&(o.delete(t),o.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,s=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},r=this.getListeners(n,t,!1);if(((r==null?void 0:r.size)??0)>0){const a=new Set(r);for(const l of a)r!=null&&r.has(l)&&s(()=>l(e))}const i=this.getGlobalListeners(t);if(i.size>0){const a=new Set(i);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ra(e){return e==null||e===""?null:e}function pt(e){return e!=null&&e!==""}function Gn(e){return!pt(e)}function X0(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Cp(e,t){const n=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return n===o}function vue(e,t,n=!1){const o=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),o&&s)return 0;if(o)return-1;if(s)return 1;function r(i,a){return i>a?1:i<a?-1:0}if(typeof e!="string"||!n)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}var yue=/[&<>"']/g,wue={"&":"&","<":"<",">":">",'"':""","'":"'"};function Nd(e){return(e==null?void 0:e.toString().toString())??null}function bp(e){var t;return((t=Nd(e))==null?void 0:t.replace(yue,n=>wue[n]))??null}function Di(e){return e.eRootDiv.getRootNode()}function jn(e){return Di(e).activeElement}function Vo(e){const{gos:t,eRootDiv:n}=e;let o=null;const s=t.get("getDocument");return s&&pt(s)?o=s():n&&(o=n.ownerDocument),o&&pt(o)?o:document}function FV(e){const t=jn(e);return t===null||t===Vo(e).body}function OV(e){return Vo(e).defaultView||window}function Z0(e){let t=null,n=null;try{t=Vo(e).fullscreenElement}catch{}finally{t||(t=Di(e));const o=t.querySelector("body");o?n=o:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function Cue(e){const t=Z0(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function bue(e){const t=Z0(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function qr(e,t,n){n==null||typeof n=="string"&&n==""?MV(e,t):Tr(e,t,n)}function Tr(e,t,n){e.setAttribute(NV(t),n.toString())}function MV(e,t){e.removeAttribute(NV(t))}function NV(e){return`aria-${e}`}function xl(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Sue(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Eue(e){return e.getAttribute("aria-label")}function Ld(e,t){qr(e,"label",t)}function Sp(e,t){qr(e,"labelledby",t)}function LV(e,t){qr(e,"live",t)}function _ue(e,t){qr(e,"atomic",t)}function Rue(e,t){qr(e,"relevant",t)}function Tue(e,t){qr(e,"invalid",t)}function Due(e,t){qr(e,"disabled",t)}function VV(e,t){qr(e,"hidden",t)}function J0(e,t){Tr(e,"expanded",t)}function xue(e,t){Tr(e,"setsize",t)}function Aue(e,t){Tr(e,"posinset",t)}function Iue(e,t){Tr(e,"multiselectable",t)}function Pue(e,t){Tr(e,"rowcount",t)}function _y(e,t){Tr(e,"rowindex",t)}function kue(e,t){Tr(e,"rowspan",t)}function Fue(e,t){Tr(e,"colcount",t)}function BV(e,t){Tr(e,"colindex",t)}function Oue(e,t){Tr(e,"colspan",t)}function Mue(e,t){Tr(e,"sort",t)}function Nue(e){MV(e,"sort")}function $V(e,t){qr(e,"selected",t)}function Lue(e,t){qr(e,"controls",t)}function Vue(e,t){Lue(e,t.id),Sp(t,e.id)}function HV(e,t){qr(e,"owns",t)}function Ry(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Bue="[tabindex], input, select, button, textarea, [href]",GV="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ep(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(GV)?!1:xi(e)}function Un(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-hidden",!t),o||VV(e,!t)}function $ue(e,t,n={}){const{skipAriaHidden:o}=n;e.classList.toggle("ag-invisible",!t),o||VV(e,!t)}function _p(e,t){const n="disabled",o=t?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);o(e);const s=e.querySelectorAll("input")??[];for(const r of s)o(r)}function ju(e,t,n){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++o>n)break}else if(e===n)break}return!1}function Ku(e){const{height:t,width:n,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:r,borderLeftWidth:i,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(r||"0"),borderLeftWidth:v(i||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(f||"0"),marginLeft:v(p||"0"),boxSizing:g}}function Q0(e){const t=Ku(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Rp(e){const t=Ku(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function UV(e){const{height:t,marginBottom:n,marginTop:o}=Ku(e);return Math.floor(t+n+o)}function Ty(e){const{width:t,marginLeft:n,marginRight:o}=Ku(e);return Math.floor(t+n+o)}function WV(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:r}=Ku(e);return{top:t.top+(n||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(r||0)}}function Dy(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function xy(e,t,n){n&&(t*=-1),e.scrollLeft=t}function zo(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Yr(e){e!=null&&e.parentNode&&e.remove()}function zV(e){return!!e.offsetParent}function xi(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!zV(e)||window.getComputedStyle(e).visibility!=="visible")}function e_(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jV(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function KV(e,t){for(let n=0;n<t.length;n++){const o=t[n],s=e.children[n];s!==o&&e.insertBefore(o,s)}}function Hue(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Tp(e,t){if(t)for(const n of Object.keys(t)){const o=t[n];if(!(n!=null&&n.length)||o==null)continue;const s=Hue(n),r=o.toString(),i=r.replace(/\s*!important/g,""),a=i.length!=r.length?"important":void 0;e.style.setProperty(s,i,a)}}function Ay(e){return()=>{const t=e();return t?t_(t)||qV(t):!0}}function t_(e){return e.clientWidth<e.scrollWidth}function qV(e){return e.clientHeight<e.scrollHeight}function Iy(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ai(e,t)}function Ai(e,t){t=n_(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Dp(e,t){t=n_(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function n_(e){return typeof e=="number"?`${e}px`:e}function o_(e){return e instanceof Node||e instanceof HTMLElement}function Ys(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Al(e,t,n){const s=OV(e).ResizeObserver,r=s?new s(n):null;return r==null||r.observe(t),()=>r==null?void 0:r.disconnect()}function Ta(e,t){const n=OV(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var YV="data-ref",s_;function XV(){return s_??(s_=document.createTextNode(" ")),s_.cloneNode()}function xp(e){const{attrs:t,children:n,cls:o,ref:s,role:r,tag:i}=e,a=document.createElement(i);if(o&&(a.className=o),s&&a.setAttribute(YV,s),r&&a.setAttribute("role",r),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(XV()),l=!1),a.append(xp(u)),a.appendChild(XV())))}return a}var Gue=["touchstart","touchend","touchmove","touchcancel","scroll"],Uue=["wheel"],r_={},ZV=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof r_[n]=="boolean")return r_[n];const o=document.createElement(e[n]||"div");return n="on"+n,r_[n]=n in o}})();function Wue(e,t){return!t||!e?!1:jue(t).indexOf(e)>=0}function zue(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function jue(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():zue(t)}function Kue(e,t,n){const o=que(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,n,s)}var que=e=>{const t=Gue.includes(e),n=Uue.includes(e);if(t)return!0;if(n)return!1};function JV(e,t,n){if(n===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=n}var Ap=(e,t)=>{const n=e.identifier;for(let o=0,s=t.length;o<s;++o){const r=t[o];if(r.identifier===n)return r}return null};function Ip(e,t){return e.gos.isElementInThisInstance(t.target)}function Yue(e,t,n){const s=e.getBoundingClientRect().height,r=Cue(n)-2,i=bue(n)-2;if(!e.offsetParent)return;const l=WV(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const f=Vo(n),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,v=p.pageXOffset||f.documentElement.scrollLeft;r>0&&h+e.clientWidth>r+v&&(h=r+v-e.clientWidth),h<0&&(h=0),i>0&&d+e.clientHeight>i+g&&(d=i+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Py=(e,...t)=>{for(const n of t){const[o,s,r,i]=n;o.addEventListener(s,r,i),e.push(n)}},i_=e=>{if(e){for(const[t,n,o,s]of e)t.removeEventListener(n,o,s);e.length=0}},Il=e=>{e.cancelable&&e.preventDefault()};function Xue(e,t){return t}function QV(e){return(e==null?void 0:e.getLocaleTextFunc())??Xue}function Zue(e,t,n,o){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(o):s,o)}function Jue(e){return(t,n,o)=>e({key:t,defaultValue:n,variableValues:o})}function Que(e){return(t,n,o)=>{let s=e==null?void 0:e[t];if(s&&(o!=null&&o.length)){let r=0;for(;!(r>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[r++])}return s??n}}var Ii=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new zu),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var o;(o=this.localEventService)==null||o.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const o of Object.keys(t)){const s=t[o];s&&n.push(this._setupListener(e,o,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let o;if(ece(e))e.__addEventListener(t,n),o=()=>(e.__removeEventListener(t,n),null);else{const s=tce(e);e instanceof HTMLElement?Kue(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),o=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const o=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const r={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(r)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return QV(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ece(e){return e.__addEventListener!==void 0}function tce(e){return e.eventServiceType==="global"}var Ke=class extends Ii{},eB={};function a_(e,t){eB[t]||(e(),eB[t]=!0)}var nce={pending:!1,funcs:[]},oce={pending:!1,funcs:[]};function l_(e,t="setTimeout",n){const o=t==="raf"?oce:nce;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const r=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const i of r)i()};t==="raf"?Ta(n,s):window.setTimeout(s,0)}function jo(e,t,n){let o;return function(...s){const r=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(r,s)},n)}}function tB(e,t){let n=0;return function(...o){const s=this,r=Date.now();r-n<t||(n=r,e.apply(s,o))}}function sce(e,t,n,o=100){const s=Date.now();let r=null,i=!1;const a=()=>{r!=null&&(window.clearInterval(r),r=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>o;(t()||u)&&(n(),i=!0,a())};l(),i||(r=window.setInterval(l,10))}var nB=new Set(["__proto__","constructor","prototype"]);function rce(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(o=>!nB.has(o)))t(n,e[n])}}function fs(e,t,n=!0,o=!1){pt(t)&&rce(t,(s,r)=>{let i=e[s];i!==r&&(o&&i==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(i={},e[s]=i),oB(r)&&oB(i)&&!Array.isArray(i)?fs(i,r,n,o):(n||r!==void 0)&&(e[s]=r))})}function oB(e){return typeof e=="object"&&e!==null}var u_=class Ba{static applyGlobalGridOptions(t){if(!Ba.gridOptions)return{...t};let n={};return fs(n,Ba.gridOptions,!0,!0),Ba.mergeStrategy==="deep"?fs(n,t,!0,!0):n={...n,...t},Ba.gridOptions.context&&(n.context=Ba.gridOptions.context),t.context&&(Ba.mergeStrategy==="deep"&&n.context&&fs(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ba.mergeStrategy==="deep"){const o=ice(t);if(o&&typeof o=="object"&&typeof n=="object")return Ba.applyGlobalGridOptions({[t]:n})[t]}return n}};u_.gridOptions=void 0,u_.mergeStrategy="shallow";var c_=u_;function ice(e){var t;return(t=c_.gridOptions)==null?void 0:t[e]}var ace={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},sB="https://www.ag-grid.com";function Pl(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Pp(e,...t){a_(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Vd(e,...t){a_(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var rB=new Set,ky={},Bd={},Fy,iB=!1,aB=!1,lce=!1;function uce(e){const[t,n]=e.version.split(".")||[],[o,s]=Fy.split(".")||[];return t===o&&n===s}function cce(e){var o;Fy||(Fy=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?uce(e)||Vd(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Fy}.`)):Vd(t(`'${e.moduleName}' is incompatible.`));const n=(o=e.validate)==null?void 0:o.call(e);n&&!n.isValid&&Vd(`${n.message}`)}function kp(e,t,n=!1){n||(iB=!0),cce(e);const o=e.rowModels??["all"];rB.add(e);let s;t!==void 0?(aB=!0,Bd[t]===void 0&&(Bd[t]={}),s=Bd[t]):s=ky;for(const r of o)s[r]===void 0&&(s[r]={}),s[r][e.moduleName]=e;if(e.dependsOn)for(const r of e.dependsOn)kp(r,t,n)}function dce(e){delete Bd[e]}function d_(e,t,n){const o=s=>{var r,i,a;return!!((r=ky[s])!=null&&r[e])||!!((a=(i=Bd[t])==null?void 0:i[s])!=null&&a[e])};return o(n)||o("all")}function h_(){return aB}function hce(e,t){const n=Bd[e]??{};return[...Object.values(ky.all??{}),...Object.values(n.all??{}),...Object.values(ky[t]??{}),...Object.values(n[t]??{})]}function fce(){return new Set(rB)}function pce(){return iB}function lB(){return lce}var gce=class{static register(e){kp(e,void 0)}static registerModules(e){for(const t of e)kp(t,void 0)}},dt="34.3.1",uB=2e3,cB=100,dB="_version_",Oy=null,$d=`${sB}/javascript-data-grid`;function mce(e){Oy=e}function vce(e){$d=e}function hB(e,t,n){return(Oy==null?void 0:Oy(e,t))??[bce(e,t,n)]}function f_(e,t,n,o,s){e(`${o?"warning":"error"} #${t}`,...hB(t,n,s))}function yce(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function wce(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=yce(e)),t}function My(e){return e===void 0?"undefined":e===null?"null":e}function p_(e,t){return`${e}?${t.toString()}`}function Cce(e,t,n){const o=Array.from(t.entries()).sort((r,i)=>i[1].length-r[1].length);let s=p_(e,t);for(const[r,i]of o){if(r===dB)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=i.length-u>cB?i.slice(0,i.length-u)+l:i.slice(0,cB)+l;t.set(r,c),s=p_(e,t)}return s}function fB(e,t){const n=new URLSearchParams;if(n.append(dB,dt),t)for(const r of Object.keys(t))n.append(r,wce(t[r]));const o=`${$d}/errors/${e}`,s=p_(o,n);return s.length<=uB?s:Cce(o,n,uB)}var bce=(e,t,n)=>{const o=fB(e,t),s=`${n?n+`
|
|
193
193
|
`:""}Visit ${o}`;return lB()?s:`${s}${n?"":`
|
|
194
194
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function Qe(...e){f_(Pp,e[0],e[1],!0)}function Cn(...e){f_(Vd,e[0],e[1],!1)}function Fp(e,t,n){f_(Vd,e,t,!1,n)}function Sce(e,t){const n=t[0];return`error #${n} `+hB(n,t[1],e).join(" ")}function Pi(...e){return Sce(void 0,e)}function pB(e,t){return e.get("rowModelType")===t}function ro(e,t){return pB(e,"clientSide")}function Hd(e,t){return pB(e,"serverSide")}function Ko(e,t){return e.get("domLayout")===t}function qu(e){return Vy(e)!==void 0}function gB(e){return typeof e.get("getRowHeight")=="function"}function Ece(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kl(e,t,n=!1,o){const{gos:s,environment:r}=e;if(o==null&&(o=r.getDefaultRowHeight()),gB(s)){if(n)return{height:o,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(g_(u))return u===0&&Qe(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return _ce(s);const i=s.get("rowHeight");return{height:i&&g_(i)?i:o,estimated:!1}}function _ce(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return g_(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Yu(e){const{environment:t,gos:n}=e,o=n.get("rowHeight");if(!o||Gn(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Qe(24),t.getDefaultRowHeight())}function g_(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function mB(e,t,n){const o=t[e.getDomDataKey()];return o?o[n]:void 0}function Xu(e,t,n,o){const s=e.getDomDataKey();let r=t[s];Gn(r)&&(r={},t[s]=r),r[n]=o}function Gd(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function vB(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ko(e,"print"))}function ki(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function m_(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function yB(e){return e.get("grandTotalRow")}function wB(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function CB(e,t,n){return!!t.group&&!t.footer&&wB(e,n)}function Ud(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let o=t(n);return typeof o!="string"&&(a_(()=>Qe(25,{id:o}),"getRowIdString"),o=String(o)),o}}function Rce(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Tce(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Wd(e){return(e==null?void 0:e.checkboxes)??!0}function Ny(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Ly(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function v_(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Dce(e){return typeof e.get("rowSelection")!="string"}function Da(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function bB(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return n&&o?!1:n?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function xce(e){const t=bB(e);return t===!0||t==="enableSelection"}function Ace(e){const t=bB(e);return t===!0||t==="enableDeselection"}function y_(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Vy(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Op(e){return Vy(e)==="multiRow"}function Ice(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function By(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return n&&o?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function SB(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function Pce(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Mp(e){const t=By(e);return t==="descendants"||t==="filteredDescendants"}function EB(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function kce(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Xs(e){return e.get("columnMenu")==="legacy"}function Fce(e){return!Xs(e)}function Oce(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ot(e,t){return e.addCommon(t)}function _B({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Mce={resizable:!0,sortable:!0},Nce=0;function RB(){return Nce++}function Fl(e){return e instanceof Zu}var Zu=class extends Ke{constructor(e,t,n,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=o,this.isColumn=!0,this.instanceId=RB(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new zu,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=bp(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:o}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),o==null||o.initCol(this)}setColDef(e,t,n){var s;const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=pt(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=pt(n)&&n.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,o=e.initialWidth;return n!=null?t=n:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var o,s,r;this.frameworkEventListenerService=(s=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(o,this.frameworkEventListenerService,this.colEventSvc);const n=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var o;const n=((o=this.frameworkEventListenerService)==null?void 0:o.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return Ot(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Mce[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return Ot(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Gn(this.sort)}isSorting(){return pt(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Qe(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Ot(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Gn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(Gn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const o=this.createColumnEvent(e,t);n&&fs(o,n),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function os(e){return e instanceof $y}var $y=class extends Ke{constructor(e,t,n,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=RB(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Fl(t)?e(t):os(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Fl(t)?e.push(t):os(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const o=this.findChildrenRemovingPadding();for(let r=0,i=o.length;r<i;r++){const a=o[r];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const o of n)os(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Lce={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function TB(e,t,n){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,n),o}var Vce=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=X0(e);let n=0;for(;;){let o=e??t;if(o?n!==0&&(o+="_"+n):o=n,!this.existingKeys[o]){const s=String(o);return e&&n>0&&Qe(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function An(e){if(e!=null&&e.length)return e[e.length-1]}function Ol(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function Np(e,t){if(e)for(const n of e)t(n)}function Xr(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function DB(e,t,n){for(let o=0;o<t.length;o++)Xr(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(n,0,t[o])}var Hy="ag-Grid-AutoColumn",xB="ag-Grid-SelectionColumn",AB="ag-Grid-RowNumbersColumn";function IB(e){const t=[],n=o=>{for(let s=0;s<o.length;s++){const r=o[s];Fl(r)?t.push(r):os(r)&&n(r.getChildren())}};return n(e),t}function xa(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Gy(e,t,n){const o={};if(!t)return;Pa(null,t,r=>{o[r.getInstanceId()]=r}),n&&Pa(null,n,r=>{o[r.getInstanceId()]=null});const s=Object.values(o).filter(r=>r!=null);e.context.destroyBeans(s)}function w_(e){return e.getId().startsWith(Hy)}function Aa(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(xB))??!1}function Ia(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(AB))??!1}function Bce(e){return Aa(e)||Ia(e)}function Uy(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function $ce(e,t){return Ol(e,t,(n,o)=>n.getColId()===o.getColId())}function Hce(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function zd(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Lp(e,t){const n=e===t,o=e.getColDef()===t,s=e.getColId()==t;return n||o||s}var Gce=(e,t)=>(n,o)=>{const s={value1:void 0,value2:void 0};let r=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],r=!0),pt(o)&&e[o]!==void 0&&(s.value2=e[o],r=!0)),!r&&t&&(t[n]!==void 0&&(s.value1=t[n]),pt(o)&&t[o]!==void 0&&(s.value2=t[o])),s},Uce=(e,t)=>{os(e)&&e.setupExpandable(),e.originalParent=t};function Wce(e,t=null,n,o,s){const r=new Vce,{existingCols:i,existingGroups:a,existingColKeys:l}=zce(o);r.addExistingKeys(l);const u=PB(e,t,0,n,i,r,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,r):u;return Pa(null,h,Uce),{columnTree:h,treeDepth:d}}function zce(e){const t=[],n=[],o=[];return e&&Pa(null,e,s=>{if(os(s)){const r=s;n.push(r)}else{const r=s;o.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:n,existingColKeys:o}}function PB(e,t,n,o,s,r,i,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&Zce(d)?u[c]=l.createProvidedColumnGroup(o,d,n,s,r,i,a):u[c]=jce(e,o,d,s,r,a)}return u}function jce(e,t,n,o,s,r){var l;const i=qce(n,o);i&&(o==null||o.splice(i.idx,1));let a=i==null?void 0:i.column;if(a){const u=C_(e,n,a.getColId());a.setColDef(u,n,r),Kce(e,a,u,r)}else{const u=s.getUniqueKey(n.colId,n.field),c=C_(e,n,u);a=new Zu(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function kB(e,t,n,o,s,r,i,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,o,a),s!==void 0&&l.setColSortIndex(t,s)),r!==void 0&&(u==null||u.setColPinned(t,r)),i!==void 0&&(c==null||c.setColFlex(t,i))}function Kce(e,t,n,o){kB(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,o);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,o);else{const r=t.getActualWidth();t.setActualWidth(r,o)}}function qce(e,t){if(t)for(let n=0;n<t.length;n++){const o=t[n].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(o.field===e.field)return{idx:n,column:t[n]};continue}if(o===e)return{idx:n,column:t[n]}}}function C_(e,t,n,o){const{gos:s,dataTypeSvc:r}=e,i={},a=s.get("defaultColDef");fs(i,a,!1,!0);const l=Yce(e,i,t,n);l&&Xce(e,l,i);const u=i.cellDataType;fs(i,t,!1,!0),u!==void 0&&(i.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=ki(s);return t.rowGroup&&c&&d&&fs(i,{sort:c.sort,initialSort:c.initialSort},!1,!0),r&&(r.postProcess(i),r.validateColDef(i)),s.validateColDef(i,n,o),i}function Yce(e,t,n,o){var i;const s=(i=e.dataTypeSvc)==null?void 0:i.updateColDefAndGetColumnType(t,n,o),r=n.type??s??t.type;return t.type=r,r?Uy(r):void 0}function Xce(e,t,n){if(!t.length)return;const o=Object.assign({},Lce),s=e.gos.get("columnTypes")||{};for(const r of Object.keys(s)){const i=s[r];r in o?Qe(34,{key:r}):(i.type&&Qe(35),o[r]=i)}for(const r of t){const i=o[r.trim()];i?fs(n,i,!1,!0):Qe(36,{t:r})}}function Zce(e){return e.children!==void 0}function Pa(e,t,n){if(t)for(let o=0;o<t.length;o++){const s=t[o];os(s)&&Pa(s,s.getChildren(),n),n(s,e)}}function FB(e,t){const n=[],o=[],s=[];return e.forEach(i=>{const a=i.getColDef().lockPosition;a==="right"?s.push(i):a==="left"||a===!0?n.push(i):o.push(i)}),t.get("enableRtl")?[...s,...o,...n]:[...n,...o,...s]}function OB(e,t){let n=!0;return Pa(null,t,o=>{if(!os(o))return;const s=o,r=s.getColGroupDef();if(!(r==null?void 0:r.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function MB(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let o=1;o<e.length;o++)if(n!==t(e[o]))return;return n}function NB(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=MB(t,r=>r.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:n})}function Jce(e,t,n){if(!t.length)return;const o=t.length===1?t[0]:null,s=MB(t,r=>r.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:n})}function Qce(e,t,n,o){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:o})}function jd(e,t,n,o,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:o})}function Zr(e,t,n){var E;const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:r,autoColSvc:i,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:f,gos:p}=e,g=o.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!g.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Qe(32),!1;const y=(R,D,x,N,B)=>{if(!R)return;const A=Gce(D,t.defaultState),P=A("flex").value1;if(kB(e,R,A("hide").value1,A("sort").value1,A("sortIndex").value1,A("pinned").value1,P,n),P==null){const k=A("width").value1;if(k!=null){const O=R.getColDef().minWidth??d.getDefaultColumnMinWidth();O!=null&&k>=O&&R.setActualWidth(k,n)}}B||!R.isPrimary()||(h==null||h.syncColumnWithState(R,n,A),s==null||s.syncColumnWithState(R,n,A,x),r==null||r.syncColumnWithState(R,n,A,N))},b=(R,D,x)=>{var ne,Y;const N=LB(e,n),B=D.slice(),A={},P={},k=[],O=[],L=[];let H=0;const W=(s==null?void 0:s.columns.slice())??[],se=(r==null?void 0:r.columns.slice())??[];for(const I of R){const z=I.colId;if(z.startsWith(Hy)){k.push(I),L.push(I);continue}if(Aa(z)){O.push(I),L.push(I);continue}const me=x(z);me?(y(me,I,A,P,!1),Xr(B,me)):(L.push(I),H+=1)}const ie=I=>y(I,null,A,P,!1);B.forEach(ie),s==null||s.sortColumns(BB.bind(s,A,W)),r==null||r.sortColumns(BB.bind(r,P,se)),o.refreshCols(!1,n);const Q=(I,z,ee=[])=>{for(const me of z){const xe=I(me.colId);Xr(ee,xe),y(xe,me,null,null,!0)}ee.forEach(ie)};return Q(I=>(i==null?void 0:i.getColumn(I))??null,k,(ne=i==null?void 0:i.getColumns())==null?void 0:ne.slice()),Q(I=>(a==null?void 0:a.getColumn(I))??null,O,(Y=a==null?void 0:a.getColumns())==null?void 0:Y.slice()),tde(t,o,p),u.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),N(),{unmatchedAndAutoStates:L,unmatchedCount:H}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:w}=b(t.state||[],g,R=>o.getColDefCol(R));if(S.length>0||pt(t.defaultState)){const R=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];w=b(S,R,D=>(c==null?void 0:c.getPivotResultCol(D))??null).unmatchedCount}return l==null||l.finish(),w===0}function ede(e,t){var b,S;const{colModel:n,autoColSvc:o,selectionColSvc:s,eventSvc:r,gos:i}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=IB(l),c=[];let d=1e3,h=1e3;const f=w=>{const E=VB(w);Gn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),Gn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(b=o==null?void 0:o.getColumns())==null||b.forEach(f),(S=s==null?void 0:s.getColumns())==null||S.forEach(f),u==null||u.forEach(f),Zr(e,{state:c},t);const p=(o==null?void 0:o.getColumns())??[],y=[...(s==null?void 0:s.getColumns())??[],...p,...a].map(w=>({colId:w.colId}));Zr(e,{state:y,applyOrder:!0},t),r.dispatchEvent(Ot(i,{type:"columnsReset",source:t}))}function LB(e,t){const{rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:s,colModel:r,sortSvc:i,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(o==null?void 0:o.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=Wy(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(R,D,x,N)=>{const B=D.map(N),A=x.map(N);if(Ol(B,A))return;const k=new Set(D);for(const L of x)k.delete(L)||k.add(L);const O=[...k];a.dispatchEvent({type:R,columns:O,column:O.length===1?O[0]:null,source:t})},h=R=>{const D=[];return r.forAllCols(x=>{const N=c[x.getColId()];N&&R(N,x)&&D.push(x)}),D},f=R=>R.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(o==null?void 0:o.columns)??[],f);const g=h((R,D)=>{const x=R.aggFunc!=null,N=x!=D.isValueActive(),B=x&&R.aggFunc!=D.getAggFunc();return N||B});g.length>0&&Qce(a,"columnValueChanged",g,t),jd(a,h((R,D)=>R.width!=D.getActualWidth()),!0,t),NB(a,h((R,D)=>R.pinned!=D.getPinned()),t),Jce(a,h((R,D)=>R.hide==D.isVisible()),t);const w=h((R,D)=>R.sort!=D.getSort()||R.sortIndex!=D.getSortIndex());w.length>0&&(i==null||i.dispatchSortChangedEvents(t,w));const E=Wy(e);ode(u,E,t,r,a)}}function Wy(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:o}=e,s=t.getColDefCols();if(Gn(s)||!t.isAlive())return[];const r=n==null?void 0:n.columns,i=o==null?void 0:o.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&r?r.indexOf(c):null,h=c.isPivotActive()&&i?i.indexOf(c):null,f=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,g=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:g,aggFunc:f,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,f=u.has(d.colId)?u.get(d.colId):-1;return h-f}),a}function VB(e){const t=(p,g)=>p??g??null,n=e.getColDef(),o=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),r=t(n.hide,n.initialHide),i=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:r,pinned:i,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:f}}function tde(e,t,n){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);nde(t.cols,o,t,n)}function nde(e,t,n,o){if(e==null)return;let s=[];const r={};for(const a of t){if(r[a])continue;const l=e.map[a];l&&(s.push(l),r[a]=!0)}let i=0;for(const a of e.list){const l=a.getColId();if(r[l]!=null)continue;l.startsWith(Hy)?s.splice(i++,0,a):s.push(a)}if(s=FB(s,o),!OB(s,n.getColTree())){Qe(39);return}e.list=s}function ode(e,t,n,o,s){const r={};for(const c of t)r[c.colId]=c;const i={};for(const c of e)r[c.colId]&&(i[c.colId]=!0);const a=e.filter(c=>i[c.colId]),l=t.filter(c=>i[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const f=o.getCol(h.colId);f&&u.push(f)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var BB=(e,t,n,o)=>{const s=e[n.getId()],r=e[o.getId()],i=s!=null,a=r!=null;if(i&&a)return s-r;if(i)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(o),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},sde=class extends Ke{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(zd(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),zd(e.source)))}createColsFromColDefs(e){var b,S,w;const{beans:t}=this,{valueCache:n,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:r,valueColsSvc:i,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?LB(t,e):void 0;n==null||n.expire();const d=(b=this.colDefCols)==null?void 0:b.list,h=(S=this.colDefCols)==null?void 0:S.tree,f=Wce(t,this.colDefs,!0,h,e);Gy(t,(w=this.colDefCols)==null?void 0:w.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,v=IB(p),y={};for(const E of v)y[E.getId()]=E;this.colDefCols={tree:p,treeDepth:g,list:v,map:y},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),i==null||i.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(o==null||o.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:r,quickFilter:i,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,s,r],f,t);const p=Ece(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),i==null||i.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(f),c.clear(),d.clear(),!Ol(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),o.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:o,list:s,tree:r,treeDepth:i}=n??t;return this.cols={list:s.slice(),map:{...o},tree:r.slice(),treeDepth:i},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),r=n.get("rowNumbers"),i=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=w_(l);if(o){const c=i==null?void 0:i.includes(l);return u||c||s&&Aa(l)||r&&Ia(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Zr(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const o=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!n.some(d=>o(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const r=e.list.filter(d=>!s.has(d));if(r.length===0){e.list=n;return}const i=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let p=null,g=null;for(const v of f.getChildren())if(!(v===h||v===d)){if(v instanceof Zu){const y=s.get(v);if(y==null)continue;(p==null||p<y)&&(p=y,g=v);continue}v.forEachLeafColumn(y=>{const b=s.get(y);b!=null&&(p==null||p<b)&&(p=b,g=y)})}return g??i(d,f)},a=[],l=new Map;for(const d of r){const h=i(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let p=f.length-1;p>=0;p--){const g=f[p];u[c--]=g}else u[c--]=f;u[c--]=h}e.list=u}positionLockedCols(e){e.list=FB(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:o}=this.beans;n.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=zd(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Gy(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var r,i,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;Np((r=this.colDefCols)==null?void 0:r.list,e),Np((i=n==null?void 0:n.columns)==null?void 0:i.list,e),Np((a=o==null?void 0:o.columns)==null?void 0:a.list,e),Np((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Np((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:o}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<o.length;a++)if(Lp(o[a],e))return o[a];const{autoColSvc:s,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;return(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??(i==null?void 0:i.getColumn(e))??null}},$B=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function Vp(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var ht=null;function HB(e){return typeof(e==null?void 0:e.getGui)=="function"}var GB=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var o;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const r of s)this.toggleCss(r,t);return}}this.cssClassStates[e]!==t&&e.length&&((o=this.getGui())==null||o.classList.toggle(e,t),this.cssClassStates[e]=t)}},rde=0,Bp=class extends Ii{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=rde++,this.cssManager=new GB(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const o of this.css??[])this.beans.environment.addGlobalCSS(o,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(YV):null}applyElementsToComponent(e,t,n,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===ht)this[t]=o??e;else{const r=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!r)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const o of e.childNodes??[])n.push(o);for(const o of n){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,r=>{const i=r.getGui();if(i)for(const a of o.attributes??[])i.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const r=Array.prototype.slice.call(o.children);s.addItems(r)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,n){const o=e.nodeName,s=this.getDataRefAttribute(e),r=o.indexOf("AG-")===0,i=r?this.componentSelectors.get(o):null;let a=null;if(i){const l=n&&s?n[s]:void 0;a=new i.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(r)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const o=e.getGui();t.replaceChild(o,n),t.insertBefore(document.createComment(n.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let o;typeof e=="string"||e==null?o=e_(e):o=xp(e),this.setTemplateFromElement(o,t,n)}setTemplateFromElement(e,t,n,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const r=t[s];this.componentSelectors.set(r.selector,r)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),o_(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:o}=this.getContainerAndElement(e,t)||{};!n||!o||o.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;$ue(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;Un(this.eGui,e,{skipAriaHidden:n});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},vn=class extends Bp{};function UB(e){return typeof e=="object"&&!!e.component}function ide(e,t){return new qn(n=>{n(window.setInterval(e,t))})}var qn=class pg{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new pg(n=>{let o=t.length;const s=new Array(o);t.forEach((r,i)=>{r.then(a=>{s[i]=a,o--,o===0&&n(s)})})}):pg.resolve()}static resolve(t=null){return new pg(n=>n(t))}then(t){return new pg(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(o=>n(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function ade(e){return e?e.prototype&&"getGui"in e.prototype:!1}function WB(e,t,n,o){const{name:s}=n;let r,i,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],f=h?h(o):null,p=g=>{typeof g=="string"?r=g:g!=null&&g!==!0&&(e.isFrameworkComponent(g)?a=g:i=g)};f?(p(f.component),l=f.params,u=f.popup,c=f.popupPosition):p(d[s])}return{compName:r,jsComp:i,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var lde=class extends Ke{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,o=!1){return this.getCompDetails(this.gridOptions,e,t,n,o)}getCompDetails(e,t,n,o,s=!1){var S;const{name:r,cellRenderer:i}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=WB(this.beans.frameworkOverrides,e,t,o),f,p;const g=w=>{const E=this.registry.getUserComponent(r,w);E&&(l=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0,f=E.params,p=E.processParams)};if(a!=null&&g(a),l==null&&u==null&&n!=null&&g(n),l&&i&&!ade(l)&&(l=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!u){const{validation:w}=this.beans;s&&(a!==n||!n)?a?w!=null&&w.isProvidedUserComp(a)||Cn(50,{compName:a}):n?w||Cn(260,{...this.gos.getModuleErrorParams(),propName:r,compName:n}):Cn(216,{name:r}):n&&!w&&Cn(146,{comp:n});return}const v=this.mergeParams(e,t,o,c,f,p),y=l==null,b=l??u;return{componentFromFramework:y,componentClass:b,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,y,v,t)}}newAgStackInstance(e,t,n,o){var a;const s=!t;let r;s?r=new e:r=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(r);const i=(a=r.init)==null?void 0:a.call(r,n);return i==null?qn.resolve(r):i.then(()=>r)}mergeParams(e,t,n,o=null,s,r){const i={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);fs(i,u)}else typeof l=="object"&&fs(i,l);return fs(i,o),r?r(i):i}},ude={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},cde={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},dde={name:"headerComponent",optionalMethods:["refresh"]},hde={name:"innerHeaderComponent"},fde={name:"innerHeaderGroupComponent"},pde={name:"headerGroupComponent"},gde={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},mde={name:"loadingCellRenderer",cellRenderer:!0},vde={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},yde={name:"loadingOverlayComponent",optionalMethods:["refresh"]},wde={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Cde={name:"tooltipComponent"},b_={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},bde={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Sde={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Ede={name:"loadingCellRenderer",cellRenderer:!0},_de={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Rde={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Tde(e,t){return e.getCompDetailsFromGridOptions(cde,"agDragAndDropImage",t,!0)}function Dde(e,t,n){return e.getCompDetails(t,dde,"agColumnHeader",n)}function xde(e,t,n){return e.getCompDetails(t,hde,void 0,n)}function Ade(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,pde,"agColumnGroupHeader",t)}function Ide(e,t,n){return e.getCompDetails(t,fde,void 0,n)}function Pde(e,t){return e.getCompDetailsFromGridOptions(Sde,void 0,t,!0)}function kde(e,t){return e.getCompDetailsFromGridOptions(Ede,"agLoadingCellRenderer",t,!0)}function Fde(e,t){return e.getCompDetailsFromGridOptions(_de,"agGroupRowRenderer",t,!0)}function Ode(e,t){return e.getCompDetailsFromGridOptions(Rde,"agDetailCellRenderer",t,!0)}function zB(e,t,n){return e.getCompDetails(t,gde,void 0,n)}function jB(e,t,n){return e.getCompDetails(t,mde,"agSkeletonCellRenderer",n,!0)}function KB(e,t,n){return e.getCompDetails(t,vde,"agCellEditor",n,!0)}function Mde(e,t,n,o){const s=t.filter;return UB(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,b_,o,n,!0)}function Nde(e,t,n){return e.getCompDetails(t,ude,"agDateInput",n,!0)}function Lde(e,t){return e.getCompDetailsFromGridOptions(yde,"agLoadingOverlay",t,!0)}function Vde(e,t){return e.getCompDetailsFromGridOptions(wde,"agNoRowsOverlay",t,!0)}function Bde(e,t){return e.getCompDetails(t.colDef,Cde,"agTooltipComponent",t,!0)}function $de(e,t,n,o){return e.getCompDetails(t,bde,o,n)}function qB(e,t){return WB(e,t,b_)}function S_(e,t,n){return e.mergeParams(t,b_,n)}function $p(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function Hde(e){return typeof e=="object"&&!!e.getComp}var Me={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},E_=class extends Bp{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},__,R_,T_,D_,x_,A_,I_;function Ml(){return __===void 0&&(__=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),__}function YB(){return R_===void 0&&(R_=/(firefox)/i.test(navigator.userAgent)),R_}function XB(){return T_===void 0&&(T_=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),T_}function Ju(){return D_===void 0&&(D_=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),D_}function P_(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!YB())?null:t.toString()}function Gde(){if(I_!==void 0)return I_;if(!document.body)return-1;let e=1e6;const t=YB()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const o=e*2;if(n.style.height=o+"px",o>t||n.clientHeight!==o)break;e=o}return n.remove(),I_=e,e}function Ude(){return A_==null&&ZB(),A_}function ZB(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(A_=n,x_=n===0)}function JB(){return x_==null&&ZB(),x_}var k_="T",Wde=new RegExp(`[${k_} ]`),zde=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${k_}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Fi(e,t){return e.toString().padStart(t,"0")}function Zs(e,t=!0,n=k_){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Fi(s,2)).join("-");return t&&(o+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Fi(s,2)).join(":")),o}function zy(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Fi(e.getDate(),2),Fi(e.getHours(),2),`:${Fi(e.getMinutes(),2)}`,`:${Fi(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Fi(e.getDate(),2)].map(String):null}var F_=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},QB=["January","February","March","April","May","June","July","August","September","October","November","December"],O_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function M_(e,t){if(t==null)return Zs(e,!1);const n=Fi(e.getFullYear(),4),o={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>QB[e.getMonth()],MMM:()=>QB[e.getMonth()].slice(0,3),MM:()=>Fi(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${F_(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${F_(e.getDate())}`,DD:()=>Fi(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>O_[e.getDay()],ddd:()=>O_[e.getDay()].slice(0,3),dd:()=>O_[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${F_(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,r=>r in o?o[r]():r)}function jy(e,t=!1){return!!xs(e,t)}function jde(e){return jy(e,!0)}function xs(e,t=!1,n){if(!e||!n&&!zde.test(e))return null;const[o,s]=e.split(Wde);if(!o)return null;const r=o.split("-").map(f=>Number.parseInt(f,10));if(r.filter(f=>!isNaN(f)).length!==3)return null;const[i,a,l]=r,u=new Date(i,a-1,l);if(u.getFullYear()!==i||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(f=>Number.parseInt(f,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function N_(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:Kde(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),o&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&s&&s>0){const u=r[0].relevance*s;r=r.filter(c=>u-c.relevance<0)}const i=[],a=[];for(const l of r)i.push(l.value),a.push(l.idx);return{values:i,indices:a}}function Kde(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],o=[];const s=e.length,r=t.length;for(let a=0;a<=r;a++)n[a]=a;let i=0;for(let a=1;a<=s;a++){o[0]=a;for(let l=1;l<=r;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++i,u===c&&++i,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++i,e[a-2]===t[l-2]&&++i),a<s/2-10&&++i,o[l]=n[l-1];else{const d=o[l-1],h=n[l],f=n[l-1];o[l]=1+Math.min(d,h,f)}}[n,o]=[o,n]}return n[r]/(i+1)}function e2(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var L_=!1,Ky=0;function qde(e){Ky>0||(e.addEventListener("keydown",qy),e.addEventListener("mousedown",qy))}function Yde(e){Ky>0||(e.removeEventListener("keydown",qy),e.removeEventListener("mousedown",qy))}function qy(e){const t=L_,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(L_=n)}function Xde(e){const t=Vo(e);return qde(t),Ky++,()=>{Ky--,Yde(t)}}function Zde(){return L_}function Kd(e,t,n=!1){const o=Bue;let s=GV;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>xi(l)),i=Array.prototype.slice.apply(e.querySelectorAll(s));return i.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(r,i):r}function Qu(e,t=!1,n=!1,o=!1){const s=Kd(e,o?".ag-tab-guard":null,n),r=t?An(s):s[0];return r?(r.focus({preventScroll:!0}),!0):!1}function ec(e,t,n,o){const s=Kd(t,n?':not([tabindex="-1"])':null),r=jn(e);let i;n?i=s.findIndex(l=>l.contains(r)):i=s.indexOf(r);const a=i+(o?-1:1);return a<0||a>=s.length?null:s[a]}function t2(e,t=5){let n=0;for(;e&&P_(e)===null&&++n<=t;)e=e.parentElement;return P_(e)===null?null:e}var Jde=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Qde=class extends Bp{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Jde)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:o,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;zo(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Un(t,!1),xl(t,"presentation")):(Un(t,!0),xl(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Iy(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return _p(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},n2=class extends Qde{constructor(e,t,n,o){super(e,t,n),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||Eue(e)!==null?Sp(e,""):Sp(e,t??"")}setAriaLabel(e){return Ld(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ai(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function ehe(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var tc=class extends n2{constructor(e,t,n="text",o="input"){super(e,(e==null?void 0:e.template)??ehe(o),[],t),this.inputType=n,this.displayFieldTag=o,this.eLabel=ht,this.eWrapper=ht,this.eInput=ht}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),n.classList.add(`${o}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:r}=this.config;s!=null&&this.setInputName(s),r!=null&&this.setInputWidth(r),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Ys(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Iy(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Ys(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ld(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _p(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ys(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ys(this.eInput,"autocomplete",t)}return this}},V_=class extends tc{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},B_={selector:"AG-CHECKBOX",component:V_},the=class extends V_{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},nc=class extends tc{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=pt(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{e2(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const o=(s=n.clipboardData)==null?void 0:s.getData("text");o!=null&&o.split("").some(r=>!e.test(r))&&n.preventDefault()}})}},Yy={selector:"AG-INPUT-TEXT-FIELD",component:nc},nhe=class extends tc{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},ohe={selector:"AG-INPUT-TEXT-AREA",component:nhe},$_=class extends nc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),i=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){jn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=n)return e;if(n>0)return`${o[0]}.${o[1].slice(0,n)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Ys(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ys(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ys(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(pt(n)){let o=this.isScientificNotation(n);if(o&&this.eInput.validity.valid)return e(n);if(!o){n=this.adjustPrecision(n);const s=this.normalizeValue(n);o=n!=s}if(o)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},she={selector:"AG-INPUT-NUMBER-FIELD",component:$_},rhe=class extends nc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ml();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){jn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Zs(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Ys(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Zs(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Ys(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ys(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return xs(this.getValue())??void 0}setDate(e,t){this.setValue(Zs(e??null,this.includeTime),t)}},o2={selector:"AG-INPUT-DATE-FIELD",component:rhe},ihe=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",ahe="ag-active-item",lhe=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),uhe=class extends Bp{constructor(e,t,n){super(lhe(e,t)),this.label=t,this.value=n,this.eText=ht}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(ahe,e),$V(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Aue(n,e),xue(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>t_(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},che=class extends Bp{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(ihe)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case Me.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case Me.DOWN:case Me.UP:e.preventDefault(),this.navigate(t);break;case Me.PAGE_DOWN:case Me.PAGE_UP:case Me.PAGE_HOME:case Me.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,o=n??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();zo(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(o=>o.value===e);if(n!==-1){const o=this.options[n];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!xi(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:o,clientHeight:s}=n,{offsetTop:r,offsetHeight:i}=t;(r+i>o+s||r<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new uhe(this.cssIdentifier,t,e);n.setParentComponent(this);const o=this.createManagedBean(n);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===Me.DOWN;let n;const{listItems:o,highlightedItem:s}=this;if(!s)n=t?o[0]:An(o);else{let i=o.indexOf(s)+(t?1:-1);i=Math.min(Math.max(i,0),o.length-1),n=o[i]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const o=t.indexOf(n),s=this.options.length-1,r=t[0].getHeight(),i=Math.floor(this.getGui().clientHeight/r);let a=-1;e===Me.PAGE_HOME?a=0:e===Me.PAGE_END?a=s:e===Me.PAGE_DOWN?a=Math.min(o+i,s):e===Me.PAGE_UP&&(a=Math.max(o-i,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){xl(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,o)=>{n.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},dhe=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",hhe={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},fhe=class extends n2{constructor(e){if(super(e,(e==null?void 0:e.template)||hhe,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ht,this.eWrapper=ht,this.eDisplayField=ht,this.eIcon=ht,this.registerCSS(dhe),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:o,minPickerWidth:s,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:o}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),J0(e,!1),this.ariaRole&&xl(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case Me.UP:case Me.DOWN:case Me.ENTER:case Me.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Me.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:r,minPickerWidth:i,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=FV(u);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,o),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,f=h.addPopup(d);l?(i&&(e.style.minWidth=i),e.style.width=n_(Ty(c)),a&&(e.style.maxWidth=a)):Iy(e,a??Ty(c));const p=r??`${Q0(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:o},eWrapper:s,pickerComponent:r}=this,i=o.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:r.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();J0(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Iy(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},phe=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",H_=class extends fhe{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(phe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Ay(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new che("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),Vue(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o==null||o.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===Me.TAB&&this.hidePicker(),t){case Me.ENTER:case Me.UP:case Me.DOWN:case Me.PAGE_UP:case Me.PAGE_DOWN:case Me.PAGE_HOME:case Me.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case Me.ESCAPE:super.onKeyDown(e);break;case Me.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:o,config:{placeholder:s},eDisplayField:r,tooltipFeature:i}=this;if(this.value===e||!o)return this;if(n||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&s&&(l=s),r.textContent=l,i==null||i.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},ghe={selector:"AG-SELECT",component:H_},mhe=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',G_=typeof window!="object"||!((dG=(cG=window==null?void 0:window.document)==null?void 0:cG.fonts)!=null&&dG.forEach),qd=(e,t,n,o,s,r)=>{if(G_)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let i=Yd.map.get(t);if(i||(i=[],Yd.map.set(t,i)),i.some(c=>c.css===e))return;const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of i){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=i.indexOf(u);i.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),i.push(l)},s2=(e,t,n,o)=>{qd(mhe,e,"shared",t,0,n),o==null||o.forEach((s,r)=>s.forEach(i=>qd(i,e,r,t,0,n)))},vhe=e=>{Yd.grids.add(e)},yhe=e=>{if(Yd.grids.delete(e),Yd.grids.size===0){Yd.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},r2,Yd=(r2=typeof window=="object"?window:{}).agStyleInjectionState??(r2.agStyleInjectionState={map:new WeakMap,grids:new Set}),Oi=e=>new i2(e),Nl="$default",whe=0,i2=class{constructor({feature:e,params:t,modeParams:n={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Nl]:{...n[Nl]??{},...t??{}},...n}}use(e,t,n){let o=this._inject;if(o==null){let{css:s}=this;if(s){const r=`ag-theme-${this.feature??"part"}-${++whe}`;typeof s=="function"&&(s=s()),s=`:where(.${r}) {
|
|
195
195
|
${s}
|
|
@@ -252,4 +252,4 @@ If you are trying to annotate ${o} with application data, use the '${o}.context'
|
|
|
252
252
|
`,R0e=class extends ebe{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,YH),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,o){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Qe(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=YH),this.isFirstLine=!1}},T0e=class extends QCe{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Qe(51);return}const t=this.getMergedParams(e),n=this.getData(t),o=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Ot(this.gos,{})):t.fileName;tbe(this.getFileName(s),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:o,valueSvc:s,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new R0e({colModel:t,colNames:n,valueSvc:s,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function D0e(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function x0e(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var A0e={moduleName:"CsvExport",version:dt,beans:[T0e],apiFunctions:{getDataAsCsv:D0e,exportDataAsCsv:x0e},dependsOn:[_0e]},I0e=class extends Ke{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:o,rowNodes:s}=this;for(let r=0;r<e;r++){const i=n+r,a=new Ll(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:o}}}setDataAndId(e,t,n){pt(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Gn(this.params.datasource.getRows)){Qe(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:o,filterModel:s},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:o,filterModel:s,context:Ot(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((o,s)=>{this.startRow+s<n&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,r)=>{const i=e.rowData?e.rowData[r]:void 0;!s.id&&s.alreadyRendered&&i&&(t[r]=new Ll(n),t[r].setRowIndex(s.rowIndex),t[r].setRowTop(s.rowTop),t[r].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},P0e=2,k0e=class extends Ke{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let o=this.blocks[n];if(!o){if(t)return;o=this.createBlock(n)}return o.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new I0e(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Pl(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,r=P0e-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,u=o?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:o}=e;return t.rowIndex>=n&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:o}=this.params,r=(e.id+1)*n+o;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,pt(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,o)=>n.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let o=-1,s=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(s&&o+1!==l.id){i=!0;continue}o=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},r,this.rowCount)}return i||s?[]:n}},F0e=class extends Ke{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Ll(e);this.rootNode=t,t.level=-1,this.rowHeight=Yu(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Yu(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Cp(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;Ud(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:o,eventSvc:s,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:o,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Yu(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new k0e(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function O0e(e){var t;(t=bw(e))==null||t.refreshCache()}function M0e(e){var t;(t=bw(e))==null||t.purgeCache()}function N0e(e){var t;return(t=bw(e))==null?void 0:t.getRowCount()}var L0e=class extends Ke{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Tce(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=jo(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Xr(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Pl(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:o}=t.getBlockStateJson();e[n]=o}),e}printCacheStatus(){Pl(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},V0e={moduleName:"InfiniteRowModelCore",version:dt,rowModels:["infinite"],beans:[F0e,L0e]},B0e={moduleName:"InfiniteRowModel",version:dt,apiFunctions:{refreshInfiniteCache:O0e,purgeInfiniteCache:M0e,getInfiniteRowCount:N0e},dependsOn:[V0e,JEe]},$0e="↑",H0e="↓",G0e={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},U0e=class extends vn{constructor(){super(G0e),this.eValue=ht,this.eDelta=ht,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),o=e.formatValue(n),s=pt(o)?o:n,r=t>=0,i=this.eDelta;r?i.textContent=$0e+s:i.textContent=H0e+s,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),zo(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:o}=e,{eValue:s,lastValue:r,beans:i}=this;if(n===r||(pt(o)?s.textContent=o:pt(n)?s.textContent=n:zo(s),(u=i.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return r&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},W0e=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",z0e={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},j0e=class extends vn{constructor(){super(z0e),this.eCurrent=ht,this.refreshCount=0,this.registerCSS(W0e)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,o=ao({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=n.textContent,this.getGui().insertBefore(o,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(Gn(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const o=this.eCurrent;return pt(e.valueFormatted)?o.textContent=e.valueFormatted:pt(e.value)?o.textContent=n:zo(o),!0}},K0e=class extends Ke{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const r=Date.now(),i=r+n,a=r+n+o,l={phase:"flash",flashEndTime:i,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const o=this.animations[n],s=`ag-cell-${n}`,r=`${s}-animation`;for(const[i,a]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(r,!0),p.transition=`background-color ${c-u}ms`,p.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=jge(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function q0e(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(o,t)})}var Y0e={moduleName:"HighlightChanges",version:dt,beans:[K0e],userComponents:{agAnimateShowChangeCellRenderer:U0e,agAnimateSlideCellRenderer:j0e},apiFunctions:{flashCells:q0e}};function X0e(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Z0e(e,t,n){var o;return(o=e.stateSvc)==null?void 0:o.setState(t,n)}function XH(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=J0e(e)),e.version=dt,e}function J0e(e){return e.cellSelection=Q0e(e,"rangeSelection"),e}function Q0e(e,t){if(e&&typeof e=="object")return e[t]}var e_e=class extends Ke{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=jo(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=jo(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=jo(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=ro(e);const o=XH(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(o,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=XH(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(n,o,s),this.setColumnsInitialisedState(n,o,!!s,s),this.setRowCountState(n,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,n){var o,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(o=this.beans.sideBar)==null?void 0:o.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,o){this.setColumnState(e,t,n,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(r,s,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:o})}setFirstDataRenderedState(e,t,n){const{scroll:o,cellSelection:s,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return XCe(Wy(e),e.colModel.isPivotMode())}setColumnState(e,t,n,o){const{sort:s,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const f=(A,P)=>{const k=!(o!=null&&o.has(A))&&!!(P||t==="api");return h||(h=k),k},p={},g=A=>{let P=p[A];return P||(P={colId:A},p[A]=P,P)},v={},y=f("sort",s);y&&(s==null||s.sortModel.forEach(({colId:A,sort:P},k)=>{const O=g(A);O.sort=P,O.sortIndex=k})),(y||!n)&&(v.sort=null,v.sortIndex=null);const b=f("rowGroup",r);b&&(r==null||r.groupColIds.forEach((A,P)=>{const k=g(A);k.rowGroup=!0,k.rowGroupIndex=P})),(b||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=f("aggregation",i);S&&(i==null||i.aggregationModel.forEach(({colId:A,aggFunc:P})=>{g(A).aggFunc=P})),(S||!n)&&(v.aggFunc=null);const w=f("pivot",a);w&&(a==null||a.pivotColIds.forEach((A,P)=>{const k=g(A);k.pivot=!0,k.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const E=f("columnPinning",l);if(E){for(const A of(l==null?void 0:l.leftColIds)??[])g(A).pinned="left";for(const A of(l==null?void 0:l.rightColIds)??[])g(A).pinned="right"}(E||!n)&&(v.pinned=null);const R=f("columnVisibility",u);if(R)for(const A of(u==null?void 0:u.hiddenColIds)??[])g(A).hide=!0;(R||!n)&&(v.hide=null);const D=f("columnSizing",c);if(D)for(const{colId:A,flex:P,width:k}of(c==null?void 0:c.columnSizingModel)??[]){const O=g(A);O.flex=P??null,O.width=k}(D||!n)&&(v.flex=null);const x=d==null?void 0:d.orderedColIds,N=!!(x!=null&&x.length)&&!(o!=null&&o.has("columnOrder")),B=N?x.map(A=>g(A)):Object.values(p);(B.length||h)&&(this.columnStates=B,Zr(this.beans,{state:B,applyOrder:N,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:r,colGroupSvc:i}=s;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);Zr(s,{state:a,applyOrder:e},t)}o&&(i==null||i.setColumnGroupState(o,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return ZCe(t)}setColumnGroupState(e,t,n){var a;const o=this.beans.colGroupSvc;if(!o||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=o.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),o.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),o=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||o||n?{filterModel:t,columnFilterState:n,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:o,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||o!==void 0)&&(t==null||t.setFilterState(n??null,o??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:o,type:s,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:o,type:s,startRow:r,endRow:i,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:o,visibleCols:s}=this.beans;if(!Da(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of i.colIds){const c=o.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=o.getCol(i.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:r,ctrlsSvc:i}=this.beans;o.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(o),rowIndex:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!o))return{page:n,pageSize:o}}setPaginationState(e,t){const{pagination:n,gos:o}=this.beans;if(!n)return;const{pageSize:s,page:r}=e??{page:0,pageSize:o.get("paginationPageSize")},i=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&n.setPageSize(s,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var o;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((o=t==null?void 0:t.toggledNodes)!=null&&o.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const o=this.cachedState;for(const s of Object.keys(t)){const r=t[s];Cp(r,o[s])||(n=!0)}this.cachedState={...o,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Cp(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},t_e={moduleName:"GridState",version:dt,beans:[e_e],apiFunctions:{getState:X0e,setState:Z0e}};function n_e(e){return e.rowModel.isLastRowIndexKnown()}function o_e(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function s_e(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function r_e(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function i_e(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function a_e(e){var t;(t=e.pagination)==null||t.goToNextPage()}function l_e(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function u_e(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function c_e(e){var t;(t=e.pagination)==null||t.goToLastPage()}function d_e(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var h_e=class extends Ke{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const o=Math.max(Yu(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?jo(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},ng="paginationPageSizeSelector",f_e={tag:"span",cls:"ag-paging-page-size"},p_e=class extends vn{constructor(){super(f_e),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ng,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){zo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ng)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),r=this.gos.get(ng)!==!0;Qe(94,{pageSizeSet:s,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Qe(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ng}),e.unshift("")}const o=String(n?"":t);this.selectPageSizeComp?(Ol(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),o=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new H_).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ng);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,o)=>n-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},g_e={selector:"AG-PAGE-SIZE-SELECTOR",component:p_e},m_e=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",v_e=class extends a${constructor(){super(),this.btFirst=ht,this.btPrevious=ht,this.btNext=ht,this.btLast=ht,this.lbRecordCount=ht,this.lbFirstRowOnPage=ht,this.lbLastRowOnPage=ht,this.lbCurrent=ht,this.lbTotal=ht,this.pageSizeComp=ht,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(m_e)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[g_e]);const{btFirst:t,btPrevious:n,btNext:o,btLast:s}=this;this.activateTabIndex([t,n,o,s]),t.insertAdjacentElement("afterbegin",Ir(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",Ir(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Ir(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Ir(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):hpe(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:o=>{(o.key===Me.ENTER||o.key===Me.SPACE)&&(o.preventDefault(),n())}})}dpe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):JCe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Due(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),o=e?n:null,s=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*s+1,a=i+r-1,e&&a>o&&(a=o));const l=i+r-1,u=!e&&n<l,c=this.formatNumber(i);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?s+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,y;if(e)v=this.formatNumber(t),y=this.formatNumber(o);else{const b=h("more","more");v=b,y=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=y,this.announceAriaStatus(c,d,y,g,v)}announceAriaStatus(e,t,n,o,s){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${i} ${o} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},y_e={selector:"AG-PAGINATION",component:v_e},w_e=class extends Ke{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return y_e}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,o;if(!this.active)return;let t=e;this.paginateChildRows||(t=((o=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:o.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return pt(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:pt(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:pt(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:pt(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,o=t-1;this.totalPages=Math.floor(o/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,r=n*s;let i=n*(s+1)-1;if(i>o&&(i=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:o,keepRenderedRows:t})}},C_e={moduleName:"Pagination",version:dt,beans:[w_e,h_e],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:n_e,paginationGetPageSize:o_e,paginationGetCurrentPage:s_e,paginationGetTotalPages:r_e,paginationGetRowCount:i_e,paginationGoToNextPage:a_e,paginationGoToPreviousPage:l_e,paginationGoToFirstPage:u_e,paginationGoToLastPage:c_e,paginationGoToPage:d_e},dependsOn:[Sw]};function b_e(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function ZH(e,t,n,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&ZH(e,t.parent,n,o,s),t.setExpanded(n,void 0,s))}function S_e(e,t){return e.rowModel.getRowNode(t)}function E_e(e,t,n,o){e.rowRenderer.addRenderedRowListener(t,n,o)}function __e(e){return e.rowRenderer.getRenderedNodes()}function R_e(e,t,n){e.rowModel.forEachNode(t,n)}function T_e(e){return e.rowRenderer.firstRenderedRow}function D_e(e){return e.rowRenderer.lastRenderedRow}function x_e(e,t){return e.rowModel.getRow(t)}function A_e(e){return e.rowModel.getRowCount()}var I_e={moduleName:"RowApi",version:dt,apiFunctions:{redrawRows:b_e,setRowNodeExpanded:ZH,getRowNode:S_e,addRenderedRowListener:E_e,getRenderedNodes:__e,forEachNode:R_e,getFirstDisplayedRowIndex:T_e,getLastDisplayedRowIndex:D_e,getDisplayedRowAtIndex:x_e,getDisplayedRowCount:A_e}},P_e={moduleName:"ScrollApi",version:dt,apiFunctions:{getVerticalPixelRange:WSe,getHorizontalPixelRange:zSe,ensureColumnVisible:kH,ensureIndexVisible:FH,ensureNodeVisible:jSe}};function k_e(e,t,n){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?o.removeAttribute(s):o.setAttribute(s,n)}function F_e(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function O_e(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function M_e(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function N_e(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function L_e(e){return{rowHeight:Yu(e),headerHeight:Up(e)}}function V_e(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push($p(a))}if((r=t.columns)!=null&&r.length)return n;const o=[],s=VR(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(s&&!BR(i.rowNode,s)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&o.push($p(u))}}return[...o,...n]}var B_e={moduleName:"RenderApi",version:dt,apiFunctions:{setGridAriaProperty:k_e,refreshCells:F_e,refreshHeader:O_e,isAnimationFrameQueueEmpty:M_e,flushAllAnimationFrames:N_e,getSizesForCurrentTheme:L_e,getCellRendererInstances:V_e}};function $_e(e,t){var n,o;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(o=e.colAutosize)==null||o.sizeColumnsToFitGridBody(t)}function JH({colAutosize:e,visibleCols:t},n,o){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:o,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function H_e(e,t){var n;t&&typeof t=="object"?JH(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var G_e=class extends Ke{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");o=r!=null&&r.length>0&&ro(e)}o&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(o=>{var u;const s=c=>jd(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(o);const r=QH(this.beans),i=c=>n.leftCols.some(d=>Lp(d,c)),a=c=>n.rightCols.some(d=>Lp(d,c)),l=e.colKeys.filter(c=>!Aa(c)&&!Ia(c)&&!i(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:o,skipHeader:s,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let y=-1;const b=Object.fromEntries(u.map(({colId:E,...R})=>[E,R])),S=s??this.gos.get("skipHeaderOnAutoSize"),w=r??S;for(;y!==0;){y=0;const E=[];for(const R of o){if(!R||Bce(R))continue;const D=f.getCol(R);if(!D||v.has(D))continue;const x=p.getPreferredWidthForColumn(D,S);if(x>0){const N=b[D.colId]??{};N.minWidth??(N.minWidth=l),N.maxWidth??(N.maxWidth=a);const B=U_e(D,x,N);D.setActualWidth(B,c),v.add(D),y++}E.push(D)}E.length&&g.refresh(c)}w||this.autoSizeColumnGroupsByColumns(o,c,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:o,ctrlsSvc:s}=this.beans,r=new Set,i=o.getColsForKeys(e);for(const l of i){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",o);const s=new rc(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,n){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=QH(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Qe(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,o){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,o));return}const s={};for(const{key:v,...y}of(o==null?void 0:o.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=y;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=xa(r);if(o!=null&&o.onlyScaleUp&&i>e||e===i&&r.every(y=>{if(y.colDef.suppressSizeToFit)return!0;const b=s==null?void 0:s[y.getId()],S=(b==null?void 0:b.minWidth)??(o==null?void 0:o.defaultMinWidth),w=(b==null?void 0:b.maxWidth)??(o==null?void 0:o.defaultMaxWidth),E=y.getActualWidth();return(S==null||E>=S)&&(w==null||E<=w)}))return;const l=[],u=[];for(const v of r){const y=((p=o==null?void 0:o.colKeys)==null?void 0:p.some(b=>Lp(v,b)))??!0;v.getColDef().suppressSizeToFit||!y?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Xr(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const y=s==null?void 0:s[v.getId()],b=(y==null?void 0:y.minWidth)??(o==null?void 0:o.defaultMinWidth),S=(y==null?void 0:y.maxWidth)??(o==null?void 0:o.defaultMaxWidth),w=v.getActualWidth();typeof b=="number"&&w<b?v.setActualWidth(b,t,!0):typeof S=="number"&&w>S&&v.setActualWidth(S,t,!0)}for(;!d;){d=!0;const v=e-xa(u);if(v<=0)for(const y of l){const b=((g=s==null?void 0:s[y.getId()])==null?void 0:g.minWidth)??(o==null?void 0:o.defaultMinWidth)??y.minWidth;y.setActualWidth(b,t,!0)}else{const y=v/xa(l);let b=v;for(let S=l.length-1;S>=0;S--){const w=l[S],E=s==null?void 0:s[w.getId()],R=(E==null?void 0:E.minWidth)??(o==null?void 0:o.defaultMinWidth),D=(E==null?void 0:E.maxWidth)??(o==null?void 0:o.defaultMaxWidth),x=w.getMinWidth(),N=w.getMaxWidth(),B=typeof R=="number"&&R>x?R:x,A=typeof D=="number"&&D<N?D:N;let P=Math.round(w.getActualWidth()*y);P<B?(P=B,h(w),d=!1):P>A?(P=A,h(w),d=!1):S===0&&(P=b),w.setActualWidth(P,t,!0),b-=P}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&jd(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=n.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:r,defaultMaxWidth:i}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var o;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(o=this.beans.colDelayRenderSvc)==null||o.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function U_e(e,t,n={}){const o=n.minWidth??e.getMinWidth();t<o&&(t=o);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function QH({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Rp(n.eGridBody)-s}var W_e={moduleName:"ColumnAutoSize",version:dt,beans:[G_e],apiFunctions:{sizeColumnsToFit:$_e,autoSizeColumns:JH,autoSizeAllColumns:H_e},dependsOn:[_$]},z_e=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function j_e(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function K_e(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function q_e(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function Y_e(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function X_e(e,t,n){var o;return(o=e.pinnedRowModel)==null?void 0:o.forEachPinnedRow(t,n)}var Z_e={moduleName:"PinnedRow",version:dt,beans:[qpe],css:[z_e],apiFunctions:{getPinnedTopRowCount:j_e,getPinnedBottomRowCount:K_e,getPinnedTopRow:q_e,getPinnedBottomRow:Y_e,forEachPinnedRow:X_e},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},J_e=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},Q_e=class extends Ke{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:n,pinnedRowModel:o,rowModel:s,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const y=(w,E)=>{p=w,g=null,v=E},b=w=>{const E=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!E){y(null,null);return}if(p==null||w.level!==p.level||w.footer||g&&w.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){y(w,r.getValue(t,w));return}const R=r.getValue(t,w);if(f){const D=Ot(n,{valueA:v,nodeA:p,valueB:R,nodeB:w,column:t,colDef:a});if(!h(D)){y(w,R);return}}else if(d?!d(v,R):v!==R){y(w,R);return}if(!g){const D=l==null?void 0:l.get(p);(D==null?void 0:D.firstNode)===p?(D.reset(),g=D):g=new J_e(t,p),u.set(p,g)}g.addSpannedNode(w),u.set(w,g)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,w=>{(!i||i.isRowInPage(w.rowIndex))&&b(w)}),this.centerValueNodeMap=u;break;case"top":o==null||o.forEachPinnedRow("top",b),this.topValueNodeMap=u;break;case"bottom":o==null||o.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},eRe=class extends Ke{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=jo(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=jo(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new Q_e(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,o=e.column,s=e.rowIndex,r=this.spanningColumns.get(o);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(s);break;default:i=n.getRow(s)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},tRe=class extends sh{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,o,s,r,i){this.eWrapper=n,super.setComp(e,t,n,o,s,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||_y(e,t.rowIndex)}setAriaRowSpan(){kue(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(cw(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},nRe=class extends Cw{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new tRe(t,this,this.beans)}isCorrectCtrlForSpan(e){var o;const t=(o=this.beans.rowSpanSvc)==null?void 0:o.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oRe=class extends Ke{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),o=n.size,s=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(r.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){r.set(c.firstNode,d),n.delete(c.firstNode);return}i=!0;const h=new nRe(c.firstNode,this.beans,!1,!1,!1);r.set(c.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===o;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const o=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},sRe={moduleName:"CellSpan",version:dt,beans:[eRe,oRe]},rRe=class extends Ke{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,o=n.cellClassRules,s=this.getCellClassParams(e,n);NR(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let o;if(typeof n=="function"){const s=this.getCellClassParams(e,t);o=n(s)}else o=n;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,o=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,o);this.staticClasses=s;for(const r of s)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:o}=this.cellCtrl;return Ot(this.beans.gos,{value:n,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},iRe=class extends Ke{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,o){NR(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,o),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let o;return typeof n=="function"?o=n(t):o=n,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new rRe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},aRe={moduleName:"CellStyle",version:dt,beans:[iRe]},lRe={moduleName:"RowStyle",version:dt,beans:[qwe]};function uRe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var cRe=class extends Ke{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:o,gos:s,element:r,columns:i}=this,a=o.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},dRe="ag-column-hover",hRe=class extends Ke{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const o=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(dRe,n)}addHeaderFilterColumnHoverListener(e,t,n,o){this.createHoverFeature(e,[n],o);const s=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new cRe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},fRe={moduleName:"ColumnHover",version:dt,beans:[hRe],apiFunctions:{isColumnHovered:uRe}},pRe=class extends Ke{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,o=!vw.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,o)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,o=this.asyncListeners.get(e),s=!!(o!=null&&o.delete(n));s||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{vw.has(i)&&t(i,a)},o=(i,a)=>{vw.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:o}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(o.has(s)){const{syncListener:i,asyncListener:a}=o.get(s);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,o)=>{n.forEach(s=>this.eventSvc.removeListener(o,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:o})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function gRe(e,t,n){var o;(o=e.apiEventSvc)==null||o.addListener(t,n)}function mRe(e,t,n){var o;(o=e.apiEventSvc)==null||o.removeListener(t,n)}function vRe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function yRe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var wRe={moduleName:"EventApi",version:dt,apiFunctions:{addEventListener:gRe,addGlobalListener:vRe,removeEventListener:mRe,removeGlobalListener:yRe},beans:[pRe]},CRe={moduleName:"Locale",version:dt,beans:[YCe]},bRe=class extends Ke{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=jo(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=kl(this.beans,d).height;for(const g of s){let v=h==null?void 0:h[g.getColId()];const y=n==null?void 0:n.getCellSpan(g,d);if(y){if(y.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=o==null?void 0:o.forEachPinnedRow)==null||a.call(o,"top",i),(l=o==null?void 0:o.forEachPinnedRow)==null||l.call(o,"bottom",i),(u=t.forEachDisplayedNode)==null||u.call(t,i),r&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const o=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:o,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=s.getLeftColsForRow(t);break;case"right":r=s.getRightColsForRow(t);break;case null:r=o.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:r}=e,i=this.beans,a=c=>{var b;if((b=this.beans.editSvc)!=null&&b.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=Ku(o),g=d+h+f+p,y=t.offsetHeight+g;if(c<5){const S=Vo(i),w=!(S!=null&&S.contains(t)),E=y==0;if(w||E){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,y,r)},l=()=>a(0);l();const u=Al(i,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const o of t){const s=n.__autoHeights[o.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},SRe={moduleName:"RowAutoHeight",version:dt,beans:[bRe]},ERe={moduleName:"AllCommunity",version:dt,dependsOn:[qH,A0e,B0e,fbe,EEe,_Ee,REe,TEe,DEe,xEe,AEe,SEe,gSe,mSe,vSe,pSe,wSe,CSe,t_e,e0e,C_e,x$,I_e,P_e,B_e,W_e,lme,Z_e,WEe,ICe,aRe,fRe,lRe,wRe,FCe,Y0e,AH,CRe,SRe,ame,S0e,sRe]};let eG=!1;eG||(gce.registerModules([ERe,qH]),eG=!0);class _Re{constructor(t,n){bn(this,"gridApi",null);bn(this,"container");bn(this,"config");bn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:o,onRowSelected:s,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{o&&o(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=zCe(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const o={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const o={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(o),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(o=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,o)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const RRe=O$.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),TRe=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected","on-scroll"],setup(e,{expose:t,emit:n}){const o=e,s=n,r=$(null);yE(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=$(null),a=q(()=>({width:"100%",height:o.height||"500px"})),l=q(()=>({...o,theme:RRe}));function u(){var v;if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:o.height};i.value=new _Re(r.value,g),i.value.init(),(v=i.value.getApi())==null||v.addEventListener("bodyScroll",()=>{s("on-scroll",new Event("scroll"))}),c()}function c(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;s("onGridReady",g)}function d(g){var y,b;if(!g)return;(y=i.value)==null||y.updateColumnDefs(g);const v=g.map(S=>S.field&&S.width&&!S.hide?{colId:S.field,width:S.width,flex:null}:null).filter(S=>S!==null);(b=i.value)==null||b.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return Je(()=>o.columnDefs,(g,v)=>{const y=g==null?void 0:g.filter(S=>!S.hide).map(S=>S.field).join(","),b=v==null?void 0:v.filter(S=>!S.hide).map(S=>S.field).join(",");y!==b&&d(g)},{deep:!0}),Vn(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),Jt(()=>{u()}),Vn(()=>{h()}),(g,v)=>(K(),he("div",{ref_key:"gridContainerRef",ref:r,style:cn(a.value),class:ce(["ag-theme-quartz",["ag-table-container",o.isSorting?"is-sorting":""]])},null,6))}});function uc(e){return kV(e)}const DRe=()=>[...[{headerName:"Thumbnail",field:"thumbnail",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,suppressMovable:!0,headerComponent:uc(Cl),width:86,resizable:!1},{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",lockPinned:!0,headerComponent:uc(Cl),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:uc(Cl)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:uc(Cl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:uc(Cl),cellRendererParams:n=>{var o,s,r;return{...n,value:(o=n==null?void 0:n.data)==null?void 0:o.completedOn.value,tooltip:((r=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>wp.fromType(n))],xw={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},xRe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:xw.WIDTH,minWidth:xw.WIDTH,maxWidth:xw.WIDTH,cellClass:"ag-checkbox-cell",headerClass:xw.HEADER_CLASS,headerComponent:Ey(Woe),suppressMovable:!0}),tG="blank",ARe=[tG,"__checkboxSelection","options"],IRe=["uiColumnResized","uiColumnMoved","api"],PRe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},nG=(e,t)=>t!=null&&t.width?{...e,width:t.width,flex:void 0}:e,kRe=(e,t,n)=>{const{getCachedValue:o,setCachedValue:s}=vf({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const d=await o(t);if(!d||typeof d!="string")return null;try{const h=JSON.parse(d);return Array.isArray(h)?h:null}catch(h){return console.error("Failed to parse cached column config:",h),null}},i=$([]),a=xRe();let l=0;const u=async d=>{const h=++l,f=await r();if(h!==l)return;const p=new Map(f==null?void 0:f.map(k=>[k.field,k])),g=DRe(),v=wp.fromType(PRe),y=!!f,S=((d==null?void 0:d.map(k=>{var O;return{headerName:k.name,field:`metric_${k.id}`,editable:((O=k==null?void 0:k.auth_permission)==null?void 0:O.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:y?!p.has(`metric_${k.id}`):!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Ey(Cl),headerComponentParams:()=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"})}}))||[]).map(k=>wp.fromType(k)),w=[a,...g,...S,v],E=[],R=[],D=[];for(const k of w)k.pinned==="left"?E.push(k):k.pinned==="right"||k.field===tG?R.push(k):D.push(k);if(!f||f.length===0){i.value=w;return}const x=new Map(D.map(k=>[k.field,k])),N=[];for(const k of f)if(k.field&&x.has(k.field)){const O=x.get(k.field);N.push({...nG(O,k),hide:k.hide}),x.delete(k.field)}const B=Array.from(x.values()),A=[...N,...B].map(k=>({...k,lockPinned:!0})),P=k=>{const O=p.get(k.field),L=nG(k,O);return O&&O.hide!==void 0?{...L,hide:O.hide}:L};i.value=[...E.map(P),...A,...R.map(P)]};Je(e,d=>u(d),{immediate:!0});const c=vr((d,h)=>{if((d==null?void 0:d.source)!==void 0&&!IRe.includes(d.source))return;const f=n.value,p=f==null?void 0:f.getColumnDefs(),g=new Map;if(f==null||f.getColumnState().forEach(y=>{y.width&&g.set(y.colId,Number(y.width))}),i.value=p||i.value,!h)return;const v=(p??[]).filter(y=>y.field&&!ARe.includes(y.field)).map(y=>({field:y.field,hide:y.hide,width:g.get(y.field)||y.width,pinned:y.pinned}));s(t,JSON.stringify(v))},vi);return eC(()=>c.cancel()),{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},FRe=()=>{const e=ln.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},ORe=e=>{var P,k,O;const{showMessage:t,showErrorNetMessage:n}=Ss(),o=Go(),s={domainApi:FRe(),wsCode:ln.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(O=(k=(P=o==null?void 0:o.appContext)==null?void 0:P.config)==null?void 0:k.globalProperties)==null?void 0:O.apiConfig;if(!r||s.domainApi===""||s.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new lN(r,s);i.on("call-api",L=>{L.success?t(L.apiCode,"success"):n(L)});const a=Po({}),l=$([]),u=$(!1),c=$(null),d=$(null),h=$(1),f=$(20);let p=Promise.resolve();const{setCachedUsers:g}=qZ(),v=L=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:L}),y=50,b=async(L,H,W)=>{if(!L.length)return[];const se=l9(L,H);return(await Promise.all(se.map(W))).flat()},S=async L=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:L})).data.map(W=>[W==null?void 0:W.id,W.permission])}catch(H){return console.error("Failed to fetch item permissions chunk:",H),[]}},w=async(L,H)=>{try{const W=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:L,per_page:L.length*H.length,metric_ids:H}),se=W.data.map(Q=>{const ne=new Map(Q.item_metrics.map(I=>[I.metric_id,{value:I.value,auth_permission:I==null?void 0:I.auth_permission}])),Y=Object.fromEntries(H.map(I=>[I,ne.get(I)??null]));return[Q==null?void 0:Q.id,Y]}),ie=new Set(W.data.map(Q=>Q==null?void 0:Q.id));for(const Q of L)if(!ie.has(Q)){const ne=Object.fromEntries(H.map(Y=>[Y,{value:null,auth_permission:void 0}]));se.push([Q,ne])}return se}catch(W){return console.error("Failed to fetch a chunk of metric values:",W),L.map(ie=>[ie,Object.fromEntries(H.map(Q=>[Q,void 0]))])}},E=async L=>{try{const H=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:L,per_page:L.length}),W=H.data.flatMap(se=>se.assignees);return g(W),H.data.map(se=>[se==null?void 0:se.id,se==null?void 0:se.assignees])}catch(H){return console.error("Failed to fetch a chunk of assigned users:",H),[]}},R=async L=>{if(!L.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const H=await b(L,y,S);return Object.fromEntries(H)}catch(H){return console.error("Failed to fetch item permissions:",H),{}}},D=async(L,H)=>!L.length||!H.length?{}:(p=p.then(async()=>{try{const ie=[];let Q=0;for(let Y=0;Y<H.length;Y+=5){Q++;const I=H.slice(Y,Y+5),z=[];for(let me=0;me<I.length;me++){const xe=I[me],de=await b(L,y,j=>w(j,[xe]));z.push(de),await new Promise(j=>setTimeout(j,500))}ie.push(...z);const ee=Y+5>=H.length}const ne={};for(const Y of ie.flat()){const[I,z]=Y;ne[I]||(ne[I]={}),Object.assign(ne[I],z)}return ne}catch(W){return console.error("Failed to fetch metric values:",W),{}}}),p),x=async L=>{if(!L.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const H=await b(L,y,E);return Object.fromEntries(H)}catch(H){return console.error("Failed to fetch assigned users:",H),{}}};return{items:l,loading:u,error:c,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async L=>{const{cursor:H,offset:W,size:se,searchQuery:ie}=L;let Q=[];u.value=!0,c.value=null;try{const ne=await i.getAllItem_cursor({...L,cursor:H||void 0,offset:W||void 0,pageSize:se||f.value,...v(ie),sortBy:L.sort_by});return l.value=ne.data,d.value=ne.meta,h.value=ne.meta.current_page||0,Q=ne.data.map(Y=>Y==null?void 0:Y.id),ne}catch(ne){throw c.value=ne,console.error("Failed to fetch items (cursor):",ne),ne}finally{const ne=async()=>{try{const[Y,I]=await Promise.all([x(Q),R(Q)]);e.value.updateItemData({assignees:Y,permission:I},Q);const z=await D(Q,e.value.metricIds);e.value.setMetricValues(z,new Set(Q),e.value.metricIds)}catch(Y){console.error("Post-fetch processing failed:",Y)}};u.value=!1,setTimeout(ne)}},getAssignableStatus:async L=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:L})}catch(H){throw console.error("Failed to fetch assignable status:",H),H}},getMetricList:async L=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:L})}catch(H){throw console.error("Failed to fetch metric list:",H),H}},getMetricValues:D,getAssignedUsers:x}};function MRe(e){return{updateRowData:(o,s)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var d;const c=(d=e.value)==null?void 0:d.getRowNode(u);if(c){if(r.push(c),o.assignees){const h=MZ((o.assignees[u]||[]).map(lO));c.data.assignees=h,i.add("assignees")}o.permission&&(c.data.permissions=o.permission[u]),l.forEach(h=>{c.data[h]=c.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(o,s,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(s).map(u=>[u,new Map(r.map(c=>[c,{value:null,auth_permission:void 0}]))]));Object.entries(o).forEach(([u,c])=>{Object.entries(c).forEach(([d,h])=>{var f;(f=a.get(u))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([u,c])=>{const d=i.getRowNode(u);return d!=null&&d.data?(c.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(u=>`metric_${u}`),force:!0})}}}function NRe(e,t,n,o,s){let r=!0;return{async getRows(i){try{o(!0),r&&(s(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:u}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let c=-1;Number.isFinite(u)?c=u:l.length<t&&(c=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,c),o(!1),s(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),o(!1),s(!1)}}}}function LRe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:o,gridApi:s,fetcher:r}=e,i=$(!0),a=$(!0),l=$(!1),u=()=>{n.value=!n.value},c=v=>{if(i.value=!1,s.value=v,!v)return null;const{addEventListener:y,setGridOption:b}=v;if(!r)return console.error("Fetcher function is undefined"),null;const S=NRe(r,e.perPage,()=>o.value,w=>{i.value=w},w=>{a.value=w});return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var y,b;if((y=s.value)==null||y.hideOverlay(),v!==void 0&&(o.value=v),(b=s.value)==null||b.deselectAll(),t.value=[],i.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=s.value)==null||v.deselectAll(),t.value=[]},f=vr(v=>{d(v)},vi);return{isLoading:i,toggleSidebar:u,onGridReady:c,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:()=>{s.value},isSelectAll:$(!1)}}const VRe={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},BRe=e=>{var t;return(t=Object.entries(VRe.changelog).find(([n,o])=>n===e))==null?void 0:t[1].changes},$Re={class:"visual-btn-visual"},HRe={class:"visual-btn--label"},GRe={key:0,class:"visual-btn--description"},URe={key:1,class:"visual-btn--description"},Aw=Et(ot({__name:"VisualButton",props:{label:{},description:{},disabled:{type:Boolean}},emits:["onClick"],setup(e,{emit:t}){const n=e,o=()=>{n.disabled||s("onClick")},s=t;return(r,i)=>(K(),he("div",{class:ce(["visual-btn",{"visual-btn--disabled":e.disabled}]),onClick:o},[be("div",$Re,[kt(r.$slots,"visual",{},()=>[i[0]||(i[0]=sz('<svg width="42" height="36" viewBox="0 0 42 36" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c2003bd7><g clip-path="url(#clip0_4824_13082)" data-v-c2003bd7><path d="M5.14286 18V10.2857H18V18H5.14286ZM5.14286 23.1 429H18V30.8571H5.14286V23.1429ZM23.1429 30.8571V23.1429H36V30.8571H23.1429ZM36 18H23.1429V10.2857H36V18ZM5.14286 0C2.30625 0 0 2.30625 0 5.14286V30.8571C0 33.6937 2.30625 36 5.14286 36H36C38.8366 36 41.1429 33.6937 41.1429 30.8571V5.14286C41.1429 2.30625 38.8366 0 36 0H5.14286Z" fill="#D7D7D7" data-v-c2003bd7></path><path d="M0 5.14286C0 2.30625 2.30625 0 5.14286 0H36C38.8366 0 41.1429 2.30625 41.1429 5.14286V10.318H0V5.14286Z" fill="#A6A6A6" data-v-c2003bd7></path></g><defs data-v-c2003bd7><clipPath id="clip0_4824_13082" data-v-c2003bd7><rect width="41.1429" height="36" fill="white" data-v-c2003bd7></rect></clipPath></defs></svg>',1))],!0)]),be("div",HRe,at(n.label),1),n.disabled?(K(),he("div",GRe," Coming soon ")):(K(),he("div",URe,at(n.description),1))],2))}}),[["__scopeId","data-v-c2003bd7"]]),oG="xlsx_toolbox",sG="feedback_lockup_toolbox",WRe="TOOLBOX_EXPORT_DATA",zRe="https://app.arbocollab.com",jRe=1e3,rG=()=>sessionStorage.getItem("BASE_URL"),iG=(e,t="xlsx-mapping")=>{const n=En("switchInstance",void 0),o=`${t}:load`,s=`${t}:edit`,r=new Set;let i;const a=()=>{const h=t==="xlsx-mapping"?oG:sG,f={showLoad:!1};n?n(h,"",f):window.appManager.switchInstance(h,"",f)},l=(h,f)=>{const p=setTimeout(()=>{r.delete(p),window.postMessage({type:h,payload:f},`${rG()}`)},jRe);r.add(p)},u=h=>{if(!h)throw new Error("Payload is missing");a(),l(o,h)},c=(h,f)=>{if(!h)throw new Error("Error file is missing");a(),l(s,{file:h})},d=h=>{if((h==null?void 0:h.type)!==WRe)return;const{file:f,fileName:p}=h.payload;e({channel:t,file:new File([f],p,{type:f.type}),fileName:p});const g=t==="xlsx-mapping"?oG:sG;g=="xlsx_toolbox"&&window.appManager.hide(g)};return Jt(()=>{i=gJ({target:window,allowedOrigins:[rG()||zRe],onMessage:d,onInvalidMessage:(h,f,p)=>{console.warn("Rejected postMessage:",f,p.origin)}})}),Vn(()=>{i==null||i(),r.forEach(clearTimeout),r.clear()}),{openToolbox:u,sendBackErrorFile:c}},KRe={class:"header-name"},qRe={class:"description"},YRe={key:0,class:"error-message"},XRe={class:"dynamic"},ZRe={key:1,class:"choose-method-container"},JRe={key:3,class:"select-status-container"},QRe={key:4,class:"result-container"},eTe={key:5,class:"result-container"},tTe={key:0},nTe={key:3},aG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",oTe=20,sTe=Et(ot({__name:"PopupToolboxUploader",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=qt,s=q(()=>[1,2,6].includes(S.value)),r=q(()=>mv()),i=q(()=>({1:{title:`Create ${r.value} in bulk`,description:""},2:{title:"Select status",description:"Choose the starting status for the new work."},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},6:{title:`Create ${r.value} by count`,description:""},7:{title:"Creation in progress",description:"Work will be created in the background. Refresh to see updates."},8:{title:"Creation failed",description:""}})),a=["csv","xlsx","xls"],l=$({segments:[],count:0}),u=({data:_,count:M,template_flow_status_id:re})=>{l.value={segments:_,count:M,template_flow_status_id:re}},c=$(!1),d=async()=>{var _;if(!((_=v.value)!=null&&_.bulkCreate)){console.error("API services not available");return}c.value=!0;try{(await v.value.bulkCreate({workspaceId:f.workspaceId,entityId:f.entityId,payload:{...l.value,entity_id:f.entityId},filter:{}})).status===br.ACCEPTED&&(S.value=7,g("import-success"))}catch(M){H(M),S.value=8}finally{c.value=!1}},h={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},f=e,p=q(()=>mv()),g=n,{apiServices:v}=no(!1,f),y=1,b=$(),S=$(y),w=$(null),E=$(null),R=$(null),D=$(void 0),x=$(null),N=q(()=>i.value[S.value]),B=$(),A=()=>{var _;c.value||(w.value=null,S.value=y,E.value=null,R.value=null,O.value=null,x.value=null,(_=B.value)==null||_.clear(),D.value=void 0,l.value={segments:[],count:0})},P=()=>{S.value=6},k=()=>{var _;A(),(_=b.value)==null||_.hide()};Je([E,R],([_,M])=>{S.value===1&&_&&M&&(S.value=2)});const O=$(null),L=_=>Ss().getErrorMessageFromResponse(_),H=_=>{if(console.error(_),typeof _=="string"){O.value=_;return}const M=_.response,re=M==null?void 0:M.data,pe=L(re);O.value=pe??_.message},W=async(_,M)=>{var pe;if(!v.value||!f.workspaceId||!f.entityId){console.error("API services not available");return}j.value=!0;const re=new FormData;re.append("file",_),re.append("format",((pe=M??_.name)==null?void 0:pe.split(".").pop())??_.name.split(".").pop()??""),re.append("entity_id",f.entityId),re.append("template_flow_status_id",w.value??"");try{await v.value.addNewSceneViaImportFile(f.workspaceId,f.entityId,re),S.value=3,g("import-success")}catch(_e){console.error("Error uploading file:",_e),H(_e||"An unknown error occurred during file upload."),S.value=4}finally{j.value=!1}},{openToolbox:se,sendBackErrorFile:ie}=iG(({file:_,fileName:M,channel:re})=>{re==="xlsx-mapping"&&(R.value=_,D.value=M??_.name,S.value=2)}),Q=$(null),ne=async()=>{var _,M;S.value=6,await ft(),(M=(_=Q.value)==null?void 0:_.focus)==null||M.call(_)},Y=async()=>{try{const _=await z();se({template:_})}catch(_){console.error("Error opening toolbox:",_),Ss().showErrorNetMessage("Failed to open toolbox.")}},I=$(!1),z=async()=>{I.value=!0;const _=f.workspaceId,M=f.entityId;if(!_||!M||!v.value)return I.value=!1,Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const re=await v.value.downloadTemplate(_,M,!1);if(!re)throw new Error("No response from downloadTemplate API");return re}catch(re){return console.error("Error downloading template:",re),Promise.reject(re)}finally{I.value=!1}},ee=_=>{var pe;const M=((pe=_.name.split(".").pop())==null?void 0:pe.toLowerCase())??"",re=aG.split(",").map(_e=>_e.trim()).includes(_.type)||a.includes(M);return re||(console.error("Invalid file type:",_.type),Ss().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),re},me=async()=>{const _=document.createElement("input");_.type="file",_.accept=`${aG}, ${a.map(M=>`.${M}`).join(", ")}`,_.onchange=async()=>{var re;const M=(re=_.files)==null?void 0:re[0];if(M){if(!ee(M)){A();return}E.value=Xm(M);try{const pe=await z();if(!pe){Ss().addNotification({id:"failed-download-template",message:"Failed to download template file.",type:"error"});return}se({source:M,template:pe})}catch(pe){console.error("Error opening toolbox:",pe),Ss().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},_.click()},xe=async _=>{var M;if(!((M=v.value)!=null&&M.getAssignableStatuses)){console.error("API services not available");return}return v.value.getAssignableStatuses(f.workspaceId,{entity_id:f.entityId,name_like:_.name_like,page:_.page,per_page:oTe})},de=q(()=>{var _;return l.value.count==0||!((_=l.value.segments)!=null&&_.length)}),j=$(!1),oe=()=>{w.value=null,R.value&&D.value&&ie(R.value,D.value)},ae=()=>{w.value&&R.value&&W(R.value,D.value)};return t({open:()=>{var _;return(_=b.value)==null?void 0:_.show()},close:()=>{var _;return(_=b.value)==null?void 0:_.hide()},hideFirstStep:()=>{var _;S.value===1&&((_=b.value)==null||_.hide())}}),(_,M)=>(K(),We(V(SN),Kt({ref_key:"popupRef",ref:b,style:h,onHidden:A,preventEscape:c.value||j.value},{popupIndex:10,popupName:N.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Lh({header:Ce(()=>[be("span",KRe,at(N.value.title),1)]),default:Ce(()=>[be("div",{class:ce(["modal-body",{"bulk-count":S.value===6,"choose-method":S.value===1}])},[be("div",qRe,at(N.value.description),1),O.value&&S.value===4?(K(),he("div",YRe,[M[1]||(M[1]=tt(" Error code ",-1)),be("span",XRe,at(O.value),1)])):qe("",!0),S.value===1?(K(),he("div",ZRe,[ye(Aw,{disabled:!1,label:"Create by count",description:"Enter how many to create.",onOnClick:ne},{visual:Ce(()=>[ye(V(pa),{src:"CreateByCount",size:65})]),_:1}),ye(Aw,{disabled:!1,label:"Start with a blank sheet",description:`Type or paste ${r.value} details
|
|
253
253
|
into a table.`,onOnClick:Y},{visual:Ce(()=>[ye(V(pa),{src:"BlankSheet",size:65})]),_:1},8,["description"]),ye(Aw,{label:"Import from file",description:`Create ${r.value} from a CSV or
|
|
254
254
|
Excel file.`,onOnClick:me},{visual:Ce(()=>[ye(V(pa),{src:"UploadFile",size:65,"max-width":"65"})]),_:1},8,["description"])])):qe("",!0),S.value===6?(K(),We(V(iue),{key:2,ref_key:"bulkCreateCountRef",ref:Q,"get-status-func":xe,"workspace-id":f.workspaceId,"take-name":p.value,onChanged:u,"entity-id":f.entityId},null,8,["workspace-id","take-name","entity-id"])):S.value===2?(K(),he("div",JRe,[ye(V(KN),{modelValue:w.value,"onUpdate:modelValue":M[0]||(M[0]=re=>w.value=re),"get-status-func":xe,"workspace-id":f.workspaceId,id:f.entityId,style:{width:"100%"},"max-width":"372px",ref_key:"selectStatusRef",ref:B},null,8,["modelValue","workspace-id","id"])])):S.value===3||S.value===7?(K(),he("div",QRe,[ye(V(pa),{src:"Success",width:240,height:180,ratio:"unset"})])):S.value===4||S.value===8?(K(),he("div",eTe,[ye(V(pa),{src:"Failed",width:240,height:180,ratio:"unset"})])):qe("",!0)],2)]),_:2},[S.value===2||S.value===4||S.value===3||S.value===6||S.value===7||S.value===8?{name:"footer",fn:Ce(()=>[S.value==6?Ue((K(),he("div",tTe,[ye(V(bt),{variant:"primary",loading:c.value,disabled:de.value||c.value,onClick:d},{default:Ce(()=>[...M[2]||(M[2]=[tt(" Create ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:de.value?"Add a name or a counter first.":void 0,bypassOverflowCheck:!0}]]):qe("",!0),S.value===4||S.value===8?(K(),We(V(bt),{key:1,variant:"secondary",onClick:k},{default:Ce(()=>[...M[3]||(M[3]=[tt(" Close ",-1)])]),_:1})):S.value===3?(K(),We(V(bt),{key:2,variant:"secondary",onClick:k},{default:Ce(()=>[...M[4]||(M[4]=[tt(" Got it ",-1)])]),_:1})):qe("",!0),S.value===2?Ue((K(),he("div",nTe,[ye(V(bt),{loading:j.value,disabled:j.value||!w.value,onClick:ae},{default:Ce(()=>[...M[5]||(M[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:j.value||!w.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):qe("",!0),S.value===4?(K(),We(V(bt),{key:4,onClick:oe},{default:Ce(()=>[...M[6]||(M[6]=[tt(" Try Again ",-1)])]),_:1})):qe("",!0),S.value===8?(K(),We(V(bt),{key:5,onClick:P},{default:Ce(()=>[...M[7]||(M[7]=[tt("Try Again",-1)])]),_:1})):qe("",!0),S.value===7?(K(),We(V(bt),{key:6,onClick:k,variant:"secondary"},{default:Ce(()=>[...M[8]||(M[8]=[tt(" Got it ",-1)])]),_:1})):qe("",!0)]),key:"0"}:void 0]),1040,["preventEscape"]))}}),[["__scopeId","data-v-67102243"]]),rTe={class:"header-name"},iTe={class:"modal-body"},aTe={class:"description"},lTe={key:0,class:"error-message"},uTe={class:"dynamic"},cTe={key:1,class:"choose-method-container"},dTe={key:2,class:"result-container"},hTe={key:3,class:"result-container"},fTe={key:2},lG="text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",pTe=Et(ot({__name:"PopupBulkUpdate",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const o=qt,s=q(()=>[1,2].includes(f.value)),r=q(()=>mv()),i=q(()=>({1:{title:`Update ${r.value} in bulk`,description:""},2:{title:`Update ${r.value} in bulk`,description:""},3:{title:"Import successful",description:"Work will be created in background. Refresh to see updates."},4:{title:"Import failed",description:"Some data doesn't meet the requirements. Review it and try again."},5:{title:"Waiting for Toolbox",description:"Waiting for Toolbox"}})),a={"--popup-pt":"20px","--popup-pb":"20px","--popup-pl":"24px","--popup-pr":"24px"},l=e,u=n,{apiServices:c}=no(!1,l),d=1,h=$(),f=$(d),p=$(null),g=$(null),v=$(null),y=$(void 0),b=$(null),S=q(()=>i.value[f.value]),w=$(),E=()=>{var ie;p.value=null,f.value=d,g.value=null,v.value=null,R.value=null,b.value=null,(ie=w.value)==null||ie.clear(),y.value=void 0};Je([g,v],([ie,Q])=>{f.value===1&&ie&&Q&&(f.value=2)});const R=$(null),D=ie=>Ss().getErrorMessageFromResponse(ie),x=ie=>{if(typeof ie=="string"){R.value=ie;return}const Q=ie.response,ne=Q==null?void 0:Q.data,Y=D(ne);R.value=Y??ie.message,console.log("Error message set to:",{errorMsg:Y,message:ie})},N=async(ie,Q)=>{var I;H.value=!0;const ne=new FormData,Y=((I=ie.name.split(".").pop())==null?void 0:I.toString())||"";if(ne.append("file",ie),ne.append("format",Y),ne.append("entity_id",l.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(l.workspaceId,l.entityId,ne),f.value=3,u("import-success")}catch(z){console.error("Error uploading file:",z),x(z),f.value=4}finally{H.value=!1,window.appManager.hide("feedback_lockup_toolbox")}},{openToolbox:B,sendBackErrorFile:A}=iG(({file:ie,fileName:Q,channel:ne})=>{ne==="feedback-merge"&&(v.value=ie,y.value=Q??ie.name,N(ie))},"feedback-merge"),P=$(!1),k=async()=>{P.value=!0;const ie=l.workspaceId,Q=l.entityId;if(!ie||!Q||!c.value)return console.error("Workspace ID or Entity ID is missing"),Promise.reject(new Error("Workspace ID or Entity ID is missing"));try{const ne=await c.value.downloadExportedItemsFile(ie,Q,!1);if(!ne)throw new Error("No response from downloadTemplate API");return ne}catch(ne){return console.error("Error downloading template:",ne),Promise.reject(ne)}finally{P.value=!1}},O=ie=>{const Q=lG.includes(ie.type);return Q||(console.error("Invalid file type:",ie.type),Ss().addNotification({id:"invalid-file-type",message:"Invalid file type. Please upload a xlsx, xls, csv file.",type:"error"})),Q},L=async()=>{const ie=document.createElement("input");ie.type="file",ie.accept=lG,ie.onchange=async()=>{var ne;const Q=(ne=ie.files)==null?void 0:ne[0];if(Q){if(!O(Q)){E();return}g.value=Xm(Q);try{const Y=await k();if(!Y){Ss().addNotification({id:"failed-download-template",message:"Failed to download file.",type:"error"});return}B({exportFile:Y,feedbackFile:Q})}catch(Y){console.error("Error opening toolbox:",Y),Ss().addNotification({id:"failed-open-toolbox",message:"Failed to open toolbox.",type:"error"})}}},ie.click()},H=$(!1),W=()=>{p.value=null,v.value&&y.value&&A(v.value,y.value)},se=()=>{p.value&&v.value&&(H.value=!0,N(v.value,y.value).finally(()=>{H.value=!1}))};return t({open:()=>{var ie;return(ie=h.value)==null?void 0:ie.show()},close:()=>{var ie;return(ie=h.value)==null?void 0:ie.hide()},hideFirstStep:()=>{var ie;f.value===1&&((ie=h.value)==null||ie.hide())}}),(ie,Q)=>(K(),We(V(SN),Kt({ref_key:"popupRef",ref:h,style:a,onHidden:E},{popupIndex:10,popupName:S.value.title,minWidth:"420px",showOverlay:!0,overlayOpacity:.5,closeOnOverlayClick:!1,closeOnEscape:!0,showCloseBtn:s.value}),Lh({header:Ce(()=>[be("span",rTe,at(S.value.title),1)]),default:Ce(()=>[be("div",iTe,[be("div",aTe,at(S.value.description),1),R.value&&f.value===4?(K(),he("div",lTe,[Q[2]||(Q[2]=tt(" Error code ",-1)),be("span",uTe,at(R.value),1)])):qe("",!0),f.value===1?(K(),he("div",cTe,[ye(Aw,{disabled:!1,label:"Import from file",description:`Update ${r.value} from a CSV or Excel file.`,onOnClick:L,style:{width:"100%"}},{visual:Ce(()=>[ye(V(pa),{src:"UploadFile",size:65})]),_:1},8,["description"])])):f.value===3?(K(),he("div",dTe,[ye(V(pa),{src:"Success",width:240,height:180,ratio:"unset"})])):f.value===4?(K(),he("div",hTe,[ye(V(pa),{src:"Failed",width:240,height:180,ratio:"unset"})])):qe("",!0)])]),_:2},[f.value===4||f.value===3?{name:"footer",fn:Ce(()=>[f.value===4?(K(),We(V(bt),{key:0,variant:"secondary",onClick:Q[0]||(Q[0]=()=>{var ne;E(),(ne=h.value)==null||ne.hide()})},{default:Ce(()=>[...Q[3]||(Q[3]=[tt(" Close ",-1)])]),_:1})):f.value===3?(K(),We(V(bt),{key:1,variant:"secondary",onClick:Q[1]||(Q[1]=()=>{var ne;E(),(ne=h.value)==null||ne.hide()})},{default:Ce(()=>[...Q[4]||(Q[4]=[tt(" Got it ",-1)])]),_:1})):qe("",!0),f.value===2?Ue((K(),he("div",fTe,[ye(V(bt),{loading:H.value,disabled:H.value||!p.value,onClick:se},{default:Ce(()=>[...Q[5]||(Q[5]=[tt(" Import ",-1)])]),_:1},8,["loading","disabled"])])),[[V(o),{content:H.value||!p.value?"Select a status first":void 0,bypassOverflowCheck:!0}]]):qe("",!0),f.value===4?(K(),We(V(bt),{key:3,onClick:W},{default:Ce(()=>[...Q[6]||(Q[6]=[tt(" Try Again ",-1)])]),_:1})):qe("",!0)]),key:"0"}:void 0]),1040))}}),[["__scopeId","data-v-f3131e7b"]]),gTe=Et(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=Vs,o=eE(),{setUserPermissions:s,setEntityPermissions:r}=o,{entityPermissions:i}=go(o),a=qt,l=Do,u=Mv(),{entityData:c}=go(u),d={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},h=$(""),f=q(()=>{var je;const Ae=((je=i.value)==null?void 0:je.has_create_item_permission)==1||!1;return[{label:"Create in bulk",value:"import_scenes",type:"text",id:"import_scenes_option",hide:!Ae},{label:"Update in bulk",value:"bulk_update",type:"text",hide:!Ae,id:"bulk_update_option"}]}),p=e;wp.initialize({wrapVueCellRenderer:Ey,wrapVueCellEditor:kV});const g=md(),{switchInstanceFunc:v}=go(g);Jt(()=>{const Ae=Go();v.value=Ae==null?void 0:Ae.appContext.config.globalProperties.switchInstance;const je=new BroadcastChannel("focusable_channel");ft(()=>{setTimeout(()=>{je.postMessage("Focusable elements updated")},7e3)})});const y=$(null),b=$([]),S=Vf(),{rowCount:w}=go(S),E=$(!1),R=$(""),D=$(),x=JO(),{metricList:N}=go(x),B=$(""),A=$(!1),P=$(new Set),k=$(new Map),{apiServices:O}=no(!1,p),{columnDefs:L,checkboxColumn:H,saveColumnConfig:W}=kRe(N,p.entityId,y),se=$();Je(()=>L,()=>{var Ae;(Ae=se.value)==null||Ae.updateColumnDefs(L.value)},{deep:!0});const ie=(Ae,je)=>{W(Ae,je)},{updateRowData:Q,setMetricValues:ne}=MRe(y),Y=q(()=>({isSearching:R.value.length>0,isFiltering:!(Object.keys(U.value||{}).length==1&&Object.keys(U.value)[0]=="preflight_status")&&Object.keys(U.value||{}).length>0})),I=q(pv),z=q(()=>L.value.filter(Ae=>{var je;return((je=Ae.field)==null?void 0:je.startsWith("metric_"))&&!Ae.hide}).map(Ae=>{var je;return((je=Ae.field)==null?void 0:je.replace("metric_",""))||""}));ri("timezone",I);const ee=q(()=>({autoFetch:!1,workspaceId:p.workspaceId,entityId:p.entityId,metricIds:z.value,updateItemData:Q,setMetricValues:ne})),{fetchItems:me,getMetricList:xe,cusorMap:de,getMetricValues:j}=ORe(ee),oe=q(()=>{if(!y.value)return!1;const Ae=y.value.getSelectedRows().length;return Ae>0&&Ae>=w.value.total}),ae=q(()=>{var Ae;return((Ae=c.value)==null?void 0:Ae.name)||"Items"}),_=Ae=>{setTimeout(()=>{ft(()=>{var je,Mt;y.value&&(Ae?(je=y.value)==null||je.showNoRowsOverlay():(Mt=y.value)==null||Mt.hideOverlay())})},500)},M=(Ae,je)=>{var Mt;w.value.total=Ae.meta.total??0,(Mt=Ae.meta.next)!=null&&Mt.cursor&&(de[je+1]=Ae.meta.next.cursor),B.value=Ae.meta["X-Tsr-signature"]||"",Ae.meta.total===0?_(!0):_(!1)},re=dE(),{setDefaultSort:pe}=re,_e=$(null),{sortingAPIConfiguration:we,isSortingRunning:X}=go(re),U=$({preflight_status:"1"}),te=q(()=>({...U.value,search:R.value}));ri("filterParams",te);const le=$([]),Ye=q(()=>{var Ae;return((Ae=c.value)==null?void 0:Ae.name)||"Items"}),Be=async({page:Ae,pageSize:je,filterText:Mt})=>{var uo,qo,ks;(uo=y.value)==null||uo.hideOverlay();const Vt=de[Ae],bo=!Vt&&Ae>1?(Ae-1)*je:void 0,Yn=we.value;Yn.length>0&&(X.value=!0);try{const hc={cursor:Vt,size:je,searchQuery:Mt,offset:bo,sort_by:Yn,...U.value},zl=await me(hc);if(!zl)return{rows:[],total:0};const Ki=(ks=(qo=zl.meta)==null?void 0:qo.extra)==null?void 0:ks.default_sort;Ki&&pe(Ki);const fh=(Iw=>{const nn=Iw.data.map(fc=>cO(fc,I.value,Ye.value));return nn.forEach(fc=>{P.value.add(String(fc.id)),k.value.set(String(fc.id),{})}),nn})(zl);return M(zl,Ae),{rows:fh,total:w.value.total}}catch(hc){return console.error("Failed to fetch items:",hc),{rows:[],total:0}}finally{X.value=!1}},{isLoading:ze,toggleSidebar:Oe,onGridReady:nt,handleUnSelect:Ze,handleSelectAll:Te,onSearch:He,firstLoad:_t}=LRe({selectRowData:$([]),isSidebarOpen:E,quickFilterText:R,gridApi:y,perPage:d.ROWS_PER_PAGE,fetcher:Be}),Lt=$([]),Yt=vr(()=>{var Yn;const Ae=((Yn=y.value)==null?void 0:Yn.getSelectedRows())||[],je=new Map(Ae.map(uo=>[uo.id,uo])),bo=Ae.map(uo=>uo.id).map(uo=>{var qo,ks;return[uo,(ks=(qo=y.value)==null?void 0:qo.getRowNode(uo))==null?void 0:ks.rowIndex]}).sort((uo,qo)=>(uo[1]??0)-(qo[1]??0)).map(([uo])=>je.get(uo));Lt.value=bo.filter(uo=>uo!==void 0)}),Mn=Po({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),Ne=q(()=>({blockLoadDebounceMillis:1e3,columnDefs:L.value,rowModelType:"infinite",cacheBlockSize:d.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:d.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:d.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ve,noRowsOverlayComponent:Ey(zse),noRowsOverlayComponentParams:()=>Y.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:Ae=>Ae.data.id,rowClassRules:{"row-deleted":Ae=>{var je;return(je=Ae.data)==null?void 0:je.isDeleted},"row-locked":Ae=>{var je;return(je=Ae.data)==null?void 0:je.isLocked},"row-archived":Ae=>{var je;return(je=Ae.data)==null?void 0:je.isArchived},"row-process-locked":Ae=>{var je,Mt;return((Mt=(je=Ae.data)==null?void 0:je.isProcessing)==null?void 0:Mt.state)==0},"row-inactive":Ae=>{var je;return!((je=Ae.data)!=null&&je.id)},"row-empty":Ae=>!Ae.data},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:p.workspaceId,entityId:p.entityId,apiServices:O.value,sorting:X.value},onCellKeyDown:Ae=>{var je,Mt,Vt;if(Ae.data.isDeleted)return!1;if(((je=Ae==null?void 0:Ae.event)==null?void 0:je.key)==="Enter"){const{api:bo,node:Yn,column:uo}=Ae,qo=bo.getCellRendererInstances({rowNodes:[Yn],columns:[uo]});if(qo.length>0){const ks=qo[0];ks&&typeof((Mt=ks.componsenExposed)==null?void 0:Mt.focus)=="function"&&((Vt=ks.componsenExposed)==null||Vt.focus())}}},isRowSelectable:Ae=>{var je,Mt;return!Ae.group&&((Mt=(je=Ae.data)==null?void 0:je.isProcessing)==null?void 0:Mt.state)!=0},suppressKeyboardEvent:Ae=>{var Vt;if((Vt=Ae.data)!=null&&Vt.isDeleted)return!0;const je=Ae.event.key,Mt=Ae.editing;return Mt&&je==="Tab"?!0:Mt&&je==="Enter"?!1:je==="Enter"?(Ae.event.preventDefault(),Ae.event.stopPropagation(),!0):je==="ArrowUp"||je==="ArrowDown"||je==="ArrowLeft"||je==="ArrowRight"||je==="Tab"||je==="Enter"},navigateToNextCell:()=>null,onBodyScroll:Ae=>{const je=Ae.api.getFirstDisplayedRowIndex(),Mt=Ae.api.getLastDisplayedRowIndex();Mn.rowsDisplay.fromIndex=je,Mn.rowsDisplay.toIndex=Mt,Mn.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(Vt=>Vt.getColId())},onViewportChanged:Ae=>{Mn.columnsDisplay=Ae.api.getAllDisplayedVirtualColumns().map(je=>je.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(Ae){if(Ae.data.isDeleted&&Ae.api.stopEditing(),Ae.colDef.field=="options"){const je=Ae.api.getCellRendererInstances({rowNodes:[Ae.node],columns:[Ae.column]});je.length>0&&je[0].focusUi()}},tabToNextCell:Ae=>{let je=Ae.nextCellPosition;if(je&&je.column.getColId()==="ag-Grid-SelectionColumn"){const Mt=Ae.api.getAllDisplayedColumns(),Vt=Mt.indexOf(je.column),bo=Ae.backwards?-1:1,Yn=Mt[Vt+bo];if(Yn)return{rowIndex:je.rowIndex,column:Yn,rowPinned:je.rowPinned}}return je}}));function Ve(){if(!y.value)return;let Ae=0;y.value.forEachNode(je=>{je.data&&Ae++}),w.value.loaded=Math.min(Ae,w.value.total)}Je(()=>we,()=>{y.value&&(B.value="",P.value.clear(),y.value.deselectAll(),Object.keys(de).forEach(Ae=>delete de[Number(Ae)]),y.value.purgeInfiniteCache(),y.value.ensureIndexVisible(0))},{deep:!0});const Rt=$(),jt=$(),Xt=()=>{ps.showPopupBulkUpdate=!0,ft(()=>{var Ae;(Ae=jt.value)==null||Ae.open()})},st=()=>{ps.showPopupToolboxUploader=!0,ft(()=>{var Ae;(Ae=Rt.value)==null||Ae.open()})},lo=$(!1),Qr=async()=>{if(O.value)try{lo.value=!0;const Ae=await O.value.downloadExportedItemsFile(p.workspaceId,p.entityId)}catch(Ae){console.error("Failed to download exported items file:",Ae)}finally{lo.value=!1}},Js=async()=>{_t.value=!0,y.value&&(B.value="",P.value.clear(),Object.keys(de).forEach(Ae=>delete de[Number(Ae)]),await y.value.deselectAll(),await y.value.ensureIndexVisible(0,"top"),await y.value.purgeInfiniteCache(),await y.value.refreshInfiniteCache())},Fr=q(()=>ln.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),$i=$();q(()=>{var Ae;return(Ae=BRe(Fr.value))==null?void 0:Ae.map(je=>`<div>• ${je}</div>`).join(`
|
|
255
|
-
`)});function Hi(Ae){var je;Ae==="new_scene"?(je=$i.value)==null||je.show():Ae==="import_scenes"?st():Ae==="overwrite_scenes"?openPopupOverwriteScenes():Ae==="bulk_update"&&Xt()}const Gi=Ae=>{b.value=Ae.api.getSelectedRows().map(je=>je.id)},Ui=Ae=>{const je=nt(Ae);return je&&(je.addEventListener("modelUpdated",Ve),je.addEventListener("bodyScroll",()=>je.stopEditing()),je.addEventListener("selectionChanged",Yt),je.addEventListener("columnMoved",Vt=>ie(Vt,!0)),je.addEventListener("columnResized",Vt=>ie(Vt,!0)),je.addEventListener("firstDataRendered",()=>{_t.value=!1}),!document.querySelector(".ag-body-viewport"))||Ae==null||Ae.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),je},Ps=()=>{var Ae;h.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};Jt(()=>{ft(()=>{Ps()}),window.addEventListener("resize",Ps);function Ae(){requestAnimationFrame(Ae)}Ae()}),Vn(()=>{window.removeEventListener("resize",Ps)});const Wi=async({code:Ae,name:je})=>{await He(Ae),setTimeout(()=>{var Mt;(Mt=D.value)==null||Mt.setValue(je)},300)},uh=Ae=>{if(!y.value)return;const je=y.value.getRowNode(Ae);je?(y.value.ensureIndexVisible(Number(je.rowIndex),"middle"),y.value.flashCells({rowNodes:[je],flashDuration:3e3,fadeDuration:1e3})):y.value.ensureIndexVisible(w.value.total-1,"bottom")},Nn=Ae=>Ae.metric_type.code==="number"?"number":"default",Co=async()=>{if(p.entityId)try{const Ae=await xe(p.entityId);N.value=Ae.data.map(je=>({...je,sortType:Nn(je)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),N.value=[]}},oT=async()=>{if(O.value)try{const Ae=await O.value.getUserPermission(p.workspaceId);s(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},ch=async()=>{if(O.value)try{const Ae=await O.value.getEntityDetail(p.workspaceId,p.entityId);r(Ae.permission),c.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},dc=hy(),{setUser:dh}=dc,sT=async()=>{if(O.value)try{const Ae=await O.value.getMe();return dh(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},zi=async()=>{var Ae;if(O.value)try{const je=await O.value.getWorkspaces(p.workspaceId),Mt=(Ae=je.data[0])==null?void 0:Ae.ws_user_role_id;return Mt&&dc.setUserRoleId(Mt),je}catch(je){console.error("Failed to fetch workspace details:",je)}};Je(()=>[p.entityId,p.workspaceId],async([Ae,je])=>{!Ae||!je||(sT(),zi(),Co(),oT(),ch())},{immediate:!0,deep:!0}),Je(z,(Ae,je)=>{const Mt=Ae.filter(Vt=>!(je!=null&&je.includes(Vt)));Mt.length>0&&j(Array.from(P.value),Mt).then(Vt=>{ne(Vt,P.value,Mt)})},{immediate:!0,deep:!0}),Je(B,(Ae,je)=>{A.value=!!(je&&Ae&&je!==Ae)}),t({refreshTable:Js});const Wl=Ae=>{U.value=Ae,Js()},ji=Ae=>{le.value=Ae,Js()},hh=Ae=>{L.value=Ae||[],ie({},!0)},rT=q(()=>{var Vt;const Ae=ln.getInstance().getItem("ws.terminology"),je=Ae?JSON.parse(Ae):null;return`New ${((Vt=je==null?void 0:je.find(bo=>bo.code==="scene"))==null?void 0:Vt.name)||"Scene"}`}),ps=Po({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),og=Ae=>{var bo,Yn;const je=Ae.data,{action:Mt,type:Vt}=je;console.log("App loader close event received:",je),Mt=="APP_LOADER:HIDE"&&(Vt==="xlsx_toolbox"||Vt==="feedback_lockup_toolbox")&&((bo=Rt.value)==null||bo.hideFirstStep(),(Yn=jt.value)==null||Yn.hideFirstStep())};return Jt(()=>{window.addEventListener("message",og)}),Vn(()=>{window.removeEventListener("message",og)}),(Ae,je)=>(K(),We(V(Loe),{"is-sidebar-open":E.value,onCloseSidebar:V(Oe),onSidebarClear:V(Oe),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Oe)},{"header-left":Ce(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(K(),We(V(YE),{key:0,variant:["primary"],options:f.value,onSelect:Hi,onHandleClick:je[1]||(je[1]=Vt=>Hi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:Ce(()=>[Ue(ye(V(bt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:je[0]||(je[0]=Vt=>Hi("new_scene")),label:rT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):qe("",!0)]}),"header-actions":Ce(()=>[ye(V(Pre),{"onUpdate:assignees":ji,onApplyFilter:Wl,loading:V(_t),entityId:p.entityId},null,8,["loading","entityId"]),Ue(ye(V(wE),{focusIndex:"4",modelValue:R.value,"onUpdate:modelValue":je[2]||(je[2]=Mt=>R.value=Mt),onSearch:V(He),class:ce(Ae.$style.itemSearchBox),onClear:je[3]||(je[3]=Mt=>V(He)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue((K(),We(V(jO),{status:V(ze)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":A.value},{default:Ce(()=>[Ue((K(),We(V(bt),{variant:["secondary","icon"],disabled:V(ze),onClick:Js},{default:Ce(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue((K(),We(V(bt),{variant:["secondary","icon"],onClick:Qr,disabled:lo.value,loading:lo.value},{default:Ce(()=>[ye(V(gt),{src:"Download"})]),_:1},8,["disabled","loading"])),[[V(a),"Download"],[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue(ye(V(Gse),{"model-value":V(L),onChange:je[4]||(je[4]=Mt=>hh(Mt)),id:"table_customization",gridApi:y.value,ref_key:"tableCustomizationRef",ref:se,"checkbox-column":V(H),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(_t),fullwidth:!0}]])]),grid:Ce(({availableHeight:Mt})=>[ye(V(TRe),Kt({id:"item_table_main",ref_key:"agGrid",ref:_e},Ne.value,{height:Mt+"px",isSorting:V(X),onOnGridReady:Ui,onSelectionChanged:Gi}),null,16,["height","isSorting"])]),footer:Ce(()=>[be("div",{class:ce(Ae.$style.tableFooter),id:"table_footer"},[be("span",null,[je[7]||(je[7]=tt(" Showing ",-1)),be("b",null,at(V(w).loaded)+" of "+at(V(w).total),1)])],2)]),"new-row":Ce(()=>[ye(V(ure),{ref_key:"createNewSceneRef",ref:$i,onSearchForCode:Wi,onFocusOnId:uh},null,512)]),"bulk-update-actions":Ce(()=>[!E.value&&b.value.length>0?Ue((K(),We(V(Aoe),{key:0,selectRowData:Lt.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":y.value,onUnselect:V(Ze),onSelectAll:V(Te),"take-name":ae.value,"selected-all":oe.value,"total-rows":V(w).total,"visible-rows":V(w).loaded,onUpdated:V(Yt),loading:V(ze),onRefreshSelectedRow:V(Yt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[lr,!E.value&&b.value.length>0]]):qe("",!0)]),snackbar:Ce(()=>[ye(V(Zoe))]),popup:Ce(()=>[ps.showPopupToolboxUploader?(K(),We(sTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:je[5]||(je[5]=Mt=>ps.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):qe("",!0),ps.showPopupBulkUpdate?(K(),We(pTe,{key:1,ref_key:"popupBulkUpdateRef",ref:jt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:je[6]||(je[6]=Mt=>ps.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):qe("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),uG="0.1.257",mTe={key:0},vTe=Et(ot({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Po({id:"",workspaceId:"",apiConfig:{}}),o=Ss(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=ln.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Ug(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",uG);try{if(l.value=Go(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||ln.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:ln.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new lN(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=q(()=>n.id),d=q(()=>n.workspaceId);return ri("workspaceId",d),ri("entityId",c),(h,f)=>(K(),he("div",{class:ce(h.$style.dashboardPluginWrapper)},[t.value?(K(),he("span",mTe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(K(),We(V(gTe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):qe("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),nT=async(e={},t={})=>{const n=nx(vTe),o=R6();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${uG}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",qt),n.directive("focusable",Do);const i=await Mle();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=nT),Ln.default=nT,Ln.initDashboard=nT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
255
|
+
`)});function Hi(Ae){var je;Ae==="new_scene"?(je=$i.value)==null||je.show():Ae==="import_scenes"?st():Ae==="overwrite_scenes"?openPopupOverwriteScenes():Ae==="bulk_update"&&Xt()}const Gi=Ae=>{b.value=Ae.api.getSelectedRows().map(je=>je.id)},Ui=Ae=>{const je=nt(Ae);return je&&(je.addEventListener("modelUpdated",Ve),je.addEventListener("bodyScroll",()=>je.stopEditing()),je.addEventListener("selectionChanged",Yt),je.addEventListener("columnMoved",Vt=>ie(Vt,!0)),je.addEventListener("columnResized",Vt=>ie(Vt,!0)),je.addEventListener("firstDataRendered",()=>{_t.value=!1}),!document.querySelector(".ag-body-viewport"))||Ae==null||Ae.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),je},Ps=()=>{var Ae;h.value=(((Ae=document.getElementById("item-table-layout-id"))==null?void 0:Ae.clientHeight)??0)-78+"px"};Jt(()=>{ft(()=>{Ps()}),window.addEventListener("resize",Ps);function Ae(){requestAnimationFrame(Ae)}Ae()}),Vn(()=>{window.removeEventListener("resize",Ps)});const Wi=async({code:Ae,name:je})=>{await He(Ae),setTimeout(()=>{var Mt;(Mt=D.value)==null||Mt.setValue(je)},300)},uh=Ae=>{if(!y.value)return;const je=y.value.getRowNode(Ae);je?(y.value.ensureIndexVisible(Number(je.rowIndex),"middle"),y.value.flashCells({rowNodes:[je],flashDuration:3e3,fadeDuration:1e3})):y.value.ensureIndexVisible(w.value.total-1,"bottom")},Nn=Ae=>Ae.metric_type.code==="number"?"number":"default",Co=async()=>{if(p.entityId)try{const Ae=await xe(p.entityId);N.value=Ae.data.map(je=>({...je,sortType:Nn(je)}))}catch(Ae){console.error("Failed to initialize metric list:",Ae),N.value=[]}},oT=async()=>{if(O.value)try{const Ae=await O.value.getUserPermission(p.workspaceId);s(Ae)}catch(Ae){console.error("Failed to fetch user permissions:",Ae)}},ch=async()=>{if(O.value)try{const Ae=await O.value.getEntityDetail(p.workspaceId,p.entityId);r(Ae.permission),c.value=Ae}catch(Ae){console.error("Failed to fetch entity details:",Ae)}},dc=hy(),{setUser:dh}=dc,sT=async()=>{if(O.value)try{const Ae=await O.value.getMe();return dh(Ae),Ae}catch(Ae){console.error("Failed to fetch user details:",Ae)}},zi=async()=>{var Ae;if(O.value)try{const je=await O.value.getWorkspaces(p.workspaceId),Mt=(Ae=je.data[0])==null?void 0:Ae.ws_user_role_id;return Mt&&dc.setUserRoleId(Mt),je}catch(je){console.error("Failed to fetch workspace details:",je)}};Je(()=>[p.entityId,p.workspaceId],async([Ae,je])=>{!Ae||!je||(sT(),zi(),Co(),oT(),ch())},{immediate:!0,deep:!0}),Je(z,(Ae,je)=>{const Mt=Ae.filter(Vt=>!(je!=null&&je.includes(Vt)));Mt.length>0&&j(Array.from(P.value),Mt).then(Vt=>{ne(Vt,P.value,Mt)})},{immediate:!0,deep:!0}),Je(B,(Ae,je)=>{A.value=!!(je&&Ae&&je!==Ae)}),t({refreshTable:Js});const Wl=Ae=>{U.value=Ae,Js()},ji=Ae=>{le.value=Ae,Js()},hh=Ae=>{L.value=Ae||[],ie({},!0)},rT=q(()=>{var Vt;const Ae=ln.getInstance().getItem("ws.terminology"),je=Ae?JSON.parse(Ae):null;return`New ${((Vt=je==null?void 0:je.find(bo=>bo.code==="scene"))==null?void 0:Vt.name)||"Scene"}`}),ps=Po({showPopupBulkUpdate:!1,showPopupToolboxUploader:!1,showPopupSceneCreator:!1,showPopupItemDetails:!1,showPopupOverwriteScenes:!1}),og=Ae=>{var bo,Yn;const je=Ae.data,{action:Mt,type:Vt}=je;console.log("App loader close event received:",je),Mt=="APP_LOADER:HIDE"&&(Vt==="xlsx_toolbox"||Vt==="feedback_lockup_toolbox")&&((bo=Rt.value)==null||bo.hideFirstStep(),(Yn=jt.value)==null||Yn.hideFirstStep())};return Jt(()=>{window.addEventListener("message",og)}),Vn(()=>{window.removeEventListener("message",og)}),(Ae,je)=>(K(),We(V(Loe),{"is-sidebar-open":E.value,onCloseSidebar:V(Oe),onSidebarClear:V(Oe),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:V(Oe)},{"header-left":Ce(()=>{var Mt;return[((Mt=V(i))==null?void 0:Mt.has_create_item_permission)==1?(K(),We(V(YE),{key:0,variant:["primary"],options:f.value,onSelect:Hi,onHandleClick:je[1]||(je[1]=Vt=>Hi("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:Ce(()=>[Ue(ye(V(bt),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:je[0]||(je[0]=Vt=>Hi("new_scene")),label:rT.value},null,8,["label"]),[[V(l),1]])]),_:1},8,["options"])):qe("",!0)]}),"header-actions":Ce(()=>[ye(V(Pre),{"onUpdate:assignees":ji,onApplyFilter:Wl,loading:V(_t),entityId:p.entityId},null,8,["loading","entityId"]),Ue(ye(V(wE),{focusIndex:"4",modelValue:R.value,"onUpdate:modelValue":je[2]||(je[2]=Mt=>R.value=Mt),onSearch:V(He),class:ce(Ae.$style.itemSearchBox),onClear:je[3]||(je[3]=Mt=>V(He)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue((K(),We(V(jO),{status:V(ze)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":A.value},{default:Ce(()=>[Ue((K(),We(V(bt),{variant:["secondary","icon"],disabled:V(ze),onClick:Js},{default:Ce(()=>[ye(V(gt),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[V(l),5],[V(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue((K(),We(V(bt),{variant:["secondary","icon"],onClick:Qr,disabled:lo.value,loading:lo.value},{default:Ce(()=>[ye(V(gt),{src:"Download"})]),_:1},8,["disabled","loading"])),[[V(a),"Download"],[V(n),{isLoading:V(_t),fullwidth:!0}]]),Ue(ye(V(Gse),{"model-value":V(L),onChange:je[4]||(je[4]=Mt=>hh(Mt)),id:"table_customization",gridApi:y.value,ref_key:"tableCustomizationRef",ref:se,"checkbox-column":V(H),tableHeight:h.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[V(n),{isLoading:V(_t),fullwidth:!0}]])]),grid:Ce(({availableHeight:Mt})=>[ye(V(TRe),Kt({id:"item_table_main",ref_key:"agGrid",ref:_e},Ne.value,{height:Mt+"px",isSorting:V(X),onOnGridReady:Ui,onSelectionChanged:Gi}),null,16,["height","isSorting"])]),footer:Ce(()=>[be("div",{class:ce(Ae.$style.tableFooter),id:"table_footer"},[be("span",null,[je[7]||(je[7]=tt(" Showing ",-1)),be("b",null,at(V(w).loaded)+" of "+at(V(w).total),1)])],2)]),"new-row":Ce(()=>[ye(V(ure),{ref_key:"createNewSceneRef",ref:$i,onSearchForCode:Wi,onFocusOnId:uh},null,512)]),"bulk-update-actions":Ce(()=>[!E.value&&b.value.length>0?Ue((K(),We(V(Aoe),{key:0,selectRowData:Lt.value,"workspace-id":p.workspaceId,"entity-id":p.entityId,"grid-api":y.value,onUnselect:V(Ze),onSelectAll:V(Te),"take-name":ae.value,"selected-all":oe.value,"total-rows":V(w).total,"visible-rows":V(w).loaded,onUpdated:V(Yt),loading:V(ze),onRefreshSelectedRow:V(Yt)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","onUpdated","loading","onRefreshSelectedRow"])),[[lr,!E.value&&b.value.length>0]]):qe("",!0)]),snackbar:Ce(()=>[ye(V(Zoe))]),popup:Ce(()=>[ps.showPopupToolboxUploader?(K(),We(sTe,{key:0,ref_key:"popupToolboxUploaderRef",ref:Rt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:je[5]||(je[5]=Mt=>ps.showPopupToolboxUploader=!1)},null,8,["workspace-id","entity-id"])):qe("",!0),ps.showPopupBulkUpdate?(K(),We(pTe,{key:1,ref_key:"popupBulkUpdateRef",ref:jt,"workspace-id":p.workspaceId,"entity-id":p.entityId,onImportSuccess:Js,onHide:je[6]||(je[6]=Mt=>ps.showPopupBulkUpdate=!1)},null,8,["workspace-id","entity-id"])):qe("",!0)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),uG="0.1.258",mTe={key:0},vTe=Et(ot({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Po({id:"",workspaceId:"",apiConfig:{}}),o=Ss(),{showMessage:s,showErrorNetMessage:r}=o,i=["basicInfor","importItems"],a=h=>{h.success?s(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=$(null),u=()=>{const h=ln.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};Ug(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",uG);try{if(l.value=Go(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||ln.getInstance().getItem("ws.code");const g={domainApi:u(),wsCode:ln.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new lN(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),Vn(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const c=q(()=>n.id),d=q(()=>n.workspaceId);return ri("workspaceId",d),ri("entityId",c),(h,f)=>(K(),he("div",{class:ce(h.$style.dashboardPluginWrapper)},[t.value?(K(),he("span",mTe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):c.value?(K(),We(V(gTe),{key:1,entityId:c.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):qe("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),nT=async(e={},t={})=>{const n=nx(vTe),o=R6();n.use(o);const s=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,s.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,u)=>{console.error("[Vue Error]",a),u&&console.error("[Info]",u)},console.log(`%cArbo Dashboard Plugin v${uG}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",qt),n.directive("focusable",Do);const i=await Mle();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=nT),Ln.default=nT,Ln.initDashboard=nT,Object.defineProperties(Ln,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|